Skip to content

feat(rpc): add jam_getBlockExtrinsics method#840

Open
mariopino wants to merge 1 commit into
jarchain:masterfrom
mariopino:fix/issue-839-get-block-extrinsics
Open

feat(rpc): add jam_getBlockExtrinsics method#840
mariopino wants to merge 1 commit into
jarchain:masterfrom
mariopino:fix/issue-839-get-block-extrinsics

Conversation

@mariopino
Copy link
Copy Markdown
Contributor

Summary

  • Adds jam_getBlockExtrinsics(blockHash) RPC method to grey-rpc
  • Returns full tickets (attempt + proof), guarantees (core_index, package_hash, erasure_root, exports_root, auth_output, auth_gas_used, results), and assurances (anchor, bitfield, validator_index) for a block
  • Follows existing patterns: parse_hash_hex, track_request, not_found/internal_error helpers

Addresses #839.

Test plan

Call jam_getBlockExtrinsics with a known block hash via wscat or curl and verify tickets/guarantees/assurances arrays are populated correctly.

Exposes full extrinsic content (tickets, guarantees, assurances) for a
given block hash. Follows the same patterns as jam_getBlock: accepts a
hex-encoded block hash, returns not_found on missing blocks, and tracks
latency via track_request.

Response shape:
- tickets: attempt + proof (hex)
- guarantees: core_index, package_hash, erasure_root, exports_root,
  auth_output, auth_gas_used, results[]
- assurances: anchor, bitfield (hex), validator_index

Addresses jarchain#839.
@github-actions
Copy link
Copy Markdown
Contributor

Genesis Review

Comparison targets:

How to review

Post a comment with the following format (rank from best to worst):

/review
difficulty: <commit1>, <commit2>, ..., <commitN>, currentPR
novelty: <commit1>, <commit2>, ..., <commitN>, currentPR
design: <commit1>, <commit2>, ..., <commitN>, currentPR
verdict: merge

Use the short commit hashes above and currentPR for this PR.
Each line ranks all comparison targets + this PR from best to worst.

To meta-review another reviewer's comment, react with 👍 or 👎.

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.

1 participant