Changelog
§0.6.1
account_lines,account_mptokensandaccount_mptoken_issuancesanswer a malformedaccountwith the messageAccount malformed., as Clio does for these three methods, instead ofaccountMalformed, which Clio keeps foraccount_infoandaccount_objects. The error code (actMalformed, 35) was already the same. The full Clio check after the 0.6.0 deployment found it; a test pins the message, and the check now sends a malformed account to all three.- The Clio check counts the
typefield of Clio’sbadFeatureanswer, for an amendment newer than Clio’s libxrpl, as the known difference it is.
§0.6.0
- An
Asset(or any Issue field) holding an MPT now gives the rightmpt_issuance_id. xrpld stores the issuance sequence of such an Issue little-endian, and Astraea put those bytes into the MPTID as they were, so a Vault with an MPT asset showedD6100200...where xrpld and Clio show000210D6.... This touchedledger_entry,account_objects,ledger_data, transactions and metadata with an MPTAsset,book_changes, and thempt_issuance_idfilter ofaccount_txfor such fields. Found by comparing object histories with xrpld’s metadata on devnet; a test pins it on that Vault’s bytes. - Batch transactions (XLS-56), enabled on mainnet with BatchV1_1 and fixBatchV1_2, were already stored, indexed and answered like Clio:
tx,account_tx,ledgerandproof_tx, for the Batch and for each inner transaction. A test now pins this down on two real mainnet Batches and three of their inner transactions, against the answers of public Clio. Before the test, 268 answers on 29 random ledgers since mid-October, hot and cold, matched public Clio, andwitness-verify evidenceaccepted aproof_txpackage for an inner transaction. - Vaults, loan brokers and loans (XLS-65, XLS-66), with the fields of closed vaults from LendingProtocolV1_1, are answered like Clio 2.8 in
account_objects(eachtypeanddeletion_blockers_only) andledger_entry(byvault,loan_brokerandloanselectors, by index, in binary, and the errors). A test checks 26 answers against public Clio on a real devnet loan broker, its vault and a loan, and decodes the LoanSet, LoanBrokerSet, VaultCreate and VaultDeposit that made them, including the LoanSet’sCounterpartySignature. On mainnet,DelegateandCredentialobjects matched public Clio inledger_entryandaccount_objects. As in Clio, aLoanblocks deleting the borrower’s account and aVaultdoesn’t; xrpld’s own list has it the other way round. account_mptoken_issuancesandaccount_mptokenslist an account’s MPT issuances and balances, as in Clio 2.7, with each flag spelled out and UInt64 amounts as base-10 strings. A test checks them against public Clio on an issuer and a holder from devnet and from mainnet.mpt_issuance_idis the 24-byte MPTID, as Clio 2.9 gives it; Clio 2.8 gave the issuance object’s key, and the test checks that this key is the one of our MPTID.account_txtakestx_typeandmpt_issuance_idfilters, as in Clio 2.8: a transaction stays if it touched an MPToken or MPTokenIssuance of that issuance, or names it in its own fields. A test on the mainnet history of an MPT holder and an issuer keeps the same transactions as public Clio.scripts/astraea-clio-check.pychecks a running Astraea against a local or public Clio with one command: requests built from random ledgers for every Clio method Astraea serves, in both API versions, JSON and binary, with filters, second pages and malformed requests, compared in full, with a report and an exit code. Running describes it.- The check has a
lendinggroup with the requests of a lending dashboard in its own shapes (type-filteredledger_datapages for vaults, loan brokers and loans, each object by ID, the ledgers that changed them,feature). On mainnet, the pages and lookups matched public Clio. API describes what such a service asks, why a type-filteredledger_datawalk is a sample and not a list on mainnet, and how to follow ledgers instead. txwith atransactionthat is not a hash now answersinvalidParams(transactionMalformed, ortransactionNotString) instead ofnotImpl, andledger_entrywith a malformedaccount_rootanswersmalformedAddress(oraccount_rootNotString) instead ofmalformedRequest, as Clio does. The check above found both.featureanswers as in Clio, which serves it itself: the amendments of xrpld 3.4.1 and nine dropped ones, withenabledread from the Amendments object of the ledger asked. Before, it was an unknown method. A test checks it against public Clio on the mainnet Amendments object.- The loader no longer stops on a ledger with parts this build does not know (a field type from a newer xrpld broke the account index and the change encoding): it stores the ledger as it came, logs each part, and reports them as
astraea_ingest_unknown_findings_total. Amendments enabled or with a validator majority that are not in the table are reported every minute (astraea_ingest_unknown_amendments_enabled,_majority).scripts/astraea-definitions-check.pycompares the tables with a node’sserver_definitionsand a release’sfeatures.macro. Running has the order of an update. A test runs the loader’s write path on a made-up ledger with such parts. ledger_entrychecks its params as Clio 2.8 does, field by field with Clio’s validators, so a malformed selector gets Clio’s error and message (Required field 'seq' missing,malformedOwner,malformedAccounts,dir_rootMalformed…) instead of a generalmalformedRequest. A test checks 205 malformed requests, every selector, against public Clio.
§0.5.5
vault_infois answered from Astraea’s own data on any validated ledger with state, as in Clio: the Vault byvault_idor byownerandseq, with its share issuance undershares, and Clio’s errors. It used to go to the node only for the current or closed ledger, and returnedunknownCmdotherwise. A test compares the answers and errors with those public Clio gave for two devnet vaults. Unlike Clio,ledger_hashis honoured.- An MPTokenIssuance object carries
mpt_issuance_id, as xrpld and Clio add it: inledger_entry,account_objects,ledger_dataandvault_info. AGENTS.mdtells coding agents how to build, check and change the project, and defers toCONTRIBUTING.mdandSECURITY.md. No code or answer changes.- A cold block part that was evicted from the cache and read again no longer repeats work the first read already did. The cache remembers which parts matched their seal and the transaction hashes of checked blocks, up to 8 MiB, so rebuilding a part doesn’t hash its stored bytes against the seal again or recompute the transaction hashes. This relies on a segment file not changing in place while the server has it open; segments are always rewritten through a new file. On one mainnet ledger, rebuilding its evicted parts went from a median of 454 to 322 ms (seven runs each, alternating, on a development machine; not yet measured on a production server). A part that doesn’t match its seal is still refused on every read.
astraea-state history-state-replayrebuilds the state from the cold history’s patches and compares the state root with each ledger header’sAccountHash, from a base snapshot up. It writes only checkpoints and can resume from them. On mainnet, every ledger from 32571 to 107874182 matched.astraea-state history-state-indexbuilds a version index over the cold history: for every object, the ledgers that changed it. With such an index,account_info,ledger_entry,account_linesandaccount_objectscan answer on ledgers before the hot state’s snapshot, where they now returnlgrNotFound; a test compares those answers with a server that holds the state directly. A damaged index is refused, never answered from: every block, the block directories, the base state and the ledger range are checked against sha256 sums, and the build ends with a full check of every file.astraea-ingest --old-state <dir>attaches such an index.account_info,ledger_entry,account_lines,account_objectsandvault_infothen answer on ledgers in the index’s range, andserver_infoshows the range asastraea.old_state_ledgers. A damaged index stops the server at start rather than being answered from. Public listeners (--public-api-addr) don’t read it and keep answeringlgrNotFoundthere: a read before the snapshot decompresses cold blocks, which is too heavy to offer anonymous clients for now.--work-mscharges a client for what its requests actually cost: every so many milliseconds of handling count as one more request against--max-requests. A request that reads much cold history now costs more than one answered from the cache, whatever its method; method weights alone guessed the cost before the request ran. Off unless given.astraea_api_rejected_total{door,reason}counts requests refused to protect the server: over a client’s connections or budget, at the cap of public sessions, or without a free slot in time.docs/running.mddescribes running the public door behind a Cloudflare Tunnel.- A documentation site laid out like Clio’s is built from
docs/and the code on every push tomain: xrpl-lending-network.github.io/astraea. - The README lists the public mainnet endpoint the maintainers run,
https://astraea.xrpl-lending.network/andwss://astraea.xrpl-lending.network/, with its limits. rustixis updated to 1.1.6 for RUSTSEC-2026-0486. Astraea doesn’t call the affected xattr functions;rustixcomes in throughtempfile.astraea-state history-cold-contentionmeasures cold reads of one client while other threads read random ledgers, for tuning cache limits.
§0.5.0
The first stable release. A public endpoint run by the maintainers will follow; until then the server is meant to be run by those who use it.
--public-api-addradds public listeners with request slots of their own, so that public load can’t fill the slots of--api-addr. They step aside withtooBusywhen--api-addrruns low, require limits per client, and cap WebSocket sessions, subscribed accounts and request size. With a public listener the limits apply to it alone. Seedocs/running.md.submitandsimulatecan be forwarded on--api-addrwith--forward-submissions; they stay off by default and are never available on a public listener. Requests that would have the node sign are refused,submitis never cached, and it is sent to a second node only if the first can’t have received it.GET /healthanswers 200 while the last ledger is at most 60 seconds old and 503 otherwise.- A forwarded request has 8 seconds over all nodes, down from 5 seconds per node, and a node that just failed is tried last. Forwarded requests have their own 16 slots, so that nodes that stopped answering can’t hold the slots that reads need. A request waits at most 5 seconds for a slot and then gets
tooBusy; it used to wait without limit. - Forwarded requests count 3 against a client’s request budget, up from 1.
account_txandnft_historyrefuse a marker past the server’s last ledger withinvalidParams(markerOutOfRange). Going forward, such a marker gave a successful empty page with no marker, which reads as “no more transactions” although the server just hadn’t reached that ledger. A client that failed over from a server further ahead could take it for a finished read. Going backward the marker was ignored and the page started again from the top.server_infono longer waits for the nodes it forwards to. When they stopped answering, a request could wait out the 5-second timeout of each node, 10 seconds with two nodes, although Astraea can answer from its own data. In an outage of both nodes a client with a 10-second timeout reportedserver_infoas timed out instead of seeing how old the ledger was. The node’s fields now come only from its last answer, refreshed in the background.- Reading an
account_txpage again no longer costs as much as the first time. One page that touches many blocks of a segment can hold about 400 MB of decoded blocks, and a segment was allowed 256 MiB, so the page evicted its own blocks while it was being read. A segment may now hold 1 GiB and the whole cache 4 GiB, up from 1 GiB, so a server can use up to 3 GiB more memory. On seven mainnet segments, for pages of 200 transactions spread across a segment, the mean read of a repeated page went from about 40 to 1.1 ms and of a first page from about 54 to 45 ms; for pages of neighbouring transactions, from about 10 to 1.0 ms and from about 30 to 26 ms. This is the storage read alone, in one process on a development machine, and does not include the index lookup or JSON. It has not yet been measured on a production server. - Decoding a part of a block no longer allocates for every stored value, and turns compact signatures into DER directly instead of through curve scalars. The output is byte for byte the same on those seven segments, and a test compares the signature code with
k256.
§0.4.0
- Research code that was never part of the server is gone: experiments and measuring tools in the codec package, and finished benchmarks in the engine. That is 46,716 lines of Rust down to 37,092 and 25 binaries down to 7. No format or answer changes. Builds from before and after the cleanup read seven mainnet segments (2.42 million transactions) with identical digests, and rewrote each one byte for byte the same as the file on disk.
- The codec follows the workspace lints. Its 21
unwrapcalls are gone, and a damaged block whose template points outside the pool now returns an error instead of panicking. write_atomic,now_msand the varint code each live in one place. The archiver’s manifest write used a copy that did not sync the directory, so a crash could lose a manifest it had just replaced; it now syncs.- Updated axum to 0.8, tonic to 0.14, prost to 0.14 and tokio-tungstenite to 0.29. Together with the cleanup,
Cargo.lockwent from 282 packages to 277 and from 26 duplicated packages to 20. Unit tests pass; this was not yet run against a live node. - docs/compared-with-clio.md compares Astraea with Clio on one host, including where Clio is ahead.
- Cold segments store a state patch only where the metadata doesn’t give it. The object after the last transaction that touched it follows from that transaction’s node, so most patches can be rebuilt on reading: a new page of a directory usually holds just the object its transaction created, and xrpld’s unlisted default fields are filled in. On seven mainnet segments from different years (3.27 million transactions) the segments went from 238.0 to 216.2 bytes per transaction, keeping 4 to 28% of the patches as entries. Every ledger came back byte for byte. With the whole mainnet history rewritten this way and the ASIX2 indexes gone, its 5.18 billion transactions take 199 bytes each in segments and 208 with indexes, down from 251 when the full load finished.
astraea-state history-cold-recode DIRrewrites older segments while the server runs. They are formatastraea-cold/2, which earlier versions refuse, so upgrade the server first. A block now holds more transactions: reading one uncached transaction took about 7% longer (0.13 ms), and rebuilding a ledger’s patches about 1 ms.
§0.3.0
- Cold segments are written without the ASIX2 indexes. Nothing read them: lookups go through the partition indexes. On mainnet they were 18.7 bytes per transaction, about 97 GB.
astraea-state history-cold-drop-index DIRremoves them from older segments; run it only once the server is 0.3 or later, since earlier versions expect the file. - The
validationsandmanifestsstreams, as in Clio: the nodes’ messages passed on as received, each once even when several nodes send it. They come from the validation stream the Proof Engine already listens to. - A stop is taken while waiting on the node or between retries. Before, a server retrying a ledger the node no longer had ignored the stop until systemd killed it.
- Limits per client, like Clio’s
dos_guard: weighted requests and response bytes per interval, and connections open at once (--max-requests,--max-response-bytes,--max-connections,--sweep-secs). A client over its limit getsslowDown, over HTTP with status 503. A whitelist is never limited, and behind a trusted proxy (--trusted-proxies) the client is taken fromCF-Connecting-IP,ForwardedorX-Forwarded-For. Off unless configured. - HTTP answers say whether they can be cached:
Cache-Control: public, max-age=86400, immutablefor a transaction or anything about a ledger named by sequence or hash,no-storefor the rest, so a cache in front of a public server can keep what never changes. nft_info,nft_historyandnfts_by_issuer, from a new NFT index in the state store: each token’s owner and URI at every ledger they changed, the tokens of each issuer by taxon, and each token’s transactions. NFT transactions are read by the rules of Clio’sNFTHelpers; one that can’t be read is logged and skipped instead of stopping the load. A store that adds the index fills the earlier ledgers in the background, from the history, keeping its progress across restarts. On mainnet that is everything from ledger 75,443,457, where NonFungibleTokensV1_1 was enabled: 32.6 million ledgers took 16 minutes, and not one NFT transaction failed to read. A store whose history doesn’t reach that far starts from the tokens in its state snapshot, as Clio starts from its first ledger. Differences from Clio are listed in docs/api.md.account_nfts,nft_buy_offersandnft_sell_offerson validated ledgers, from the state, as in Clio. Before, they worked only for the open ledger, through the node. On one mainnet ledger they returned the same tokens and offers as xrpld 3.4.1 for 39 accounts and 372 tokens from recent NFT transactions, and for the largest holders among 965 accounts, up to 18,607 tokens; offer pages matched xrpld’s page for page.- Licensed under ISC, like xrpld.
SECURITY.mdsays how to report a vulnerability,CONTRIBUTING.mdhow to contribute. cargo deny checkin CI: permissive licenses only, crates.io only, no known RustSec advisories. It found four: three in zstd (RUSTSEC-2026-0391, -0398, -0403), fixed by moving to zstd 0.14.3, and one in crypto-bigint (RUSTSEC-2026-0387), fixed by moving to k256 0.14. The new k256 returns the normalized signature instead of an option; a high-S signature is still refused where canonical signatures are required.ledger_entryandproof_entrytake every selector of Clio 2.8. New:amm,bridge,credential,delegate,did,loan,loan_broker,mpt_issuance,mptoken,oracle,permissioned_domain,vault, the two cross-chain claim IDs,deposit_preauthbyauthorized_credentials, and a hex key underamendments,fee,hashes,nft_offer,nunlorsigner_list. Keys are derived as in xrpld and match the keys xrpld 3.4.1 returns for the same params. Errors use Clio’s codes (malformedOwner,malformedAddress,malformedDocumentID,malformedAuthorizedCredentials).ledger_entrytakesinclude_deleted, as in Clio.- Each request has 10 seconds. Handlers run on blocking threads that cannot be stopped from outside, so the loops whose length the client controls check a per-thread deadline, and a request past it ends with
tooBusyand frees its slot. book_changesand thebook_changesstream. Rates and volumes follow xrpld’s amount arithmetic (16-digit division, sums throughNumber, rounding to nearest with ties to even) and matched xrpld 3.4.1 on all 5889 order books in 4464 random mainnet ledgers, 1101 of them with several crossings.
§0.2.0
- The tree history rebuild replays each of the 4096 subtrees on its own, in memory, from its key range of object versions, on 8 threads; a second pass puts the top of the tree together for every ledger and checks it against
AccountHash. On mainnet 56 thousand ledgers took 99 seconds instead of about two and a half hours, with records byte for byte the same. After a stop, subtrees already replayed are not read again. - Metrics on how far the data can be trusted and what is served (docs/metrics.md): signers and quorum of the last confirmed ledger, each publisher’s latest UNL list and its expiry, evidence bundles by how the target was confirmed, the served range with the first ledgers with state and with tree history, cold history size and transactions, bytes on disk by part. The API adds response bytes, answers from the node, requests in progress, subscribers per stream and dropped sessions; the process adds the standard
process_*metrics. proof_entryat earlier ledgers (ledger_indexorledger_hash). Each ledger now records the state subtrees at depth 3 it changed (a full set of 4096 every 256 ledgers) in alevelskeyspace; a path at an earlier ledger is rebuilt from those and the object versions, and must reproduce both the recorded subtree and the header’sAccountHash. A store that started keeping the history later rebuilds it in the background, down to the state snapshot: every ledger’s root is checked against the header, andproof_entryreaches the snapshot once the rebuild is complete.- Proofs for all of history.
proof_ledgerandproof_txno longer need an anchor within 512 ledgers: an older target is reached through the long skip list in the latest state, which holds the hash of every 256th ledger since the start of history. The package (xrpl-witness/evidence/4) proves that list in the state of the latest tree ledger, anchors that ledger by quorum as before, and adds the headers from the target up to the next multiple of 256.proof_txfinds transactions in cold history too.witness-verify evidencechecks the newskipsfield. account_txover cold history reads only headers and transactions, not state changes, and prepares the blocks a page needs in parallel. In the Clio comparison benchmark p99 for a 200-transaction page went from 4.2 s to 660 ms.- Cold segments carry a seal (
cold-F.seal): each block gets its full check once, when the segment is written, instead of on every load.astraea-state history-cold-sealseals older segments. With it, account_tx p99 is 383 ms and 16 clients get 234 requests per second, up from 39. server_infono longer waits for the node: the node’sload_factorand version are refreshed in the background.- One byte budget for the whole cold block cache instead of a fixed share per segment, and
TransactionIndexread straight from the metadata header. On mixed history and state requestsaccount_txp99 went from 16.7 ms to 5.3 ms (Clio: 7.2 to 8.8 ms). - Cold segments are written as ASTJ6: ASTJ5 blocks cut into parts of up to 1 MiB that decode on their own, each with its own dictionary and zstd frame.
account_txdecodes one part per transaction instead of the whole block: a single cold transaction takes 2.0 ms instead of 7.0 on recent history. Archives grow by 8% on recent history and 17% around ledger 98 million. Seals cover a block’s head and each part, so a read hashes only what it decodes.astraea-state history-cold-recoderewrites ASTJ5 segments in place while the server runs; with parts off, blocks are written byte for byte as before. On the Clio comparison range recoded to ASTJ6, account_tx p99 for a 200-transaction page went from 465 ms to 128 ms (Clio: 106 ms), and 16 clients get 433 requests per second instead of 298 (Clio: 453). - The XRPLA client retries dropped connections and 5xx answers with a growing pause.
- The full-history loader locks each chunk, gives each process its own temporary archive, and refuses a chunk with fewer ledgers than asked.
- WebSocket sessions answer a client’s close frame before disconnecting. Without the reply xrpl.js saw an abnormal close and reconnected clients it had just disconnected, which then pinged forever: a few hundred idle sessions within a quarter of an hour.
--api-addrtakes several addresses. One that is busy is retried every 10 seconds, so Astraea takes over a port as soon as the server holding it stops.- API metrics on the metrics port:
astraea_api_requests_totalby transport, method and status (successor the error name),astraea_api_request_duration_secondsby method, and open WebSocket sessions.
§0.1.0
First version in this repository.
- Clio-compatible API:
server_info,ping,ledger,tx(hash and CTID),account_tx,account_info,account_lines,account_objects,account_offers,ledger_entry,ledger_data,mpt_holders. - WebSocket subscriptions to the
ledgerandtransactionsstreams and to accounts. - Forwarding of node-only methods (
fee,server_state,ledger_current,server_definitions) and of public read methods asked about the open ledger. Nothing else reaches the node. - Proof API:
proof_ledger,proof_tx,proof_entry, with offline checking inwitness-verify evidence. - Hot store with state at every ledger since the snapshot; cold store in ASTJ5 with on-disk indexes; new cold history becomes visible without a restart.
- Loader for the XRPLA archive with signature, digest, tree-root and chain checks, and scripts for loading and publishing full history.
- UNL list collector, validation archiver with sealed segments, and an independent archive verifier.