Repository navigation
v3.4.0
Added
- A bridge is an economic intent between two named fund accounts of one strategy on
different chains. A strategy asks for it withconfig.bridge(name, amount); the
deposit is planned, signed and reconciled on the chain it leaves. A transfer in
flight is owned state, in neither wallet's balance and never a measured zero, and
its arrival and its refund are reconciled as external effects on their own chains
and reachon_outcome(#49). - Across is the first bridge connector (
across). A market is one direction: the
sent asset, the received asset on the destination chain, the author's fee ceiling
max_fee_bpsand the quote sourceacross_api. The output amount is the venue's
own quote, and the gateway refuses to sign a deposit whose fee exceeds the
ceiling; the SpokePool checks no price. The SpokePool is pinned per chain by proxy
address, implementation and code hash, and a difference refuses new deposits only.
Routes need the same decimals on both sides (#50). - An Across transfer is settled by its measured arrival on the destination chain or
its measured refund on the source chain. A transfer is proven unfilled only by the
destination chain, after its fill deadline; a refund payment that cannot be
attributed is reported as such, credited to nothing, and stops nothing. A missing
outcome never sends again (#52, #68). - Reference strategies
across_usdc_arbitrum_base_bridgeand
arbitrum_base_bridge_and_lend, which bridges and then supplies exactly the
measured arrival to Compound V3. A bridge allocation composes with allocations of
other connectors (#55, #59). - Economic backtests model a bridge with
across-full-fee-ceiling-fixed-latency-v1:
the whole fee ceiling is charged and the arrival is credited after
data.arrival_latency_seconds, both stated in the backtest file and reported as
model assumptions. No refund is modeled (#65). - Across declares fork runs, production and economic backtests on Arbitrum, Base,
Ethereum, OP Mainnet, BNB Smart Chain, Polygon, Robinhood Chain and Avalanche.
Only Arbitrum has a reference lifecycle, a refund proof and a production
rehearsal, all on forks; the other chains are declared on read-only mainnet facts
and offline tests, andalmanak supportsays so on each row. No mainnet
transaction of this connector has been sent (#66, #68, #72). almanak ax bridgesends an exact amount to a stated recipient on another chain
through Across, under a required--max-fee-bps, and ends when the deposit is
mined.almanak ax bridge-statusreads what became of a transfer from its
reference or its deposit transaction, andalmanak ax revoke-bridgeclears a
standing SpokePool approval. A bridge takes a provider key and refuses
--public-rpc(#73).- An Across bridge may send from a Safe with Zodiac Roles, and either account of a
bridge may be an EOA or a Safe. The connector derives two scope-only grants for a
Safe that sends: an approval of the sent asset to the route's SpokePool only, for
any amount, which also serves the revocation, and the SpokePool'sdepositwith
the Safe as depositor, the destination fund as recipient, both tokens, the
destination chain and an empty message pinned. Amounts, the venue's relayer, the
quote time, the fill deadline and the exclusivity are free: Roles cannot relate a
deposit's output to its input, so the fee ceiling stays a gateway check and a
compromised operator or gateway host can move the bridged asset out of the Safe.
A Safe destination keeps a wrapped native output as the token.ax bridgeis
unchanged and takes a plain wallet. - Across declares the Safe/Roles account profile on every chain with a pinned
SpokePool, for fork runs and production. It is declared with no fork proof: the
grants are held to the planner's calldata by offline tests and were never installed
in a Roles module, and no Safe has bridged on a fork or on mainnet.almanak supportsays so on each row, the QA catalog leaves the profile out by the
connector's own list, and a generated fork operator file still provisions plain
accounts for a bridge. A standalone bridge has no fork run with a Safe: its fork
fixture funds EOA accounts only and refuses a Safe fund with that cause. - One deployment may bind Safe and EOA accounts together. Permission generation
makes one partition per Safe, an EOA account has none, and a deployment that
binds no Safe is refused. The change is in the shared permission code, so it
applies to every connector.
Changed
-
The agent skill is named
almanak-defiand lives inskills/almanak-defi/. It was
almanakinskills/almanak/. An agent finds a skill by its name and description,
and the name now says what the skill is for. -
--public-rpc blastapiis the public endpoint for BNB Chain (eip155:56), and
bnbchainis no longer a name. BNB Chain's own endpoint keeps less than a minute of
state, so a direct action that took longer than that between a mined step and its
reconciliation ended withmissing trie nodeand a record thatax recovercould
not resolve through it. A record kept onbnbchainis resolved by naming a
transport, such asax recover --record <path> --public-rpc blastapi(#42). -
scripts/qualify_public_rpc.pyhas a tenth check,reads_at_age: pinned state must
be served at a block at least 360 seconds behind the head, measured by the block
timestamps the endpoint itself reports. That is the 120 seconds an observation may
age plus an allowance of 240 seconds for one step of a direct action to be planned,
signed, mined and reconciled. The read 64 blocks behind the head stays, but 64 blocks
are about 29 seconds on BNB Chain, so an endpoint that keeps a minute of state passed
every check. The 360 seconds are a floor the tool checks: a slower step or a later
ax recoverreads older state. One listed pair does not meet it and stays listed
with the limit stated in the operating guide:publicnodeon Avalanche leaves
state reads older than about 100 seconds unanswered (#42).
Fixed
- The provider guard's
web3_clientVersionread is sent again after a transient
failure, as itseth_chainIdread already was. The method was missing from the
reads the execution reader may send again, so one refused connection, timeout, HTTP
5xx or HTTP 429 on that read before a privileged gateway request ended a direct
action run with--execute, even with a signed step waiting, and left the record to
ax recover. A failure that outlasts the reader's retry bounds is now marked transient
like any other read. Other HTTP 4xx answers are unchanged (#64). - An execution read answered with HTTP 408 Request Timeout is sent again within the
reader's retry bounds, and a 408 that outlasts them is marked transient, as an HTTP
5xx already was. It was a finalhttprefusal, so one such answer ended a direct
action run with--executeeven with a signed step waiting and left the record to
ax recover. Every other HTTP 4xx answer, HTTP 400 with a JSON-RPC error included,
still ends the command at once and is sent once: it does not pass on a repeat, and
the hold for a signed step has no time limit. A transaction submission answered 408
is still sent once, not marked transient, and keeps its signed step, as one answered
with a 5xx does; its message now readseth_sendRawTransaction: HTTP 408instead of
calling the submission refused (#64). - A direct action run with
--executeno longer ends over one failed read between two
of its steps once a step is mined. A transient provider or storage failure was held
only while a signed step was unresolved, so between a reconciled step and the next
signature it ended the command with exit 1, the approvals standing and no position.
The command now runs the check again until the next signed step is recorded, for at
most 60 seconds per request counted over the checks that ended in such a failure,
and then ends as before, with a message that says the mined steps stand. A check
repeated at signing signs the same recorded plan again: both signatures are of one
transaction, only one can be mined, and nothing unrecorded is sent. A failure before
any step is mined and a refusal that waiting cannot change still end the command at
once, andax recoveris unchanged (#42). - A direct action run with
--executeno longer ends over its own step that was just
mined. When the endpoint served neither the receipt nor the transaction of that step
in one check, the command took the wallet's advanced count for another transaction
at the step's nonce, asked for the consumed-nonce proof, and ended on its refusal
with exit 1 and the record kept although every step was mined, untilax recover
resolved it. The command now reads the receipt again and asks again while the proof
refuses, until those checks have taken 60 seconds for the step, and then ends as
before. A refusal that waiting cannot change therefore ends the command up to a
minute later.ax recoveris unchanged, and only the full proof drops a step (#35). almanak ax recoversends a read of its public endpoint proof again after a
transient failure, within the 8 seconds execution reads have. The reader it proves
a named--public-rpcendpoint with had no retry budget, so one failed read of the
chain number, the genesis block or the head refused the recovery (#42).- A single execution read whose first attempt timed out is sent once more. The
execution reader's 8 second retry budget starts with the first attempt and the
provider timeout is 15 seconds, so a timeout had spent the budget and the read failed
after one attempt, while a refused connection was tried about five times. The re-send
follows a 0.5 second wait and has an 8 second provider timeout. The timeouts apply to
each phase of an attempt and not to its total. Batched reads are unchanged, and a
transaction submission is still never sent again (#42). - A read that geth refuses with
missing trie nodeis reported asthe endpoint does not serve state at that block. It was not a known reason, so the refusal said only
RPC rejected the requested read (JSON-RPC -32000). The usual cause is a pinned
block whose state the endpoint has pruned. The read is not sent again. Other
clients' wordings for the same condition are not recognised (#42).