Skip to content

Remove Tower BFT - #12460

Open
ripatel-fd wants to merge 12 commits into
mainfrom
ripatel/rm-legacy
Open

ripatel-fd wants to merge 12 commits into
mainfrom
ripatel/rm-legacy

Conversation

@ripatel-fd

@ripatel-fd ripatel-fd commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
 ┌─ ⚡ PERF · c2c54c8 vs main@5ca81ea ─────────────────────────────────
 │ SUITE                               BASELINE          NEW         Δ
 │ replay tps, mainnet                        …   12,901 tps         …
 │ bench tps, localnet                        …  665,429 tps         …
 │ snapshot load, testnet                     …       4.84 s         …
!│ mem total, mainnet                146.36 GiB   147.04 GiB  ▲  +0.46%
+│ mem total, testnet                 87.25 GiB    87.12 GiB  ▼  -0.15%
+│ clean compile, firedancer             3.47 s       3.19 s  ▼  -7.97%
+│ binary size, firedancer             59.94 MB     57.99 MB  ▼  -3.25%
 ├─────────────────────────────────────────────────────────────────────
@@ 0 REGRESSIONS · 1 WARNING · 3 IMPROVED · 0 NOISE · 3 UNMEASURED @@
 └─────────────────────────────────────────────────────────────────────
history · 11 pushes
 ┌─ HISTORY · Δ vs main, per push, newest first ──────────────────────────────────
 │ HEAD         TPS    BENCH     SNAP    MEM·M    MEM·T  COMPILE   BINARY
!│ c2c54c8        …        …        …   +0.46%   -0.15%   -7.97%   -3.25%
 │ 958c0b0        …        …        …        …        …        …        …
!│ 8ab00d1        …        …        …   +0.46%   -0.15%   -7.55%   -3.25%
!│ 3989b76        …        …        …   +0.46%   -0.15%   -5.15%   -3.26%
!│ e7a3f1e        …        …        …   +0.46%   -0.15%   -7.27%   -3.26%
!│ 628aa28        …        …        …   +0.46%   -0.15%   -8.85%   -3.26%
-│ 6201b50        …        …        …        …        …        …        …
-│ 855b540        …        …        …   +0.46%   -0.14%   -5.78%   -3.05%
-│ c9629e7        …        …        …   +0.47%   -0.14%   +0.24%   -2.65%
-│ b98e7df        …        …        …   +0.47%   -0.14%   +0.27%   -2.60%
-│ 8d5a102        …        …        …   +0.47%   -0.14%   +0.03%   -2.60%
 └────────────────────────────────────────────────────────────────────────────────

@ripatel-fd
ripatel-fd force-pushed the ripatel/rm-legacy branch 10 times, most recently from 628aa28 to e7a3f1e Compare October 21, 2026 18:23
@ripatel-fd
ripatel-fd marked this pull request as ready for review October 21, 2026 18:25
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:25
@ripatel-fd
ripatel-fd deployed to coverage-report October 21, 2026 18:25 — with GitHub Actions Active
@ripatel-fd
ripatel-fd deployed to coverage-report October 21, 2026 18:30 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two critical out-of-bounds access issues and a moderate repair-RPS reporting regression remain unresolved.

2 open issues
What changed in this PR

Removes Tower BFT infrastructure, making Alpenglow the sole consensus path across validator and development tooling.

Changes:

  • Removes obsolete consensus tiles, persistence, interfaces, and commands.
  • Makes Alpenglow behavior unconditional in genesis, replay, networking, and RPC.
  • Updates configuration, telemetry, tests, backtests, and benchmarks.

Unresolved issues:

  • Critical — 3 votes: src/app/shared/commands/watch/watch.c:1367 removes the missing-GUI guard, causing out-of-bounds metric reads when GUI is disabled. Restore the guard.
  • Moderate — 1 vote: src/app/shared/commands/watch/watch.c:1919 excludes successful legacy repair responses from valid and total RPS. Retain existing response counters alongside the new counters.
  • Critical — 1 vote: src/disco/net/sock/fd_sock_tile.c:253 leaves eight-entry port arrays with a nine-iteration loop, causing out-of-bounds reads during socket-provider startup. Derive the loop bound from the array length.
