Add flag to explicitly enable state network (#2031)
This commit is contained in:
parent
bea558740f
commit
2766e20179
|
@ -1,5 +1,5 @@
|
||||||
# Fluffy
|
# Fluffy
|
||||||
# Copyright (c) 2021-2023 Status Research & Development GmbH
|
# Copyright (c) 2021-2024 Status Research & Development GmbH
|
||||||
# Licensed and distributed under either of
|
# Licensed and distributed under either of
|
||||||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||||
|
@ -246,6 +246,12 @@ type
|
||||||
defaultValueDesc: $defaultDisablePoke
|
defaultValueDesc: $defaultDisablePoke
|
||||||
name: "disable-poke" .}: bool
|
name: "disable-poke" .}: bool
|
||||||
|
|
||||||
|
stateNetworkEnabled* {.
|
||||||
|
hidden
|
||||||
|
desc: "Enable State Network"
|
||||||
|
defaultValue: false
|
||||||
|
name: "state" .}: bool
|
||||||
|
|
||||||
case cmd* {.
|
case cmd* {.
|
||||||
command
|
command
|
||||||
defaultValue: noCommand .}: PortalCmd
|
defaultValue: noCommand .}: PortalCmd
|
||||||
|
|
|
@ -166,10 +166,14 @@ proc run(config: PortalConf) {.raises: [CatchableError].} =
|
||||||
)
|
)
|
||||||
streamManager = StreamManager.new(d)
|
streamManager = StreamManager.new(d)
|
||||||
|
|
||||||
stateNetwork = Opt.some(StateNetwork.new(
|
stateNetwork =
|
||||||
d, db, streamManager,
|
if config.stateNetworkEnabled:
|
||||||
bootstrapRecords = bootstrapRecords,
|
Opt.some(StateNetwork.new(
|
||||||
portalConfig = portalConfig))
|
d, db, streamManager,
|
||||||
|
bootstrapRecords = bootstrapRecords,
|
||||||
|
portalConfig = portalConfig))
|
||||||
|
else:
|
||||||
|
Opt.none(StateNetwork)
|
||||||
|
|
||||||
accumulator =
|
accumulator =
|
||||||
# Building an accumulator from header epoch files takes > 2m30s and is
|
# Building an accumulator from header epoch files takes > 2m30s and is
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2023 Status Research & Development GmbH. Licensed under
|
# Copyright (c) 2021-2024 Status Research & Development GmbH. Licensed under
|
||||||
# either of:
|
# either of:
|
||||||
# - Apache License, version 2.0
|
# - Apache License, version 2.0
|
||||||
# - MIT license
|
# - MIT license
|
||||||
|
@ -315,6 +315,7 @@ for NUM_NODE in $(seq 0 $(( NUM_NODES - 1 ))); do
|
||||||
--table-ip-limit=1024 \
|
--table-ip-limit=1024 \
|
||||||
--bucket-ip-limit=24 \
|
--bucket-ip-limit=24 \
|
||||||
--bits-per-hop=1 \
|
--bits-per-hop=1 \
|
||||||
|
--state=1 \
|
||||||
${TRUSTED_BLOCK_ROOT_ARG} \
|
${TRUSTED_BLOCK_ROOT_ARG} \
|
||||||
${RADIUS_ARG} \
|
${RADIUS_ARG} \
|
||||||
${EXTRA_ARGS} \
|
${EXTRA_ARGS} \
|
||||||
|
|
Loading…
Reference in New Issue