Skip to content

Add Ethereum PoW (ETHW) support#1534

Open
icyverso-create wants to merge 1 commit into
trezor:masterfrom
icyverso-create:add-ethw-coin
Open

Add Ethereum PoW (ETHW) support#1534
icyverso-create wants to merge 1 commit into
trezor:masterfrom
icyverso-create:add-ethw-coin

Conversation

@icyverso-create

Copy link
Copy Markdown

Adds support for Ethereum PoW (ETHW), the geth-based PoW fork of Ethereum (chain / network id 10001).

ETHW reuses the existing EthereumType implementation unchanged. The only chain-specific difference is the network id reported by the backend, which the generic eth Initialize() rejects with Unknown network id 10001. This mirrors the existing thin EVM-clone packages (bsc, base): a small bchain/coins/ethw package embeds eth.EthereumRPC and overrides Initialize() to accept network id 10001.

No base-package or other-coin code is modified — only the standard coin-addition points.

Changes

  • bchain/coins/ethw/ethwrpc.go — new package (embeds eth.EthereumRPC, MainNet = 10001)
  • bchain/coins/blockchain.go — register Ethereum PoW and Ethereum PoW Archive
  • configs/coins/ethw.json — coin definition (backend = ethereumpow geth v1.10.23.1)
  • docs/ports.md — port registry entry
  • tests/tests.json + tests/rpc/testdata/ethw.json — integration test + fixtures

Backend: https://github.com/ethereumpow/go-ethereum (geth fork)

Testing

  • go vet, gofmt, go run build/templates/generate.go ethw, and go run contrib/scripts/check-and-generate-port-registry.go all pass.
  • Unit tests pass.
  • Integration RPC tests pass against a fully-synced ETHW mainnet node:
    TestIntegration/ethw=main/rpc/{GetBlock,GetBlockHash,GetTransaction,EstimateFee,GetBlockHeader,EthCallBatch}
  • Verified on a live instance that API responses (tx incl. parsedData, address balances & tokens, contract info, blocks, websocket) match a reference node, an independent public ETHW RPC, and the OKLink block explorer.

Ethereum PoW (ETHW) is a geth-based PoW fork of Ethereum (chain/network id 10001). It reuses the EthereumType implementation unchanged; the only chain-specific difference is the network id reported by the backend, which the generic eth Initialize() rejects ("Unknown network id 10001").

Adds a thin bchain/coins/ethw package mirroring the existing EVM clones (bsc, base): it embeds eth.EthereumRPC and overrides Initialize() to accept network id 10001. Registers "Ethereum PoW" (+ Archive) in the coin factory, adds configs/coins/ethw.json, updates the port registry, and provides integration-test fixtures.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cranycrane

Copy link
Copy Markdown
Contributor

Hey, thanks for your contribution! Could you please share an address to a live Blockbook instance running ETHW so we can check everything is running as expected?

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.

2 participants