-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Conversation
5d8da70
to
13c6a75
Compare
There is something wrong with the executor tests with the error |
If you change a test in such a way that you would expect that the trie-root changes, then this is okay and you just need to use these new values as the expected ones. |
b45ae6b
to
bfd0ef5
Compare
So the problem with the integration test is that the local testnet now has the same values as the normal net. This means bob doesn't have enough funds to transfer. Who can send bob some more funds? :) The test generates 512 identical blocks, so what looked like syncing to a net was not actually syncing to a net, and that also explains why there wheren't enough funds in the genesis block. |
d4884f7
to
209dc3f
Compare
Yes, it would seem the dev net pulls in the same default config, i.e. did some democracy tests yesterday on a dev network and ended up tweaking these to get some saner defaults - parameter_types! {
pub const LaunchPeriod: BlockNumber = 5 * MINUTES;
pub const VotingPeriod: BlockNumber = 5 * MINUTES;
pub const EmergencyVotingPeriod: BlockNumber = 5 * MINUTES;
pub const MinimumDeposit: Balance = 1000;
pub const EnactmentPeriod: BlockNumber = 5 * MINUTES;
pub const CooloffPeriod: BlockNumber = 5 * MINUTES;
} So previously the dev network genesis overwrote with "nice for dev values", so not 100% sure where that happens atm. However, it would be "very useful" to have the dev/test with different values to the normal networks. |
5590912
to
7e77d92
Compare
So some items like the gas price can change as frequently as every block, although there isn't any code yet there to do so. If there are other items that should remain in storage and not be parameters, please point them out to me. |
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.
Regarding contracts, I think block_gas_limit might change relatively frequently.
However, I am not sure if I am confident in the initial values of these parameters so as a note any of these values might need some tuning.
@bkchr this doesn't allow for module-local consts to make it into the metadata though... |
(though i don't really care; whatever can be in fastest for now, i guess.) |
After talking to @gavofyork, I will do the metadata stuff today. After that is merged we can merge this one. I'm still in favor of using associated constants. Looking into the code, a lot of repetition is happening and this will happen again in Polkadot and each other Blockchain building on Substrate. |
yeah, happy to see a switch to associated constants. |
b5bfafa
to
a2a1372
Compare
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.
Overall looking good.
Just some minor stuff + some of my last comments.
Maybe we could put the default parameter type values into each module?
* balances: Turn storage items into parameters. * contract: Turn storage items into parameters. * council: Turn storage items into parameters. * finality-tracker: Turn storage items into parameters. * treasury: Turn storage items into parameters. * democracy: Fix tests. * example: Fix tests. * executive: Fix tests. * staking: Fix tests. * Update runtime. * Update template-node. * Update runtime version. * Fix executor tests. * Fix node cli tests. * Address grumbles. * Add removed default values to docs. * Make gas price a storage item. * Set associated consts must be callable outside of build. * Fix not enough gas to pay for transfer fee. * Fix build. * Emit metadata. * Fix build. * Add default values for all parameter types. * Fix build. * Fix build. * Fix build. * Fix build.
* balances: Turn storage items into parameters. * contract: Turn storage items into parameters. * council: Turn storage items into parameters. * finality-tracker: Turn storage items into parameters. * treasury: Turn storage items into parameters. * democracy: Fix tests. * example: Fix tests. * executive: Fix tests. * staking: Fix tests. * Update runtime. * Update template-node. * Update runtime version. * Fix executor tests. * Fix node cli tests. * Address grumbles. * Add removed default values to docs. * Make gas price a storage item. * Set associated consts must be callable outside of build. * Fix not enough gas to pay for transfer fee. * Fix build. * Emit metadata. * Fix build. * Add default values for all parameter types. * Fix build. * Fix build. * Fix build. * Fix build.
Closes #2400