Skip to content

Commit

Permalink
GH-3 --vote-threads needed for all producers
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Apr 15, 2024
1 parent 4b4eca6 commit 895cef7
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions docs/01_nodeos/02_usage/01_nodeos-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ The example below shows a typical usage of `nodeos` when starting a block produc
```sh
nodeos \
-e -p eosio \
--vote-threads 3 \
--data-dir /users/mydir/eosio/data \
--config-dir /users/mydir/eosio/config \
--plugin eosio::producer_plugin \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Open one "terminal" window and perform the following steps:
Start your own single-node blockchain with this single command:

```sh
nodeos -e -p eosio --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin
nodeos -e -p eosio --vote-threads 3 --plugin eosio::chain_api_plugin --plugin eosio::history_api_plugin
```

[[info | Nodeos Minimal Options]]
Expand Down
2 changes: 1 addition & 1 deletion tests/cli_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def abi_file_with_nodeos_test():
os.makedirs(data_dir, exist_ok=True)
walletMgr = WalletMgr(True)
walletMgr.launch()
cmd = "./programs/nodeos/nodeos -e -p eosio --plugin eosio::trace_api_plugin --trace-no-abis --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::http_plugin --access-control-allow-origin=* --http-validate-host=false --max-transaction-time=-1 --resource-monitor-not-shutdown-on-threshold-exceeded " + "--data-dir " + data_dir + " --config-dir " + data_dir
cmd = "./programs/nodeos/nodeos -e -p eosio --vote-threads 2 --plugin eosio::trace_api_plugin --trace-no-abis --plugin eosio::producer_plugin --plugin eosio::producer_api_plugin --plugin eosio::chain_api_plugin --plugin eosio::chain_plugin --plugin eosio::http_plugin --access-control-allow-origin=* --http-validate-host=false --max-transaction-time=-1 --resource-monitor-not-shutdown-on-threshold-exceeded " + "--data-dir " + data_dir + " --config-dir " + data_dir
node = Node('localhost', 8888, nodeId, data_dir=Path(data_dir), config_dir=Path(data_dir), cmd=shlex.split(cmd), launch_time=datetime.datetime.now().strftime('%Y_%m_%d_%H_%M_%S'), walletMgr=walletMgr)
time.sleep(5)
node.waitForBlock(1)
Expand Down
2 changes: 1 addition & 1 deletion tests/gelf_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def gelfServer(stop):

data_dir = Path(Utils.getNodeDataDir(node_id))
config_dir = Path(Utils.getNodeConfigDir(node_id))
start_nodeos_cmd = shlex.split(f"{Utils.EosServerPath} -e -p eosio --data-dir={data_dir} --config-dir={config_dir}")
start_nodeos_cmd = shlex.split(f"{Utils.EosServerPath} -e -p eosio --vote-threads 2 --data-dir={data_dir} --config-dir={config_dir}")
if os.path.exists(data_dir):
shutil.rmtree(data_dir)
os.makedirs(data_dir)
Expand Down
2 changes: 2 additions & 0 deletions tests/p2p_no_listen_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
'-e',
'-p',
'eosio',
'--vote-threads',
'3',
'--p2p-listen-endpoint',
'',
'--plugin',
Expand Down
2 changes: 1 addition & 1 deletion tests/plugin_http_api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def startEnv(self) :
"--p2p-peer-address localhost:9011 --resource-monitor-not-shutdown-on-threshold-exceeded ") % (self.data_dir, self.config_dir, self.data_dir, "\'*\'", "false")
nodeos_flags += category_config.nodeosArgs()

start_nodeos_cmd = ("%s -e -p eosio %s %s ") % (Utils.EosServerPath, nodeos_plugins, nodeos_flags)
start_nodeos_cmd = ("%s -e -p eosio --vote-threads 2 %s %s ") % (Utils.EosServerPath, nodeos_plugins, nodeos_flags)
self.nodeos = Node(TestHelper.LOCAL_HOST, TestHelper.DEFAULT_PORT, self.node_id, self.data_dir, self.config_dir, shlex.split(start_nodeos_cmd), walletMgr=self.keosd)
time.sleep(self.sleep_s*2)
self.nodeos.waitForBlock(1, timeout=30)
Expand Down
2 changes: 1 addition & 1 deletion tests/resource_monitor_plugin_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def prepareDirectories():
def runNodeos(extraNodeosArgs, myTimeout):
"""Startup nodeos, wait for timeout (before forced shutdown) and collect output."""
if debug: Print("Launching nodeos process.")
cmd="programs/nodeos/nodeos --config-dir rsmStaging/etc -e -p eosio --plugin eosio::chain_api_plugin --data-dir " + dataDir + " "
cmd="programs/nodeos/nodeos --config-dir rsmStaging/etc -e -p eosio --vote-threads 2 --plugin eosio::chain_api_plugin --data-dir " + dataDir + " "

cmd=cmd + extraNodeosArgs
if debug: Print("cmd: %s" % (cmd))
Expand Down
2 changes: 1 addition & 1 deletion tests/split_blocklog_replay_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
os.makedirs(config_dir)

try:
start_nodeos_cmd = f"{Utils.EosServerPath} -e -p eosio --data-dir={data_dir} --config-dir={config_dir} --blocks-log-stride 10" \
start_nodeos_cmd = f"{Utils.EosServerPath} -e -p eosio --vote-threads 2 --data-dir={data_dir} --config-dir={config_dir} --blocks-log-stride 10" \
" --plugin=eosio::http_plugin --plugin=eosio::chain_api_plugin --http-server-address=localhost:8888"

nodeos.launchCmd(start_nodeos_cmd, node_id)
Expand Down
1 change: 1 addition & 0 deletions tutorials/bios-boot-tutorial/bios-boot-tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def startNode(nodeIndex, account):
' --p2p-max-nodes-per-host ' + str(maxClients) +
' --enable-stale-production'
' --producer-name ' + account['name'] +
' --vote-threads 3'
' --signature-provider ' + account['pub'] + '=KEY:' + account['pvt'] +
' --plugin eosio::http_plugin'
' --plugin eosio::chain_api_plugin'
Expand Down

0 comments on commit 895cef7

Please sign in to comment.