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

Zebra returns a confusing error for block proposals when it isn't fully synced yet #5991

Closed
teor2345 opened this issue Jan 18, 2023 · 1 comment · Fixed by #6416
Closed
Assignees
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance A-rpc Area: Remote Procedure Call interfaces C-bug Category: This is a bug I-usability Zebra is hard to understand or use

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jan 18, 2023

Motivation

Sometimes Zebra knows that it isn't fully synced, but it accepts block proposals anyway.

This is a temporary issue that gets resolved when Zebra syncs to the tip. And it's just in proposal mode. So this seems like a low priority.

The proposals fail with an error like:
(The error format was changed in PRs #5993 and #6044.)

invalid proposal: Block {
    source: ValidateProposal(
        "proposal is not based on the current best chain tip: previous block hash must be the best chain tip",
    ),
}

But it would be more helpful to return the same error as the template mode:

Zebra has not synced to the chain tip, estimated distance: 67, local tip: Height(1952293). Hint: check your network connection, clock, and time zone settings.

Specifications

We might want to follow whatever zcashd does here.
This might impact compatibility with some mining pools.

Testing

Manually run zcash-rpc-block-template-to-proposal. To reproduce this error, get the template from a synced zcashd instance, and send it to a Zebra instance you just started.

Related Work

These tickets change how errors are displayed:

@teor2345 teor2345 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Low ❄️ I-usability Zebra is hard to understand or use A-rpc Area: Remote Procedure Call interfaces A-compatibility Area: Compatibility with other nodes or wallets, or standard rules labels Jan 18, 2023
@teor2345 teor2345 changed the title Zebra accepts block proposals when it isn't fully synced yet Zebra returns a confusing error for block proposals when it isn't fully synced yet Jan 18, 2023
@mpguerra mpguerra moved this to 🛑 Won't Fix in Zebra Jan 19, 2023
@mpguerra mpguerra added this to Zebra Jan 19, 2023
@mpguerra mpguerra moved this from 🛑 Won't Fix to 🆕 New in Zebra Jan 19, 2023
@mpguerra
Copy link
Contributor

@teor2345 teor2345 added A-diagnostics Area: Diagnosing issues or monitoring performance C-bug Category: This is a bug and removed A-compatibility Area: Compatibility with other nodes or wallets, or standard rules C-enhancement Category: This is an improvement labels Feb 1, 2023
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Mar 16, 2023
@arya2 arya2 self-assigned this Mar 27, 2023
@mergify mergify bot closed this as completed in #6416 Apr 3, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Diagnosing issues or monitoring performance A-rpc Area: Remote Procedure Call interfaces C-bug Category: This is a bug I-usability Zebra is hard to understand or use
Projects
Archived in project
3 participants