-
Notifications
You must be signed in to change notification settings - Fork 121
feat: implement asset callbacks #2571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PhilippGackstatter
wants to merge
44
commits into
next
Choose a base branch
from
pgackst-asset-callbacks
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,475
−194
Open
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
453dbe6
feat: add `AssetCallbacks` and integrate into vault key
PhilippGackstatter f12f15f
feat: add metadata extraction code in MASM
PhilippGackstatter 8dfb8b6
feat: implement `on_asset_added_to_account`
PhilippGackstatter c56074d
chore: rename `AssetCallbacks` -> `AssetCallbacksFlag`
PhilippGackstatter 2cb5e91
feat: Add `AssetCallbacks` storage helper struct
PhilippGackstatter e5107cd
chore: add `BlockList` callback test component
PhilippGackstatter 1031162
chore: define `Asset::is_same` based on vault key
PhilippGackstatter 2701ded
chore: set callbacks flag in create_fungible_asset
PhilippGackstatter eff4cc7
chore: add callbacks flag in `FungibleAsset`
PhilippGackstatter c4e1432
fix: size hint of fungible asset delta
PhilippGackstatter c498054
feat: add `account::find_storage_slot`
PhilippGackstatter a901831
feat: add `has_callbacks` kernel proc
PhilippGackstatter 02d598c
feat: pass `enable_callbacks` to `create_fungible_key`
PhilippGackstatter 773b492
chore: rename to `on_before_asset_added_to_account`
PhilippGackstatter d9f2329
chore: update NUM_POST_COMPUTE_FEE_CYCLES according to benchmark
PhilippGackstatter 3ffe4ba
chore: add test for callback inputs
PhilippGackstatter de06e70
feat: use `AssetVaultKey` in `FungibleAssetDelta`
PhilippGackstatter 6316cb8
chore: implement serialization for `AssetVaultKey`
PhilippGackstatter 7588e08
fix: test_create_fungible_asset_succeeds
PhilippGackstatter 82ed18b
chore: add missing docs
PhilippGackstatter 301425e
chore: split fpi memory clearing out of end_foreign_context
PhilippGackstatter 5014e9b
chore: add changelog
PhilippGackstatter 9073f5c
chore: update protocol library docs
PhilippGackstatter b0e8e16
chore: deduplicate slot ID definition
PhilippGackstatter dd75128
chore: use empty word for detection in `AssetCallbacks`
PhilippGackstatter 08d5582
chore: return vault key in fungible asset error
PhilippGackstatter 4b61a4f
chore: rename account_has_callbacks -> faucet_has_callbacks
PhilippGackstatter 2b5ca98
chore: AssetCallbacksFlag -> AssetCallbackFlag
PhilippGackstatter bcc14a1
chore: simplify block list; minor fixes
PhilippGackstatter 4c37b06
chore: do not pass native account ID to callback
PhilippGackstatter 9a0d240
Merge remote-tracking branch 'origin/next' into pgackst-asset-callbacks
PhilippGackstatter 0a1a757
feat: handle missing callback slot in kernel event handler
PhilippGackstatter a72d12b
chore: simplify has_non_empty_slot
PhilippGackstatter fb8dc3e
Merge remote-tracking branch 'origin/next' into pgackst-asset-callbacks
PhilippGackstatter 3418a74
chore: use `has_callbacks` in `faucet::create_fungible_asset`
PhilippGackstatter 40f401a
chore: use `padw padw swapdw` for padding
PhilippGackstatter b3ff0a0
chore: `get_storage_slot` -> `get_storage_slot_ptr`
PhilippGackstatter adfba4f
chore: make flag constants associated
PhilippGackstatter 78db024
chore: move with_callbacks to constructor section
PhilippGackstatter 73c2dee
chore: mention callbacks in fungible asset docs
PhilippGackstatter ea5c074
chore: add missing docs
PhilippGackstatter aa9173b
chore: remove unused doc link
PhilippGackstatter 7010651
Merge remote-tracking branch 'origin/next' into pgackst-asset-callbacks
PhilippGackstatter be3c98b
chore: add potential future fungible asset delta todo
PhilippGackstatter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,40 @@ | ||
| { | ||
| "consume single P2ID note": { | ||
| "prologue": 3173, | ||
| "notes_processing": 1714, | ||
| "prologue": 3487, | ||
| "notes_processing": 1831, | ||
| "note_execution": { | ||
| "0xa030091e37d38b506d764d5666f3a13af9e5702a0159974a3bc27053d7a55e01": 1674 | ||
| "0x1421e92d0f84f11b3e6f84e4e1d193e648eb820666ffb8c50ea818c25a32990c": 1791 | ||
| }, | ||
| "tx_script_processing": 42, | ||
| "epilogue": { | ||
| "total": 63977, | ||
| "auth_procedure": 62667, | ||
| "after_tx_cycles_obtained": 574 | ||
| "total": 71195, | ||
| "auth_procedure": 69694, | ||
| "after_tx_cycles_obtained": 608 | ||
| } | ||
| }, | ||
| "consume two P2ID notes": { | ||
| "prologue": 4131, | ||
| "notes_processing": 3431, | ||
| "prologue": 4509, | ||
| "notes_processing": 3668, | ||
| "note_execution": { | ||
| "0x209ecf97790d4328e60a3b15160760934383ecff02550cb5df72e3f6d459fa70": 1708, | ||
| "0x4f9da5658d9f717fdcfa674906e92a7424d86da93f3a21fe0362a220f0e457b7": 1674 | ||
| "0x702c078c74683d33b507e16d9fc67f0be0cc943cd94c1f652e3a60e0f4164d9f": 1791, | ||
| "0x92cc0c8c208e3b8bad970c23b2c4b4c24cc8d42626b3f56363ce1a6bbf4c7ac2": 1828 | ||
| }, | ||
| "tx_script_processing": 42, | ||
| "epilogue": { | ||
| "total": 63949, | ||
| "auth_procedure": 62653, | ||
| "after_tx_cycles_obtained": 574 | ||
| "total": 71143, | ||
| "auth_procedure": 69668, | ||
| "after_tx_cycles_obtained": 608 | ||
| } | ||
| }, | ||
| "create single P2ID note": { | ||
| "prologue": 1681, | ||
| "prologue": 1766, | ||
| "notes_processing": 32, | ||
| "note_execution": {}, | ||
| "tx_script_processing": 1497, | ||
| "tx_script_processing": 1682, | ||
| "epilogue": { | ||
| "total": 64803, | ||
| "auth_procedure": 62899, | ||
| "after_tx_cycles_obtained": 574 | ||
| "total": 72099, | ||
| "auth_procedure": 69906, | ||
| "after_tx_cycles_obtained": 608 | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth procedure cycle count went up quite a bit - but I'm guessing this may be because of some prior changes rather than because of this PR, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked a few key PRs:
So auth component consolidation added ~500 cycles but the VM migration was the main reason for the large increase in cycles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since most of the auth procedure is Falcon signature verification - I wonder if most of the delta is because Falcon signature verification got a bit less efficient.
@Al-Kindi-0 - could you check how many cycles Falcon signature takes now? (maybe some stack re-orientation work made it less efficient?)