Skip to content

[DO-NOT-MERGE] Leios prototype#6386

Draft
bladyjoker wants to merge 870 commits into
release/10.5.1from
leios-prototype
Draft

[DO-NOT-MERGE] Leios prototype#6386
bladyjoker wants to merge 870 commits into
release/10.5.1from
leios-prototype

Conversation

@bladyjoker

@bladyjoker bladyjoker commented Dec 3, 2025

Copy link
Copy Markdown
Contributor

Description

This PR hosts changes to cardano-node related to Leios. I'm opening a PR for easier management and transparency to make changes visible at a glance.

More importantly, this branch will be tagged and sourced for Leios demos.

IT IS NOT INTENDED TO BE REVIEWED OR MERGED!

@bladyjoker bladyjoker self-assigned this Dec 3, 2025
@bladyjoker bladyjoker changed the base branch from master to release/10.5.1 December 3, 2025 09:36
@ch1bo ch1bo force-pushed the leios-prototype branch 2 times, most recently from b6a9eb6 to 5c62bb9 Compare December 16, 2025 10:21
@bladyjoker bladyjoker linked an issue Jan 27, 2026 that may be closed by this pull request
20 tasks
@bladyjoker bladyjoker moved this to 🏗 In progress in Consensus Team Backlog Jan 28, 2026
@ch1bo ch1bo force-pushed the leios-prototype branch 2 times, most recently from 1d83529 to 8409d7b Compare February 11, 2026 20:09
@ch1bo ch1bo force-pushed the leios-prototype branch 6 times, most recently from 1d2aa70 to 1ce288a Compare February 23, 2026 12:06
palas and others added 2 commits March 11, 2026 16:41
…-gen

Revert #6447: [cardano-testnet] Add flag to run tx-generator from cardano-testnet
@bladyjoker bladyjoker added the leios Means that this tickets is related to the implementation of ouroboros leios. label Mar 12, 2026
carbolymer and others added 3 commits March 12, 2026 15:20
chore: fix some minor issues in the comments
…o-subcommand

cardano-testnet: Add `--params-file` and `--params-mainnet` flags to `cardano` subcommand
Correct spelling errors, grammar issues, and formatting mistakes
found across 16 documentation files including READMEs, CHANGELOGs,
issue templates, and technical documentation.

Notable fixes:
- Misspellings: worklooad, infrastrucutre, Promtheus, mangager, etc.
- Grammar: "such networking" -> "such as networking",
  "it's components" -> "its components"
- Wrong words: "date" -> "data", "cost mode" -> "cost model"
- Formatting: version "0,2,3" -> "0.2.3", stray "#" in heading

Co-authored-by: Ronald Eddy Jr <ronald_eddy@yahoo.com>
ch1bo and others added 11 commits May 25, 2026 13:13
The consensus Leios chunks added four fields to the consensus tracer
records that cardano-node assembles in 'Cardano.Tracing.Tracers' (old
style) and 'Cardano.Node.Tracing.Tracers' (new style):

  - Consensus.Tracers'      gained 'leiosKernelTracer' and 'leiosPeerTracer'
  - NodeToNode.Tracers'     gained 'tLeiosNotifyTracer' and 'tLeiosFetchTracer'

This commit populates those fields in both 'mkTracers' code paths so
the record-construction sites are total. All four are wired to
'nullTracer' for now; the corresponding 'Transformable' / 'MetaTrace'
instances and EKG metrics are left as TODO. The new-style tracing
system will accordingly emit a 'TracerConsistencyWarnings' for the
four Leios namespaces declared in the config.yaml — that surfaces the
gap explicitly rather than silently dropping the configuration.

Adds the corresponding selectors to 'TraceSelection' / 'PartialTraceSelection'
and their JSON parsing:

  - traceLeiosKernel          / Consensus.LeiosKernel
  - traceLeiosPeer            / Consensus.LeiosPeer
  - traceLeiosNotifyProtocol  / LeiosNotify.Remote
  - traceLeiosFetchProtocol   / LeiosFetch.Remote

