Add Ethereum PoW (ETHW) support#1534
Open
icyverso-create wants to merge 1 commit into
Open
Conversation
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>
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? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 withUnknown network id 10001. This mirrors the existing thin EVM-clone packages (bsc,base): a smallbchain/coins/ethwpackage embedseth.EthereumRPCand overridesInitialize()to accept network id10001.No base-package or other-coin code is modified — only the standard coin-addition points.
Changes
bchain/coins/ethw/ethwrpc.go— new package (embedseth.EthereumRPC,MainNet = 10001)bchain/coins/blockchain.go— registerEthereum PoWandEthereum PoW Archiveconfigs/coins/ethw.json— coin definition (backend = ethereumpow geth v1.10.23.1)docs/ports.md— port registry entrytests/tests.json+tests/rpc/testdata/ethw.json— integration test + fixturesBackend: https://github.com/ethereumpow/go-ethereum (geth fork)
Testing
go vet,gofmt,go run build/templates/generate.go ethw, andgo run contrib/scripts/check-and-generate-port-registry.goall pass.TestIntegration/ethw=main/rpc/{GetBlock,GetBlockHash,GetTransaction,EstimateFee,GetBlockHeader,EthCallBatch}parsedData, address balances & tokens, contract info, blocks, websocket) match a reference node, an independent public ETHW RPC, and the OKLink block explorer.