Repository navigation
Conversation
|
👋 ejacquier, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
| // getDON(uint32) | ||
| const GET_DON_SELECTOR = new Uint8Array([0x23, 0x53, 0x74, 0x05]) | ||
| // getNodesByP2PIds(bytes32[]) | ||
| const GET_NODES_BY_P2P_IDS_SELECTOR = new Uint8Array([0x05, 0xa5, 0x19, 0x66]) |
There was a problem hiding this comment.
Shouldn't this be generated by something in the ABI?
| @@ -0,0 +1,451 @@ | |||
| /** | |||
There was a problem hiding this comment.
This is a lot to ask a customer to do. Should we refactor the code that verifies reports in our existing SDKs to do most of the heavy lifting that's here?
Namely, we could ask them to fetch from the contract themselves (since that's different than how the SDK would do it) then do the rest.
OTOH; it would only work for TS and Go that way, so it's kind of nice to have this isolated in case someone wants to verify in a Java server etc...
Off-Chain Report Validation template
Adds
starter-templates/offchain-report-validation— a TypeScript starter template that demonstrates the full off-chain report flow, end to end:cre/offchain-report-write/): cron-triggered, writes auint256to aStorageconsumer via the chain writer (writeReport), and emits the DON-signed report in its logs (REPORT_JSON_BEGIN/ENDmarkers, one field per line to avoid truncation) in a copy-pasteable JSON format. The HTTP hand-off point (push report to your backend) is marked with a comment but intentionally not implemented.cre/contracts/):Storage.solonReceiverTemplate, checked-in ABI, and TypeScript bindings generated withcre generate-bindings(+newStorageMockused in unit tests).f+ signer addresses) from the capabilities registry via plaineth_callover RPC, and checksf + 1unique DON signatures. Ships a real production-DON sample report that validates out of the box (npm run dev/npm run verify:sample). First template with a small web UI — included because off-chain validation is something end users do outside the DON.