Skip to content

Advance FRAME: Signed Extensions#154

Merged
sacha-l merged 4 commits into
mainfrom
kiz-signed-extensions-main
Jul 10, 2022
Merged

Advance FRAME: Signed Extensions#154
sacha-l merged 4 commits into
mainfrom
kiz-signed-extensions-main

Conversation

@kianenigma
Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown

@sacha-l sacha-l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Comment thread syllabus/6-FRAME/6.4-Exotic_Stuff/6.4-Signed_Extensions_slides.md Outdated
- 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread syllabus/6-FRAME/6.4-Exotic_Stuff/6.4-Signed_Extensions_slides.md
Comment thread syllabus/6-FRAME/6.4-Exotic_Stuff/6.4-Signed_Extensions_slides.md Outdated
Comment thread syllabus/6-FRAME/6.4-Exotic_Stuff/6.4-Signed_Extensions_slides.md
Comment on lines +256 to +260
- 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.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kianenigma kianenigma mentioned this pull request Jul 7, 2022
24 tasks
@kianenigma
Copy link
Copy Markdown
Member Author

@sacha-l feel free to merge when ready.

@sacha-l
Copy link
Copy Markdown

sacha-l commented Jul 10, 2022

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.

@sacha-l sacha-l merged commit f657cc2 into main Jul 10, 2022
@sacha-l sacha-l deleted the kiz-signed-extensions-main branch July 10, 2022 18:00
kianenigma added a commit that referenced this pull request Jul 19, 2023
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants