Skip to content

rpc: add 'rpc' as always-available module#20771

Closed
meowsbits wants to merge 1 commit intoethereum:masterfrom
etclabscore:fix/rpc-moduleavailability
Closed

rpc: add 'rpc' as always-available module#20771
meowsbits wants to merge 1 commit intoethereum:masterfrom
etclabscore:fix/rpc-moduleavailability

Conversation

@meowsbits
Copy link
Copy Markdown
Contributor

The MetadataAPI module 'rpc' is registered on
the creation of a new handler.

Signed-off-by: meows b5c6@protonmail.com


Fixes

A incorrect error ERROR[03-16|07:48:24.157] Unavailable modules in HTTP API list unavailable=[rpc] available="[admin debug web3 eth txpool personal ethash miner net]" is logged if a user configures --rpcapi=rpc[|,...]

./build/bin/geth --datadir=/tmp/gethddd --nodiscover --maxpeers=0 --rpc --rpcapi=admin,debug,eth,ethash,miner,net,personal,rpc,txpool,web3
07e1ff053b63af9b75c446c1a6aa7dbed878727ad2052b376648d46d@127.0.0.1:30303?discport=0"
INFO [03-16|07:48:24.157] IPC endpoint opened                      url=/tmp/gethddd/geth.ipc
ERROR[03-16|07:48:24.157] Unavailable modules in HTTP API list     unavailable=[rpc] available="[admin debug web3 eth txpool personal ethash miner net]"
INFO [03-16|07:48:24.158] HTTP endpoint opened                     url=http://127.0.0.1:8545 cors= vhosts=localhost

The MetadataAPI module 'rpc' is registered on
the creation of a new handler.

Signed-off-by: meows <b5c6@protonmail.com>
@meowsbits meowsbits requested review from fjl and holiman as code owners March 16, 2020 13:54
@holiman
Copy link
Copy Markdown
Contributor

holiman commented Mar 17, 2020

Since its always available, why would a user specify it explicitly?
And if we do add support for adding it explicitly, shouldn't the behaviour when not explicitly adding be to also not expose it?
I think we should close this PR.

@karalabe
Copy link
Copy Markdown
Member

The rpc namespace is a bit of a special snowflake. There's no real way to make it behave exactly like the others since it's a built in metadata endpoint. I think we should just tell people that it's always available and not specify it. Simpler than adding yet more code to work around a nicety.

@karalabe karalabe closed this Mar 17, 2020
@meowsbits
Copy link
Copy Markdown
Contributor Author

imo at least it shouldn't print an error if the user does configure it

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.

3 participants