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

Add a contextual validity test for the getblocktemplate method #5681

Closed
arya2 opened this issue Nov 21, 2022 · 1 comment
Closed

Add a contextual validity test for the getblocktemplate method #5681

arya2 opened this issue Nov 21, 2022 · 1 comment
Labels
C-enhancement Category: This is an improvement

Comments

@arya2
Copy link
Contributor

arya2 commented Nov 21, 2022

Motivation

A contextual validity check was added to the getblocktemplate RPC method in #5630.

While this would needlessly hurt performance in production, it's useful for testing that the getblocktemplate response will be contextually valid and accepted if submitted with a valid solution before another block is committed.

Designs

  • See change(rpc): check contextual validity of getblocktemplate response #5630
    • Add #[cfg(test)] to the new code so that it will only run when Zebra is built for testing
  • Sync Zebra to the tip
  • Call getblocktemplate RPC with test configuration
    • Convert the getblocktemplate response into a prepared block with an invalid/empty solution
    • Apply all of the contextual validation logic as a speculative check to ensure that the block template is contextually valid
@arya2 arya2 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 21, 2022
@arya2
Copy link
Contributor Author

arya2 commented Nov 21, 2022

Closing this for now in favour of #5685

@arya2 arya2 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2022
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: This is an improvement
Projects
None yet
Development

No branches or pull requests

2 participants