Skip to content

feat: add AUTOBAHN option to local docker cluster (CON-247)#3220

Open
wen-coding wants to merge 1 commit intomainfrom
wen/add_autobahn_to_localcluster_script
Open

feat: add AUTOBAHN option to local docker cluster (CON-247)#3220
wen-coding wants to merge 1 commit intomainfrom
wen/add_autobahn_to_localcluster_script

Conversation

@wen-coding
Copy link
Copy Markdown
Contributor

Summary

  • NodeKey.SaveAs() writes node_pubkey.txt alongside node_key.json in node:ed25519:public:<hex> format
  • FilePVKey.Save() writes validator_pubkey.txt alongside priv_validator_key.json in validator:ed25519:public:<hex> format
  • step1_configure_init.sh copies both pubkey files to shared volume (build/generated/node_N/)
  • step4_config_override.sh reads all nodes' pubkeys, generates autobahn JSON config, injects path into config.toml
  • AUTOBAHN env var wired through docker-compose.yml and Makefile

Usage

AUTOBAHN=true make docker-cluster-start

Test plan

  • AUTOBAHN=true make docker-cluster-start — all 4 nodes start with autobahn enabled
  • Check node logs for autobahn peer connection messages
  • go build ./... passes
  • Existing tests pass (node_key.go, privval)

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 9, 2026, 5:14 PM

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedApr 9, 2026, 4:01 PM

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

❌ Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.02%. Comparing base (8d7e329) to head (be2e651).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/privval/file.go 60.00% 1 Missing and 1 partial ⚠️
sei-tendermint/types/node_key.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3220   +/-   ##
=======================================
  Coverage   59.02%   59.02%           
=======================================
  Files        2065     2065           
  Lines      169414   169422    +8     
=======================================
+ Hits        99994   100000    +6     
  Misses      60673    60673           
- Partials     8747     8749    +2     
Flag Coverage Δ
sei-chain-pr 79.21% <60.00%> (?)
sei-db 70.41% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/privval/file.go 68.00% <60.00%> (-0.33%) ⬇️
sei-tendermint/types/node_key.go 67.44% <60.00%> (-1.79%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wen-coding wen-coding requested review from masih and pompon0 April 9, 2026 16:05
@wen-coding wen-coding force-pushed the wen/add_autobahn_to_localcluster_script branch from a67f990 to 2f9bcd2 Compare April 9, 2026 16:09
}
// Write pubkey in autobahn-compatible format alongside the key file.
pubKeyStr := fmt.Sprintf("validator:%v", pvKey.PubKey.String())
pubKeyPath := filepath.Join(filepath.Dir(outFile), "validator_pubkey.txt")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto re path cleaning.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return err
}
// Write pubkey in autobahn-compatible format alongside the key file.
pubKeyStr := fmt.Sprintf("validator:%v", pvKey.PubKey.String())
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto re %s for string concat; that's more explicit given we want the strigner value of key and would safely fail if anything but string is passed in.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

- NodeKey.SaveAs writes node_pubkey.txt alongside node_key.json
- FilePVKey.Save writes validator_pubkey.txt alongside priv_validator_key.json
- step1 copies pubkey files to shared volume for cross-node access
- step4 generates autobahn JSON config from all nodes' pubkeys when AUTOBAHN=true
- Wired through docker-compose.yml and Makefile

Usage: AUTOBAHN=true make docker-cluster-start

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@wen-coding wen-coding force-pushed the wen/add_autobahn_to_localcluster_script branch from 39f68a7 to be2e651 Compare April 9, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants