sunshine-protocol / sunshine

Governance + Bounty Platform
Other
43 stars 16 forks source link

purge chain command doesn't work #157

Closed 4meta5 closed 4 years ago

4meta5 commented 4 years ago
➜  sunshine-node git:(bounty-client-tests) ✗ ./target/release/test-node --dev                                           
2020-08-14 08:17:25 Running in --dev mode, RPC CORS has been disabled.
2020-08-14 08:17:25 Sunshine Node
2020-08-14 08:17:25 ✌️  version 0.1.0
2020-08-14 08:17:25 ❤️  by 4meta5, 2020-2020
2020-08-14 08:17:25 📋 Chain specification: Development
2020-08-14 08:17:25 🏷  Node name: luxuriant-cows-6603
2020-08-14 08:17:25 👤 Role: AUTHORITY
2020-08-14 08:17:25 💾 Database: ParityDb at /Users/4meta5/Library/Application Support/test-node/chains/dev/paritydb
2020-08-14 08:17:25 ⛓  Native runtime: sun-spec-1 (sun-time-1.tx1.au1)
2020-08-14 08:17:25 📦 Highest known block at #119
2020-08-14 08:17:25 Using default protocol ID "sup" because none is configured in the chain specs
2020-08-14 08:17:25 🏷  Local node identity is: 12D3KooWNL5tWUniNzjnYxwKbaCcULsAdvwGjB91G3V4NJycGwgX (legacy representation: QmZG7ajS9z6EZTmX22UrL6zQ97tNnTacm9R2ebNru6qKqc)
2020-08-14 08:17:25 〽️ Prometheus server started at 127.0.0.1:9615
2020-08-14 08:17:30 🙌 Starting consensus session on top of parent 0x5c4713ba796f1bfc08c672979635cbf8b95a060fceaf584cb64beeac1f682b16
2020-08-14 08:17:30 💤 Idle (0 peers), best: #119 (0x5c47…2b16), finalized #117 (0xa67d…f8d7), ⬇ 0 ⬆ 0
2020-08-14 08:17:30 Timeout fired waiting for transaction pool at block #119. Proceeding with production.
2020-08-14 08:17:30 🎁 Prepared block for proposing at 120 [hash: 0x8e5d3d3aecebc25e85c547cd72e4e5bdfea8e6fa5bfc504818f7bff4f30404c7; parent_hash: 0x5c47…2b16; extrinsics (1): [0x52be…62a0]]
2020-08-14 08:17:30 🔖 Pre-sealed block for proposal at 120. Hash now 0x1a2ed5088be2cc757d4eaa7dc4a51dfe52c8fef5d03e8f82b6e24419fec433b2, previously 0x8e5d3d3aecebc25e85c547cd72e4e5bdfea8e6fa5bfc504818f7bff4f30404c7.
2020-08-14 08:17:30 ✨ Imported #120 (0x1a2e…33b2)
...
➜  sunshine-node git:(bounty-client-tests) ✗ ./target/release/test-node purge-chain --dev
Are you sure to remove "/Users/4meta5/Library/Application Support/test-node/chains/dev/db"? [y/N]: y
"/Users/4meta5/Library/Application Support/test-node/chains/dev/db" did not exist.
...
➜  sunshine-node git:(bounty-client-tests) ✗ ./target/release/test-node --dev                                           
2020-08-14 08:17:25 Running in --dev mode, RPC CORS has been disabled.
2020-08-14 08:17:25 Sunshine Node
2020-08-14 08:17:25 ✌️  version 0.1.0
2020-08-14 08:17:25 ❤️  by 4meta5, 2020-2020
2020-08-14 08:17:25 📋 Chain specification: Development
2020-08-14 08:17:25 🏷  Node name: luxuriant-cows-6603
2020-08-14 08:17:25 👤 Role: AUTHORITY
2020-08-14 08:17:25 💾 Database: ParityDb at /Users/4meta5/Library/Application Support/test-node/chains/dev/paritydb
2020-08-14 08:17:25 ⛓  Native runtime: sun-spec-1 (sun-time-1.tx1.au1)
2020-08-14 08:17:25 📦 Highest known block at #119
2020-08-14 08:17:25 Using default protocol ID "sup" because none is configured in the chain specs
2020-08-14 08:17:25 🏷  Local node identity is: 12D3KooWNL5tWUniNzjnYxwKbaCcULsAdvwGjB91G3V4NJycGwgX (legacy representation: QmZG7ajS9z6EZTmX22UrL6zQ97tNnTacm9R2ebNru6qKqc)
2020-08-14 08:17:25 〽️ Prometheus server started at 127.0.0.1:9615
2020-08-14 08:17:30 🙌 Starting consensus session on top of parent 0x5c4713ba796f1bfc08c672979635cbf8b95a060fceaf584cb64beeac1f682b16
2020-08-14 08:17:30 💤 Idle (0 peers), best: #120 (0x5c47…2b16), finalized #117 (0xa67d…f8d7), ⬇ 0 ⬆ 0
2020-08-14 08:17:30 Timeout fired waiting for transaction pool at block #119. Proceeding with production.
2020-08-14 08:17:30 🎁 Prepared block for proposing at 120 [hash: 0x8e5d3d3aecebc25e85c547cd72e4e5bdfea8e6fa5bfc504818f7bff4f30404c7; parent_hash: 0x5c47…2b16; extrinsics (1): [0x52be…62a0]]
2020-08-14 08:17:30 🔖 Pre-sealed block for proposal at 121. Hash now 0x1a2ed5088be2cc757d4eaa7dc4a51dfe52c8fef5d03e8f82b6e24419fec433b2, previously 0x8e5d3d3aecebc25e85c547cd72e4e5bdfea8e6fa5bfc504818f7bff4f30404c7.
2020-08-14 08:17:30 ✨ Imported #120 (0x1a2e…33b2)
4meta5 commented 4 years ago

