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

Fix/reset polkadot proxy account nonce #4053

Closed

Conversation

ramizhasan111
Copy link
Contributor

@ramizhasan111 ramizhasan111 commented Sep 27, 2023

Pull Request

Closes: PRO-864

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have updated documentation where appropriate.

Summary

the resetting of the polkadot proxy account nonce is now moved to when the polkadot rotation tx is constructed.

@ramizhasan111 ramizhasan111 requested review from ahasna, tomjohnburton, niklasnatter and zoheb391 and removed request for a team September 27, 2023 11:10
@linear
Copy link

linear bot commented Sep 27, 2023

PRO-864 Polkadot Vault nonce sync issues

On Perseverance, the vault nonce got out of sync. The current signer key is unavailable, because we fail to broadcast the vault rotation transaction. That is because it uses the wrong nonce.

The handover transaction was constructed in statechain block 363820 with nonce 0

The signing key is da5ebeaf4401c7f3c627c0a91d1858ddde7dcc5a10ea585185e7d182f1d9d72a

But nonce 0 for that key had already been used by a different transaction that was submitted in statechain block 361716 (and made it into polkadot in polkadot block 382499)

The account nonce was reset from 2 to 0 in statechain block 361702. Even after that, several attempts to sign/submit extrinsics using nonce 2 were made

I believe the underlying cause was that a swap drained the entire dot vault, which prevented the transaction from going through. once we provided additional funds, the transaction succeeded, but by that time our nonce counting somehow got out of sync

@ramizhasan111 ramizhasan111 changed the base branch from main to release/0.9 September 27, 2023 11:12
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

Merging #4053 (b91c06c) into release/0.9 (0fbf186) will decrease coverage by 0%.
The diff coverage is 0%.

@@             Coverage Diff             @@
##           release/0.9   #4053   +/-   ##
===========================================
- Coverage           72%     72%   -0%     
===========================================
  Files              366     366           
  Lines            56871   56864    -7     
  Branches         56871   56864    -7     
===========================================
- Hits             41031   41006   -25     
- Misses           13759   13770   +11     
- Partials          2081    2088    +7     
Files Coverage Δ
state-chain/chains/src/dot.rs 41% <ø> (ø)
state-chain/pallets/cf-vaults/src/lib.rs 79% <ø> (-<1%) ⬇️
state-chain/pallets/cf-vaults/src/mock.rs 82% <ø> (-<1%) ⬇️
state-chain/runtime/src/lib.rs 39% <ø> (ø)
state-chain/traits/src/lib.rs 52% <ø> (-<1%) ⬇️
state-chain/runtime/src/chainflip.rs 42% <0%> (-1%) ⬇️
state-chain/chains/src/dot/api.rs 1% <0%> (-<1%) ⬇️
state-chain/pallets/cf-environment/src/lib.rs 67% <0%> (-3%) ⬇️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@dandanlen
Copy link
Collaborator

I'll cherry-pick this into the 0.9.3 branch.

@dandanlen
Copy link
Collaborator

Closing this here, will cherry pick from main via a separate PR.

@dandanlen dandanlen closed this Sep 28, 2023
@ahasna ahasna deleted the fix/reset-polkadot-proxy-account-nonce branch May 23, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants