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

Don't apply a message that is getting replaced when estimating gas #5402

Closed
Kubuxu opened this issue Jan 22, 2021 · 0 comments · Fixed by #5403
Closed

Don't apply a message that is getting replaced when estimating gas #5402

Kubuxu opened this issue Jan 22, 2021 · 0 comments · Fixed by #5403
Labels
area/messages kind/bug Kind: Bug P2 P2: Should be resolved

Comments

@Kubuxu
Copy link
Contributor

Kubuxu commented Jan 22, 2021

Currently, when estimating gas for a message we apply all messages from the From address that are in the mpool.

We should appply messages only up to nonce-1 inclusive.

@jennijuju jennijuju added area/messages P2 P2: Should be resolved labels Jan 22, 2021
@jennijuju jennijuju added the kind/bug Kind: Bug label Jan 22, 2021
Kubuxu pushed a commit that referenced this issue Jan 22, 2021
The bug is applying all messages from given From address are priors
before appling the message that we are estimating.

If user tries replacing message in the middle with gas limit estimation
then message sequence is off and user will either get an execution error
or gas mis-esimation.

Resolves #5402

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
bibibong pushed a commit to EpiK-Protocol/go-epik that referenced this issue Feb 22, 2021
The bug is applying all messages from given From address are priors
before appling the message that we are estimating.

If user tries replacing message in the middle with gas limit estimation
then message sequence is off and user will either get an execution error
or gas mis-esimation.

Resolves filecoin-project#5402

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/messages kind/bug Kind: Bug P2 P2: Should be resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants