edgeware-network / edgeware-node

Substrate node implementing Edgeware
https://edgewa.re
GNU General Public License v3.0
17 stars 17 forks source link

Erup-5 Runtime upgrade tracking #20

Closed flipchan closed 1 year ago

flipchan commented 2 years ago

Issue for tracking the erup-5-latest runtime upgrade

flipchan commented 2 years ago

Sudo > submit unchecked > compact wasm version of erup-5

Error: Service(Application(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such function: env:ext_storage_clear_prefix_version_2\"))"))))
flipchan commented 2 years ago

https://spec.polkadot.network/#_ext_storage_clear_prefix

flipchan commented 2 years ago

https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines

flipchan commented 2 years ago

Erup-5:

🏋️  Runtime size:       5.500 MB (5,767,006 bytes)
🗜  Compressed:          No
✨ Reserved meta:        OK - [6D, 65, 74, 61]
🎁 Metadata version:     V14
🔥 Core version:     edgeware-53 (edgeware-node-53.tx3.au16)
🗳️  system.setCode hash:        0x99afe6dd8fbc4124fcc83aa006047cc25c0e62f87546c9a4ba8455e926258a8c
🗳️  authorizeUpgrade hash:  0xc5ab02c855d7b766171f0d50b892df924974b1d50dc6c5067684b326f120f7f9
#️⃣  Blake2-256 hash:       0x6b5d3a24b5e9b27a7fc2f8452f47cc75075f08b798476cfc480615c5573ab108
📦 IPFS:         https://www.ipfs.io/ipfs/QmYmCrW7hQkbqmxeXnnwJzDreZA9edD7tZb6jZGnnG5JFB

Current erup-4:

🏋️  Runtime size:       3.244 MB (3,401,167 bytes)
🗜  Compressed:          No
✨ Reserved meta:        OK - [6D, 65, 74, 61]
🎁 Metadata version:     V13
🔥 Core version:     edgeware-51 (edgeware-node-51.tx2.au16)
🗳️  system.setCode hash:        0x10d3eaf6081d95c42884d46d9f35290305fc3cd297d3533cd111369b4424f9c2
🗳️  authorizeUpgrade hash:  0xa1a888c2a66aef3350af88932c40764bc5f270fd3a42a35dc5797f293a7b398d
#️⃣  Blake2-256 hash:       0xbc4333d1b8abad2089f0ba1354530e664074c655b905f411e47a4bb262159467
📦 IPFS:         https://www.ipfs.io/ipfs/QmWCJmvYX1gz5UJ9KdpKkbEGspZPt3Tw9NFjYxMy3u67pA
flipchan commented 2 years ago

subwasm diff erup4.edgeware_runtime.compact.wasm erup5.edgeware_runtime.compact.compressed.wasm > out_compact_wasm_diff

flipchan commented 2 years ago
subwasm meta erup4.edgeware_runtime.compact.wasm 
 - 00: System
 - 01: Utility
 - 02: Aura
 - 03: Timestamp
 - 04: Authorship
 - 05: Indices
 - 06: Balances
 - 07: TransactionPayment
 - 08: Staking
 - 09: Session
 - 10: Democracy
 - 11: Council
 - 12: PhragmenElection
 - 14: Grandpa
 - 15: Treasury
 - 16: Contracts
 - 17: Sudo
 - 18: ImOnline
 - 19: AuthorityDiscovery
 - 20: Offences
 - 21: Historical
 - 22: RandomnessCollectiveFlip
 - 23: Identity
 - 24: Recovery
 - 25: Vesting
 - 26: Scheduler
 - 27: Proxy
 - 28: Multisig
 - 29: Assets
 - 32: TreasuryReward
 - 33: Ethereum
 - 34: EVM
 - 37: Bounties
 - 38: Tips
 - 39: ElectionProviderMultiPhase
 - 40: DynamicFee

erup5:

subwasm metadata target/release/wbuild/edgeware-runtime/edgeware_runtime.wasm 
Running subwasm v0.18.0
 - 00: System
 - 01: Utility
 - 02: Aura
 - 03: Timestamp
 - 04: Authorship
 - 05: Indices
 - 06: Balances
 - 07: TransactionPayment
 - 08: ElectionProviderMultiPhase
 - 09: Staking
 - 10: Session
 - 11: Democracy
 - 12: Council
 - 13: PhragmenElection
 - 14: Grandpa
 - 15: Treasury
 - 16: Contracts
 - 17: Sudo
 - 18: ImOnline
 - 19: AuthorityDiscovery
 - 20: Offences
 - 21: Historical
 - 22: RandomnessCollectiveFlip
 - 23: Identity
 - 24: Recovery
 - 25: Vesting
 - 26: Scheduler
 - 27: Proxy
 - 28: Multisig
 - 29: Assets
 - 30: TreasuryReward
 - 31: Ethereum
 - 32: EVM
 - 33: Bounties
 - 34: Tips
 - 35: DynamicFee
 - 36: BaseFee
 - 37: BagsList
 - 38: Preimage
flipchan commented 2 years ago

ugh..

2022-07-07 17:14:18 Unable to author block in slot 276201143,. `can_author_with` returned: Failed to get 
runtime version at `BlockId::Hash(0xda6c7276b0460171a9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb)` an
d will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such
 function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!              
2022-07-07 17:14:20 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 14 B/s ⬆ 0
flipchan commented 2 years ago

https://substrate.stackexchange.com/questions/2713/how-might-we-introduce-a-new-host-function-into-the-polkadot-ecosystem

flipchan commented 2 years ago

https://github.com/edgeware-network/edgeware-node/tree/erup-5-latest

flipchan commented 2 years ago

After some more digging the chain needs a new binary to run, so I started the chain in development mode with the erup-4 node

I compiled erup-5-latest and pushed the wasm file as a runtime upgrade, the chain breaks at block 61:

022-07-12 19:10:22 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 28 B/s ⬆ 0                                                     
2022-07-12 19:10:24 Unable to author block in slot 276274304,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0xda6c7276b0460171a
9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such 
function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                                                                    
2022-07-12 19:10:27 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 57 B/s ⬆ 0                                                     
2022-07-12 19:10:30 Unable to author block in slot 276274305,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0xda6c7276b0460171a
9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such 
function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                                                                    
2022-07-12 19:10:32 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 28 B/s ⬆ 0                                                     
2022-07-12 19:10:36 Unable to author block in slot 276274306,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0xda6c7276b0460171a
9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such 
function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                                                                    
2022-07-12 19:10:37 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 28 B/s ⬆ 0  
2022-07-12 19:10:36 Unable to author block in slot 276274306,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0xda6c7276b0460171$
9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such 
function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                                                                    
2022-07-12 19:10:37 💤 Idle (0 peers), best: #61 (0xda6c…7ffb), finalized #59 (0xbc79…a6ca), ⬇ 28 B/s ⬆ 0                                                     

Then I just copy the binary from the new node:

cp ../../erup-5-latest/edgeware-node/target/release/edgeware .
 ./edgeware --dev --ws-external --base_path /root/.local/share/edgeware

Now I start the node and it keeps producing blocks:

: /tmp/erup-4-nodes/edgeware-node # ./edgeware --dev --ws-external --base-path /root/.loca                                                           
l/share/edgeware                                                                                                                                              

2022-07-12 22:04:13 Edgeware Node
2022-07-12 22:04:13 ✌️  version erup-5
2022-07-12 22:04:13 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022
2022-07-12 22:04:13 📋 Chain specification: Development
2022-07-12 22:04:13 🏷  Node name: overwrought-twist-2452
2022-07-12 22:04:13 👤 Role: AUTHORITY
2022-07-12 22:04:13 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db/full
2022-07-12 22:04:13 ⛓  Native runtime: edgeware-52 (edgeware-node-52.tx2.au16)

