Skip to content

Evaluate whether we can consider a couple of Subxt errors recoverable, as they are currently forcing a restart of the miner. #1149

@sigurpol

Description

@sigurpol

Disclaimer

Restart of the miner are not critical since the miner is designed to properly recover even if restart happens in the middle of a submission**

Critical errors seen on the field on WAH

We have seen on WAH the miner restarting because of

"Invalid block hash"

025-09-05 15:02:11.667	
Error: Subxt(Rpc(ClientError(User(UserError { code: -32801, message: "Invalid block hash", data: None }))))
	
	
2025-09-05 15:02:11.664	
2025-09-05T13:02:11.664235Z DEBUG polkadot-staking-miner: round of execution finished. outcome = Err(Subxt(Rpc(ClientError(User(UserError { code: -32801, message: "Invalid block hash", data: None })))))    
	
	
2025-09-05 15:02:11.664	
2025-09-05T13:02:11.664140Z ERROR polkadot-staking-miner: Runtime upgrade subscription error: Rpc(ClientError(User(UserError { code: -32801, message: "Invalid block hash", data: None })))    

"Not enough data to fill buffer"

	
2025-09-10 10:04:58.658	
2025-09-10T08:04:58.658617Z TRACE polkadot-staking-miner: Listener task started, watching for finalized blocks    
	
	
2025-09-10 10:04:57.646	
Error: Codec(Error { cause: None, desc: "Not enough data to fill buffer" })
	
	
2025-09-10 10:04:57.638	
2025-09-10T08:04:57.638101Z DEBUG polkadot-staking-miner: round of execution finished. outcome = Err(Codec(Error { cause: None, desc: "Not enough data to fill buffer" }))    
	
	
2025-09-10 10:04:57.638	
2025-09-10T08:04:57.638073Z ERROR polkadot-staking-miner: Miner task failed: Codec error: `Not enough data to fill buffer`    
	
	
2025-09-10 10:04:57.634	
2025-09-10T08:04:57.634144Z TRACE polkadot-staking-miner: get_block_state: Fetching round    
	
	
2025-09-10 10:04:57.634	
2025-09-10T08:04:57.634120Z ERROR polkadot-staking-miner: Critical miner error - process will exit: Codec(Error { cause: None, desc: "Not enough data to fill buffer" })    

The error happens when fetching the round from storage.

let current_round = storage
		.fetch_or_default(&runtime::storage().multi_block_election().round())
		.await?;

To recover or not to recover

Evaluate if recovering instead of restarting for these errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions