Advance FRAME: Signed Extensions#154
Conversation
sacha-l
left a comment
There was a problem hiding this comment.
Just did a quick pass and left comments, looks good. There's some potential overlap with module 4. How transactions are constructed, encoded and decoded should probably live in 4. Then the topic of transaction priority here builds on the knowledge learnt from how extrinsics are constructed (byte field wise). Transaction versioning should be mentioned there too (this is interesting because in the tipping PR Gav made, the transaction version is bumped).
| - The tip! | ||
| 2. Some hooks that are executed before and after the transaction is executed. | ||
| - Before each transaction is executed, it must pay its fee upfront. | ||
| 3. Some additional validation logic that is used to validate the transaction. |
There was a problem hiding this comment.
This would be for unsigned extrinsics, as in logic under a #[validate_unsigned] macro - otherwise signed extrinsics don't carry this additional validation logic, right?
There was a problem hiding this comment.
no, signed transactions can also have validation that happens by the tx-pool. This is exactly what SignedExtension::validate is. I rephrased it now to make it clearer. 6b14d39
| - SignedExtensions that logs something on each transaction | ||
| - SignedExtension that keeps a counter of all transactions | ||
| - SignedExtensions that keeps a counter of all successful/failed transactions | ||
| - SignedExtension that tries to refund the transaction from each account as long as they submit less | ||
| than 1tx/day. |
There was a problem hiding this comment.
This probably more like a 1-2 hour workshop. Wdyt? Also, do we need any boiler plate here or should the starting point be just a FRAME node template and we just provide instructions?
There was a problem hiding this comment.
no boilerplate needed.
What we can do (and perhaps you cand work on if you want) is prepare "example answers" to all of these ideas.
I recall that @shawntabrizi had a "feeless pallet" seminar sometime ago. Perhaps you can get an answer from that.
Co-authored-by: Sacha Lansky <sacha@parity.io>
|
@sacha-l feel free to merge when ready. |
|
I'll merge this in for now. I have made a note to go back to add in the example answers to the workshop component. |
* add signed ext * add some notes * rephrase validate * Update syllabus/6-FRAME/6.4-Exotic_Stuff/6.4-Signed_Extensions_slides.md Co-authored-by: Sacha Lansky <sacha@parity.io> Co-authored-by: Sacha Lansky <sacha@parity.io>
Still needs a re-read from my end as well, but mostly done.
After this, I am keen on working on 4.3 Transaction Queue, because it is quite related.