All - Activity - jannotti - Algorand
Which protocol steps have TEAL execution?
I’ll try to answer, but I’m not sure I follow your questions precisely. First, there are two kinds of TEAL execution, 1) programs executed in logicsigs, and 2) programs executed in ApplicationCall (“appl”) transaction.
Case #1 Logicsigs
These are explicitly designed to be stateless with respect …
Rekeying an address back to itself?
Yes, you must be explicit with the rekey-to, rather than set it to null, because there’s no encoding of a null value at the txn msgpack level. The closest thing is simply not setting a field. But if you don’t set it, you don’t rekey it, which was your original intent!
Why have both txn.sender() and txn.asset_sender() in PyTEAL?
They are different. The Sender is the sender of the transaction and, often, the account the assets will come from. But not for clawback. In a clawback transaction, AssetSender, is set (normally it’s zero). The Sender is the account with clawback authority. But the assets move from AssetSender to …
128-bit TEAL operations
With divmodw and callsub/retsub released to betanet…
func TestMulDiv(t *testing.T) {
// Demonstrate a "function" that expects three u64s on stack,
// and calculates B*C/A. (Following opcode documentaion
// convention, C is top-of-stack, B is below it, and A is
// below B.
muldiv := `
muldiv:
…
Asset URL max length (how to link IPFS)
You could weigh in here: TEAL 4 Epic · Issue #1950 · algorand/go-algorand · GitHub. But honestly, there isn’t a lot of nuance to this particular conversation - I think everyone has come to realize that 32 bytes is too small. The current intention is to expand the limit to 96 bytes. That seems to …
Bond Implementation
I think everything you said is correct technically about my proposal, though I’d say your last bullet’s “shouldn’t have” clause is not a technical point, it’s a decision you can make about your use-case. For example, I think it’s perfectly reasonable that I could sell all my coupons to someone else…
128-bit TEAL operations
I’m not all convinced this always works. The low word could be nearly too big, so when you bring the bits down from the high word, you get addition overflow.
128-bit TEAL operations
Let’s pretend TEAL only supported u16, so the numbers are small. I think you’re asking how you should calculate (2^8/2^9)(2^8+1). Which is (256/513)(258) = 128r384. How can we get 128r384 using only what TEAL has? I changed the calculation slightly to be a better illustration.
128-bit TEAL operations
I think you would avoid losing precision by also talking the modulo when performing that initial division, and use that fractional part in the later multiplication.
Minimal Iot platform
Developed on a Mac and periodically confirm compatibility with Linux. I haven’t done multisig yet, and only a few indexer apis. But everything else should work.
Minimal Iot platform
This is a first cut at a C++ SDK that does signing and such. Still very untested.
Bond Implementation
I propose another possibility, inspired by the original meaning of a bond coupon. From Coupon Definition.
Why do we need stateless and stateful contracts at the same time?
Algorand is definitely considering a proposal to give stateful contracts control over an associated account. In analogy to stateless contracts, they might have authority over the address that is the hash of their source code combined with the creating account. (So that multiple instances of the same …