-
Notifications
You must be signed in to change notification settings - Fork 132
supplyverifier: add pull syncer and non-universe node verification #1777
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
Draft
ffranr
wants to merge
17
commits into
wip/supplycommit/add-verifier
Choose a base branch
from
wip/supplyverify/pull-sync-verify
base: wip/supplycommit/add-verifier
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.
Draft
supplyverifier: add pull syncer and non-universe node verification #1777
ffranr
wants to merge
17
commits into
wip/supplycommit/add-verifier
from
wip/supplyverify/pull-sync-verify
Conversation
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
64ffd37
to
cb2486f
Compare
26cf469
to
ded200f
Compare
This enables extending the supplyverifier syncer to support pulling supply commitments in a follow-up commit.
Introduce the PullSupplyCommitment method, which calls the FetchSupplyCommit RPC endpoint. Support for calling this endpoint from the syncer was added in the previous commit.
Consolidate all state machine startup logic into a new method called startAssetSM to improve code clarity. Added IsRunning checks to ensure the state machine is active before returning it from the cache.
Consolidate all state machine startup logic into a new method called startAssetSM to improve code clarity. Added IsRunning checks to ensure the state machine is active before returning it from the cache.
Add a method that returns all asset groups with supply commitment enabled.
Add a new SQL query to fetch the latest stored supply commitment based on the highest block height.
Query the local database for asset groups with supply commitment enabled where the node cannot publish commitments (no delegation key). These are commitments published by external issuers. Commitments from the current node are excluded, as they do not need to be tracked by the verifier. A temporary limit of 50 state machines is set to prevent tapd nodes or universe servers from exhausting resources.
Extract CheckSupplyCommitSupport function for use in the supplyverifier package. Rename fetchLatestAssetMetadata to FetchLatestAssetMetadata to allow external usage.
Verify that the asset group is supported before starting a supplyverifier state machine for it.
Rename table `mint_anchor_uni_commitments` to `supply_pre_commits` to align with current "supply" terminology. Drop the NOT NULL constraint on `batch_id` so the table can also store pre-commit outputs from peer-issued assets, not just those minted locally. Also, remove the unique index on (batch_id, tx_output_index) and add unique index on outpoint.
Rename SQL query to better align with "supply" terminology.
Rename SQL query to better align with "suppl" terminology.
cb2486f
to
87ca58f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
supply commit
Work on the supply commitment feature, enabling issuers to attest to total asset supply on-chain.
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.
Extend the
supplyverifier
syncer to support pulling supply commitments from universe servers.Add a
supplyverifier
state machine so that non-universe tapd nodes (regular node) can verify supply commitments by: