FAQ¶
Short answers to the questions newcomers ask most, grouped by track. Each answer links to the page that explains it in depth. For an error message you can see, go to Troubleshooting; for a word you do not know, go to the Glossary.
For an error message, see Troubleshooting. For a term you do not know, see the Glossary.
Track A: stress-testing a PTB¶
How many agents can I run?
As many as the keystore has addresses. Agent i signs as the i-th keystore address, and loadtest exits with Not enough keys in keystore when there are fewer addresses than --agents. Each of those addresses also needs gas coins on the network the payload names. See Running a load test and Fund it.
What request rate does my configuration give?
With the default arrival type it is agents / interval requests per second. With poisson it is --poisson-lambda times the agent count. staircase divides the interval by a step that grows during the run. See Arrival types. When run.json says rate_achieved is false, the generator reached under 90 percent of its target, which is a limit of the generator, not a result about the backend.
Why does the backend reject create_akn_iri.json, update_iter.json and split_coin.json?
The first two name the PTB list ptbs, but the backend requires ptb. split_coin.json uses SplitCoins, which is not a Move call, and only Move calls are supported. Treat the three as notes, not as working inputs. See Sample payloads.
Can I send two PTBs in one request?
No. ptb is an array, but the backend uses only its first element and ignores the rest without an error. To send two transactions, send two requests. Several Move calls inside one calls array are fine: they run in one transaction, in order. See Several calls and several PTBs.
Can a payload pass an object as an argument?
Yes, on the Track A path (/api/SendPTB): ["object", id] and ["immutable", id] are accepted. The restriction to pure arguments applies only to bridged calls (see the Track C entry below). See Argument kinds.
Should I run the load generator inside the stack or from the host?
Inside the stack (./deploy.sh benchmark or hybrid) for a configured run from .env. From the host when you want to pair it with a bridge mode stack, as bench_sweep and consensus_compare.sh do. Use a release build for timing runs. See Running the load generator.
Does a load test cost real money?
It spends gas on Testnet or Devnet, where the coins are test coins. Every request pays from the coins of the agent's address. consensus_compare.sh also sends real transactions and asks before it starts. See Fund the agents first and Comparing committee scenarios.
Why is the first run slow or erratic?
Starting before the backend's coin caches are warm sends every request down the RPC fallback path. loadtest therefore polls GET /ready first, and so should you. /health answers too early. See GET /ready.
Track B: static relayer¶
Does the content of the source event matter in static mode?
No. The event is a trigger. The handler runs the fixed call in EVENT_HANDLER_TARGET with EVENT_HANDLER_ARGS_JSON, whatever the event says. See How static mode works.
Which mode do I need, static or bridge?
Static to measure the cost of the relayer path and a fixed destination call, signed by the relayer's own key. Bridge when the event should describe the call and the BridgeAA account should be the sender. The full comparison is in Static mode and bridge mode.
Why did my listener skip events I emitted before it started?
By default the listener deletes its saved state at start and begins at the chain tip, so events emitted while it was down are not delivered. Set EVENT_LISTENER_RESET_CURSOR to false to resume from the saved cursor. See What the listener does and The cursor.
The listener logged status 202. Has the call landed on the destination chain?
Not necessarily. The handler answers 202 as soon as the event is queued, before the destination transaction is sent. Read the handler log (batch confirmed) and bridge_results.csv to see the outcome. See Verifying and measuring.
Can I use the 3-phase acknowledgement in static mode?
No. BRIDGE_PROTOCOL_PHASES=3 with EVENT_HANDLER_MODE=static is a startup error, because the acknowledgement reports on a bridged request and static mode has none. See Three phases and the AA acknowledgement.
Track C: relayer with account abstraction¶
Why does the BridgeAA need its own gas coins?
Because the account is the sender of every bridged destination transaction, and gas is paid by the sender's coins. Funding the relayer's address is not enough: the handler stops at startup with BridgeAA … owns no gas coins. See One-time bridge setup and Gas pool sizing.
Why is my bridged call timing out with code 14?
timed-out before finality could be reached (code 14) from the event handler is almost always failed authentication, usually a source_sender missing from the ACL. The first abort code you see names the first check that failed. See Errors and, for the fix, Managing the ACL.
Can I bridge object arguments?
No. The authenticator compares each intent argument to the call argument by raw bytes, and only for pure inputs. An object argument, or the result of another command, makes the call non-matching. That is why bridge_target::record takes only values and why acknowledge_pure exists beside acknowledge. See Why only pure arguments are matched.
What are the chain ids, and where must they agree?
They are labels you choose, not network identifiers. They must agree in three places: the account's own chain_id, the ACL entry's source_chain_id and the SourceConfig. The handler checks the first two at startup. See Constraints on the call and Testnet and Devnet in this repository.
How do I authorise more source senders after the account exists?
Use bridge_acl_add (generate, then apply --verify). BRIDGE_ACL_SOURCE_SENDERS only applies at creation, and add_acl_entry cannot go through /api/SendPTB because the account itself must send it. See Managing the ACL.
Does the acknowledgement prove the call ran?
No. It is a claim by the relayer: nothing on the source chain verifies the destination state. It gives the source chain a record that the round trip completed. See Relayers and cross-chain calls and Three phases.
Which signer should I use for the acknowledgement, eoa or aa?
eoa (the default) sends an ordinary transaction from the relayer's key and stays off consensus. aa routes it through a second BridgeAA on the source chain, so both legs share one authorisation model, at the cost of a second account and a second gas pool. See EOA or AA acknowledgement.
How many gas coins do I need, and how rich?
About rate x hold_time coins, and each coin must cover the whole per-transaction budget, LOADTEST_GAS_BUDGET_BRIDGE times the events in the batch (at most BATCH_SIZE). A pool that is too poor retires itself and every row comes back no_gas. Use the calculator on Gas pool sizing.
Is replay protection on chain?
No. The destination chain keeps no nonce. The listener remembers the ids of the events it forwarded, newest 10,000 by default (EVENT_LISTENER_DEDUPE_CAPACITY), and skips repeats. See Replay protection is off-chain.
Can I use a secp256r1 relayer key?
No. bridge_abstract_account verifies ed25519 (scheme 0) and secp256k1 (scheme 1) only, and the handler refuses a secp256r1 key at startup. See One-time bridge setup.
Committee¶
What does the committee actually protect against?
Up to f = ⌊(n−1)/3⌋ nodes forging, censoring, delaying or equivocating, and replays of events already committed. It does not protect against more than f faulty nodes, a lying event source, or a compromised delivery key or executor. See What it protects against, and what it does not.
Why does the handler answer 403 when I post an event to it?
With CONSENSUS_ENABLED=true the handler executes only deliveries signed by the committee (an HMAC-SHA256 under CONSENSUS_DELIVERY_KEY in the x-committee-signature header). Point the listener at the committee, not at the handler. See POST /api/handle_event.
Why does the committee answer 503?
CometBFT processes died at runtime and left the committee without a quorum, or the ingest queue is full. The listener keeps its cursor and retries. A committee configured without a quorum stays up, since that stall is the experiment. See Adding the consensus committee.
Does the committee give me independent operators?
No. All nodes run as CometBFT processes in one container on loopback, so it models agreement, not independent operators, real network latency or partitions. See Limitations.
How do I choose the number of nodes?
n nodes tolerate f = ⌊(n−1)/3⌋ faulty ones, and delivery needs f + 1 commit reports (capped at the number of live nodes, and at least 1). Try your numbers in the calculator on Adding the consensus committee.
General¶
Is this production software?
No. It is a work-in-progress prototype, and only PTBs made of Move calls are supported. See Home.
What happened to ENABLE_AA and /api/SendAAPTB?
They belong to a legacy path that used an older abstract_account package, which is deprecated and whose Move source is not in this repository. BridgeAA and Track C replace it. See Legacy: the abstract_account path and start new work at One-time bridge setup.
Where do the results go?
loadtest writes merged_results.csv and run.json in a PTB_CALL_<unix timestamp> folder; the event handler appends to bridge_results.csv. Column meanings are in CSV schemas, and the folders in Where outputs land.
Why did deploy.sh reset my Docker Swarm?
That is what it does: it runs docker swarm leave --force, then docker swarm init, rebuilds the images and deploys. Run it only on a machine where that is acceptable. See Deployment.
Can I keep a second .env in testing_backend/?
Do not. The host tools search the current directory and then its parents, so a testing_backend/.env shadows stealth_name_service/backend/.env for them only, and the containers and the tools then disagree. See Configuration.
Do I need to clone the repository to follow this book?
Yes, and you need access first: the GitHub repository is private for now. Source references in this book are plain repository paths, not links. See Get the repository.