2022-07-12 22:04:53 Migrating database to a database-type-based subdirectory: '"/root/.local/share/edgeware/chains/dev/db"' -> '"/root/.local/share/edgeware/$
hains/dev/db/full"'
2022-07-12 22:04:55 Using default protocol ID "sup" because none is configured in the chain specs
2022-07-12 22:04:55 🏷  Local node identity is: 12D3KooWJVXhuvEMj9Pp8FbNmGCMDKzzDZbFx8e1FLuAtFKFxQ2b
2022-07-12 22:04:55 📦 Highest known block at #61
2022-07-12 22:04:55 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-07-12 22:04:55 Listening for new connections on 0.0.0.0:9944.
2022-07-12 22:05:00 🙌 Starting consensus session on top of parent 0xda6c7276b0460171a9ed8085df5362b5ad083ab4e190a2f305173b88c3477ffb
2022-07-12 22:05:00 ✅ no migration for System
2022-07-12 22:05:00 ✅ no migration for Utility
2022-07-12 22:05:00 ✅ no migration for Aura
2022-07-12 22:05:00 ✅ no migration for Timestamp
2022-07-12 22:05:00 ✅ no migration for Authorship
2022-07-12 22:05:00 ✅ no migration for Indices
2022-07-12 22:05:00 ✅ no migration for Balances
2022-07-12 22:05:00 ✅ no migration for TransactionPayment
2022-07-12 22:05:00 ✅ no migration for ElectionProviderMultiPhase
2022-07-12 22:05:00 ✅ no migration for Staking
2022-07-12 22:05:00 ✅ no migration for Session
2022-07-12 22:05:00 ✅ no migration for Democracy
2022-07-12 22:05:00 ✅ no migration for Council
2022-07-12 22:05:00 ✅ no migration for PhragmenElection
2022-07-12 22:05:00 ✅ no migration for Grandpa
2022-07-12 22:05:00 ✅ no migration for Treasury
2022-07-12 22:05:00 ✅ no migration for Contracts
2022-07-12 22:05:00 ✅ no migration for Sudo