Here is my attempt to go to the db directly. I can delete the whole test-node folder but the purge-chain command exists for a reason -- I want it to work with paritydb

➜  ApplicationSupport cd test-node 
➜  test-node ls -a
.      ..     chains
➜  test-node cd chains
➜  chains ls -a
.   ..  dev
➜  chains cd dev 
➜  dev ls -a
.        ..       keystore network  paritydb
➜  dev cd paritydb 
➜  paritydb ls -a
.           table_00_1  table_01_1  table_02_1  table_03_1  table_04_1  table_05_1  table_06_1  table_07_1  table_08_1  table_09_1  table_10_1
..          table_00_10 table_01_10 table_02_10 table_03_10 table_04_10 table_05_10 table_06_10 table_07_10 table_08_10 table_09_10 table_10_10
index_00_16 table_00_11 table_01_11 table_02_11 table_03_11 table_04_11 table_05_11 table_06_11 table_07_11 table_08_11 table_09_11 table_10_11
index_01_16 table_00_12 table_01_12 table_02_12 table_03_12 table_04_12 table_05_12 table_06_12 table_07_12 table_08_12 table_09_12 table_10_12
index_02_16 table_00_13 table_01_13 table_02_13 table_03_13 table_04_13 table_05_13 table_06_13 table_07_13 table_08_13 table_09_13 table_10_13
index_03_16 table_00_14 table_01_14 table_02_14 table_03_14 table_04_14 table_05_14 table_06_14 table_07_14 table_08_14 table_09_14 table_10_14
index_04_16 table_00_15 table_01_15 table_02_15 table_03_15 table_04_15 table_05_15 table_06_15 table_07_15 table_08_15 table_09_15 table_10_15
index_05_16 table_00_2  table_01_2  table_02_2  table_03_2  table_04_2  table_05_2  table_06_2  table_07_2  table_08_2  table_09_2  table_10_2
index_08_16 table_00_3  table_01_3  table_02_3  table_03_3  table_04_3  table_05_3  table_06_3  table_07_3  table_08_3  table_09_3  table_10_3
index_10_16 table_00_4  table_01_4  table_02_4  table_03_4  table_04_4  table_05_4  table_06_4  table_07_4  table_08_4  table_09_4  table_10_4
log0        table_00_5  table_01_5  table_02_5  table_03_5  table_04_5  table_05_5  table_06_5  table_07_5  table_08_5  table_09_5  table_10_5
log1        table_00_6  table_01_6  table_02_6  table_03_6  table_04_6  table_05_6  table_06_6  table_07_6  table_08_6  table_09_6  table_10_6
log2        table_00_7  table_01_7  table_02_7  table_03_7  table_04_7  table_05_7  table_06_7  table_07_7  table_08_7  table_09_7  table_10_7
metadata    table_00_8  table_01_8  table_02_8  table_03_8  table_04_8  table_05_8  table_06_8  table_07_8  table_08_8  table_09_8  table_10_8
stats.txt   table_00_9  table_01_9  table_02_9  table_03_9  table_04_9  table_05_9  table_06_9  table_07_9  table_08_9  table_09_9  table_10_9
table_00_0  table_01_0  table_02_0  table_03_0  table_04_0  table_05_0  table_06_0  table_07_0  table_08_0  table_09_0  table_10_0
4meta5 commented 4 years ago

thanks @dvc94ch