Skip to content

Commit

Permalink
clients/besu: add Shanghai fork and fix issue with duplicated node ke…
Browse files Browse the repository at this point in the history
…ys (#674)

* Add bootnode check to avoid duplicated enode address

* Add shanghaiTime to mapper.jq

Co-authored-by: gfukushima <[email protected]>
  • Loading branch information
2 people authored and fjl committed Jan 23, 2023
1 parent 4fcdc0d commit 104c185
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 9 additions & 8 deletions clients/besu/besu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,15 @@ if [ -d /blocks ]; then
IMPORTFLAGS="$IMPORTFLAGS $blocks"
fi


# Configure mining.
if [ "$HIVE_MINER" != "" ]; then
FLAGS="$FLAGS --miner-enabled --miner-coinbase=$HIVE_MINER"
# For clique mining, besu uses the node key as the block signing key.
if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then
echo "Importing clique signing key as node key..."
echo "$HIVE_CLIQUE_PRIVATEKEY" > /opt/besu/key
if [ "$HIVE_BOOTNODE" != "" ]; then
# Configure mining.
if [ "$HIVE_MINER" != "" ]; then
FLAGS="$FLAGS --miner-enabled --miner-coinbase=$HIVE_MINER"
# For clique mining, besu uses the node key as the block signing key.
if [ "$HIVE_CLIQUE_PRIVATEKEY" != "" ]; then
echo "Importing clique signing key as node key..."
echo "$HIVE_CLIQUE_PRIVATEKEY" > /opt/besu/key
fi
fi
fi
if [ "$HIVE_MINER_EXTRA" != "" ]; then
Expand Down
1 change: 1 addition & 0 deletions clients/besu/mapper.jq
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def to_int:
"berlinBlock": env.HIVE_FORK_BERLIN|to_int,
"londonBlock": env.HIVE_FORK_LONDON|to_int,
"parisBlock": env.HIVE_MERGE_BLOCK_ID|to_int,
"shanghaiTime": env.HIVE_SHANGHAI_TIMESTAMP|to_int,
"terminalTotalDifficulty": env.HIVE_TERMINAL_TOTAL_DIFFICULTY|to_int,
}|remove_empty
}

0 comments on commit 104c185

Please sign in to comment.