Skip to content

chore: Add besu-to-besu spin up script - #1334

Merged
dhfang merged 15 commits into
mainfrom
diana/fou-1225-create-script-to-launch-two-besu-chains-locally
Aug 13, 2026
Merged

dhfang merged 15 commits into
mainfrom
diana/fou-1225-create-script-to-launch-two-besu-chains-locally

Conversation

@dianab-cl

Copy link
Copy Markdown
Contributor

No description provided.

@dianab-cl
dianab-cl requested a review from a team as a code owner August 10, 2026 15:12
@linear-code

linear-code Bot commented Aug 10, 2026

Copy link
Copy Markdown

FOU-1225

@greptile-apps

greptile-apps Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a local two-chain Besu QBFT demonstration with generated genesis configurations, account derivation, Docker Compose orchestration, and operational documentation.

  • Adds templates and scripts for initializing, starting, inspecting, and cleaning two independent Besu chains.
  • Documents chain accounts, ports, configuration, prerequisites, and the local-devnet security model.
  • Updates ignore and license configuration for generated artifacts and JSON templates.

Confidence Score: 3/5

The PR is not yet safe to merge because the previously reported validator-key exposure remains unresolved.

The generated validator key is still written mode 0644 beneath mode-0755 directories, so an unrelated local user can read a custom mnemonic’s sole-validator key and impersonate that validator.

Files Needing Attention: examples/besu-to-besu/lib/chains.sh

Important Files Changed

Filename Overview
examples/besu-to-besu/lib/chains.sh Implements account derivation, QBFT genesis generation, generated-file handling, chain startup, status reporting, and cleanup.
examples/besu-to-besu/lib/common.sh Adds shared prerequisite checks, logging, template rendering, Foundry fallback, and JSON-RPC helpers.
examples/besu-to-besu/setup.sh Provides the command-line entrypoint and configurable defaults for initializing and operating the demonstration.
examples/besu-to-besu/docker-compose.yml Defines two independent loopback-published Besu services with persistent data volumes and read-only generated configuration mounts.
examples/besu-to-besu/README.md Documents the example’s architecture, generated files, accounts, configuration, usage, and local-devnet constraints.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    Setup[setup.sh] --> Init[Derive accounts and validator keys]
    Init --> Render[Render Besu configs and genesis files]
    Render --> Env[Write chains.env]
    Render --> Compose[Start Docker Compose services]
    Compose --> A[Besu chain A]
    Compose --> B[Besu chain B]
    A --> Wait[Poll JSON-RPC]
    B --> Wait
    Wait --> Status[Report chain IDs and block heights]
Loading

Reviews (5): Last reviewed commit: "Merge branch 'main' into diana/fou-1225-..." | Re-trigger Greptile

Comment thread examples/besu-to-besu/lib/chains.sh Outdated
Comment thread examples/besu-to-besu/README.md Outdated
@dianab-cl

Copy link
Copy Markdown
Contributor Author

@greptile review

Comment thread examples/besu-to-besu/lib/chains.sh
@dianab-cl

Copy link
Copy Markdown
Contributor Author

@greptile review

Comment thread examples/besu-to-besu/lib/chains.sh
@dianab-cl

Copy link
Copy Markdown
Contributor Author

@greptile review

Base automatically changed from development to main August 11, 2026 13:01
@dianab-cl dianab-cl changed the title Add besu-to-besu spin up script chore: Add besu-to-besu spin up script Aug 11, 2026
Comment thread examples/besu-to-besu/README.md
@dianab-cl dianab-cl closed this Aug 11, 2026
@dianab-cl dianab-cl reopened this Aug 11, 2026
dianab-cl and others added 10 commits August 11, 2026 21:18
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
A dummy-client deploy in TestStartRealizesAppStackAndDummyClients hung in
bind.WaitMined for 9+ minutes on CI until the go test 10m alarm killed the
whole package: nothing bounded the wait, and WaitMined polls forever while
swallowing every receipt error.

Bound each setup transaction wait with the chain's CompletionBudget, so a
lost transaction fails its own test in bounded time with a stage-named
error instead of panicking the test binary.

Note for future work: evm.EVMClient.waitForReceipt fails on the first
transport error; geth-style nodes emit a transient, string-only
"transaction indexing is in progress" receipt error right after mining,
so reusing that helper here would need its error handling revisited.

Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
Signed-off-by: Diana Borbe <diana@cosmoslabs.io>
@dianab-cl
dianab-cl force-pushed the diana/fou-1225-create-script-to-launch-two-besu-chains-locally branch from c2c9db5 to 7c0da14 Compare August 11, 2026 19:18
dhfang added 2 commits August 13, 2026 22:46
Signed-off-by: Dennis Fang <dhsfang@gmail.com>
…esu-chains-locally

Signed-off-by: dhfang <dhsfang@gmail.com>
@dhfang
dhfang merged commit cba657a into main Aug 13, 2026
19 checks passed
@dhfang
dhfang deleted the diana/fou-1225-create-script-to-launch-two-besu-chains-locally branch August 13, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants