Skip to content

Manually test the getblocktemplate RPC creates valid blocks #5803

Description

@oxarbitrage

Our final goal is to support mining pools to use zebra for their operations. This requires multiple rpc methods to be present.

There is a discussion open to exchange ideas on this.

Details

From #5804 (comment)

I think we can do testing using a block proposal, which is a block without a proof of work.

Here's how we could do that:

  • Finish all the required getblocktemplate RPC fields
  • Create a block header from the RPC fields, with a zeroed-out equihash solution, and serialize it
  • Create the block transactions by combining all the coinbasetxn and transaction data fields
  • Send that block to zcashd using `getblocktemplate '{ "mode": "proposal", "data": "(hex data)" }'

zcashd has proposal support, but it's not documented. Here's the spec:
https://en.bitcoin.it/wiki/BIP_0023#Block_Proposal

Related Work

Metadata

Metadata

Labels

A-consensusArea: Consensus rule updatesA-rpcArea: Remote Procedure Call interfacesC-testingCategory: These are tests

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions