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

[FEATURE] Polkadot network upgrade: sunset of stash/controller feature #5462

Merged
2 commits merged into from
Nov 28, 2023

Conversation

chabroA
Copy link
Contributor

@chabroA chabroA commented Nov 15, 2023

📝 Description

Following an update of the Polkadot protocol, this PR removes the controller arg from the calls in our Polkadot integration.

❓ Context

✅ Checklist

Pull Requests must pass the CI and be code reviewed. Set as Draft if the PR is not ready.

  • npx changeset was attached.
  • Covered by automatic tests.
  • Impact of the changes:
    • Polkadot integration on LLD and LLC
    • The staking feature of the Polkadot coin should still work fine

🧐 Checklist for the PR Reviewers

  • The code aligns with the requirements described in the linked JIRA or GitHub issue.
  • The PR description clearly documents the changes made and explains any technical trade-offs or design decisions.
  • There are no undocumented trade-offs, technical debt, or maintainability issues.
  • The PR has been tested thoroughly, and any potential edge cases have been considered and handled.
  • Any new dependencies have been justified and documented.
  • Performance considerations have been taken into account. (changes have been profiled or benchmarked if necessary)

@chabroA chabroA requested a review from a team as a code owner November 15, 2023 14:55
Copy link

vercel bot commented Nov 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Ignored Deployments
Name Status Preview Updated (UTC)
ledger-live-docs ⬜️ Ignored (Inspect) Nov 15, 2023 2:55pm
ledger-live-github-bot ⬜️ Ignored (Inspect) Nov 15, 2023 2:55pm
native-ui-storybook ⬜️ Ignored (Inspect) Nov 15, 2023 2:55pm
react-ui-storybook ⬜️ Ignored (Inspect) Nov 15, 2023 2:55pm
web-tools ⬜️ Ignored (Inspect) Nov 15, 2023 2:55pm

@live-github-bot
Copy link
Contributor

Desktop Build Checks


Copy link
Member

@hedi-edelbloute hedi-edelbloute left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's test every staking operations

i launched the bot but i think it might not check staking as balance is low

Copy link

[Bot] Testing with 'Oxygen' ✅ 3 txs ($34.82) ⏲ 2min 40s

✅ 1 specs are successful: Polkadot

What is the bot and how does it work? Everything is documented here!

⚠️ 1 spec hints
  • Spec Polkadot:
    • There are not enough accounts (6) to cover all mutations (7).
      Please increase the account target to at least 8 accounts
Details of the 3 mutations

Spec Polkadot (6)

