-
Notifications
You must be signed in to change notification settings - Fork 1
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
Flexible configuration for chain simulator #21
Conversation
pkg/proxy/api/endpoints.go
Outdated
initialWalletsEndpoint = "/simulator/initial-wallets" | ||
setKeyValuesEndpoint = "/simulator/address/:address/set-state" | ||
setStateMultipleEndpoint = "/simulator/set-state" | ||
addValidatorsKeys = "/simulator/add-keys" |
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 you please add also in the README file information about the new endpoints
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.
forgot about the README.md, added.
|
||
|
||
if __name__ == "__main__": | ||
main() |
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.
👍
cmd/chainsimulator/flags.go
Outdated
@@ -14,6 +14,11 @@ var ( | |||
Usage: "The main configuration file to load", | |||
Value: "./config/config.toml", | |||
} | |||
nodeOverrideConfigurationFile = cli.StringFlag{ |
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.
👍
config/tomlConfig_test.go
Outdated
t.Parallel() | ||
|
||
testString := ` | ||
# OverridableConfigTomlValues represents an array of items to be overloaded inside other configuration files, which can be helpful |
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.
Test string can be shorter, to only have a short, dummy comment instead of the full description.
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.
made it shorter
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.
made it shorter here #21
|
||
def main(): | ||
# create a network provider | ||
provider = ProxyNetworkProvider(SIMULATOR_URL) |
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.
🤩
provider = ProxyNetworkProvider(SIMULATOR_URL) | ||
|
||
# generate blocks until we reach the epoch 10 | ||
provider.do_post(f"{GENERATE_BLOCKS_UNTIL_EPOCH_REACHED_URL}/10", {}) |
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.
Could have been a constant. But perfectly fine as it is, in this context.
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.
added const here: #22
a443fcf
27dfa3e
to
ba634bd
Compare
-num-waiting-validators-per-shard
and-num-waiting-validators-meta
flags/simulator/generate-blocks-until-epoch-reached
endpoint route + .py example/simulator/force-reset-validator-statistics
endpoint route