-
Notifications
You must be signed in to change notification settings - Fork 27
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
Make MsgSubmitProposal
a nondeterministic message
#377
Conversation
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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @dzmitryhil, @silverspase, and @ysv)
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
type BalancesOptions struct { Messages []sdk.Msg NondeterministicMessagesGas uint64
Why do we need it? What about the Amount
it seems similar.
Code quote:
NondeterministicMessagesGas
integration-tests/gov.go
line 20 at r1 (raw file):
) const submitProposalGas = 200_000
Is it enough for any type? Maybe more ?
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.
Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @silverspase, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Why do we need it? What about the
Amount
it seems similar.
Just to not mix the two, Amount is for what account wants to transfer, NondeterministicMessagesGas specifically defines the gas assigned to nondeterministic txs
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Is it enough for any type? Maybe more ?
If we see that tests stop passing we will increase
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @silverspase, and @ysv)
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Just to not mix the two, Amount is for what account wants to transfer, NondeterministicMessagesGas specifically defines the gas assigned to nondeterministic txs
But we already use the Amount for such cases, for example WASM.
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
If we see that tests stop passing we will increase
Maybe we can estimate before the submission and fund the account with the proper amount instead?
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @silverspase, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
But we already use the Amount for such cases, for example WASM.
Then it should be converted.
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Maybe we can estimate before the submission and fund the account with the proper amount instead?
it's nondeterministic so it may change all the time.
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Then it should be converted.
I still don't see a need for it, the value here is quite random, so just append to the amount.
I would agree if we somehow check that we spend just that amount, but we don't so no need to introduce additional amount.
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
it's nondeterministic so it may change all the time.
Estimate before the TX execution with gas multiplier = 1.3 and that is about 99% garanty for the znet.
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @miladz68, @silverspase, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
I still don't see a need for it, the value here is quite random, so just append to the amount.
I would agree if we somehow check that we spend just that amount, but we don't so no need to introduce additional amount.
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.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @silverspase, @wojtek-coreum, and @ysv)
integration-tests/chain.go
line 123 at r1 (raw file):
I think treating it as non deterministic is a better approach. just let the default cosmos behavior take over and estimate the gas and then submit.
…deterministic-gas # Conflicts: # x/deterministicgas/config_test.go
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.
Reviewable status: 2 of 14 files reviewed, 2 unresolved discussions (waiting on @dzmitryhil, @miladz68, @silverspase, and @ysv)
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Estimate before the TX execution with gas multiplier = 1.3 and that is about 99% garanty for the znet.
Done.
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.
Reviewable status: 2 of 14 files reviewed, 1 unresolved discussion (waiting on @miladz68, @silverspase, @wojtek-coreum, and @ysv)
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Done.
Let's use prev solution :-)
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.
Reviewable status: 1 of 14 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @miladz68, @silverspase, and @ysv)
integration-tests/gov.go
line 20 at r1 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Let's use prev solution :-)
Done.
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.
Reviewable status: 1 of 14 files reviewed, all discussions resolved (waiting on @miladz68, @silverspase, and @ysv)
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.
Reviewed 1 of 12 files at r3, 3 of 6 files at r4, 9 of 9 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)
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.
Reviewed 1 of 12 files at r3, 3 of 6 files at r4, 9 of 9 files at r5, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @silverspase and @ysv)
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)