Operations dispatched by showcase/formance-ledger/harness/cmd/formance-host
Configures ClusterPolicy limits including MetadataMaxCommandBytes.
Creates a ledger with initial AccountTypes patterns and chart enforcement mode.
Applies a single transaction or multi-order atomic batch via RequestProcessor.ProcessOrders.
Reverts an existing transaction (optionally at effective date).
Deletes transaction or account metadata via RequestProcessor.
formancehq/ledger @ c3dc255e2eacda0ce4c44799ea8cd57ba5198805
Pre-sums OrderMetadataSize across orders and handles matchOrderSkip rollbacks.
Validates chart rules and checks metadataBudget against MaxCommandBytes.
Validates AccountType pattern syntax without ValidateSegmentTypes or PatternsConflict.
Translates v2 transaction/revert timestamps into v3 mirror orders.
Proposal-isolated MemScope volumes/logs and ledger:post outputs
Proposal-isolated account volumes, ledger configs, and committed transactions.
Committed policy revisions, created ledgers, transactions, and skip logs.
Five ledger accounting and timestamp invariants checked after every batch
sum(Input) == sum(Output) across all accounts for every (ledger, asset, color).
Input >= Output for every non-world, non-forced account on normal ledgers.
Cumulative Input and Output volumes never decrease compared to preBatch.
ACCOUNT_TYPE_TRANSIENT accounts must clear to zero balance at batch commit.
Persisted effective timestamps never wrap uint64 past math.MaxInt64.
Skipped-order budget leak, CreateLedger chart bypass, and v2 pre-1970 underflow
matchOrderSkip drops orderOverlayScope (0 persisted bytes) without subtracting OrderMetadataSize(order) from ctx.metadataBudget.bytes.
processCreateLedger omits ValidateSegmentTypes and PatternsConflict, letting equal-specificity NORMAL patterns shadow ACCOUNT_TYPE_TRANSIENT and bypass strict chart enforcement.
translateNewTransaction and translateRevertedTransaction swallow time.Parse errors and cast negative UnixMicro() to uint64 (+586,524 AD).