Skip to content

Commit

Permalink
Fix operation mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Apr 22, 2024
1 parent dca37a1 commit 6f3546e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 10 additions & 4 deletions multiversx_sdk_cli/localnet/node_config_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,16 @@


def patch_config(data: ConfigDict, config: ConfigRoot):
general_settings: ConfigDict = dict()
general_settings['ChainID'] = CHAIN_ID

data['GeneralSettings'].update(general_settings)
data['GeneralSettings']['ChainID'] = CHAIN_ID

# "--operation-mode=historical-balances" is not available for nodes,
# since << validator cannot be a full archive node >>,
# but we attempt to set the "deep-history" mode as follows:
data['DbLookupExtensions']['Enabled'] = True
data['GeneralSettings']['StartInEpochEnabled'] = False
data['StateTriesConfig']['AccountsStatePruningEnabled'] = False
data['StoragePruning']['ObserverCleanOldEpochsData'] = False
data['StoragePruning']['AccountsTrieCleanOldEpochsData'] = False

# Make epochs shorter
epoch_start_config: ConfigDict = dict()
Expand Down
3 changes: 1 addition & 2 deletions multiversx_sdk_cli/localnet/step_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ async def do_start(configfile: Path, stop_after_seconds: int):
"--log-save",
f"--log-level={loglevel}",
"--log-logger-name",
f"--rest-api-interface={validator.api_interface()}",
"--operation-mode=historical-balances"
f"--rest-api-interface={validator.api_interface()}"
], cwd=validator.folder, delay=NODES_START_DELAY))

# Proxy
Expand Down

0 comments on commit 6f3546e

Please sign in to comment.