Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ default-members = [
resolver = "2"

[workspace.package]
version = "0.19.0-rc.2"
version = "0.19.0"
edition = "2024"
rust-version = "1.98.1"
authors = ["OpenZeppelin"]
Expand Down
2 changes: 1 addition & 1 deletion crates/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description = "Client library for Guardian"
include = ["src/**/*", "proto/**/*", "build.rs", "Cargo.toml", "LICENSE", "README.md"]

[dependencies]
guardian-shared = { version = "=0.19.0-rc.2", path = "../shared" }
guardian-shared = { version = "=0.19.0", path = "../shared" }
miden-protocol = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion crates/contracts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ miden-standards = { workspace = true }
miden-protocol = { workspace = true }

anyhow = { workspace = true }
guardian-shared = { version = "=0.19.0-rc.2", path = "../shared" }
guardian-shared = { version = "=0.19.0", path = "../shared" }

[features]
testing = ["miden-protocol/testing"]
Expand Down
10 changes: 5 additions & 5 deletions crates/miden-multisig-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ description = "High-level SDK for interacting with multisig accounts on Miden vi

[dependencies]
# Internal crates
guardian-client = { version = "=0.19.0-rc.2", path = "../client" }
guardian-shared = { version = "=0.19.0-rc.2", path = "../shared" }
miden-confidential-contracts = { version = "=0.19.0-rc.2", path = "../contracts" }
guardian-client = { version = "=0.19.0", path = "../client" }
guardian-shared = { version = "=0.19.0", path = "../shared" }
miden-confidential-contracts = { version = "=0.19.0", path = "../contracts" }

# Miden
miden-client = { workspace = true, features = ["tonic"] }
Expand Down Expand Up @@ -52,9 +52,9 @@ default = ["legacy-consume-notes"]
legacy-consume-notes = []

[dev-dependencies]
guardian-client = { version = "=0.19.0-rc.2", path = "../client", features = ["testing"] }
guardian-client = { version = "=0.19.0", path = "../client", features = ["testing"] }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["test-util"] }
miden-confidential-contracts = { version = "=0.19.0-rc.2", path = "../contracts", features = ["testing"] }
miden-confidential-contracts = { version = "=0.19.0", path = "../contracts", features = ["testing"] }
miden-client = { workspace = true, features = ["tonic", "testing"] }
miden-rpc-client = { path = "../miden-rpc-client", features = ["scripted-node"] }
2 changes: 1 addition & 1 deletion crates/miden-multisig-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ let tx = TransactionType::add_cosigner_with_scheme(other_wallet, SignatureScheme

`push_account` registers the schemes the account stores (`MultisigAccount::cosigners`,
`MultisigAccount::guardian_scheme`), which for a mixed account needs a GUARDIAN
0.19.0-rc.1 or later. Signer updates keep each approver's stored scheme, `add_cosigner`
0.19.0 or later. Signer updates keep each approver's stored scheme, `add_cosigner`
gives the new signer your scheme, and a GUARDIAN switch keeps the GUARDIAN's
scheme. A proposal that would write a kept approver under another scheme,
including one from an older SDK that wrote its own scheme for every approver,
Expand Down
2 changes: 1 addition & 1 deletion docs/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ the runtime env vars in this document.
| `GUARDIAN_CANONICALIZATION_FAST_PROMOTION_ENABLED` | `true` | any | Enables the additional promotion-only pass for recent candidates. Set to `false` to use only the full canonicalization interval; AWS deployments can set Terraform variable `guardian_canonicalization_fast_promotion_enabled = false`. |
| `GUARDIAN_CANONICALIZATION_MAX_CONCURRENT_ACCOUNTS` | `10`; `50` when `GUARDIAN_ENV=prod` | any | Accounts one canonicalization pass processes in parallel; `1` = fully sequential. Each account holds a DB connection only during its short fenced transactions (the dominant cost is a connectionless chain RPC), so this may exceed `GUARDIAN_DB_POOL_MAX_SIZE`; simultaneous write bursts just queue briefly at the pool. |
| `GUARDIAN_CANONICALIZATION_REBUILD_ADMISSION` | `auto` | any | How many background state reconstructions the canonicalization worker may run at once, out of the process-wide reconstruction slots (half the host's cores) that `push_delta` shares. `auto` takes every slot but one, so background rebuilds never hold every slot and a push only waits behind other pushes (on 8 vCPU and up, concurrent pushes share one slot instead of the several they could take before; measured with one push at a time only): 1 on 2 and 4 vCPU hosts, 3 on 8 vCPU. A number from 1 to 64 sets it, capped at the slots; taking every slot makes pushes wait up to one rebuild. An invalid value stops startup. See `benchmarks/prod-server/results/2026-10-30-rebuild-admission-local.md`. |
| `GUARDIAN_MAX_PENDING_CANDIDATES_PER_ACCOUNT` | `1` | any | Candidate deltas one account may hold in flight at once (issue #17). The default, `1`, is the historical one-in-flight-candidate behavior: while a candidate is pending, every further delta and proposal for the account gets `409 conflict_pending_delta`. A value from `2` to `16` opts in to queueing chained candidates, so the client that pushed the newest candidate can push its next transaction before the previous one canonicalizes: each new delta must build on the newest queued candidate's post-state (or the canonical state when nothing is queued) and carry a higher nonce. A delta or proposal arriving while the queue is full, a delta competing for a base another queued candidate already claimed, a delta or proposal whose nonce does not exceed the newest queued candidate's, and any delta or proposal behind a queued candidate that changes the account's signer set or guardian key get `409 conflict_pending_delta`; a delta building on a state the server does not know gets `400 commitment_mismatch` against the canonical commitment. At every depth, a delta whose nonce is not the one it leaves the account at, and a proposal whose nonce is not the account's next nonce (the newest queued candidate's plus one, or the canonical nonce plus one with nothing queued), get `400 invalid_delta` (issue #518). `/state` serves the canonical state; `GET /state/tail` (gRPC `GetStateTail`, issue #517) serves the queue tail and the queued candidates, so another device or cosigner can build on it (its `accepts_submissions` is false while the queue would refuse anything built on it), and a proposal that names its base (`base_commitment`, sent by both multisig SDKs) is refused with `409` when that base is one a queued candidate already claimed. The multisig SDKs do not import the tail yet, so a cosigner using them is refused until the queue drains, as at depth `1`. Each chained admission, and each `GET /state/tail`, replays the queued payloads onto the canonical state (one delta application per queued candidate), so the depth also bounds per-request reconstruction cost; a value above `16` stops startup. The Miden node accepts a transaction built on another still in its mempool, and evicts the dependents of one it drops. Before raising it, upgrade TypeScript clients to `@openzeppelin/miden-multisig-client` 0.18.1 or later and Rust clients to `miden-multisig-client` 0.19.0-rc.1 or later. TypeScript 0.18.0 and earlier execute a proposal whatever state GUARDIAN pinned it to, so a queue can admit an execution behind a candidate while its transaction lands on an older state, leaving GUARDIAN behind the chain for that account, and they label proposals with a timestamp by default, which the server refuses at every depth since 0.19.0 (issue #518). Rust 0.18.3 and earlier execute a proposal on the client's own state whatever state GUARDIAN pinned it to, so its transaction can land on a state its signers did not approve it for. Newer releases of both SDKs refuse to execute a proposal pinned to a state the client does not hold, and both label proposals with the account's next nonce. A Guardian execution does not join the queue, at any depth: requesting one while any candidate is queued gets `409 conflict_pending_delta`, and while an execution holds the account every delta push gets `GUARDIAN_EXECUTION_CONFLICT` (proposals can still be created). AWS deployments set it through Terraform variable `guardian_max_pending_candidates_per_account`. |
| `GUARDIAN_MAX_PENDING_CANDIDATES_PER_ACCOUNT` | `1` | any | Candidate deltas one account may hold in flight at once (issue #17). The default, `1`, is the historical one-in-flight-candidate behavior: while a candidate is pending, every further delta and proposal for the account gets `409 conflict_pending_delta`. A value from `2` to `16` opts in to queueing chained candidates, so the client that pushed the newest candidate can push its next transaction before the previous one canonicalizes: each new delta must build on the newest queued candidate's post-state (or the canonical state when nothing is queued) and carry a higher nonce. A delta or proposal arriving while the queue is full, a delta competing for a base another queued candidate already claimed, a delta or proposal whose nonce does not exceed the newest queued candidate's, and any delta or proposal behind a queued candidate that changes the account's signer set or guardian key get `409 conflict_pending_delta`; a delta building on a state the server does not know gets `400 commitment_mismatch` against the canonical commitment. At every depth, a delta whose nonce is not the one it leaves the account at, and a proposal whose nonce is not the account's next nonce (the newest queued candidate's plus one, or the canonical nonce plus one with nothing queued), get `400 invalid_delta` (issue #518). `/state` serves the canonical state; `GET /state/tail` (gRPC `GetStateTail`, issue #517) serves the queue tail and the queued candidates, so another device or cosigner can build on it (its `accepts_submissions` is false while the queue would refuse anything built on it), and a proposal that names its base (`base_commitment`, sent by both multisig SDKs) is refused with `409` when that base is one a queued candidate already claimed. The multisig SDKs do not import the tail yet, so a cosigner using them is refused until the queue drains, as at depth `1`. Each chained admission, and each `GET /state/tail`, replays the queued payloads onto the canonical state (one delta application per queued candidate), so the depth also bounds per-request reconstruction cost; a value above `16` stops startup. The Miden node accepts a transaction built on another still in its mempool, and evicts the dependents of one it drops. Before raising it, upgrade TypeScript clients to `@openzeppelin/miden-multisig-client` 0.18.1 or later and Rust clients to `miden-multisig-client` 0.19.0 or later. TypeScript 0.18.0 and earlier execute a proposal whatever state GUARDIAN pinned it to, so a queue can admit an execution behind a candidate while its transaction lands on an older state, leaving GUARDIAN behind the chain for that account, and they label proposals with a timestamp by default, which the server refuses at every depth since 0.19.0 (issue #518). Rust 0.18.3 and earlier execute a proposal on the client's own state whatever state GUARDIAN pinned it to, so its transaction can land on a state its signers did not approve it for. Newer releases of both SDKs refuse to execute a proposal pinned to a state the client does not hold, and both label proposals with the account's next nonce. A Guardian execution does not join the queue, at any depth: requesting one while any candidate is queued gets `409 conflict_pending_delta`, and while an execution holds the account every delta push gets `GUARDIAN_EXECUTION_CONFLICT` (proposals can still be created). AWS deployments set it through Terraform variable `guardian_max_pending_candidates_per_account`. |
| `GUARDIAN_CANONICALIZATION_RETAINED_TTL_SECONDS` | `86400` | any | How long a give-up candidate is kept as `retained` for background reconciliation; `0` disables retention (historical delete-on-give-up). The same TTL bounds the `superseded_deltas` archive: a retained or client-abandoned row replaced by a resubmission at its nonce stays recoverable for the TTL counted from the supersede, so a row can be kept up to about twice the TTL after it was parked. `0` also disables the archive: a superseded row is deleted. The archive also takes a parked row that a Guardian execution replaces at its nonce, so reconciliation restores it if its transaction lands instead. |
| `GUARDIAN_CANONICALIZATION_RECONCILE_INTERVAL_SECONDS` | `60` | any | Cadence of the reconcile pass over retained deltas. |
| `GUARDIAN_RELEASE_SWEEP_ENABLED` | `true` | any | Runs the chain-driven release sweep (issue #434), a background task that walks every unreleased Miden account against the chain and releases those whose guardian switch never reached this server (offline switches, failed pushes, a network-dead old operator). A switch is recognised either through a pending proposal (any label) or an unpromoted switch delta whose post-state the chain reached, at the head or in the account's transaction history (works for private accounts, even after they transacted again), or, for public accounts, through the guardian key in the account's published on-chain storage. It also writes a push-path release whose own write failed. A key counts as a switch only when it is neither this server's nor the one the account was stored with, so a server restarted under a different ack key releases nothing. Set to `false` to turn the walk off. Block watch follows this switch unless `GUARDIAN_BLOCK_WATCH_ENABLED` is set, so `false` alone still leaves release detection to the push path, as before block watch existed; with `GUARDIAN_BLOCK_WATCH_ENABLED=true` block watch keeps detecting switches from the block feed with the walk off. Once block watch is healthy the walk is only a safety net; raise `GUARDIAN_RELEASE_SWEEP_ROTATION_SECONDS` (for example to `604800`, weekly) rather than turning it off. All `GUARDIAN_RELEASE_SWEEP_*` values are trimmed; one that does not parse, or lies outside the range given for it, stops startup. AWS deployments set the switch, the rotation and the rate through Terraform variables `guardian_release_sweep_enabled`, `guardian_release_sweep_rotation_seconds` and `guardian_release_sweep_max_rate_per_second`. |
Expand Down
Loading
Loading