Skip to content

Remove ringbuffer - #8537

Merged
Eddy Ashton (eddyashton) merged 5 commits into
mainfrom
agents/ringbuffer-code-removal-finalization
Oct 9, 2026
Merged

Eddy Ashton (eddyashton) merged 5 commits into
mainfrom
agents/ringbuffer-code-removal-finalization

Conversation

@eddyashton

Copy link
Copy Markdown
Member

Motivation

Stacked on #8535 as the final implementation step of the ringbuffer-removal plan. All production traffic and periodic maintenance have moved to typed host services and scheduled tasks, leaving the host-enclave ringbuffer infrastructure unused.

This PR removes that dead infrastructure. Configuration migration remains a separate follow-up.

Implementation summary

  • Remove host and enclave circuits, buffer allocation, message dispatch, fragmentation, writer wrappers, serializers, startup flushing and shutdown draining.
  • Remove the remaining ringbuffer declarations, helpers, dedicated tests, benchmark and load-plotting script.
  • Simplify enclave startup and lifecycle coordination now that the main enclave thread only handles stop and transport-shutdown coordination.
  • Update retained tests, build registration and documentation to describe the typed transport and task-based implementation.
  • Keep memory.circuit_size, memory.max_msg_size and memory.max_fragment_size accepted with unchanged defaults and JSON registration.

Safety and compatibility

There is no intended runtime, public API, configuration, node wire-format or ledger-format change. The removed code has no production caller after #8535. Mixed-version protocol compatibility is unchanged, and the existing memory fields remain accepted pending a separate compatibility migration.

Validation:

  • Fresh Clang 18 RelWithDebInfo configure and affected application/unit builds pass.
  • Seven focused unit suites and five representative e2e suites pass; the recovery suite passes unchanged after filesystem writeback synchronization.
  • Full repository static checks and warning-as-error Sphinx validation pass.
  • A fresh full Debug CLANG_TIDY=ON build completes all 333 steps with all 16 available CPUs and no clang-tidy warnings or errors.
  • Independent whole-change review found no significant issues.

No changelog entry is included because this is internal cleanup with no intended user-facing impact.

@eddyashton
Eddy Ashton (eddyashton) requested a review from a team as a code owner October 8, 2026 15:35
@eddyashton Eddy Ashton (eddyashton) changed the title Remove obsolete ringbuffer infrastructure Remove ringbuffer Oct 8, 2026
@eddyashton
Eddy Ashton (eddyashton) added this pull request to stack #8541 October 8, 2026 16:22
Base automatically changed from agents/final-ringbuffer-tick-removal-implementation to main October 9, 2026 14:11
@achamayou
Amaury Chamayou (achamayou) force-pushed the agents/ringbuffer-code-removal-finalization branch from 8029d3f to 5583bfb Compare October 9, 2026 14:11
@eddyashton
Eddy Ashton (eddyashton) requested a balanced review from Copilot October 9, 2026 14:17
Comment thread include/ccf/entity_id.h Outdated
Comment thread include/ccf/entity_id.h Outdated
Comment thread tests/e2e_operations.py Outdated

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

Public configuration and threading documentation still describes removed ring-buffer and dispatch-thread behavior.

2 open findings
What changed in this PR

Removes obsolete host-enclave ring-buffer infrastructure after transport and maintenance migrated to typed services and scheduled tasks.

Changes:

  • Deletes ring-buffer implementation, serializers, tests, benchmarks, and tooling.
  • Simplifies enclave startup, shutdown, and lifecycle coordination.
  • Updates retained tests, build registration, and documentation.

Custom instructions used

  • .github/copilot-instructions.md
  • .github/instructions/reviewing.instructions.md
  • .github/skills/testing/SKILL.md
  • .github/skills/formatting-and-linting/SKILL.md
