@xyo-network/xl1-cli 5.8.1 → 5.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -1
- package/dist/cli-min.mjs +274 -274
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -803,7 +803,7 @@ One config per actor **process** — the shape a real multi-host deployment runs
|
|
|
803
803
|
| `bridge` | `chain-mongo` + `default-evm-rpc` + `bridge-wallet` + Redis | — | authority store + remote EVM chain |
|
|
804
804
|
| `rewardRedemption` | `chain-mongo` + `default-evm-rpc` + `rewardRedemption-wallet` | — | authority store + EVM staking contract |
|
|
805
805
|
|
|
806
|
-
- **One writer per bucket.** The finalizer owns `s3-finalized` + `s3-chain-state`; the indexer owns `s3-index`. No other actor writes the network's object storage; a mirror writes only its own target buckets.
|
|
806
|
+
- **One writer per bucket.** The finalizer owns `s3-finalized` + `s3-chain-state`; the indexer owns `s3-index`. No other actor writes the network's object storage; a mirror writes only its own target buckets. The one exception is deliberate: several finalizers may share the finalizer's buckets when each commits through `S3FinalizationRunner` ([Finalizer without a chain store](#finalizer-without-a-chain-store-per-actor)).
|
|
807
807
|
- **Index add-ons are actors of their own.** The `indexer` runs only the main index and, when bound, the EVM event and rewards passes. The slash tree and register mirror (`indexerSlash`), the license index (`indexerLicense`) and the payload-locator family (`indexerPayloads`) are separate actors, so they can share the indexer's process or live on other infrastructure. Each writes only its own prefix of `s3-index`; run each one in exactly one place. A standalone process that reads blocks over REST binds `BlockViewer`, `IndexViewer` and `ChainStateViewer` to their REST connections together: left alone, `IndexViewer` resolves in-process, which reads blocks, and planning reports the cycle. `indexerSlash` takes `floorBlock`, `pagesPerPass` and `syncInterval`; the license fold's bounds stay options of the `LicenseViewer` binding and the payloads pass bounds options of the `PayloadIndexPublishRunner` binding.
|
|
808
808
|
- **`BlockViewer` is not auto-bound to REST.** When a process declares a local store, `BlockViewer` defaults to it, so the API and indexer configs bind `BlockViewer → rest-finalized` explicitly to read finalized blocks from the CDN. `ChainStateViewer` / `IndexViewer` bind to their REST connections automatically when those connections are declared (the explicit bindings here are for clarity).
|
|
809
809
|
- **Staking and rewards.** `chain.id` is the staking contract address on the backing EVM. Event publishing binds `EvmChainViewer → default-evm-rpc` and `EvmEventIndexPublishRunner → s3-index`. Durable reward publishing additionally binds `NetworkStakeRewardsIndexPublishRunner → s3-index`, `StakeEventsViewer → rest-index`, and `StakeViewer → default-evm-rpc`. API processes bind `NetworkStakeStepRewardsByPositionViewer → rest-index` to read the resulting index without local cache priming.
|
|
@@ -1004,6 +1004,87 @@ One config per actor **process** — the shape a real multi-host deployment runs
|
|
|
1004
1004
|
}
|
|
1005
1005
|
```
|
|
1006
1006
|
|
|
1007
|
+
### Finalizer without a chain store (per-actor)
|
|
1008
|
+
|
|
1009
|
+
Bind `FinalizationRunner` to the `s3` connection that holds the finalized blocks and the finalizer commits each block straight into the published chain, with no store of its own. The commit is a create-only write of `block/number/<n>.json`, so the bucket, not the finalizer, lets exactly one block take each height. That makes it safe to run more than one finalizer on a network: a standby on other infrastructure, or two pods overlapping during a rollout.
|
|
1010
|
+
|
|
1011
|
+
```json
|
|
1012
|
+
{
|
|
1013
|
+
"xl1": {
|
|
1014
|
+
"connections": {
|
|
1015
|
+
"default-evm-rpc": {
|
|
1016
|
+
"type": "evm-rpc",
|
|
1017
|
+
"url": "https://sepolia.infura.io/v3/YOUR_INFURA_PROJECT_ID",
|
|
1018
|
+
"chainId": "0xaa36a7"
|
|
1019
|
+
},
|
|
1020
|
+
"default-rpc": {
|
|
1021
|
+
"type": "rpc",
|
|
1022
|
+
"protocol": "https",
|
|
1023
|
+
"url": "https://rpc.xl1.example/rpc"
|
|
1024
|
+
},
|
|
1025
|
+
"memory": {
|
|
1026
|
+
"type": "memory"
|
|
1027
|
+
},
|
|
1028
|
+
"rest-finalized": {
|
|
1029
|
+
"type": "rest",
|
|
1030
|
+
"baseUrl": "https://chain.xl1.example"
|
|
1031
|
+
},
|
|
1032
|
+
"rest-index": {
|
|
1033
|
+
"type": "rest",
|
|
1034
|
+
"baseUrl": "https://index.xl1.example"
|
|
1035
|
+
},
|
|
1036
|
+
"s3-finalized": {
|
|
1037
|
+
"type": "s3",
|
|
1038
|
+
"accountId": "YOUR_R2_ACCOUNT_ID",
|
|
1039
|
+
"accessKeyId": "YOUR_ACCESS_KEY_ID",
|
|
1040
|
+
"secretAccessKey": "YOUR_SECRET_ACCESS_KEY",
|
|
1041
|
+
"prefix": "xl1/",
|
|
1042
|
+
"bucket": "xl1-chain",
|
|
1043
|
+
"readUrl": "https://chain.xl1.example"
|
|
1044
|
+
},
|
|
1045
|
+
"s3-chain-state": {
|
|
1046
|
+
"type": "s3",
|
|
1047
|
+
"accountId": "YOUR_R2_ACCOUNT_ID",
|
|
1048
|
+
"accessKeyId": "YOUR_ACCESS_KEY_ID",
|
|
1049
|
+
"secretAccessKey": "YOUR_SECRET_ACCESS_KEY",
|
|
1050
|
+
"prefix": "xl1/",
|
|
1051
|
+
"bucket": "xl1-chain-state",
|
|
1052
|
+
"readUrl": "https://chain-state.xl1.example"
|
|
1053
|
+
}
|
|
1054
|
+
},
|
|
1055
|
+
"chain": {
|
|
1056
|
+
"id": "dd381fbb392c85160d8b0453e446757b12384046"
|
|
1057
|
+
},
|
|
1058
|
+
"providerBindings": {
|
|
1059
|
+
"BlockValidationViewer": { "connection": "memory" },
|
|
1060
|
+
"BlockViewer": { "connection": "rest-finalized" },
|
|
1061
|
+
"ChainContractViewer": { "connection": "default-evm-rpc" },
|
|
1062
|
+
"ChainStatePublishRunner": { "connection": "s3-chain-state" },
|
|
1063
|
+
"ChainStateViewer": { "connection": "s3-chain-state" },
|
|
1064
|
+
"EvmChainViewer": { "connection": "default-evm-rpc" },
|
|
1065
|
+
"FinalizationRunner": { "connection": "s3-finalized" },
|
|
1066
|
+
"IndexViewer": { "connection": "rest-index" },
|
|
1067
|
+
"MempoolViewer": { "connection": "default-rpc" }
|
|
1068
|
+
},
|
|
1069
|
+
"actors": [
|
|
1070
|
+
{
|
|
1071
|
+
"name": "finalizer",
|
|
1072
|
+
"finalizationCheckInterval": 500
|
|
1073
|
+
}
|
|
1074
|
+
]
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
```
|
|
1078
|
+
|
|
1079
|
+
- **What it reads.** Blocks over REST, the head from the chain-state bucket itself (`ChainStateViewer → s3-chain-state`, so it is not a CDN-cached copy), candidates from the mempool over JSON-RPC. Block validation keeps only working state in memory.
|
|
1080
|
+
- **`ChainStatePublishRunner` is required.** The runner moves `head.json` through it, never backwards and only over the pointer it read. Planning fails without the binding.
|
|
1081
|
+
- **No `BlockPublishRunner`, and `publishOnFinalize` does nothing.** The finalize write is the publication. Leave `BlockPublishRunner` unbound: its publisher overwrites `block/number/<n>.json` unconditionally.
|
|
1082
|
+
- **Cut over with the old finalizer stopped.** A store-backed finalizer that publishes to the same buckets must be fully stopped first, for the same reason. On Kubernetes that means a `Recreate` strategy for the switch, not a rolling update.
|
|
1083
|
+
- **Lost heights are normal.** A finalizer that loses a height to another logs `lost block <n> to another finalizer`, counts it in `finalizer_actor_finalization_conflicts`, and continues from the block that won.
|
|
1084
|
+
- **The bucket must enforce create-only writes.** The runner checks this when it starts (a probe at `.probe/create-only.json`) and refuses to start on a store that does not. Cloudflare R2 and AWS S3 do; the `s3rver` server the local S3 test rig uses does not.
|
|
1085
|
+
- **Dead letters.** `DeadLetterQueueRunner` is optional. Bind it to a store connection to keep rejected candidates; unbound, they are only logged.
|
|
1086
|
+
- **Runner options** go on the binding, for example `"FinalizationRunner": { "connection": "s3-finalized", "options": { "contentEncoding": "br" } }`.
|
|
1087
|
+
|
|
1007
1088
|
### Indexer (per-actor)
|
|
1008
1089
|
|
|
1009
1090
|
```json
|