Spec Polkadot found 6 Polkadot accounts (preload: 1455ms). Will use Polkadot 24.9430.3 on nanoSP 1.1.0
Polkadot 1 cross: 1.09228 DOT (15ops) (16KwUHz2qkSqXwpiAsH2b6PZrYkxhGYi33E2TLU1FD6o7bVa on 44'/354'/0'/0'/0') polkadotbip44#0 js:2:polkadot:16KwUHz2qkSqXwpiAsH2b6PZrYkxhGYi33E2TLU1FD6o7bVa:polkadotbip44
Polkadot 2: 1.48334 DOT (29ops) (1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm on 44'/354'/1'/0'/0') polkadotbip44#1 js:2:polkadot:1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm:polkadotbip44
Polkadot 3: 1.24331 DOT (20ops) (12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy on 44'/354'/2'/0'/0') polkadotbip44#2 js:2:polkadot:12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy:polkadotbip44
Polkadot 4: 1.25961 DOT (17ops) (14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi on 44'/354'/3'/0'/0') polkadotbip44#3 js:2:polkadot:14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi:polkadotbip44
Polkadot 5: 1.10298 DOT (15ops) (16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT on 44'/354'/4'/0'/0') polkadotbip44#4 js:2:polkadot:16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT:polkadotbip44
Polkadot 6: 0 DOT (0ops) (15qDxnyJ2rSYTT5w17NEPWBESxqmVippsymSGMkJCLQruev on 44'/354'/5'/0'/0') polkadotbip44#5 js:2:polkadot:15qDxnyJ2rSYTT5w17NEPWBESxqmVippsymSGMkJCLQruev:polkadotbip44
necessary accounts resynced in 0.25ms
▬ Polkadot 24.9430.3 on nanoSP 1.1.0
→ FROM Polkadot 2: 1.48334 DOT (29ops) (1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm on 44'/354'/1'/0'/0') polkadotbip44#1 js:2:polkadot:1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm:polkadotbip44 1.4833424758 DOT spendable. 

max spendable ~1.46759
★ using mutation 'send 50%~'
→ TO Polkadot 5: 1.10298 DOT (15ops) (16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT on 44'/354'/4'/0'/0') polkadotbip44#4 js:2:polkadot:16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT:polkadotbip44
✔️ transaction 
SEND  0.2514850611 DOT
TO 16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT
STATUS (492ms)
  amount: 0.2514850611 DOT
  estimated fees: 0.0156348041 DOT
  total spent: 0.2671198652 DOT
errors: 
errors: 
✔️ has been signed! (4s) 
✔️ broadcasted! (85ms) optimistic operation: 
  -0.2671198652 DOT  OUT        0xb3a896bbeaf51fb1b88260132e093e6a0b29d541780663a5e29b55a2f585ca87 2023-11-16T09:49
✔️ operation confirmed (30.5s): 
  -0.2671198652 DOT  OUT        0xb3a896bbeaf51fb1b88260132e093e6a0b29d541780663a5e29b55a2f585ca87 2023-11-16T09:49
✔️ Polkadot 2: 1.21622 DOT (30ops) (1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm on 44'/354'/1'/0'/0') polkadotbip44#1 js:2:polkadot:1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm:polkadotbip44 1.2162226106 DOT spendable. 
(in 30.5s)
✔️ destination operation 
  +0.2514850611 DOT  IN         0xb3a896bbeaf51fb1b88260132e093e6a0b29d541780663a5e29b55a2f585ca87 2023-11-16T09:49
(in 10.6s)

necessary accounts resynced in 0.28ms
▬ Polkadot 24.9430.3 on nanoSP 1.1.0
→ FROM Polkadot 4: 1.25961 DOT (17ops) (14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi on 44'/354'/3'/0'/0') polkadotbip44#3 js:2:polkadot:14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi:polkadotbip44 1.259613745 DOT spendable. 

max spendable ~1.24386
★ using mutation 'send 50%~'
→ TO Polkadot 3: 1.24331 DOT (20ops) (12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy on 44'/354'/2'/0'/0') polkadotbip44#2 js:2:polkadot:12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy:polkadotbip44
✔️ transaction 
SEND  0.1355272335 DOT
TO 12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy
STATUS (367ms)
  amount: 0.1355272335 DOT
  estimated fees: 0.0156348041 DOT
  total spent: 0.1511620376 DOT
errors: 
errors: 
✔️ has been signed! (3.9s) 
✔️ broadcasted! (206ms) optimistic operation: 
  -0.1511620376 DOT  OUT        0x4575de70f89c6123bf02d8fc7359d49473663ad045fd282178af3a6682334c17 2023-11-16T09:50
✔️ operation confirmed (30.6s): 
  -0.1511620376 DOT  OUT        0x4575de70f89c6123bf02d8fc7359d49473663ad045fd282178af3a6682334c17 2023-11-16T09:50
✔️ Polkadot 4: 1.10845 DOT (18ops) (14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi on 44'/354'/3'/0'/0') polkadotbip44#3 js:2:polkadot:14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi:polkadotbip44 1.1084517074 DOT spendable. 
(in 30.6s)
✔️ destination operation 
  +0.1355272335 DOT  IN         0x4575de70f89c6123bf02d8fc7359d49473663ad045fd282178af3a6682334c17 2023-11-16T09:50
(in 10.8s)

necessary accounts resynced in 2.20ms
▬ Polkadot 24.9430.3 on nanoSP 1.1.0
→ FROM Polkadot 5: 1.35447 DOT (16ops) (16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT on 44'/354'/4'/0'/0') polkadotbip44#4 js:2:polkadot:16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT:polkadotbip44 1.3544744267 DOT spendable. 

max spendable ~1.33872
★ using mutation 'send 50%~'
→ TO Polkadot 2: 1.21622 DOT (30ops) (1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm on 44'/354'/1'/0'/0') polkadotbip44#1 js:2:polkadot:1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm:polkadotbip44
✔️ transaction 
SEND  0.1846329305 DOT
TO 1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm
STATUS (415ms)
  amount: 0.1846329305 DOT
  estimated fees: 0.0156348041 DOT
  total spent: 0.2002677346 DOT
errors: 
errors: 
✔️ has been signed! (3.8s) 
✔️ broadcasted! (161ms) optimistic operation: 
  -0.2002677346 DOT  OUT        0x4c8046ba73e968892c2c4afec01c4a7ed0dcfb0383eab835b0d114ad17f033f7 2023-11-16T09:50
✔️ operation confirmed (30.5s): 
  -0.2002677346 DOT  OUT        0x4c8046ba73e968892c2c4afec01c4a7ed0dcfb0383eab835b0d114ad17f033f7 2023-11-16T09:50
✔️ Polkadot 5: 1.1542 DOT (17ops) (16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT on 44'/354'/4'/0'/0') polkadotbip44#4 js:2:polkadot:16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT:polkadotbip44 1.1542066921 DOT spendable. 
(in 30.5s)
✔️ destination operation 
  +0.1846329305 DOT  IN         0x4c8046ba73e968892c2c4afec01c4a7ed0dcfb0383eab835b0d114ad17f033f7 2023-11-16T09:50
(in 10.4s)


Details of the 6 uncovered mutations

Spec Polkadot (6)

  • send max: send is too low to activate account (2), balance is too low (1)
  • bond - bondExtra: not enough balance to bond (2), balance is too low (1)
  • unbond: can't unbond (2), balance is too low (1)
  • rebond: can't rebond (2), balance is too low (1)
  • nominate: can't nominate (2), balance is too low (1)
  • withdraw: nothing to withdraw (2), balance is too low (1)
Portfolio ($34.82) – Details of the 1 currencies
Spec (accounts) State Remaining Runs (est) funds?
Polkadot (6) 102 ops (+6), 6.18154 DOT ($34.82) ⚠️ 30 16KwUHz2qkSqXwpiAsH2b6PZrYkxhGYi33E2TLU1FD6o7bVa
Polkadot 1 cross: 1.09228 DOT (15ops) (16KwUHz2qkSqXwpiAsH2b6PZrYkxhGYi33E2TLU1FD6o7bVa on 44'/354'/0'/0'/0') polkadotbip44#0 js:2:polkadot:16KwUHz2qkSqXwpiAsH2b6PZrYkxhGYi33E2TLU1FD6o7bVa:polkadotbip44
Polkadot 2: 1.40085 DOT (31ops) (1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm on 44'/354'/1'/0'/0') polkadotbip44#1 js:2:polkadot:1Fxs6gCxLVmx4PVwpeqqd53Fve3BFfjsqinREqyzeE3qMtm:polkadotbip44
Polkadot 3: 1.37884 DOT (21ops) (12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy on 44'/354'/2'/0'/0') polkadotbip44#2 js:2:polkadot:12TaEe4DmNMsv6sufAiUx4rz3ypMksuUr19jC3a99U7p9ipy:polkadotbip44
Polkadot 4: 1.10845 DOT (18ops) (14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi on 44'/354'/3'/0'/0') polkadotbip44#3 js:2:polkadot:14NHRVm4ezgnAodCZcV6o6E8DqDXQi2VgsJRD4gKDyhxrNPi:polkadotbip44
Polkadot 5: 1.1542 DOT (17ops) (16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT on 44'/354'/4'/0'/0') polkadotbip44#4 js:2:polkadot:16Woo4M3FMUUUXNKphUyx42LH42cHYgThQm959Z2DARJUePT:polkadotbip44
Polkadot 6: 0 DOT (0ops) (15qDxnyJ2rSYTT5w17NEPWBESxqmVippsymSGMkJCLQruev on 44'/354'/5'/0'/0') polkadotbip44#5 js:2:polkadot:15qDxnyJ2rSYTT5w17NEPWBESxqmVippsymSGMkJCLQruev:polkadotbip44
Performance ⏲ 2min 40s

Time spent for each spec: (total across mutations)

Spec (accounts) preload scan re-sync tx status sign op broadcast test destination test
TOTAL 1455ms 16.4s 3.61ms 1274ms 11.7s 452ms 91.6s 31.9s
Polkadot (5) 1455ms 16.4s 3.61ms 1274ms 11.7s 452ms 91.6s 31.9s

What is the bot and how does it work? Everything is documented here!

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following discussion this morning: no need to do anything more, as after the network update clients may still have separate controller/stash accounts, and Live will still be able to let them move away from this configuration.

All good 👌

@ghost
Copy link

ghost commented Nov 28, 2023

polkadot-controller.mp4

Validated on this PR:

  • account that is only a stash: display is correct
  • account that is only a controller: display is correct
  • doing a setController on a stash account: tx successful
  • after the tx, former stash and controller accounts are displayed as normal accounts, staking is enabled

@ghost ghost merged commit cf41c53 into develop Nov 28, 2023
55 of 65 checks passed
@ghost ghost deleted the feat/LIVE-8064-polkadot-sunset-stash-controller-feature branch November 28, 2023 09:16
This pull request was closed.
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.

3 participants