File Description
src/​flamenco/​runtime/​tests/​test_sol_compat.c Removes shred fixture dispatch.
src/​flamenco/​runtime/​tests/​test_sol_compat_so.c Removes shred compatibility mode.
src/​flamenco/​runtime/​tests/​run_ledger_backtest.sh Removes consensus selection.
src/​flamenco/​runtime/​tests/​Local.mk Removes shred harness targets.
src/​flamenco/​runtime/​tests/​fd_solfuzz.h Removes shred harness declarations.
src/​flamenco/​runtime/​tests/​fd_solfuzz_exec.c Removes shred fixture execution.
src/​flamenco/​runtime/​tests/​fd_sol_compat.h Removes shred compatibility API.
src/​flamenco/​runtime/​tests/​fd_sol_compat.c Removes shred compatibility implementation.
src/​flamenco/​genesis/​test_genesis_create.c Updates Alpenglow account expectations.
src/​flamenco/​genesis/​fd_genesis_create.h Removes consensus option.
src/​flamenco/​genesis/​fd_genesis_create.c Always creates Alpenglow accounts.
src/​discof/​txsend/​Local.mk Removes TxSend build target.
src/​discof/​txsend/​generated/​fd_txsend_tile_seccomp.h Deletes generated TxSend filter.
src/​discof/​txsend/​fd_txsend_tile.seccomppolicy Deletes TxSend syscall policy.
src/​discof/​txsend/​fd_txsend_tile.h Deletes TxSend tile definitions.
src/​discof/​tower/​Local.mk Removes Tower tile targets.
src/​discof/​tower/​fd_tower_tile.seccomppolicy Deletes Tower syscall policy.
src/​discof/​tower/​fd_tower_slot_rooted.h Deletes Tower root notification.
src/​discof/​rpc/​test_rpc_tile.c Removes Tower-mode assertions.
src/​discof/​rpc/​fd_rpc_tile.c Uses Alpenglow confirmation behavior.
src/​discof/​rotor/​fd_rotor_tile.h Removes legacy repair signals.
src/​discof/​restore/​fd_snapin_tile.c Always requires snapshot block IDs.
src/​discof/​replay/​fd_sched.h Simplifies scheduler constructor.
src/​discof/​replay/​fd_sched.c Always applies Alpenglow validation.
src/​discof/​replay/​fd_replay_tile_private.h Removes Tower replay state.
src/​discof/​repair/​test_rserve_tile.c Updates store constructor calls.
src/​discof/​repair/​Local.mk Removes legacy repair targets.
src/​discof/​repair/​generated/​fd_repair_tile_seccomp.h Deletes generated repair filter.
src/​discof/​repair/​fd_reqlim.h Deletes request deduplication API.
src/​discof/​repair/​fd_reqlim.c Deletes request deduplication implementation.
src/​discof/​repair/​fd_repair_tile.seccomppolicy Deletes repair tile policy.
src/​discof/​repair/​fd_repair_tile.h Deletes legacy repair messages.
src/​discof/​repair/​fd_repair_metrics.h Deletes legacy repair metrics interface.
src/​discof/​reasm/​Local.mk Removes reassembly targets.
src/​discof/​reasm/​fd_reasm_private.h Deletes reassembly internals.
src/​discof/​poh/​Local.mk Removes PoH tile targets.
src/​discof/​poh/​generated/​fd_poh_tile_seccomp.h Deletes generated PoH filter.
src/​discof/​poh/​fd_poh_tile.seccomppolicy Deletes PoH syscall policy.
src/​discof/​gossip/​test_gossip_tile.c Deletes gossip tile tests.
src/​discof/​gossip/​Local.mk Removes gossip unit-test target.
src/​discof/​gossip/​fd_gossip_tile.h Removes TxSend tracking state.
src/​discof/​gossip/​fd_gossip_tile.c Removes Tower and TxSend inputs.
src/​discof/​forest/​Local.mk Removes forest targets.
src/​discof/​admin/​fd_adminctl.h Versions simplified identity payload.
src/​disco/​topo/​fd_topo.h Removes consensus-specific tile fields.
src/​disco/​store/​fd_store.h Makes Alpenglow indexes unconditional.
src/​disco/​shred/​fd_shred_tile.c Removes Tower routing and gating.
src/​disco/​net/​sock/​fd_sock_tile.c Removes TxSend socket routing.
src/​disco/​net/​mlx5/​test_mlx5_tile.c Removes TxSend route assertions.
src/​disco/​net/​fd_net_tile_private.h Removes TxSend port mapping.
src/​disco/​metrics/​generated/​fd_metrics_sample_gen.c Updates sampling schema.
src/​disco/​metrics/​generated/​fd_metrics_replay.h Removes reassembly gauge.
src/​disco/​metrics/​generated/​fd_metrics_poh.h Deletes PoH metrics header.
src/​disco/​metrics/​generated/​fd_metrics_all.h Removes obsolete tile metrics includes.
src/​disco/​keyguard/​fd_sign_tile.c Removes Tower and TxSend signing links.
src/​disco/​gui/​test_gui_hist_evict.c Updates Alpenglow GUI expectations.
src/​disco/​gui/​fd_gui_printf.h Removes Tower display declarations.
src/​disco/​gui/​fd_gui_peers.h Removes Tower vote tracking interfaces.
src/​disco/​fd_disco_base.h Removes TxSend protocol identifier.
src/​disco/​events/​schema/​metrics_replay.json Deprecates reassembly event field.
src/​disco/​events/​schema/​events.proto Marks protobuf field deprecated.
src/​disco/​diag/​fd_diag_tile.c Removes Tower voting diagnostics.
src/​choreo/​tower/​test_tower_serdes.c Removes tower-file conversion tests.
src/​choreo/​tower/​Local.mk Retains serialization targets only.
src/​choreo/​tower/​fuzz_tower_file.c Deletes tower-file fuzz harness.
src/​choreo/​tower/​fd_tower.h Removes stake tracking members.
src/​choreo/​tower/​fd_tower_stakes.h Deletes Tower stake API.
src/​choreo/​tower/​fd_tower_stakes.c Deletes Tower stake implementation.
src/​choreo/​tower/​fd_tower_serdes.h Removes vote expansion API.
src/​choreo/​tower/​fd_tower_serdes.c Removes vote expansion implementation.
src/​choreo/​tower/​fd_tower_file.h Deletes tower-file API.
src/​choreo/​tower/​fd_tower_file.c Deletes tower-file serialization.
src/​choreo/​fd_choreo.h Removes Tower stakes include.
src/​app/​shared/​test_config_parse.c Removes Tower configuration assertions.
src/​app/​shared/​fd_config.h Removes obsolete configuration fields.
src/​app/​shared/​fd_config_parse.c Deprecates removed configuration keys.
src/​app/​shared/​fd_config_json.c Updates configuration serialization.
src/​app/​shared/​fd_action.h Removes obsolete command arguments.
src/​app/​shared/​commands/​watch/​watch.c Updates consensus monitoring.
src/​app/​shared/​commands/​configure/​hyperthreads.c Removes PoH-specific checks.
src/​app/​shared/​commands/​configure/​ethtool-channels.c Updates configured network ports.
src/​app/​shared/​commands/​configure/​configure.c Removes blockstore stage help.
src/​app/​shared/​boot/​fd_boot.c Removes Alpenglow CLI switch.
src/​app/​shared_dev/​commands/​quic_trace/​fd_quic_trace.h Removes TxSend tracing state.
src/​app/​shared_dev/​commands/​quic_trace/​fd_quic_trace_rx_tile.c Restricts tracing to QUIC server traffic.
src/​app/​shared_dev/​commands/​quic_trace/​fd_quic_trace_main.c Removes TxSend tracing support.
src/​app/​shared_dev/​commands/​configure/​genesis.c Removes consensus prerequisite.
src/​app/​shared_dev/​boot/​fd_dev_boot.c Removes development consensus switch.
src/​app/​firedancer/​topology.h Simplifies store setup interface.
src/​app/​firedancer/​main.c Removes obsolete tile registrations.
src/​app/​firedancer/​config/​testnet.toml Removes explicit consensus selection.
src/​app/​firedancer/​config/​testnet-jito.toml Removes explicit consensus selection.
src/​app/​firedancer/​config/​devnet.toml Removes explicit consensus selection.
src/​app/​firedancer/​config/​default.toml Removes Tower settings; updates comments.
src/​app/​firedancer/​commands/​wait.c Removes consensus labels from logs.
src/​app/​firedancer/​commands/​set_identity.c Accepts vote-history files only.
src/​app/​firedancer/​callbacks.c Updates store construction callbacks.
src/​app/​firedancer-dev/​tests/​test_firedancer_dev.c Removes explicit Alpenglow setup.
src/​app/​firedancer-dev/​main.h Removes obsolete tiles and commands.
src/​app/​firedancer-dev/​Local.mk Removes obsolete command targets.
src/​app/​firedancer-dev/​commands/​tower.c Deletes Tower inspection command.
src/​app/​firedancer-dev/​commands/​send_test/​Local.mk Removes send-test target.
src/​app/​firedancer-dev/​commands/​rotor.c Updates missing-tile error.
src/​app/​firedancer-dev/​commands/​reasm.c Deletes reassembly inspection command.
src/​app/​firedancer-dev/​commands/​gossip.c Removes TxSend port configuration.
src/​app/​firedancer-dev/​commands/​backtest.c Uses Alpenglow messages and topology.
contrib/​test/​run_unit_tests.sh Removes Tower page reservation.
contrib/​test/​run_test_vectors.sh Removes shred fixture execution.
contrib/​test/​run_script_tests.sh Removes reassembly script test.
contrib/​ci/​bench/​benchmark_comment.py Removes separate Alpenglow memory row.
contrib/​ci/​bench/​bench.sh Updates ledger and benchmark arguments.
.github/​workflows/​on_pull_request.yml Updates snapshot benchmark input.
.github/​workflows/​benchmark.yml Updates default snapshot ledger.
.github/​workflows/​backtest.yml Updates cleanup configuration path.

