node: refactor package node (#21105)
This PR significantly changes the APIs for instantiating Ethereum nodes in a Go program. The new APIs are not backwards-compatible, but we feel that this is made up for by the much simpler way of registering services on node.Node. You can find more information and rationale in the design document: https://gist.github.com/renaynay/5bec2de19fde66f4d04c535fd24f0775. There is also a new feature in Node's Go API: it is now possible to register arbitrary handlers on the user-facing HTTP server. In geth, this facility is used to enable GraphQL. There is a single minor change relevant for geth users in this PR: The GraphQL API is no longer available separately from the JSON-RPC HTTP server. If you want GraphQL, you need to enable it using the ./geth --http --graphql flag combination. The --graphql.port and --graphql.addr flags are no longer available.
Showing
- cmd/faucet/faucet.go 11 additions, 14 deletionscmd/faucet/faucet.go
- cmd/geth/chaincmd.go 8 additions, 7 deletionscmd/geth/chaincmd.go
- cmd/geth/config.go 7 additions, 5 deletionscmd/geth/config.go
- cmd/geth/consolecmd.go 8 additions, 8 deletionscmd/geth/consolecmd.go
- cmd/geth/dao_test.go 1 addition, 2 deletionscmd/geth/dao_test.go
- cmd/geth/main.go 15 additions, 34 deletionscmd/geth/main.go
- cmd/geth/usage.go 2 additions, 2 deletionscmd/geth/usage.go
- cmd/p2psim/main.go 1 addition, 1 deletioncmd/p2psim/main.go
- cmd/utils/cmd.go 1 addition, 1 deletioncmd/utils/cmd.go
- cmd/utils/flags.go 36 additions, 78 deletionscmd/utils/flags.go
- cmd/utils/flags_legacy.go 13 additions, 0 deletionscmd/utils/flags_legacy.go
- cmd/wnode/main.go 2 additions, 3 deletionscmd/wnode/main.go
- console/console_test.go 3 additions, 5 deletionsconsole/console_test.go
- core/rawdb/freezer.go 11 additions, 7 deletionscore/rawdb/freezer.go
- eth/api_backend.go 22 additions, 0 deletionseth/api_backend.go
- eth/backend.go 30 additions, 64 deletionseth/backend.go
- ethclient/ethclient_test.go 15 additions, 14 deletionsethclient/ethclient_test.go
- ethstats/ethstats.go 69 additions, 83 deletionsethstats/ethstats.go
- graphql/graphql_test.go 107 additions, 1 deletiongraphql/graphql_test.go
- graphql/service.go 11 additions, 74 deletionsgraphql/service.go
Loading
Please register or sign in to comment