Mining

Endpoints related to Stacks block production and mining.

Validate a proposed Stacks block

post
/v3/block_proposal

Used by stackers to validate a proposed Stacks block from a miner. This API endpoint requires a basic Authorization header.

Authorizations
authorizationstringRequired

Plain-text secret value that must exactly equal the node's configured password, which is set as connection_options.auth_token in the node's configuration file.

Body
blockstring · min: 400Required

Hex-encoded block data (must be valid SIP-003 serialized block, typically 200+ bytes)

Pattern: ^([0-9a-fA-F]{2})+$
chain_idintegerRequired

Chain ID for the block

Responses
post
/v3/block_proposal

Upload a Stacks block

post
/v2/blocks/upload/{consensus_hash}

Upload a Stacks block to the node for processing. The block must be in binary format and associated with the given consensus hash.

Path parameters
consensus_hashstringRequired

Consensus hash (40 hex characters)

Pattern: ^[0-9a-f]{40}$
Body
string · binary · min: 1Optional

Binary-encoded Stacks block

Responses
chevron-right
200

Block upload result

application/json
stacks_block_idstringOptional

The ID of the uploaded block

acceptedbooleanOptional

Whether the block was accepted

post
/v2/blocks/upload/{consensus_hash}

Last updated

Was this helpful?