Check the Java version
java --version
The Java version must be 21 or higher. If not, update it.
Besu Installation latest version - https://github.com/hyperledger/besu/releases
wget https://github.com/hyperledger/besu/releases/download/26.2.0/besu-26.2.0-bin.tar.gz
tar xvf besu-*-bin.tar.gz
echo 'export PATH="$HOME/besu/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
besu --help
besu --version
git clone git@github.com:Herb-Supply-Chain/IBFT-Network.git
cd IBFT-Network
besu operator generate-blockchain-config --config-file=ibftConfigFile.json --to=networkFiles --private-key-file-name=key
Move the four key folders, each containing key and key.pub files, to the Node-1/data, Node-2/data, Node-3/data, and Node-4/data directories respectively
networkFiles/
├── genesis.json
└── keys
├── 0x438821c42b812fecdcea7fe8235806a412712fc0
│ ├── key
│ └── key.pub
├── 0xca9c2dfa62f4589827c0dd7dcf48259aa29f22f5
│ ├── key
│ └── key.pub
├── 0xcd5629bd37155608a0c9b28c4fd19310d53b3184
│ ├── key
│ └── key.pub
└── 0xe96825c5ab8d145b9eeca1aba7ea3695e034911a
├── key
└── key.pub
IBFT-Network/
├── genesis.json
├── Node-1
│ ├── data
│ │ ├── key
│ │ ├── key.pub
├── Node-2
│ ├── data
│ │ ├── key
│ │ ├── key.pub
├── Node-3
│ ├── data
│ │ ├── key
│ │ ├── key.pub
├── Node-4
│ ├── data
│ │ ├── key
│ │ ├── key.pub
Copy the genesis.json to the IBFT-Network directory as shown above in the folder tree
besu --data-path=data \
--genesis-file=../genesis.json \
--rpc-http-enabled\
--rpc-http-api=ETH,NET,IBFT \
--host-allowlist="*" \
--rpc-http-cors-origins="all" \
--min-gas-price=0 \
--api-gas-price-max=0 \
--profile=ENTERPRISE
besu --data-path=data \
--genesis-file=../genesis.json \
--p2p-port=30304 \
--rpc-http-enabled \
--rpc-http-api=ETH,NET,IBFT \
--host-allowlist="*" \
--rpc-http-cors-origins="all" \
--rpc-http-port=8546 \
--min-gas-price=0 \
--api-gas-price-max=0 \
--profile=ENTERPRISE \
--bootnodes=
--bootnodes value is the enode URL present in the logs of Node-1 See the highlighted text in the picture for reference
Paste the bootnode from Node-1 to Node-2's --bootnodes flag

besu --data-path=data \
--genesis-file=../genesis.json \
--p2p-port=30305 \
--rpc-http-enabled \
--rpc-http-api=ETH,NET,IBFT \
--host-allowlist="*" \
--rpc-http-cors-origins="all" \
--rpc-http-port=8547 \
--min-gas-price=0 \
--api-gas-price-max=0 \
--profile=ENTERPRISE \
--bootnodes=
again the Node-1 enode URL will be pasted in the --bootnodes flag

besu --data-path=data \
--genesis-file=../genesis.json \
--p2p-port=30306 \
--rpc-http-enabled \
--rpc-http-api=ETH,NET,IBFT \
--host-allowlist="*" \
--rpc-http-cors-origins="all" \
--rpc-http-port=8548 \
--min-gas-price=0 \
--api-gas-price-max=0 \
--profile=ENTERPRISE \
--bootnodes=
The same enode URL here as well

Now you can use Hardhat, Foundry, or Remix to deploy smart contracts You have 4 RPC URLs for the 4 nodes. Use any one of the RPC URLs to deploy smart contracts, send transactions, and read events on the chain
More nodes can be added; you just have to change the --p2p-port and --rpc-http-port to the next sequential numbers