File Description
tsan_env_suppressions Removes obsolete ring-buffer guidance.
tests/​plot_node_load.py Deletes ring-buffer load plotting.
tests/​infra/​e2e_args.py Generalizes message-size help text.
tests/​e2e_operations.py Updates snapshot test description.
tests/​e2e_batched.py Removes ring-buffer terminology from response tests.
tests/​ci-buckets.txt Removes deleted benchmark registration.
src/​tls/​datagram_server.h Removes obsolete transport comparison.
src/​node/​rpc/​serialization.h Removes ring-buffer message include.
src/​node/​rpc/​ringbuffer_messages.h Deletes administrative ring-buffer messages.
src/​node/​rpc/​node_call_types.h Removes obsolete include.
src/​node/​node_state.h Updates asynchronous processing rationale.
src/​indexing/​test/​lfs.cpp Updates host-read comments.
src/​host/​ticker.h Deletes ring-buffer ticker.
src/​host/​test/​runtime_control.cpp Removes shutdown-drain test behavior.
src/​host/​runtime_control.h Simplifies host-loop shutdown.
src/​host/​run.cpp Removes circuits, writers, dispatch, and draining.
src/​host/​ledger_subsystem.h Updates shutdown documentation.
src/​host/​handle_ring_buffer.h Deletes host ring-buffer handler.
src/​enclave/​main.cpp Removes circuit and shared beacon setup.
src/​enclave/​entry_points.h Simplifies enclave creation interface.
src/​enclave/​enclave.h Replaces message dispatch with lifecycle coordination.
src/​ds/​test/​typed_messages.cpp Deletes typed ring-buffer tests.
src/​ds/​test/​stub_writer.h Deletes ring-buffer test writer.
src/​ds/​test/​serializer.cpp Deletes ring-buffer serializer tests.
src/​ds/​test/​serialized.cpp Supplies the remaining DS test main.
src/​ds/​test/​ring_buffer.cpp Deletes ring-buffer tests.
src/​ds/​test/​ring_buffer_bench.cpp Deletes ring-buffer benchmark.
src/​ds/​test/​oversized.cpp Deletes fragmentation tests.
src/​ds/​test/​messaging.cpp Deletes messaging tests.
src/​ds/​serializer.h Deletes ring-buffer serializers.
src/​ds/​ring_buffer.h Deletes ring-buffer implementation.
src/​ds/​ring_buffer_types.h Deletes ring-buffer types and writer APIs.
src/​ds/​oversized.h Deletes fragmentation support.
src/​ds/​notifying.h Deletes notifying writers.
src/​ds/​non_blocking.h Deletes queued ring-buffer writers.
src/​ds/​messaging.h Deletes ring-buffer dispatch infrastructure.
src/​consensus/​ledger_enclave_types.h Generalizes ledger response allowance documentation.
src/​consensus/​aft/​raft_types.h Removes obsolete include.
src/​common/​configuration.h Deletes enclave circuit configuration.
include/​ccf/​entity_id.h Removes ring-buffer serialization comment.
doc/​spelling_wordlist.txt Removes ring-buffer spellings.
doc/​overview/​glossary.rst Removes ring-buffer definition and updates RPC text.
doc/​operations/​resource_usage.rst Documents coordination and scheduled tasks.
doc/​build_apps/​logging.rst Documents direct framework logging.
doc/​architecture/​tcp_internals.rst Updates RPC and TCP architecture descriptions.
CMakeLists.txt Removes deleted tests and benchmark.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/operations/resource_usage.rst
Comment thread doc/overview/glossary.rst
Delete the circuits, message dispatch, fragmentation helpers, tests, and documentation left after all production traffic moved to typed host services and scheduled tasks. Keep the existing public memory configuration accepted unchanged for a later compatibility migration.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Snapshots no longer cross a ringbuffer message-size boundary, so this regression no longer exercises a production constraint. The adjacent snapshot creation and parsing tests retain coverage of the remaining behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The enclave main thread now only coordinates lifecycle events. Describe it consistently as the coordination thread in implementation comments, operator documentation, and the worker_threads schema.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
run_file_operations lowered memory.max_msg_size to 1MB so that
test_large_snapshot could cheaply exceed it, and capped
ledger.max_transaction_size below that to satisfy the host validation.
With the test removed, the remaining file operation tests use the
default limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@achamayou
Amaury Chamayou (achamayou) force-pushed the agents/ringbuffer-code-removal-finalization branch from ad21dcd to 7c419a4 Compare October 9, 2026 14:59
@eddyashton
Eddy Ashton (eddyashton) merged commit a54f560 into main Oct 9, 2026
12 checks passed
@eddyashton
Eddy Ashton (eddyashton) deleted the agents/ringbuffer-code-removal-finalization branch October 9, 2026 15:51
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.

3 participants