The init script does not process the override parameter, which may cause inconsistent configuration variables between internal modules.
まだ誰も着手していません。
評価
調査の方向性
まず init script の geth init コマンドと run script の override パラメータを比較し、次にエントリポイント initGenesis を読んで、それらの値がどのように保存されるかを確認します。関連する override が一貫して処理されるように初期化フローを更新し、genesis 設定がノードの実行時に使用される値と一致することを検証します。
索引モデルが issue の本文から書いたものです。
説明
The init script is below:
if [ $i -eq 0 ] ; then
${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme ${stateScheme} --db.engine ${dbEngine} ${workspace}/genesis/genesis.json > "${initLog}" 2>&1
elif [ $i -eq 1 ] ; then
${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme path --db.engine pebble --multidatabase ${workspace}/genesis/genesis.json > "${initLog}" 2>&1
else
${workspace}/bin/geth --datadir ${workspace}/.local/node${i} init --state.scheme path --db.engine pebble ${workspace}/genesis/genesis.json > "${initLog}" 2>&1
fi
The run script is below:
nohup ${workspace}/.local/node${i}/geth${i} --config ${workspace}/.local/node${i}/config.toml \
--mine --vote --password ${workspace}/.local/node${i}/password.txt --unlock ${cons_addr} --miner.etherbase ${cons_addr} --blspassword ${workspace}/.local/node${i}/password.txt \
--datadir ${workspace}/.local/node${i} \
...
--rialtohash ${rialtoHash} **--override.passedforktime ${PassedForkTime} --override.lorentz ${PassedForkTime} --override.maxwell** ${LastHardforkTime} \
--override.immutabilitythreshold ${FullImmutabilityThreshold} --override.breatheblockinterval ${BreatheBlockInterval} \
--override.minforblobrequest ${MinBlocksForBlobRequests} --override.defaultextrareserve ${DefaultExtraReserveForBlobRequests} \
>> ${workspace}/.local/node${i}/bsc-node.log 2>&1 &
The initGenesis code is below:
// initGenesis will initialise the given JSON format genesis file and writes it as
// the zero'd block (i.e. genesis) or will fail hard if it can't succeed.
func initGenesis(ctx *cli.Context) error {
if ctx.Args().Len() != 1 {
utils.Fatalf("need genesis.json file as the only argument")
}
...
var overrides core.ChainOverrides
if ctx.IsSet(utils.OverridePassedForkTime.Name) {
v := ctx.Uint64(utils.OverridePassedForkTime.Name)
overrides.OverridePassedForkTime = &v
}
if ctx.IsSet(utils.OverrideLorentz.Name) {
v := ctx.Uint64(utils.OverrideLorentz.Name)
overrides.OverrideLorentz = &v
}
if ctx.IsSet(utils.OverrideMaxwell.Name) {
v := ctx.Uint64(utils.OverrideMaxwell.Name)
overrides.OverrideMaxwell = &v
}
if ctx.IsSet(utils.OverrideFermi.Name) {
v := ctx.Uint64(utils.OverrideFermi.Name)
overrides.OverrideFermi = &v
}
if ctx.IsSet(utils.OverrideVerkle.Name) {
v := ctx.Uint64(utils.OverrideVerkle.Name)
overrides.OverrideVerkle = &v
}
...
_, hash, _, err := core.SetupGenesisBlockWithOverride(chaindb, triedb, genesis, &overrides)
if err != nil {
utils.Fatalf("Failed to write genesis block: %v", err)
}
log.Info("Successfully wrote genesis state", "database", name, "hash", hash.String())
return nil
}
This method handles the override parameter, but it is not passed in the script.The init script will write the configuration to the genesis block. When the node is running, if some modules read the genesis block configuration in the db, and some modes use the configuration in the running parameters, it may cause inconsistent data reading and writing.
- 主要言語
- Shell
- スター
- 70
- フォーク
- 62
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
bnb-chain/node-deploy のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
bnb-chain/node-deploy#83 ·
bnb-chain/node-deploy の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Leonxlnx/taste-skill#164 ·
メンテナーはふだん 1 日以内に返信
-
patch: moving an executable script removes its executable bit対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンreproduced
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
anomalyco/opencode#58651 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`ODK_RESOURCES_DIR` not set when `ODK_USER_ID` is 0 or unset対応中かも @gouttegd が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
INCATools/ontology-development-kit#1390 · 担当者 1 名 ·
-
使用脚本 DD 腾讯云 报错オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
evals: run-validity calls runs VALID when every Bash call failed to start the sandbox (long TMPDIR)オープンpriority: medium status: needs-decision work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
melodic-software/claude-code-plugins#9611 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信