-
Notifications
You must be signed in to change notification settings - Fork 77
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 dev testnet. #141
Add dev testnet. #141
Conversation
ping @GeekArthur. sorry never written any go before. did I do something incredibly stupid? I think this is a really useful patch for people building apps that use the rosetta api. |
Network: ethereum.DevNetwork, | ||
} | ||
config.GenesisBlockIdentifier = nil | ||
config.Params = params.AllCliqueProtocolChanges |
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.
do we this change?
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.
looks to me like the config for the dev testnet: https://github.com/ethereum/go-ethereum/blob/master/params/config.go#L280
it has the right chain id 1337, all the protocol transitions are set to 0 and uses clique consensus.
How do you connect Rosetta to your local testnet? Do you use |
@dvc94ch I think it makes sense to me to enable geth developer mode for dApp development or smart contract development. The majority of current rosetta usage is around blockchain integration, I believe that's why we don't have dev mode as we need to leverage the large amount of data from pre-existing public network for validating the implementation of rosetta API |
I repurposed the To answer your question, you can test it using the command sequence below:
|
not a very exciting feature I guess. any estimate when you'll find time to review it? |
The PR LGTM, @xiaying-peng you can review again to see if it addresses your previous comments |
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.
LGTM, thanks for contributing!
If someone could reapprove so ci can run, that would be great |
@@ -148,14 +148,14 @@ func TestLoadConfiguration(t *testing.T) { | |||
cfg: &Configuration{ | |||
Mode: Online, | |||
Network: &types.NetworkIdentifier{ | |||
Network: ethereum.RopstenNetwork, | |||
Network: ethereum.DevNetwork, |
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.
can we add an additional test for devnet?
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.
well, depends if NETWORK=TESTNET means devnet or ropsten. there still is a test for ropsten here https://github.com/coinbase/rosetta-ethereum/pull/141/files/1032355c75d5317c6324ee9fdea22fad474a62fb#diff-0aadb475e41b205384efdcf4231633cdd5097bb5b936000d7ce06989c0e41741L92
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.
ah maybe you're asking how to enable the dev net? The only way currently is by setting NETWORK=TESTNET. we could also allow NETWORK=DEV or something like that.
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.
@xiaying-peng if you tell me what changes you'd like I'll make them. I'm not quite clear on what you'd like. We can leave TESTNET to mean ROPSTEN and add a DEV network, if that is what you want.
can we merge this? |
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.
LGTM, thank you!
Makes it easier to test stuff by adding support for running a local testnet.