Skip to content

feat(contract): enable read_rpc in the release build - #5146

Draft
haiyuechen-nearone wants to merge 8 commits into
5126-sign-an-inconclusive-for-v2-foreign-tx-requestsfrom
5127-enable-v2-foreign-tx-verification
Draft

haiyuechen-nearone wants to merge 8 commits into
5126-sign-an-inconclusive-for-v2-foreign-tx-requestsfrom
5127-enable-v2-foreign-tx-verification

Conversation

@haiyuechen-nearone

@haiyuechen-nearone haiyuechen-nearone commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

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_keys lists 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 a read_rpc request.

  • 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.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable V2 foreign tx verification

1 participant