erc20-vault on the 0.15.0 path-notification protocol set - #12
Open
BRBussy wants to merge 1 commit into
Open
Conversation
The V1 SignBidirectionalEventNotification now carries the resolved ledger-tree path of the caller's request map (requestsPathDepth + requestsPath) instead of a flat field ordinal, so the MPC follows the compiler-recorded path through raw state and chunked (>15 field) contracts can integrate. On this set: - @sig-net/midnight, @sig-net/midnight-contract and @sig-net/midnight-contract-deploy pinned at 0.15.0, fakenet compose image at 0.10.0 (built against the same set) - the vault's two notifier calls pack depth 1 + path [0, 0, 0, 0]; the compiled contract-info.json records the map's "index" as 0 - VAULT_REQUESTS_INDEX_FIELD / VAULT_NONCE_FIELD become VAULT_REQUESTS_PATH / VAULT_NONCE_PATH, the harness option becomes requesterRequestsPath, and the raw-state reads go through signetFieldNodeByPath - the integrator guides explain the chunk-tree layout and how to read a map's path from the compiled artifacts Verified locally: unit tests green, and the full e2e suite (6 files, 60 tests) green in one run against the fakenet 0.10.0 image. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Moves the examples onto the
@sig-net0.15.0 matched set, in which the V1SignBidirectionalEventNotificationcarries the resolved ledger-tree path of the caller's request map (requestsPathDepth+ up to 4requestsPathindices) instead of a flat field ordinal.@sig-net/midnight,@sig-net/midnight-contract,@sig-net/midnight-contract-deploy: 0.14.0 → 0.15.0; fakenet compose image: 0.9.0 → 0.10.0 (built against the same set)depositErc20,withdrawErc20) pack depth1+ path[0, 0, 0, 0]. The compiledcontract-info.jsonrecords the map's"index"as0, which is the source the docs teach integrators to readVAULT_REQUESTS_INDEX_FIELD/VAULT_NONCE_FIELDbecomeVAULT_REQUESTS_PATH/VAULT_NONCE_PATH, the test-harness reader option becomesrequesterRequestsPath, and the contract tests read raw state throughsignetFieldNodeByPathWhy
Past 15 ledger fields, compactc packs a contract's public state into a chunk tree, so a flat field index cannot address every contract's request map. The path-carrying notification makes the MPC's read deterministic: it follows the compiler-recorded path node for node and never re-derives the chunk structure by inspecting array shapes.
Matched counterparts: sig-net/midnight-integration#48 (the protocol change and 0.15.0 release) and sig-net/solana-signet-program#56 (the fakenet 0.10.0 responder).
Testing
fakenet:0.10.0image: three request/attest round trips plus the failure-refund, false-claimer and bearer-transfer flowsworkflow_dispatchfull-suite CI run is in flight on this branch: https://github.com/sig-net/midnight-examples/actions/runs/30636958025🤖 Generated with Claude Code