-
Notifications
You must be signed in to change notification settings - Fork 14
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
refactor(engine)!: substate address based on entity id prefix #951
refactor(engine)!: substate address based on entity id prefix #951
Conversation
Test Results (CI)475 tests - 19 471 ✅ - 23 2h 50m 9s ⏱️ + 1h 2m 55s For more details on these failures, see this check. Results for commit 1ce401b. ± Comparison against base commit 0deb6cd. This pull request removes 24 and adds 5 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
9168a84
to
48e21d3
Compare
48e21d3
to
ed7f8cc
Compare
* development: fix(walletd): emit AccountChanged event on changes for account refresh (tari-project#956)
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.
tested locally and it's working as expected
1acbfa9
* development: refactor(engine)!: substate address based on entity id prefix (tari-project#951)
* development: feat: change bindings package usage to git instead of local (tari-project#963) v0.4.1 fix(engine): claiming burns/fees call frame error (tari-project#960) ci: fix windows and macos builds (tari-project#961) v0.4.0 ci: add tari generate to built binaries (tari-project#959) refactor(engine)!: substate address based on entity id prefix (tari-project#951) fix(walletd): emit AccountChanged event on changes for account refresh (tari-project#956)
Description
Prefix all substate addresses with an entity ID to group objects related to a particular component in the same shard
All shards commit transaction receipt
Adds CreateAccount command which uses the owner public key prefix as the entity ID
Adds OwnerRule::ByPublicKey
Motivation and Context
Substate addresses for Components, Resources, Vaults and NFTs are composed of the entity id (20 bytes), componentKey (8 bytes) and version (4 bytes) (4.29 billion versions).
CreateAccount is implemented the same as CallFunction but sets the entity ID to the owner public key for the call. This can be later changed to create the account without invoking WASM
These "versionable" substate IDs are now 28 bytes long (entity id + component key).
Transaction receipts are committed by all involved shards.
How Has This Been Tested?
CI, Manually
What process can a PR reviewer use to test or verify this change?
Verify that all objects created by a template/component call share the same prefix.
Breaking Changes
BREAKING CHANGE: all SubstateIds are shorter which breaks all wasm templates (need to recompile), new instruction is not recognised by older versions.