Review effort: Balanced

Comment thread src/app/shared/commands/watch/watch.c
Comment thread src/disco/net/sock/fd_sock_tile.c
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:33
@nishk-jump nishk-jump assigned nishk-jump and unassigned nishk-jump Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Test Vectors Coverage

Overall (lines / functions / branches across all instrumented files)

Metric Base PR Delta
Lines 16.50% (40094/242375) 15.60% (36093/231226) -0.90% 📉
Functions 0.60% (4800/843658) 0.50% (4108/781752) -0.10% 📉
Branches N/A N/A N/A

Per directory (line coverage, recursive)

Directory Base PR Delta
flamenco/vm 78.93% (3541/4486) 78.93% (3541/4486) +0.00% ➡️
flamenco/vm/syscall 89.74% (2238/2494) 89.74% (2238/2494) +0.00% ➡️
flamenco/runtime 63.08% (12130/19231) 62.66% (11880/18958) -0.41% 📉
flamenco/runtime/program 79.09% (5889/7446) 78.97% (5880/7446) -0.12% 📉
flamenco/gossip 12.66% (495/3911) 12.66% (495/3911) +0.00% ➡️
ballet/bls 57.28% (295/515) 57.28% (295/515) +0.00% ➡️
ballet/bn254 95.82% (1947/2032) 95.82% (1947/2032) +0.00% ➡️
ballet/ed25519 62.39% (1624/2603) 59.47% (1548/2603) -2.92% 📉
ballet/secp256k1 100.00% (424/424) 100.00% (424/424) +0.00% ➡️
ballet/secp256r1 84.78% (156/184) 84.78% (156/184) +0.00% ➡️
ballet/zksdk 100.00% (1216/1216) 100.00% (1216/1216) +0.00% ➡️

