feat(local-env): catalog seeds full lifecycle for all 12 blueprints#3183
Merged
feat(local-env): catalog seeds full lifecycle for all 12 blueprints#3183
Conversation
Co-authored-by: Pavan Soratur <pavanvsoratur@gmail.com> Co-authored-by: vutuanlinh2k2 <69841784+vutuanlinh2k2@users.noreply.github.com> Co-authored-by: Dustin Brickwood <dustinbrickwood204@gmail.com> Co-authored-by: drewstone <drewstone329@gmail.com> Co-authored-by: shekohex <dev+github@shadykhalifa.me>
Co-authored-by: vutuanlinh2k2 <69841784+vutuanlinh2k2@users.noreply.github.com> Co-authored-by: vutuanlinh2k2 <vutuanlinh2002@gmail.com>
…26-03-20 [RELEASE] Merge develop into master
release: promote develop → staging (iframe feature)
release: promote staging → master (iframe feature + tnt-core v0.11.3)
…ng-3 release: develop → staging
Brings the local catalog seed to a clean end-to-end state — every
blueprint registers, every operator activates in staking, every
service request gets approved. No more 'OperatorNotActive' or
'UnknownSelector' reverts in the seed log.
Three coordinated changes:
- Operator staking pre-registration (the actual fix). Adds
ensureOperatorActiveInStaking() that:
1. Reads isOperatorActive(operator) on MultiAssetDelegation,
returns immediately if true
2. Otherwise approves the staking proxy on TNT for the 100 TNT
bond and calls registerOperatorWithAsset(tnt, bond)
3. Wraps in try/catch so duplicate-registration / insufficient-
balance failures log cleanly without aborting the seed
Called inside the seed loop right before each operator's
registerOperator(blueprintId,...). LocalTestnet.s.sol only stakes
operators for its bootstrap blueprint; this lets the other 12
catalog blueprints succeed too.
- approveService ABI updated to PR-119's unified ApprovalParams
shape (uint64 requestId, AssetSecurityCommitment[],
uint256[4] blsPubkey, uint256[2] blsPopSignature,
TeeAttestationCommitment[]). Previously the catalog was calling
the deleted approveService(uint64, uint8) signature and getting
UnknownSelector reverts on every blueprint.
- BLUEPRINT_ROOT env var (default $HOME/code) replaces the hardcoded
/home/drew/code paths so the seed works for any operator without
editing the script.
Local-env addresses for staking proxy + TNT token + 100 TNT bond
inlined as constants matching script/LocalTestnet.s.sol's deploy
order; override via env vars if you re-shuffle that script.
Verified end-to-end against a live anvil + tnt-core deploy:
Blueprint exists: 12
Approving service request: 11 (1 was pre-approved from prior run)
! skipped: 0
+ staking: registered for op1 + op2
✅ Deploy Preview for tangle-dapp ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-cloud ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for tangle-leaderboard ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes the catalog seed so a fresh
./scripts/local-env/start-local-env.sh+yarn local:blueprint-ui-catalogproduces 12 blueprints with active operators and approved service requests, end-to-end clean.What was broken
registerOperator(blueprintId,...)reverted withOperatorNotActivefor every blueprint past the LocalTestnet bootstrap fixture, because the deploy script only stakes operators on its single bootstrap blueprint.approveService(uint64, uint8)reverted withUnknownSelectorbecause PR Listen. to accounts change on MetaMask and UI fixes #119 unifiedapproveServiceintoapproveService(ApprovalParams). Catalog ABI was stale./home/drew/code/...paths.What it does now
ensureOperatorActiveInStaking()helper called before eachregisterOperator(blueprintId,…). Idempotent — returns early if the operator is alreadyisOperatorActive. Otherwise approvesOPERATOR_BOND(100 TNT) on the staking proxy and callsregisterOperatorWithAsset(tnt, bond).approveServiceABI + call updated to the PR-119ApprovalParamstuple shape, with empty arrays opting out of per-asset commitments / BLS / TEE.BLUEPRINT_ROOTenv var (default$HOME/code) replaces hardcoded paths.script/LocalTestnet.s.soldeploy order.Verified