Also drops the duplicate 'LogFormatting (Simple/Stateful.TraceSendRecv)'
and 'MetaTrace (Simple/Stateful.TraceSendRecv)' instances that the
upstream leios-prototype branch carried in
'Cardano/Node/Tracing/Tracers/NodeToClient.hs' — they are now provided
by 'ouroboros-network:framework-tracing' and would collide if redefined
here.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Introduces 'Cardano.Node.Configuration.Leios.LeiosDbConfig' with two
constructors:

  - LeiosDbInMemory          (matches 'LeiosDbConnection's in-memory backend)
  - LeiosDbSQLite !FilePath  (SQLite backend, file relative to node CWD)

Wired through 'PartialNodeConfiguration' / 'NodeConfiguration' as
'ncLeiosDbConfig' with JSON parsing ('"LeiosDbConfig":{"Backend":...,
"Filepath":...}') and a default of 'LeiosDbSQLite "leios.db"'.

At node startup ('Cardano.Node.Run.handleSimpleNode'), the configured
backend is materialised into a 'LeiosDbHandle' (via 'newLeiosDBInMemory'
/ 'newLeiosDBSQLite') and passed into 'RunNodeArgs' through a new
'rnLeiosDb :: Maybe (LeiosDbHandle m)' field, which consensus's
'runWith' threads into the Leios kernel's shared connection.
'Nothing' falls back to the in-memory default.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The consensus Leios chunks extended 'NTN.Codecs' with two extra type
parameters ('bLN' / 'bLF', for LeiosNotify and LeiosFetch), and the
network-side BearerBytes/Reception work changed 'runPeerWithLimits' to
return 'Maybe (Reception bytes)' (instead of 'Maybe bytes') and made
'byteLimitsKeepAlive' parameter-less.

Update 'tx-generator' to compile against the rebased stack:

  - Pull in 'ouroboros-network:framework-tracing' as a sublib dependency.
  - Extend the local 'myCodecs' type to 9 'ByteString' parameters (was 7).
  - Update 'kaClient' return type to 'IO ((), Maybe (Mux.Reception ByteString))'.
  - Drop the size-function argument from 'byteLimitsKeepAlive'.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Both had been on the leios-prototype and and need to be re-exposed after
resetting to a recent cardano-node version.

Only the rest-in-mempool execution units metric was not easily
applicable. That part of the code will change anyways though.
Changed api srp to IntersectMBO
Comment on lines +14 to +46
name: Check for scriv fragment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check for changes in cardano-testnet
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
cardano:
- 'cardano-testnet/**'

- name: Check for changelog changes
if: steps.filter.outputs.cardano == 'true'
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: "cardano-testnet/changelog.d/*.md"
skip-label: "no-changelog-needed"
failure-message: "You modified `cardano-testnet` but are missing a changelog fragment! Please run `scriv create` or apply the `no-changelog-needed` label."

- name: Install Nix
if: steps.filter.outputs.cardano == 'true'
uses: cachix/install-nix-action@v31
with:
extra_nix_config: |
accept-flake-config = true

- name: Check scriv fragments are correct
if: steps.filter.outputs.cardano == 'true'
uses: rrbutani/use-nix-shell-action@v1
with:
script: cd cardano-testnet && scriv collect --version "CI-CHECK" --keep
johnalotoski and others added 3 commits June 5, 2026 12:41
This allows us to easily identify that this is a leios prototype
version. The <major>.<minor>.<patch> is the version on which release the
prototype is based on, while the .164 suffix is directly supported by
the Haskell version parsing and references CIP-164
@ch1bo ch1bo force-pushed the leios-prototype branch from 6ebb856 to a705da8 Compare June 9, 2026 08:22
johnalotoski and others added 13 commits June 9, 2026 20:58
  Adapts cardano-node to the updated ouroboros-consensus
  newLeiosDBSQLite signature (Tracer IO TraceLeiosDb -> FilePath -> ...)
  from IntersectMBO/ouroboros-consensus#2062 by contramapping the
  TraceLeiosDb constructor into the existing Consensus.LeiosKernel
  tracer. SQLite UNIQUE/PRIMARY KEY collision events are given Warning
  severity so they remain visible under the default Notice configuration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was unnecessarily dropped from leios-prototype and broke the
.#cardano-node-macos nix derivation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE leios Means that this tickets is related to the implementation of ouroboros leios.

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.