Skip to content
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

feat(vald): new EVM config field #1245

Merged
merged 8 commits into from
Jan 25, 2022
Merged

feat(vald): new EVM config field #1245

merged 8 commits into from
Jan 25, 2022

Conversation

jcs47
Copy link
Contributor

@jcs47 jcs47 commented Jan 21, 2022

Description

Upon testing non-standard rpc methods (e.g., Moonbeam's chain_getFinalizedHead), ganache returns error code -32000 (server error) instead of -32601 (method not found error). In order to be able to continue using ganache for local testing (as well as to account for other possible situations where we wouldn't want to support non-standard rpc functionality), this PR adds a new field in evm config params called rpc-module-support, which allows vald to skip detecting non-standard rpc functionality.

Todos

  • Unit tests
  • Manual tests
  • Documentation
  • Connect epics/issues
  • Tag type of change

Steps to Test

Expected Behaviour

Other Notes

@jcs47 jcs47 added the enhancement New feature or request label Jan 21, 2022
Name string `mapstructure:"name"`
RPCAddr string `mapstructure:"rpc_addr"`
WithBridge bool `mapstructure:"start-with-bridge"`
RPCModuleSupport bool `mapstructure:"rpc-module-support"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is quite weird. It's basically saying if it's set to true, then do not try to detect whether or not it's beyond the standard ethereum jsonrpc. Maybe something like enable-rpc-detection.

x/evm/types/config.go Outdated Show resolved Hide resolved
@jcs47 jcs47 requested a review from fish-sammy January 25, 2022 16:50
@jcs47 jcs47 merged commit 48b5ce7 into main Jan 25, 2022
@jcs47 jcs47 deleted the evm_config_add_field branch January 25, 2022 17:22
Name string `mapstructure:"name"`
RPCAddr string `mapstructure:"rpc_addr"`
WithBridge bool `mapstructure:"start-with-bridge"`
EnableRPCDetection bool `mapstructure:"enable-rpc-detection"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanna confirm before you merge, does this mean that EnableRPCDetection is optional in the config.toml file and if one doesn't have it there it would default to true?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants