Skip to content

bug: Zebra does not advertise mined blocks in some cases #8909

Open

Description

What happened?

I expected to see this happen: Zebra should advertise blocks it mines

Instead, this happened: it doesn't if the node is ahead in the network and it's the sole miner.

What were you doing when the issue happened?

Mining on the testnet

Zebra logs

No response

Zebra Version

1.9.0 (restore-internal-miner branch)

Which operating systems does the issue happen on?

  • Linux
  • macOS
  • Windows
  • Other OS

OS details

No response

Additional information

Zebra has a gossip task in gossip.rs that repeatedly waits until it's close to the tip and advertises the tip block. However, in SyncStatus::wait_until_close_to_tip() which is used to that, it calls is_close_to_tip() which relies on the last synced block lengths to tell if it's close to the tip. But if the node is the ahead of the other nodes (e.g. it's the sole miner) then it won't ever receive blocks and is_close_to_tip() will return false.

I'm not sure what is the best fix for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bugS-needs-triageStatus: A bug report needs triage

    Type

    Projects

    • Status

      Sprint Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions