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

Resubmitting the same payload (blocked eth acc) #454

Closed
volovyks opened this issue Feb 12, 2024 · 2 comments
Closed

Resubmitting the same payload (blocked eth acc) #454

volovyks opened this issue Feb 12, 2024 · 2 comments
Assignees
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Near BOS NEAR BOS team at Pagoda

Comments

@volovyks
Copy link
Collaborator

Description

@encody raised an important issue:

Take this sequence of events:
- alice.near calls sign on mpc-signer.near with payload p1.
- The recursive call runs out of gas before an MPC node calls respond on mpc-signer.near for payload p1.
- alice.near sees that her transaction failed.
- alice.near is prevented from calling sign with payload p1 again until the MPC node calls respond for payload p1.
- The MPC node calls respond with signature s1 for payload p1 .
- alice.near does not receive signature s1 since her sign call has already run out of gas.
- alice.near may now resubmit payload p1 for signing, but this restarts the process from step 1.
If this sequence of events is possible, then we have a problem at step 4: because EVM chains enforce sequential nonces, this will effectively lock whatever account is waiting for a signature until signature s1 has been generated and received, and it will require manual nonce resynchronization with the foreign chain (requiring either PoA or light client state proving) every single time a signature fails to be generated in time, since there is a possibility that the signature could still appear on-chain without our knowledge. We do not have the PoA or light client infrastructure to do this.

Optional: User Story

As a user, I want to be able to resubmit the same transaction if the previous call failed.

Prior discussion: https://pagodaplatform.slack.com/archives/C04HWL4BJKE/p1707540181322559?thread_ts=1707240635.158159&cid=C04HWL4BJKE

@volovyks volovyks added Near BOS NEAR BOS team at Pagoda Emerging Tech Emerging Tech flying formation at Pagoda labels Feb 12, 2024
@volovyks
Copy link
Collaborator Author

The real solution here is the near/NEPs#516

@volovyks volovyks linked a pull request Mar 6, 2024 that will close this issue
@volovyks volovyks self-assigned this Mar 6, 2024
@volovyks volovyks removed a link to a pull request Mar 6, 2024
@volovyks
Copy link
Collaborator Author

With the current design, it is possible to submit the same payload for the second time fi the fist one already failed or got a response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emerging Tech Emerging Tech flying formation at Pagoda Near BOS NEAR BOS team at Pagoda
Projects
Status: Done
Development

No branches or pull requests

1 participant