-
Notifications
You must be signed in to change notification settings - Fork 805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add deny list config for EVM RPC #1427
Conversation
timeouts := rpc.DefaultHTTPTimeouts | ||
timeouts.WriteTimeout = time.Second | ||
srv := createAndStartServer(t, &evmrpc.HTTPConfig{ | ||
DenyList: []string{"test_sleep"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the test_sleep
endpoint exists on this server. Might be good to try to denylist an endpoint that exists like test
for this test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh just saw this, I think we added that as a new module in the config itself, if you look at previous test cases, it seems to be a valid endpoint
Describe your changes and provide context
This PR add a new configuration for EVM RPC to configure deny list. If a method appears in deny list, the server will return an error response to indicate the method is not found.
Config would be look like:
deny_list = ["eth_a", "eth_b"]
Testing performed to validate your change
Added unit test for deny list.