-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tracks issued assets state and contextually validates issue actions and asset burns #26
base: zsa-integration-issuance-commitments
Are you sure you want to change the base?
Conversation
9f5cb45
to
3d00b81
Compare
902bfa6
to
44dd204
Compare
44dd204
to
2daf84f
Compare
zebra-state/src/service/finalized_state/disk_format/shielded.rs
Outdated
Show resolved
Hide resolved
…callyVerifiedBlock types, updates `IssuedAssetsChange::from_transactions()` method return type
…heckpointVerifiedBlock
self.issued_assets.get(asset_base).cloned() | ||
} | ||
|
||
/// Remove the History tree index at `height`. |
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.
@dmidem I think it would be simpler to keep the issued assets maps on each ContextuallyValidatedBlock
partial relative to the previous block instead of making them partial relative to the finalized tip, but if they need to be relative to the finalized tip, copying the AssetBase
s for every block would multiply the non-finalized state's theoretical max memory use, so those should go in Arc
s.
/// Remove the History tree index at `height`. | |
/// When a block with the provided `transactions` and partial `issued_assets` state is removed | |
/// from the chain tip, revert its changes from the [`Chain`]'s partial issued assets state. | |
/// | |
/// When a block is removed from the chain root to be committed to the finalized state, any | |
/// assets in its partial `issued_assets` with an asset state matching the one in the chain's | |
/// partial issued assets map is removed from the chain's partial issued assets map (since that | |
/// it should match the finalized issued asset state.) |
This PR tracks issued assets in Zebra's state and uses that state to contextually validate issue actions and asset burns.
It still needs tests, additional documentation, cleanup, and to track information for creating split notes.
Review
This PR may be easier to review by commit.