Full HTML report: coverage report.

@ripatel-fd
ripatel-fd deployed to coverage-report October 21, 2026 18:37 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A broken public-header export, two out-of-bounds accesses, and two benchmark compatibility regressions remain unresolved.

1 open issue
2 resolved since last review

Review effort: Balanced

Comment thread src/choreo/tower/Local.mk
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:41
@ripatel-fd
ripatel-fd deployed to coverage-report October 21, 2026 18:45 — with GitHub Actions Active
@ripatel-fd
ripatel-fd deployed to coverage-report October 21, 2026 18:48 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Baseline benchmarks lose required Alpenglow configuration, and still-relevant gossip startup test coverage is removed.

3 open issues

Review effort: Balanced

Comment thread contrib/ci/bench/bench.sh
Comment thread src/flamenco/runtime/tests/run_ledger_backtest.sh
Copilot AI balanced review requested due to automatic review settings October 21, 2026 18:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved genesis memory-safety, benchmark compatibility, and regression-coverage issues need correction.

2 open issues
3 resolved since last review

Review effort: Balanced

Comment thread src/flamenco/genesis/fd_genesis_create.c
Comment thread contrib/ci/bench/bench.sh

This branch was successfully deployed

1 active deployment
coverage-report — c2c54c89 Deployed Oct 21, 2026 by ripatel-fd via Coverage Test Vectors #346
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