2022-07-12 22:05:00 ✅ no migration for Indices
2022-07-12 22:05:00 ✅ no migration for Balances
2022-07-12 22:05:00 ✅ no migration for TransactionPayment
2022-07-12 22:05:00 ✅ no migration for ElectionProviderMultiPhase
2022-07-12 22:05:00 ✅ no migration for Staking
2022-07-12 22:05:00 ✅ no migration for Session
2022-07-12 22:05:00 ✅ no migration for Democracy
2022-07-12 22:05:00 ✅ no migration for Council
2022-07-12 22:05:00 ✅ no migration for PhragmenElection
2022-07-12 22:05:00 ✅ no migration for Grandpa
2022-07-12 22:05:00 ✅ no migration for Treasury
2022-07-12 22:05:00 ✅ no migration for Contracts
2022-07-12 22:05:00 ✅ no migration for Sudo
2022-07-12 22:05:00 ✅ no migration for ImOnline
2022-07-12 22:05:00 ✅ no migration for AuthorityDiscovery
2022-07-12 22:05:00 ✅ no migration for Offences
2022-07-12 22:05:00 ✅ no migration for Historical
2022-07-12 22:05:00 ✅ no migration for RandomnessCollectiveFlip
2022-07-12 22:05:00 ✅ no migration for Identity
2022-07-12 22:05:00 ✅ no migration for Recovery
2022-07-12 22:05:00 ✅ no migration for Vesting
2022-07-12 22:05:00 ✅ no migration for Scheduler
2022-07-12 22:05:00 ✅ no migration for Proxy
2022-07-12 22:05:00 ✅ no migration for Multisig
2022-07-12 22:05:00 ✅ no migration for Assets
2022-07-12 22:05:00 ✅ no migration for TreasuryReward
2022-07-12 22:05:00 ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion($
)`
2022-07-12 22:05:00 ✅ no migration for EVM
2022-07-12 22:05:00 ✅ no migration for Bounties
2022-07-12 22:05:00 ✅ no migration for Tips
2022-07-12 22:05:00 ✅ no migration for DynamicFee
2022-07-12 22:05:00 ⚠️ BaseFee declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `StorageVersion(0$
`
2022-07-12 22:05:00 ✅ no migration for BagsList
2022-07-12 22:05:00 ✅ no migration for Preimage
2022-07-12 22:05:00 🎁 Prepared block for proposing at 62 (9 ms) [hash: 0x02d5bd3a26eafc37be9659faf9cbf67ec333f8992f64640fe8b15357c873296b; parent_hash: 0xda$
c…7ffb; extrinsics (2): [0x2f09…9c2f, 0x72ed…e2be]]
2022-07-12 22:05:00 🔖 Pre-sealed block for proposal at 62. Hash now 0x7e2c4535568875c306a4c4dd6f02f0184b995952bdd595167b5f2d421822238f, previously 0x02d5bd3$
2022-07-12 22:05:00 🎁 Prepared block for proposing at 62 (9 ms) [hash: 0x02d5bd3a26eafc37be9659faf9cbf67ec333f8992f64640fe8b15357c873296b; parent_hash: 0xda$
c…7ffb; extrinsics (2): [0x2f09…9c2f, 0x72ed…e2be]]
2022-07-12 22:05:00 🔖 Pre-sealed block for proposal at 62. Hash now 0x7e2c4535568875c306a4c4dd6f02f0184b995952bdd595167b5f2d421822238f, previously 0x02d5bd3a
26eafc37be9659faf9cbf67ec333f8992f64640fe8b15357c873296b.
2022-07-12 22:05:00 ✨ Imported #62 (0x7e2c…238f)
2022-07-12 22:05:00 💤 Idle (0 peers), best: #62 (0x7e2c…238f), finalized #59 (0xbc79…a6ca), ⬇ 86 B/s ⬆ 0
2022-07-12 22:05:05 💤 Idle (0 peers), best: #62 (0x7e2c…238f), finalized #60 (0x7aea…8a42), ⬇ 28 B/s ⬆ 0
2022-07-12 22:05:06 🙌 Starting consensus session on top of parent 0x7e2c4535568875c306a4c4dd6f02f0184b995952bdd595167b5f2d421822238f
2022-07-12 22:05:06 🎁 Prepared block for proposing at 63 (0 ms) [hash: 0xa16e4d70b9b9eab14fb63b8fd864515df0ce9f2c955ed5e5e8c506eeb01788db; parent_hash: 0x7e2
c…238f; extrinsics (2): [0x11c3…888a, 0x72ed…e2be]]
2022-07-12 22:05:06 🔖 Pre-sealed block for proposal at 63. Hash now 0xe0252ae9a05b2ae40c81921c47cbb0f51f53fbbd96e5aa8ce33729200b6714ff, previously 0xa16e4d70
b9b9eab14fb63b8fd864515df0ce9f2c955ed5e5e8c506eeb01788db.
2022-07-12 22:05:06 ✨ Imported #63 (0xe025…14ff)
^[[A^[[A2022-07-12 22:05:10 💤 Idle (0 peers), best: #63 (0xe025…14ff), finalized #61 (0xda6c…7ffb), ⬇ 57 B/s ⬆ 0
2022-07-12 22:05:12 🙌 Starting consensus session on top of parent 0xe0252ae9a05b2ae40c81921c47cbb0f51f53fbbd96e5aa8ce33729200b6714ff
2022-07-12 22:05:12 🎁 Prepared block for proposing at 64 (0 ms) [hash: 0x26921c9ab185cc207cb0602c0d812f5038e997ecb7b4dd36f1efeb3c5852a0ed; parent_hash: 0xe02
5…14ff; extrinsics (2): [0x4b1d…d8f0, 0x72ed…e2be]]
2022-07-12 22:05:12 🔖 Pre-sealed block for proposal at 64. Hash now 0x8bb3dd37443adead50ee6e44ee53f783e953de5333a88aad0df72696fdadf3df, previously 0x26921c9a
b185cc207cb0602c0d812f5038e997ecb7b4dd36f1efeb3c5852a0ed.
2022-07-12 22:05:12 ✨ Imported #64 (0x8bb3…f3df)
2022-07-12 22:05:15 💤 Idle (0 peers), best: #64 (0x8bb3…f3df), finalized #62 (0x7e2c…238f), ⬇ 14 B/s ⬆ 0
2022-07-12 22:05:18 🙌 Starting consensus session on top of parent 0x8bb3dd37443adead50ee6e44ee53f783e953de5333a88aad0df72696fdadf3df
2022-07-12 22:05:18 🎁 Prepared block for proposing at 65 (0 ms) [hash: 0xec7b39481b9ef60a8c10ab31c077b8a3f4c70eb4b5c0fbf8da98cbca5f929437; parent_hash: 0x8bb
3…f3df; extrinsics (2): [0xe6c3…4ca5, 0x72ed…e2be]]
2022-07-12 22:05:18 🔖 Pre-sealed block for proposal at 65. Hash now 0x185e0def7a9487318c49654f8cb24d0fb2a2e3d6c37b0985c0018f2efe456ab4, previously 0xec7b3948
1b9ef60a8c10ab31c077b8a3f4c70eb4b5c0fbf8da98cbca5f929437.
flipchan commented 2 years ago

Running with snapshot balances


# ./target/release/edgeware --chain customchainspec --validator --bob  --unsafe-pruning --rpc-cors=all --force-authoring 
2022-07-15 23:26:18 Edgeware Node    
2022-07-15 23:26:18 ✌️  version 3.3.6-0492028-x86_64-linux-gnu    
2022-07-15 23:26:18 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022    
2022-07-15 23:26:18 📋 Chain specification: Development    
2022-07-15 23:26:18 🏷 Node name: Bob    
2022-07-15 23:26:18 👤 Role: AUTHORITY    
2022-07-15 23:26:18 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db    
2022-07-15 23:26:18 ⛓  Native runtime: edgeware-51 (edgeware-node-51.tx2.au16)    
Error: Service(Client(StateDatabase("Expected pruning mode: constrained")))

# ./target/release/edgeware --chain customchainspec --validator --charlie  --rpc-cors=all --force-authoring 
2022-07-15 23:26:46 Edgeware Node    
2022-07-15 23:26:46 ✌️  version 3.3.6-0492028-x86_64-linux-gnu    
2022-07-15 23:26:46 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022    
2022-07-15 23:26:46 📋 Chain specification: Development    
2022-07-15 23:26:46 🏷 Node name: Charlie    
2022-07-15 23:26:46 👤 Role: AUTHORITY    
2022-07-15 23:26:46 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db    
2022-07-15 23:26:46 ⛓  Native runtime: edgeware-51 (edgeware-node-51.tx2.au16)    
Error: Service(Client(StateDatabase("Expected pruning mode: constrained")))

# ./target/release/edgeware --chain customchainspec --validator --charlie  --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000
2022-07-15 23:27:40 Edgeware Node    
2022-07-15 23:27:40 ✌️  version 3.3.6-0492028-x86_64-linux-gnu    
2022-07-15 23:27:40 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022    
2022-07-15 23:27:40 📋 Chain specification: Development    
2022-07-15 23:27:40 🏷 Node name: Charlie    
2022-07-15 23:27:40 👤 Role: AUTHORITY    
2022-07-15 23:27:40 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db    
2022-07-15 23:27:40 ⛓  Native runtime: edgeware-51 (edgeware-node-51.tx2.au16)    
2022-07-15 23:27:41 Using default protocol ID "sup" because none is configured in the chain specs    
2022-07-15 23:27:41 🏷 Local node identity is: 12D3KooWHoQ7mr1NmL41Zxuys1EPcMDfAHQmKqiPE7pCTajxm4FB    
2022-07-15 23:27:43 📦 Highest known block at #0    
2022-07-15 23:27:43 〽️ Prometheus server started at 127.0.0.1:9615    
2022-07-15 23:27:43 Listening for new connections on 127.0.0.1:9944.    
2022-07-15 23:27:43 join multicast failed: Address already in use (os error 98)    
2022-07-15 23:27:48 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 0.1kiB/s ⬆ 0    
2022-07-15 23:27:53 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 57 B/s ⬆ 0    

# ./target/release/edgeware --chain customchainspec --validator --bob --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000
2022-07-15 23:28:16 Edgeware Node    
2022-07-15 23:28:16 ✌️  version 3.3.6-0492028-x86_64-linux-gnu    
2022-07-15 23:28:16 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022    
2022-07-15 23:28:16 📋 Chain specification: Development    
2022-07-15 23:28:16 🏷 Node name: Bob    
2022-07-15 23:28:16 👤 Role: AUTHORITY    
2022-07-15 23:28:16 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db    
2022-07-15 23:28:16 ⛓  Native runtime: edgeware-51 (edgeware-node-51.tx2.au16)    
2022-07-15 23:28:17 Using default protocol ID "sup" because none is configured in the chain specs    
2022-07-15 23:28:17 🏷 Local node identity is: 12D3KooWHoQ7mr1NmL41Zxuys1EPcMDfAHQmKqiPE7pCTajxm4FB    
2022-07-15 23:28:18 📦 Highest known block at #0    
2022-07-15 23:28:18 〽️ Prometheus server started at 127.0.0.1:9615    
2022-07-15 23:28:18 Listening for new connections on 127.0.0.1:9944.    
2022-07-15 23:28:18 join multicast failed: Address already in use (os error 98)    
2022-07-15 23:28:23 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 0.2kiB/s ⬆ 0    
2022-07-15 23:28:28 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 57 B/s ⬆ 0    
2022-07-15 23:28:33 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 86 B/s ⬆ 0    
2022-07-15 23:28:38 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 28 B/s ⬆ 0    
2022-07-15 23:28:43 💤 Idle (0 peers), best: #0 (0x2149…e6c5), finalized #0 (0x2149…e6c5), ⬇ 28 B/s ⬆ 0    

# ./target/release/edgeware --chain customchainspec --validator --alice --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000
2022-07-15 23:29:13 Edgeware Node    
2022-07-15 23:29:13 ✌️  version 3.3.6-0492028-x86_64-linux-gnu    
2022-07-15 23:29:13 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022    
2022-07-15 23:29:13 📋 Chain specification: Development    
2022-07-15 23:29:13 🏷 Node name: Alice    
2022-07-15 23:29:13 👤 Role: AUTHORITY    
2022-07-15 23:29:13 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db    
2022-07-15 23:29:13 ⛓  Native runtime: edgeware-51 (edgeware-node-51.tx2.au16)    
2022-07-15 23:29:13 Using default protocol ID "sup" because none is configured in the chain specs    
2022-07-15 23:29:13 🏷 Local node identity is: 12D3KooWHoQ7mr1NmL41Zxuys1EPcMDfAHQmKqiPE7pCTajxm4FB    
2022-07-15 23:29:15 📦 Highest known block at #0    
2022-07-15 23:29:15 〽️ Prometheus server started at 127.0.0.1:9615    
2022-07-15 23:29:15 Listening for new connections on 127.0.0.1:9944.    
2022-07-15 23:29:15 join multicast failed: Address already in use (os error 98)    
2022-07-15 23:29:18 🙌 Starting consensus session on top of parent 0x2149ae556a9778fafa692779d7cbd7048fdc6f28b583c653836ac31a5179e6c5    
2022-07-15 23:29:18 🎁 Prepared block for proposing at 1 [hash: 0xeb9cf7d048b6c0f74af736d42778aba77c41927d282bd845bd6f86af46d6f9c8; parent_hash: 0x2149…e6c5; extrinsics (2): [0xfbbd…88e9, 0x098b…6133]]    
2022-07-15 23:29:18 🔖 Pre-sealed block for proposal at 1. Hash now 0x5ab9c552f9b8344ff9d24793c03ae2f3b4a1d8636c73d3137c233136055ef6d0, previously 0xeb9cf7d048b6c0f74af736d42778aba77c41927d282bd845bd6f86af46d6f9c8.    
2022-07-15 23:29:18 ✨ Imported #1 (0x5ab9…f6d0)    
2022-07-15 23:29:20 💤 Idle (0 peers), best: #1 (0x5ab9…f6d0), finalized #0 (0x2149…e6c5), ⬇ 28 B/s ⬆ 0    
2022-07-15 23:29:24 🙌 Starting consensus session on top of parent 0x5ab9c552f9b8344ff9d24793c03ae2f3b4a1d8636c73d3137c233136055ef6d0    
2022-07-15 23:29:24 🎁 Prepared block for proposing at 2 [hash: 0x3afad0214b9a62435419105452e8ae34fe9d81687e3c9c1a45cf6a27fa119e4f; parent_hash: 0x5ab9…f6d0; extrinsics (2): [0x693f…774f, 0x098b…6133]]    
2022-07-15 23:29:24 🔖 Pre-sealed block for proposal at 2. Hash now 0x804a089484c70b85d7bf21ad304a05025c66e95868bcb30e4fb99ff414726f3e, previously 0x3afad0214b9a62435419105452e8ae34fe9d81687e3c9c1a45cf6a27fa119e4f.    
2022-07-15 23:29:24 ✨ Imported #2 (0x804a…6f3e)    
2022-07-15 23:29:25 💤 Idle (0 peers), best: #2 (0x804a…6f3e), finalized #0 (0x2149…e6c5), ⬇ 28 B/s ⬆ 0   
flipchan commented 2 years ago

modified a script from nathan:

const { BN } = require("@polkadot/util");
const { encodeAddress } = require("@polkadot/util-crypto");
const { WsProvider, ApiPromise } = require("@polkadot/api");
const fs = require('fs').promises;
const { spec } = require('@edgeware/node-types');

const config = {
    blockNumber: 12186935,
    endpoint: "wss://edgeware.api.onfinality.io/public",
    decimals: 18
}

// Global Variables
var global = {
    blocknumber: 0,
    pageSize: 100,
};

// Convert a big number balance to expected float with correct units.
function toUnit(balance) {
    base = new BN(10).pow(new BN(config.decimals));
    dm = new BN(balance).divmod(base);
    return parseFloat(dm.div.toString() + "." + dm.mod.toString())
}

// Connect to Substrate endpoint
async function connect() {
    let endpoint = config.endpoint;
        global.endpoint = endpoint;
        const provider = new WsProvider(endpoint);
        const api = await ApiPromise.create({
            provider,
            ...spec
            // types: {
            //     ResourceId: "u32",
            // }
        });
        const blockHash = await api.rpc.chain.getBlockHash(config.blockNumber);
        const api_at = await api.at(blockHash);
        return api_at;
        // global.chainDecimals = substrate.registry.chainDecimals;
        // global.chainToken = substrate.registry.chainToken;
}

async function getTotalIssuance() {
    try {
        const api = await connect();

        console.log("querying the total issuance")
        let total_issuance = toUnit(await api.query.balances.totalIssuance())

        let data = {
            issuance: total_issuance,
        }

        console.log("writing")
        await fs.writeFile('issuance.json', JSON.stringify(data));

        process.exit(0)
    } catch (e) {
        console.log(e);
        process.exit(1)
    }
}

// Main function
async function takeSnapshot() {
    try {
        console.log("connecting...")
        const api = await connect();
        let balances = {}

        // Get address from input
        console.log("fetching...")
        // console.log(api.query.system);
        // process.exit(0)
        const all_accounts = await api.query.system.account.entries();  //.entries();

        if (all_accounts.length == 0) {
            throw("No account");
        }
        console.log("computing balances...");
        for (account of all_accounts) {
            // console.log(account.data)
            // console.log(all_accounts)
            let address = encodeAddress(account[0].slice(-32));
            let free = account[1].data.free;
            let reserved = account[1].data.reserved;
            balances[address] = toUnit(free);
// {
  //              "AccountId": address,
    //            "Free": toUnit(free),
      //          "Reserved": toUnit(reserved),
        //        "Total": toUnit(free.add(reserved)),
          //  };
        }

        console.log("writing")
        await fs.writeFile('balances2.json', JSON.stringify(balances));
        process.exit(0)
    } catch (error) {
        console.log(error)
        process.exit(1)
    }
}

takeSnapshot();
// getTotalIssuance();

parsed with python as toUnit is broken and did a lacy parse to make it not break on minimal deposit

#cat parse.py 
import json
data = json.load(open('balances2.json', 'rb'))
def add_fluff(inp):
    return "8"+inp+"9000099999999"
for x in data.keys(): print('[\n"'+x+'",\n'+add_fluff(str(data.get(x)).replace('0.', '').replace('.', ''))+'\n],\n')
flipchan commented 2 years ago

then copy the output from the python script and add it to the balances in the customchainspec

flipchan commented 2 years ago

Submit the new runtime upgrade with erup-4 and the balances: the validator stops like before



2022-07-19 15:29:48 ✨ Imported #52621 (0x51b3…fbb2)
2022-07-19 15:29:49 Unknown error: Client(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such function: env:ext_storage_clear_prefix_version_2\"))")))
2022-07-19 15:29:49 Unsupported Offchain Worker API version: (Err(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t providesuch function: env:ext_storage_clear_prefix_version_2\"))"))), Err(Application(VersionInvalid("RuntimeConstruction(Other(\"host doesn\\\'t provide such function: env:ext_storage_clear_prefix_version_2\"))")))). Consider turning off offchain workers if they are not part of your runtime..    
2022-07-19 15:29:52 💤 Idle (0 peers), best: #52621 (0x51b3…fbb2), finalized #52619 (0xf182…72d1), ⬇ 57 B/s ⬆ 0                                  
2022-07-19 15:29:54 Unable to author block in slot 276372899,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0x51b3a5143862247274fdfcf84d31c9c014bcf61ab34c7cd2ae80affbcd2efbb2)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"hostdoesn\\\'t provide such function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                               
2022-07-19 15:29:57 💤 Idle (0 peers), best: #52621 (0x51b3…fbb2), finalized #52619 (0xf182…72d1), ⬇ 86 B/s ⬆ 0                                  
2022-07-19 15:30:00 Unable to author block in slot 276372900,. `can_author_with` returned: Failed to get runtime version at `BlockId::Hash(0x51b3a5143862247274fdfcf84d31c9c014bcf61ab34c7cd2ae80affbcd2efbb2)` and will disable authoring. Error: VersionInvalid("RuntimeConstruction(Other(\"hostdoesn\\\'t provide such function: env:ext_storage_clear_prefix_version_2\"))") Probably a node update is required!                               
2022-07-19 15:30:02 💤 Idle (0 peers), best: #52621 (0x51b3…fbb2), finalized #52619 (0xf182…72d1), ⬇ 72 B/s ⬆ 0                                  
flipchan commented 2 years ago

./target/release/edgeware --chain customchainspec --validator --alice --rpc-cors=all --force-authoring --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=unsafe

flipchan commented 2 years ago

chainspec fails to read with all the new balances

 ./edgeware --chain customchainspec --validator --alice --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=unsafe
Error: Input("Error parsing spec file: unknown field `lightSyncState` at line 80670 column 1")
flipchan commented 2 years ago
./edgeware build-spec --chain=dev > chaindev
run 
`node setup.js && python3.9 parse.py > bout`
add bout in chaindev balances 

./edgeware build-spec --chain=chaindev --raw > chaindev.raw

Copy the erup-5 binary to the node directory and start your chain with it:
 ./edgeware --chain customchainspec --validator --alice --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=unsafeError: Input("Error parsing spec file: key must be a string at line 16 column 1")        
sc-light and substrate light client interfaces and depricated so we want to edit the chainspec and remove the lightSyncState
./target/release/edgeware build-spec --chain dev | grep light
2022-07-21 18:14:52 Building chain spec    
  "lightSyncState": null,
# vim customchainspec
 # ./edgeware --chain customchainspec --validator --alice --rpc-cors=all --force-authoring  --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=unsafe
2022-07-21 18:03:54 Edgeware Node
2022-07-21 18:03:54 ✌️  version erup-5
2022-07-21 18:03:54 ❤️  by Commonwealth Labs <hello@commonwealth.im>, 2017-2022                                                                   
2022-07-21 18:03:54 📋 Chain specification: Development
2022-07-21 18:03:54 🏷  Node name: Alice
2022-07-21 18:03:54 👤 Role: AUTHORITY
2022-07-21 18:03:54 💾 Database: RocksDb at /root/.local/share/edgeware/chains/dev/db/full                                                       
2022-07-21 18:03:54 ⛓  Native runtime: edgeware-52 (edgeware-node-52.tx2.au16)                                                                   
2022-07-21 18:03:56 Migrating database to a database-type-based subdirectory: '"/root/.local/share/edgeware/chains/dev/db"' -> '"/root/.local/share/edgeware/chains/dev/db/full"'
2022-07-21 18:03:59 Using default protocol ID "sup" because none is configured in the chain specs                                                
2022-07-21 18:03:59 🏷  Local node identity is: 12D3KooWRnKKFJsui5gNioU3jEJ7RKdBc1WQ5QKLhGLvrqurphcX                                              
2022-07-21 18:04:00 📦 Highest known block at #52621
2022-07-21 18:04:00 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-07-21 18:04:00 Listening for new connections on 0.0.0.0:9944.
2022-07-21 18:04:00 join multicast failed: Address already in use (os error 98)                                            
2022-07-21 18:03:54 ⛓  Native runtime: edgeware-52 (edgeware-node-52.tx2.au16)                                                                    
2022-07-21 18:03:56 Migrating database to a database-type-based subdirectory: '"/root/.local/share/edgeware/chains/dev/db"' -> '"/root/.local/shar
e/edgeware/chains/dev/db/full"'                                                                                                                   
2022-07-21 18:03:59 Using default protocol ID "sup" because none is configured in the chain specs                                                 
2022-07-21 18:03:59 🏷  Local node identity is: 12D3KooWRnKKFJsui5gNioU3jEJ7RKdBc1WQ5QKLhGLvrqurphcX                                               
2022-07-21 18:04:00 📦 Highest known block at #52621                                                                                              
2022-07-21 18:04:00 〽️ Prometheus exporter started at 127.0.0.1:9615                                                                              
2022-07-21 18:04:00 Listening for new connections on 0.0.0.0:9944.                                                                                
2022-07-21 18:04:00 join multicast failed: Address already in use (os error 98)                                                                   
2022-07-21 18:04:05 💤 Idle (0 peers), best: #52621 (0x51b3…fbb2), finalized #52619 (0xf182…72d1), ⬇ 57 B/s ⬆ 0                                   
2022-07-21 18:04:06 🙌 Starting consensus session on top of parent 0x51b3a5143862247274fdfcf84d31c9c014bcf61ab34c7cd2ae80affbcd2efbb2             
2022-07-21 18:04:06 ✅ no migration for System                                                                                                    
2022-07-21 18:04:06 ✅ no migration for Utility                                                                                                   
2022-07-21 18:04:06 ✅ no migration for Aura                                                                                                      
2022-07-21 18:04:06 ✅ no migration for Timestamp                                                                                                 
2022-07-21 18:04:06 ✅ no migration for Authorship                                                                                                
2022-07-21 18:04:06 ✅ no migration for Indices                                                                                                   
2022-07-21 18:04:06 ✅ no migration for Balances                                                                                                  
2022-07-21 18:04:06 ✅ no migration for TransactionPayment                                                                                        
2022-07-21 18:04:06 ✅ no migration for ElectionProviderMultiPhase                                                                                
2022-07-21 18:04:06 ✅ no migration for Staking                                                                                      
2022-07-21 18:04:06 ✅ no migration for Session
2022-07-21 18:04:06 ✅ no migration for Democracy
2022-07-21 18:04:06 ✅ no migration for Council
2022-07-21 18:04:06 ✅ no migration for PhragmenElection
2022-07-21 18:04:06 ✅ no migration for Grandpa
2022-07-21 18:04:06 ✅ no migration for Treasury
2022-07-21 18:04:06 ✅ no migration for Contracts
2022-07-21 18:04:06 ✅ no migration for Sudo
2022-07-21 18:04:06 ✅ no migration for ImOnline
2022-07-21 18:04:06 ✅ no migration for AuthorityDiscovery
2022-07-21 18:04:06 ✅ no migration for Offences
2022-07-21 18:04:06 ✅ no migration for Historical
2022-07-21 18:04:06 ✅ no migration for RandomnessCollectiveFlip
2022-07-21 18:04:06 ✅ no migration for Identity
2022-07-21 18:04:06 ✅ no migration for Recovery
2022-07-21 18:04:06 ✅ no migration for Vesting
2022-07-21 18:04:06 ✅ no migration for Scheduler
2022-07-21 18:04:06 ✅ no migration for Proxy
2022-07-21 18:04:06 ✅ no migration for Multisig
2022-07-21 18:04:06 ✅ no migration for Assets
2022-07-21 18:04:06 ✅ no migration for TreasuryReward
2022-07-21 18:04:06 ⚠️ Ethereum declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `Stor
ageVersion(0)`
2022-07-21 18:04:06 ✅ no migration for EVM
2022-07-21 18:04:06 ✅ no migration for EVM
2022-07-21 18:04:06 ✅ no migration for Bounties
2022-07-21 18:04:06 ✅ no migration for Tips
2022-07-21 18:04:06 ✅ no migration for DynamicFee
2022-07-21 18:04:06 ⚠️ BaseFee declares internal migrations (which *might* execute). On-chain `StorageVersion(0)` vs current storage version `Stora
geVersion(0)`
2022-07-21 18:04:06 ✅ no migration for BagsList
2022-07-21 18:04:06 ✅ no migration for Preimage
2022-07-21 18:04:06 🎁 Prepared block for proposing at 52622 (36 ms) [hash: 0x71c155abf6c5064d819f26c5bd62af9fa15f63ff4823e13aaefba5c4faa553c9; pa
rent_hash: 0x51b3…fbb2; extrinsics (2): [0x64f4…01d8, 0x72ed…e2be]]
2022-07-21 18:04:06 🔖 Pre-sealed block for proposal at 52622. Hash now 0x5e5857d464d6be1e35cef728976fcba77caf35a90bf94c1a8955cd9da0323ab2, previo
usly 0x71c155abf6c5064d819f26c5bd62af9fa15f63ff4823e13aaefba5c4faa553c9.
2022-07-21 18:04:06 ✨ Imported #52622 (0x5e58…3ab2)
2022-07-21 18:04:10 💤 Idle (0 peers), best: #52622 (0x5e58…3ab2), finalized #52620 (0x36a8…226a), ⬇ 57 B/s ⬆ 0
2022-07-21 18:04:12 🙌 Starting consensus session on top of parent 0x5e5857d464d6be1e35cef728976fcba77caf35a90bf94c1a8955cd9da0323ab2
2022-07-21 18:04:12 🎁 Prepared block for proposing at 52623 (23 ms) [hash: 0xc52b7f9c214229a81b076c619b6b58075eb81d5e97626d6962fd672c1c0ac09b; pa
rent_hash: 0x5e58…3ab2; extrinsics (2): [0xb99d…4525, 0x72ed…e2be]]
2022-07-21 18:04:12 🔖 Pre-sealed block for proposal at 52623. Hash now 0x1283abd926fb1cd4d139869f12e6cb136911386d58c688aca0849f63a21b6ac3, previo
usly 0xc52b7f9c214229a81b076c619b6b58075eb81d5e97626d6962fd672c1c0ac09b.
2022-07-21 18:04:12 ✨ Imported #52623 (0x1283…6ac3)
flipchan commented 2 years ago

pushed to erup-5-latest

flipchan commented 2 years ago

Trying with: https://github.com/maxsam4/fork-off-substrate.git

HTTP_RPC_ENDPOINT=http://mynode:9988 npm start 

> fork-off-substrate@1.0.0 start
> node index.js

We are intentionally using the HTTP endpoint. If you see any warnings about that, please ignore them.
Custom Schema missing, using default schema.
2022-07-26 22:17:35        API/INIT: Api will be available in a limited mode since the provider does not support subscriptions
2022-07-26 22:17:38        API/INIT: RPC methods not decorated: contracts_upload_code, dev_getBlockStats, eth_feeHistory, eth_maxPriorityFeePerGas
2022-07-26 22:17:38        API/INIT: Error: FATAL: Unable to initialize the API: Cannot convert undefined or null to object
    at ApiPromise.value (/home/filip/rust/work/edgeware/chain_data/fork-off-substrate/node_modules/@polkadot/api/base/Init.cjs:88:25)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
flipchan commented 2 years ago

GIthub issue regarding this: https://github.com/maxsam4/fork-off-substrate/issues/116

flipchan commented 2 years ago

Simulate the upgrade with balance migration:

Generate chainspec: ./target/release/edgeware build-spec --chain=dev > chaindev Add balances then generate a raw one that you use

./target/release/edgeware build-spec --chain=chaindev --raw > chaindev.raw

start the chain with erup-4 binary ./target/release/edgeware --chain=chaindev.raw --validator --alice --rpc-cors=all --force-authoring --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=Unsafe --base-path=/tmp/edgtesto --rpc-port=11667 --ws-port=1166 --rpc-external

switch to erup-5 ./edgeware --chain=chaindev.raw --validator --alice --rpc-cors=all --force-authoring --unsafe-pruning --pruning=1000 --ws-external --rpc-methods=Unsafe --base-path=/tmp/edgtesto --rpc-port=11667 --ws-port=1166 --rpc-external 2022-08-14 20:32:36 Edgeware Node
2022-08-14 20:32:36 ✌️ version erup-5
2022-08-14 20:32:36 ❤️ by Commonwealth Labs hello@commonwealth.im, 2017-2022
2022-08-14 20:32:36 📋 Chain specification: Development
2022-08-14 20:32:36 🏷 Node name: Alice
2022-08-14 20:32:36 👤 Role: AUTHORITY
2022-08-14 20:32:36 💾 Database: RocksDb at /tmp/edgtesto/chains/dev/db/full
2022-08-14 20:32:36 ⛓ Native runtime: edgeware-52 (edgeware-node-52.tx2.au16)
2022-08-14 20:32:38 Migrating database to a database-type-based subdirectory: '"/tmp/edgtesto/chains/dev/db"' -> '"/tmp/edgtesto/chains/dev/db/full"'
2022-08-14 20:32:39 Using default protocol ID "sup" because none is configured in the chain specs
2022-08-14 20:32:39 🏷 Local node identity is: 12D3KooWA8pqk7wqezzFS1u7wwaaZDWGt2j5KPMo4y1Uju7pF6qj
2022-08-14 20:32:39 📦 Highest known block at #54
2022-08-14 20:32:39 〽️ Prometheus exporter started at 127.0.0.1:9615
2022-08-14 20:32:39 Listening for new connections on 0.0.0.0:1166.
2022-08-14 20:32:39 join multicast failed: Address already in use (os error 98)
2022-08-14 20:32:40 🔍 Discovered new external address for our node: /ip4/162.55.230.224/tcp/30333/p2p/12D3KooWA8pqk7wqezzFS1u7wwaaZDWGt2j5KPMo4y1Uju7pF6qj
2022-08-14 20:32:41 Accepted a new tcp connection from 105.180.83.179:4469.
2022-08-14 20:32:42 🙌 Starting consensus session on top of parent 0xe00ea60e9a8c4bcb4fbef5abbb14efe2632aa53a51d6d3d15e47f56ed8026301
2022-08-14 20:32:42 ✅ no migration for System
2022-08-14 20:32:42 ✅ no migration for Utility
2022-08-14 20:32:42 ✅ no migration for Aura
2022-08-14 20:32:42 ✅ no migration for Timestamp
2022-08-14 20:32:42 ✅ no migration for Authorship
2022-08-14 20:32:42 ✅ no migration for Indices
2022-08-14 20:32:42 ✅ no migration for Balances
2022-08-14 20:32:42 ✅ no migration for TransactionPayment
2022-08-14 20:32:42 ✅ no migration for ElectionProviderMultiPhase
2022-08-14 20:32:42 ✅ no migration for Staking
2022-08-14 20:32:42 ✅ no migration for Session
2022-08-14 20:32:42 ✅ no migration for Democracy
2022-08-14 20:32:42 ✅ no migration for Council
2022-08-14 20:32:42 ✅ no migration for PhragmenElection
2022-08-14 20:32:42 ✅ no migration for Grandpa
2022-08-14 20:32:42 ✅ no migration for Treasury
2022-08-14 20:32:42 ✅ no migration for Contracts
2022-08-14 20:32:42 ✅ no migration for Sudo
2022-08-14 20:32:42 ✅ no migration for ImOnline
2022-08-14 20:32:42 ✅ no migration for AuthorityDiscovery
2022-08-14 20:32:42 ✅ no migration for Offences
2022-08-14 20:32:42 ✅ no migration for Historical
2022-08-14 20:32:42 ✅ no migration for RandomnessCollectiveFlip
2022-08-14 20:32:42 ✅ no migration for Identity
2022-08-14 20:32:42 ✅ no migration for Recovery
2022-08-14 20:32:42 ✅ no migration for Vesting
2022-08-14 20:32:42 ✅ no migration for Scheduler
2022-08-14 20:32:42 ✅ no migration for Proxy
2022-08-14 20:32:42 ✅ no migration for Multisig
2022-08-14 20:32:42 ✅ no migration for Assets
2022-08-14 20:32:42 ✅ no migration for TreasuryReward
2022-08-14 20:32:42 ⚠️ Ethereum declares internal migrations (which might execute). On-chain StorageVersion(0) vs current storage version StorageVersion(0)
2022-08-14 20:32:42 ✅ no migration for EVM
2022-08-14 20:32:42 ✅ no migration for Bounties
2022-08-14 20:32:42 ✅ no migration for Tips
2022-08-14 20:32:42 ✅ no migration for DynamicFee
2022-08-14 20:32:42 ⚠️ BaseFee declares internal migrations (which might execute). On-chain StorageVersion(0) vs current storage version StorageVersion(0)
2022-08-14 20:32:42 ✅ no migration for BagsList
2022-08-14 20:32:42 ✅ no migration for Preimage
2022-08-14 20:32:42 🎁 Prepared block for proposing at 55 (19 ms) [hash: 0xab7683967914af4ac4251af48608c07d90d0251fcf97e1052e369e40bfe65c8c; parent_hash: 0xe00e…6301; extrinsics (2): [0xff19…48ba, 0x72ed…e2be]]
2022-08-14 20:32:42 🔖 Pre-sealed block for proposal at 55. Hash now 0x3da716f0ce23a993297dfe2deb078ac93603b903573604f0be4dddb052901b8d, previously 0xab7683967914af4ac4251af48608c07d90d0251fcf97e1052e369e40bfe65c8c.
2022-08-14 20:32:42 ✨ Imported #55 (0x3da7…1b8d)
2022-08-14 20:32:44 💤 Idle (0 peers), best: #55 (0x3da7…1b8d), finalized #53 (0xe135…d5c4), ⬇ 3.0kiB/s ⬆ 2.2kiB/s
2022-08-14 20:32:48 🙌 Starting consensus session on top of parent 0x3da716f0ce23a993297dfe2deb078ac93603b903573604f0be4dddb052901b8d
2022-08-14 20:32:48 🎁 Prepared block for proposing at 56 (13 ms) [hash: 0x776e8f1b88dd3ba8116931af18eeefd22143081f52c94f19ccb6f1881721a54e; parent_hash: 0x3da7…1b8d; extrinsics (2): [0x1008…2856, 0x72ed…e2be]]
2022-08-14 20:32:48 🔖 Pre-sealed block for proposal at 56. Hash now 0x2ee798b5f198e2922a3fc6a93d6f6cd8794bb77e0098960fb5752499fb668d38, previously 0x776e8f1b88dd3ba8116931af18eeefd22143081f52c94f19ccb6f1881721a54e.
2022-08-14 20:32:48 ✨ Imported #56 (0x2ee7…8d38)

Testing with subalfred:

Before upgrade(fails due to metadata v13 needs custom types):

filip$ cargo +nightly run export-state ws://server:1166 --fork-off --simple-governance --output xxxold.json --log subalfred::core::node,subalfred::core::substrate_client Finished dev [unoptimized + debuginfo] target(s) in 0.78s Running target/debug/subalfred export-state 'ws://server:1166' --fork-off --simple-governance --output xxxold.json --log 'subalfred::core::node,subalfred::core::substrate_client' Error: [core::node] failed to parse metadata

Caused by: [submetadatan] unsupported version, 13

After upgrade:

filip$ cargo +nightly run  export-state ws://server:1166 --fork-off --simple-governance --output xxxold.json --log subalfred::core::node,subalfred::core::substrate_client
    Finished dev [unoptimized + debuginfo] target(s) in 1.04s
     Running `target/debug/subalfred export-state 'ws://server:1166' --fork-off --simple-governance --output xxxold.json --log 'subalfred::core::node,subalfred::core::substrate_client'`
2022-08-15T20:24:55.617654Z TRACE subalfred::core::node::export_state: fetching from System::Account
2022-08-15T20:24:55.992327Z TRACE subalfred::core::substrate_client: fetched 512 keys
2022-08-15T20:24:56.312465Z TRACE subalfred::core::substrate_client: fetched 1024 keys
2022-08-15T20:24:56.970225Z TRACE subalfred::core::substrate_client: fetched 512 pairs
2022-08-15T20:24:57.289160Z TRACE subalfred::core::substrate_client: fetched 1536 keys
2022-08-15T20:24:57.695763Z TRACE subalfred::core::substrate_client: fetched 1024 pairs
2022-08-15T20:24:58.011941Z TRACE subalfred::core::substrate_client: fetched 2048 keys
2022-08-15T20:24:58.284828Z TRACE subalfred::core::substrate_client: fetched 1536 pairs
2022-08-15T20:24:58.572124Z TRACE subalfred::core::substrate_client: fetched 2560 keys
2022-08-15T20:24:58.875077Z TRACE subalfred::core::substrate_client: fetched 2048 pairs
2022-08-15T20:24:59.161687Z TRACE subalfred::core::substrate_client: fetched 3072 keys
2022-08-15T20:24:59.481626Z TRACE subalfred::core::substrate_client: fetched 2560 pairs
2022-08-15T20:24:59.821677Z TRACE subalfred::core::substrate_client: fetched 3584 keys
2022-08-15T20:25:00.093019Z TRACE subalfred::core::substrate_client: fetched 3072 pairs
2022-08-15T20:25:00.384123Z TRACE subalfred::core::substrate_client: fetched 4096 keys
2022-08-15T20:25:00.625246Z TRACE subalfred::core::substrate_client: fetched 3584 pairs
2022-08-15T20:25:00.892065Z TRACE subalfred::core::substrate_client: fetched 4608 keys
2022-08-15T20:25:01.327258Z TRACE subalfred::core::substrate_client: fetched 4096 pairs
2022-08-15T20:25:01.612348Z TRACE subalfred::core::substrate_client: fetched 5120 keys
2022-08-15T20:25:01.862514Z TRACE subalfred::core::substrate_client: fetched 4608 pairs
2022-08-15T20:25:02.162102Z TRACE subalfred::core::substrate_client: fetched 5632 keys
2022-08-15T20:25:02.400138Z TRACE subalfred::core::substrate_client: fetched 5120 pairs
2022-08-15T20:25:02.601907Z TRACE subalfred::core::substrate_client: fetched 6144 keys
2022-08-15T20:25:02.952912Z TRACE subalfred::core::substrate_client: fetched 5632 pairs
2022-08-15T20:25:03.111736Z TRACE subalfred::core::substrate_client: fetched 6656 keys
2022-08-15T20:25:03.493008Z TRACE subalfred::core::substrate_client: fetched 6144 pairs
2022-08-15T20:25:03.670226Z TRACE subalfred::core::substrate_client: fetched 7168 keys
2022-08-15T20:25:04.054041Z TRACE subalfred::core::substrate_client: fetched 6656 pairs
2022-08-15T20:25:04.203571Z TRACE subalfred::core::substrate_client: fetched 7680 keys
2022-08-15T20:25:04.687119Z TRACE subalfred::core::substrate_client: fetched 7168 pairs
2022-08-15T20:25:04.842135Z TRACE subalfred::core::substrate_client: fetched 8192 keys
2022-08-15T20:25:05.314384Z TRACE subalfred::core::substrate_client: fetched 7680 pairs
2022-08-15T20:25:05.492332Z TRACE subalfred::core::substrate_client: fetched 8704 keys
2022-08-15T20:25:05.916172Z TRACE subalfred::core::substrate_client: fetched 8192 pairs
2022-08-15T20:25:06.062907Z TRACE subalfred::core::substrate_client: fetched 9216 keys
2022-08-15T20:25:06.564933Z TRACE subalfred::core::substrate_client: fetched 8704 pairs
2022-08-15T20:25:06.741906Z TRACE subalfred::core::substrate_client: fetched 9728 keys
2022-08-15T20:25:07.183726Z TRACE subalfred::core::substrate_client: fetched 9216 pairs
2022-08-15T20:25:07.211342Z TRACE subalfred::core::substrate_client: fetched 10240 keys
2022-08-15T20:25:07.845007Z TRACE subalfred::core::substrate_client: fetched 9728 pairs
2022-08-15T20:25:08.011703Z TRACE subalfred::core::substrate_client: fetched 10752 keys
2022-08-15T20:25:08.306280Z TRACE subalfred::core::substrate_client: fetched 10240 pairs
2022-08-15T20:25:08.479804Z TRACE subalfred::core::substrate_client: fetched 11264 keys
2022-08-15T20:25:08.731996Z TRACE subalfred::core::substrate_client: fetched 10752 pairs
2022-08-15T20:25:09.589271Z TRACE subalfred::core::substrate_client: fetched 11776 keys
2022-08-15T20:25:09.894101Z TRACE subalfred::core::substrate_client: fetched 11264 pairs
2022-08-15T20:25:10.041581Z TRACE subalfred::core::substrate_client: fetched 12288 keys
2022-08-15T20:25:10.442553Z TRACE subalfred::core::substrate_client: fetched 11776 pairs
2022-08-15T20:25:10.482388Z TRACE subalfred::core::substrate_client: fetched 12800 keys
2022-08-15T20:25:11.044247Z TRACE subalfred::core::substrate_client: fetched 12288 pairs
2022-08-15T20:25:11.222029Z TRACE subalfred::core::substrate_client: fetched 13312 keys
2022-08-15T20:25:11.502503Z TRACE subalfred::core::substrate_client: fetched 12800 pairs
2022-08-15T20:25:11.690924Z TRACE subalfred::core::substrate_client: fetched 13824 keys
2022-08-15T20:25:11.957588Z TRACE subalfred::core::substrate_client: fetched 13312 pairs
2022-08-15T20:25:12.122032Z TRACE subalfred::core::substrate_client: fetched 14336 keys
2022-08-15T20:25:12.398208Z TRACE subalfred::core::substrate_client: fetched 13824 pairs
2022-08-15T20:25:12.578831Z TRACE subalfred::core::substrate_client: fetched 14848 keys
2022-08-15T20:25:12.844433Z TRACE subalfred::core::substrate_client: fetched 14336 pairs
2022-08-15T20:25:13.010246Z TRACE subalfred::core::substrate_client: fetched 15360 keys
2022-08-15T20:25:13.204253Z TRACE subalfred::core::substrate_client: fetched 14848 pairs
2022-08-15T20:25:13.351591Z TRACE subalfred::core::substrate_client: fetched 15872 keys
2022-08-15T20:25:13.664222Z TRACE subalfred::core::substrate_client: fetched 15360 pairs
2022-08-15T20:25:13.831737Z TRACE subalfred::core::substrate_client: fetched 16384 keys
2022-08-15T20:25:14.048169Z TRACE subalfred::core::substrate_client: fetched 16400 keys
2022-08-15T20:25:14.202807Z TRACE subalfred::core::substrate_client: fetched 15872 pairs
2022-08-15T20:25:14.493536Z TRACE subalfred::core::substrate_client: fetched 16384 pairs
2022-08-15T20:25:14.657506Z TRACE subalfred::core::substrate_client: fetched 16400 pairs
2022-08-15T20:25:14.906064Z TRACE subalfred::core::node::export_state: fetching from Council
2022-08-15T20:25:15.086114Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:15.266348Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:15.266455Z TRACE subalfred::core::node::export_state: fetching from Preimage
2022-08-15T20:25:15.466598Z  WARN subalfred::core::substrate_client: no keys found under prefix(0xd8f314b7f4e6b095f0f8ee4656a44825) start_key()
2022-08-15T20:25:15.467718Z TRACE subalfred::core::node::export_state: fetching from Recovery
2022-08-15T20:25:15.656595Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:15.836506Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:15.836619Z TRACE subalfred::core::node::export_state: fetching from DynamicFee
2022-08-15T20:25:16.026773Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:16.226522Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:16.226730Z TRACE subalfred::core::node::export_state: fetching from Scheduler
2022-08-15T20:25:16.396688Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:16.596613Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:16.596791Z TRACE subalfred::core::node::export_state: fetching from BagsList
2022-08-15T20:25:16.776632Z  WARN subalfred::core::substrate_client: no keys found under prefix(0xdf66cf37cde77d2a63889732a23c685e) start_key()
2022-08-15T20:25:16.776899Z TRACE subalfred::core::node::export_state: fetching from Democracy
2022-08-15T20:25:16.946682Z TRACE subalfred::core::substrate_client: fetched 5 keys
2022-08-15T20:25:17.116692Z TRACE subalfred::core::substrate_client: fetched 5 pairs
2022-08-15T20:25:17.116892Z TRACE subalfred::core::node::export_state: fetching from Staking
2022-08-15T20:25:17.287338Z TRACE subalfred::core::substrate_client: fetched 23 keys
2022-08-15T20:25:17.456695Z TRACE subalfred::core::substrate_client: fetched 23 pairs
2022-08-15T20:25:17.456894Z TRACE subalfred::core::node::export_state: fetching from PhragmenElection
2022-08-15T20:25:17.606670Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:17.786677Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:17.786923Z TRACE subalfred::core::node::export_state: fetching from Identity
2022-08-15T20:25:17.956229Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:18.117034Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:18.117223Z TRACE subalfred::core::node::export_state: fetching from Tips
2022-08-15T20:25:18.296489Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:18.466616Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:18.466874Z TRACE subalfred::core::node::export_state: fetching from TransactionPayment
2022-08-15T20:25:18.626656Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:18.776514Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:18.776724Z TRACE subalfred::core::node::export_state: fetching from Contracts
2022-08-15T20:25:18.959793Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:19.126553Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:19.126749Z TRACE subalfred::core::node::export_state: fetching from ElectionProviderMultiPhase
2022-08-15T20:25:19.305615Z TRACE subalfred::core::substrate_client: fetched 3 keys
2022-08-15T20:25:19.486336Z TRACE subalfred::core::substrate_client: fetched 3 pairs
2022-08-15T20:25:19.486457Z TRACE subalfred::core::node::export_state: fetching from Offences
2022-08-15T20:25:19.626706Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:19.776509Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:19.776703Z TRACE subalfred::core::node::export_state: fetching from Indices
2022-08-15T20:25:19.926572Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:20.086442Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:20.086611Z TRACE subalfred::core::node::export_state: fetching from Multisig
2022-08-15T20:25:20.246575Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:20.406326Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:20.406527Z TRACE subalfred::core::node::export_state: fetching from Assets
2022-08-15T20:25:20.556619Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:20.706463Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:20.706654Z TRACE subalfred::core::node::export_state: fetching from AuthorityDiscovery
2022-08-15T20:25:20.856666Z TRACE subalfred::core::substrate_client: fetched 3 keys
2022-08-15T20:25:21.006599Z TRACE subalfred::core::substrate_client: fetched 3 pairs
2022-08-15T20:25:21.006909Z TRACE subalfred::core::node::export_state: fetching from Ethereum
2022-08-15T20:25:21.162669Z TRACE subalfred::core::substrate_client: fetched 201 keys
2022-08-15T20:25:21.369735Z TRACE subalfred::core::substrate_client: fetched 201 pairs
2022-08-15T20:25:21.371834Z TRACE subalfred::core::node::export_state: fetching from Bounties
2022-08-15T20:25:21.506369Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:21.656594Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:21.656822Z TRACE subalfred::core::node::export_state: fetching from Aura
2022-08-15T20:25:22.186637Z TRACE subalfred::core::substrate_client: fetched 3 keys
2022-08-15T20:25:22.357057Z TRACE subalfred::core::substrate_client: fetched 3 pairs
2022-08-15T20:25:22.357372Z TRACE subalfred::core::node::export_state: fetching from ImOnline
2022-08-15T20:25:22.526503Z TRACE subalfred::core::substrate_client: fetched 3 keys
2022-08-15T20:25:22.686644Z TRACE subalfred::core::substrate_client: fetched 3 pairs
2022-08-15T20:25:22.686983Z TRACE subalfred::core::node::export_state: fetching from Vesting
2022-08-15T20:25:22.856607Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:23.036559Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:23.036739Z TRACE subalfred::core::node::export_state: fetching from RandomnessCollectiveFlip
2022-08-15T20:25:23.196638Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:23.507242Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:23.507543Z TRACE subalfred::core::node::export_state: fetching from Proxy
2022-08-15T20:25:23.646626Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:23.806592Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:23.806789Z TRACE subalfred::core::node::export_state: fetching from Treasury
2022-08-15T20:25:23.956601Z TRACE subalfred::core::substrate_client: fetched 1 keys
2022-08-15T20:25:24.116277Z TRACE subalfred::core::substrate_client: fetched 1 pairs
2022-08-15T20:25:24.116448Z TRACE subalfred::core::node::export_state: fetching from Balances
2022-08-15T20:25:24.256746Z TRACE subalfred::core::substrate_client: fetched 4 keys
2022-08-15T20:25:24.406547Z TRACE subalfred::core::substrate_client: fetched 4 pairs
2022-08-15T20:25:24.406778Z TRACE subalfred::core::node::export_state: fetching from EVM
2022-08-15T20:25:24.567000Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:24.746366Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:24.746476Z TRACE subalfred::core::node::export_state: fetching from TreasuryReward
2022-08-15T20:25:24.906703Z TRACE subalfred::core::substrate_client: fetched 3 keys
2022-08-15T20:25:25.076617Z TRACE subalfred::core::substrate_client: fetched 3 pairs
2022-08-15T20:25:25.076840Z TRACE subalfred::core::node::export_state: fetching from Sudo
2022-08-15T20:25:25.226653Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:25.396303Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:25.396500Z TRACE subalfred::core::node::export_state: fetching from BaseFee
2022-08-15T20:25:25.560632Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:25.706521Z TRACE subalfred::core::substrate_client: fetched 2 pairs
2022-08-15T20:25:25.706681Z TRACE subalfred::core::node::export_state: fetching from Timestamp
2022-08-15T20:25:25.856625Z TRACE subalfred::core::substrate_client: fetched 2 keys
2022-08-15T20:25:26.006451Z TRACE subalfred::core::substrate_client: fetched 2 pairs
✓ fully exported 16677 pairs, takes 33s

All done! The subalfred was able to extract keys that have been migrated

flipchan commented 2 years ago

https://github.com/edgeware-network/edgeware-node/issues/25

ShankarWarang commented 1 year ago

Fulfilled in #28 and merged already.