Skip to content

Commit

Permalink
Merge pull request #272 from dysnix/bsc-improve-cli-args
Browse files Browse the repository at this point in the history
[bsc] improve CLI args
  • Loading branch information
voron authored Dec 7, 2023
2 parents 78ff9d2 + 4928f83 commit d2d1206
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 32 deletions.
4 changes: 2 additions & 2 deletions dysnix/bsc/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
apiVersion: v2
name: bsc
description: Binance Smart Chain chart for Kubernetes
version: "0.6.32"
appVersion: "v1.2.4"
version: 0.6.33
appVersion: 1.2.15

keywords:
- geth
Expand Down
28 changes: 10 additions & 18 deletions dysnix/bsc/templates/configs/_config.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,36 @@
[Eth]
NetworkId = 56
LightPeers = 100
NoPruning = false
NoPrefetch = false
LightPeers = 100
UltraLightFraction = 75
TrieTimeout = 100000000000
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
TrieTimeout = 150000000000
DisablePeerTxBroadcast = true

[Eth.Miner]
GasFloor = 30000000
GasCeil = 40000000
GasPrice = 1000000000
GasCeil = 140000000
GasPrice = 3000000000
Recommit = 10000000000
Noverify = false

[Eth.TxPool]
Locals = []
NoLocals = true
Journal = "transactions.rlp"
Rejournal = 3600000000000
PriceLimit = 1000000000
PriceLimit = 3000000000
PriceBump = 10
AccountSlots = 512
GlobalSlots = 10000
AccountQueue = 256
GlobalQueue = 5000
Lifetime = 10800000000000
AccountSlots = 200
GlobalSlots = 8000
AccountQueue = 200
GlobalQueue = 4000

[Eth.GPO]
Blocks = 20
Percentile = 60
OracleThreshold = 20
OracleThreshold = 1000

[Node]
IPCPath = "geth.ipc"
HTTPHost = "0.0.0.0"
NoUSB = true
InsecureUnlockAllowed = false
HTTPPort = {{ .Values.service.rpcPort }}
HTTPVirtualHosts = ["{{ join "\",\"" .Values.bsc.rpcVhosts }}"]
Expand Down
22 changes: 15 additions & 7 deletions dysnix/bsc/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ spec:
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.bscCmdOverride }}
{{- with .Values.bscCmd }}
Expand All @@ -84,24 +84,32 @@ spec:
- --syncmode={{ .Values.bsc.syncmode }}
- --gcmode={{ .Values.bsc.gcmode }}
- --maxpeers={{ .Values.bsc.maxpeers }}
- --cache={{ .Values.bsc.cache }}
- --cache={{ .Values.bsc.cache.value }}
- --snapshot={{ .Values.bsc.snapshot }}
- --pipecommit={{ .Values.bsc.pipecommit }}
- --persistdiff={{ .Values.bsc.persistdiff }}
- --diffblock={{ .Values.bsc.diffblock }}
- --port={{ .Values.service.p2pPort0 }}
{{- if .Values.bsc.allowUnprotectedTxs }}
- --rpc.allow-unprotected-txs
- --txlookuplimit=0
{{- end }}
{{- if kindIs "float64" .Values.bsc.txlookuplimit }}
- --txlookuplimit={{ int .Values.bsc.txlookuplimit }}
{{- end }}
{{- if kindIs "float64" .Values.bsc.history.transactions }}
- --history.transactions={{ int .Values.bsc.history.transactions }}
{{- end }}
{{- if .Values.bsc.cache.preimages }}
- --cache.preimages
{{- end }}
{{- if .Values.bsc.wsEnabled }}
- --ws
{{- end }}
{{- if .Values.bsc.diffsync }}
- --diffsync
{{- end }}
{{- if .Values.bsc.triesVerifyMode }}
- --tries-verify-mode={{ .Values.bsc.triesVerifyMode }}
{{- end }}
{{- if .Values.bsc.pruneancient }}
- --pruneancient=true
{{- end }}
{{- if and .Values.externalLBp2p .Values.externalLBp2pIP }}
- --nat=extip:{{- .Values.externalLBp2pIP -}}
{{- end }}
Expand Down
15 changes: 10 additions & 5 deletions dysnix/bsc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ terminationGracePeriodSeconds: 180

image:
repository: ghcr.io/bnb-chain/bsc
tag: latest
tag: ""
pullPolicy: Always

imagePullSecrets: []
Expand Down Expand Up @@ -99,16 +99,21 @@ bsc:
gcmode: "full"
logLevel: "info"
base_path: "/data"
rpcApi: ["eth", "net", "web3", "txpool", "parlia"]
rpcApi: ["eth", "net", "web3", "txpool"]
rpcVhosts: ["*"]
wsEnabled: false
wsApi: ["net", "web3", "eth"]
wsOrigins: ["*"]
maxpeers: 50
cache: 8192
snapshot: false
pipecommit: false
diffsync: true
allowUnprotectedTxs: true
cache:
value: 8192
preimages: true
txlookuplimit: 0 # WARNING: won't work on BSC >=1.3.x, node will crash if it's provided. use ".Values.history.transactions" instead
history:
transactions: null # BSC >=1.3.x only
pruneancient: false # WARNING: enabling this option is irreversible, ancient data will be permanently removed
# extra arguments to pass to container
extraArgs: []
# https://github.com/bnb-chain/bsc/issues/1193
Expand Down

0 comments on commit d2d1206

Please sign in to comment.