Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Premix persist tool improvements #2000

Merged
merged 6 commits into from
Feb 1, 2024

Conversation

web3-developer
Copy link
Contributor

No description provided.

TOOLS_DIRS := \
tests
tests \
premix
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this so we can build the tool as a separate binary with: make persist

vmState.generateWitness = true # Enable saving witness data
vmState.com.hardForkTransition(blockHeader)
Copy link
Contributor Author

@web3-developer web3-developer Feb 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing a bug found during my recent testing. Without this the miner rewards may not be correct during processBlock.

sleep(1000)
continue
else:
raise e
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added support for retrying the request for block data so that the tool doesn't crash due to temporary network issues.

thisBlock = requestBlock(blockNumber, { DownloadAndValidate })
except CatchableError as e:
if retryCount < 3:
warn "Unable to block data via JSON-RPC API", error = e.msg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
warn "Unable to block data via JSON-RPC API", error = e.msg
warn "Unable to get block data via JSON-RPC API", error = e.msg

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@web3-developer web3-developer merged commit a5ac5d3 into master Feb 1, 2024
14 checks passed
@web3-developer web3-developer deleted the premix-persist-tool-improvements branch February 1, 2024 14:11
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.

None yet

3 participants