Page MenuHomePhabricator

[explorer and ecash-herald] Parse new miner anon minimalist
AbandonedPublic

Authored by bytesofman on Aug 5 2024, 18:50.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

Depends on D16586

Parse new anon miner.

This miner has consistently-18-byte coinbase hex pushes. Pushes are regularly structured: 3-byte push for the blockheight (little-endian), 4-byte push of unknown data, and 8-byte push of unknown data.

In the herald, we parse by the payout output script. In the explorer, we parse by the structure of the coinbase hex, since we do not have the outputScript readily available from the block page.

Test Plan

npm test for ecash-herald, cargo test for explorer

Diff Detail

Repository
rABC Bitcoin ABC
Branch
new-miner-mathlete
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29863
Build 59261: Build Diffecash-herald-tests
Build 59260: arc lint + arc unit

Event Timeline

clean up comment spacing from lint, add reference examples in comments

bytesofman published this revision for review.Aug 5 2024, 18:53
Fabien requested changes to this revision.Aug 6 2024, 06:44
Fabien added a subscriber: Fabien.
Fabien added inline comments.
web/explorer/explorer-server/src/templating/filters.rs
193 ↗(On Diff #49041)

The blockheight is in the coinbase data already, see https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki

This revision now requires changes to proceed.Aug 6 2024, 06:44

Improve parsing for new miner

bytesofman retitled this revision from [explorer and ecash-herald] Parse new miner anon mathlete to [explorer and ecash-herald] Parse new miner anon minimalist.

fix comments in herald constants

See another approach in D16596. This avoids nicknames for miners that are anonymous and also prevent the need for maintenance/special casing entirely.

to be updated per mentioned diff

D16596 is a better approach.

There is probably a way to also tag these miners by the last chars of the deposit address in explorer, but it is not readily available and might need another API call (you need blocktxs for this). The info is less useful in the explorer anyway compared to the herald, where we can readily see if we are getting "the same" unidentified miner a lot.

Leaving address-only identifiable miners as "unknown" in explorer (where you can still check their address) is ok for now.