Skip to content

feat(rpc): tag Zebra-mined blocks with a 🦓 coinbase marker#10836

Open
upbqdn wants to merge 1 commit into
mainfrom
coinbase-zebra-tag
Open

feat(rpc): tag Zebra-mined blocks with a 🦓 coinbase marker#10836
upbqdn wants to merge 1 commit into
mainfrom
coinbase-zebra-tag

Conversation

@upbqdn

@upbqdn upbqdn commented Jun 26, 2026

Copy link
Copy Markdown
Member

Motivation

Closes #10835.

Solution

  • Prepend a 🦓 marker (ZEBRA_COINBASE_MARKER) to the coinbase input of every block Zebra builds, as a single script push. When extra_coinbase_data is set, a ": " separator and the operator data follow.
  • Make mining.extra_coinbase_data a validating newtype (ExtraCoinbaseData) capped at 86 bytes (the 94-byte coinbase budget minus the 4-byte marker, 2-byte separator, and 2-byte push opcode). Oversized values are unrepresentable, so the config fails to load and Zebra refuses to start.
  • Update the mining book and rustdoc.

A separate marker push would need a zcash_transparent change; the single push carries marker + separator + data.

Why 🦓, not "Zebra"?

The marker is for machines — explorers and hashrate monitors that detect Zebra blocks by scanning coinbase data. Plain ASCII like "Zebra" is something miners genuinely type (pool names, messages, the word itself), so matching it would mis-tag other blocks. The 4-byte emoji (f0 9f a6 93) is vanishingly unlikely in human text, so a hit is almost certainly a Zebra block — and it's 1 byte smaller than "Zebra", leaving more room in the tight coinbase budget. A leading emoji also reads as a deliberate tag, not incidental text.

AI Disclosure

  • AI tools were used: Claude Code implemented the change, docs, and test.

Copilot AI review requested due to automatic review settings June 26, 2026 12:59
@upbqdn upbqdn self-assigned this Jun 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@ValarDragon

Copy link
Copy Markdown
Contributor

Thank you for adding this back!

@nuttycom nuttycom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

utACK! 🦓

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Tag Zebra-mined blocks with a coinbase marker

4 participants