Repository navigation
feat(contract): enable read_rpc in the release build - #5146
Draft
haiyuechen-nearone wants to merge 8 commits into
Draft
haiyuechen-nearone wants to merge 8 commits into
haiyuechen-nearone wants to merge 8 commits into
Conversation
Remove the foreign-tx-v2 cargo feature and its cfg gates, so the release contract has read_rpc and respond_verify_foreign_tx_v2. The sandbox and E2E tests deploy the release build, and the separate V2 contract build is gone. The ABI snapshot gains the two methods, the timeout callback and their types.
Document the arguments, the three answers and the response fields of read_rpc, how each answer is bound to one request, and how a receiver outside NEAR verifies the signature with or without the SDK. Tell operators that read_rpc needs no configuration, how to read the inconclusive metric, and to vote the contract update only once every participant runs a node release that supports it.
Use the 15 Tgas config default for sign, ckd and verify_foreign_transaction, explain which node labels the inconclusive metric fills for each cause, note that V2 attempts and inconclusive rounds share the verify_foreign_tx task label, describe both causes of an inconclusive in the TDX guide, and drop hyphens from the prose this change touches.
…nto 5127-enable-v2-foreign-tx-verification
…nto 5127-enable-v2-foreign-tx-verification
This branch has not been deployed
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.
Closes #5127
Turns V2 foreign tx verification (
read_rpc) on in the release build of the contract, and updates the live docs: the contract README, the TDX operator guide and the node operator metrics.Reviewer notes:
Merge only after the node release with V2 is out AND
outcome_keyslists a key for every participant.register_outcome_key(feat(contract): register node outcome keys #5154) ships in an earlier contract release, since nodes register their keys through it.The docs describe the collect first model: outcome keys, inspection once the request's block is final, the counting rule, 5 second signing rounds with up to three per leader, and the inconclusive metric labelled with cause and chain.
The README example verifies every signed outcome through
verify_signed_outcome. A new mainnet protocol sandbox test answers aread_rpcrequest.Known: the release wasm is about 5.9 KB over the CI size limit (about 1,203,900 against 1,198,000), so the reproducible build check fails until the limit is raised or the contract shrinks.