node snapshot import should pay attention to config.json
v10.3. When importing a snapshot, this process does not honor the current values of history-mode. If my setting is X before I even begin the import, then node should pay attention to this setting and import the snapshot, setting whatever internal values need to be set.
I should not have to set config parameters, import successfully, then be told I have invalid parameters.
$ cat /opt/tezos_mainnet/node_data/data/config.json
{ "data-dir": "/var/run/tezos/node/data",
"rpc":
{ "listen-addrs": [ ":8732" ],
"acl": [ { "address": ":8732", "blacklist": [] } ] },
"p2p":
{ "bootstrap-peers":
[ "boot.tzbeta.net", "116.202.172.21", "95.216.45.62" ],
"listen-addr": "[::]:9732" },
"shell": { "history_mode": { "rolling": { "additional_cycles": 0 } } } }
...
Oct 28 03:20:38.975 - node.snapshots: importing data from snapshot
Oct 28 03:20:38.975 - node.snapshots: /snapshot: chain TEZOS_MAINNET, block hash BKpWkHj3XSAvugxnw6CtdiZVBWNJ7y4taZPpdNheWPU5wqTxNVa at level 1812850 in rolling (snapshot version 2)
Oct 28 03:20:38.975 - node.snapshots: retrieving and validating data. This can take a while, please bear with us
Writing context: 40010K/40010K (100%) elements, 3282MiB read Done
Copying protocols: 1/1 Done
Storing floating blocks: 120 blocks wrote Done
Oct 28 04:14:54.991 - node.snapshots: successful import from file /snapshot
...
Oct 28 15:46:18.560 - node.main: The given history mode Rolling mode + 5 extra cycles does not correspond to
Oct 28 15:46:18.560 - node.main: the stored history mode Rolling mode. If you wish to force the switch, use
Oct 28 15:46:18.560 - node.main: the flag '--force-history-mode-switch'.
tezos-node: Error:
Cannot switch from history mode Rolling mode + 5 extra cycles to Rolling mode. In order to change your history mode please refer to the Tezos node documentation. If you really want to change your history mode, run this command again with the `--force-history-mode-switch` option.
Edited by Krixt Tacos