You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
little helper that pulls new blocks from the rpc node and submits (fake) attestations after each epoch
3
+
> Early, simplified attester mode. Work in progress – expect breaking changes and incomplete feature coverage.
4
+
5
+
This command-line helper joins the attester set of an Evolve-based chain and streams attestations for new blocks. It is the first public beta of the attester workflow and intentionally omits a number of production-hardening features (automatic key management, batching, robust persistence, etc.). The goal is to unblock experimentation on top of the upcoming attester mode.
6
+
7
+
## What it does
8
+
- Configures the Cosmos SDK Bech32 prefixes required by the target chain.
9
+
- Derives an operator account key from a mnemonic and loads the validator consensus key from the local `priv_validator_key.json`.
10
+
- Submits a `MsgJoinAttesterSet` transaction so the validator's consensus key is registered as an attester.
11
+
- Polls the node's RPC (`/status` and `/block`) to detect new heights and rebuilds the Evolve header and original `BlockID` for each block.
12
+
- Signs a precommit-style vote with the consensus key and wraps it in `MsgAttest` transactions paid for by the operator account.
13
+
- Retries failed submissions a few times and keeps catching up when the attester falls behind.
14
+
15
+
## Prerequisites
16
+
- An Evolve node exposing RPC on `tcp://HOST:PORT` and REST API on `http://HOST:PORT`.
17
+
- Access to the validator home directory so the attester can read `config/priv_validator_key.json` and `data/priv_validator_state.json`.
18
+
- A funded Cosmos SDK account mnemonic that will cover the attestation fees.
19
+
- The chain ID and Bech32 prefixes used by your deployment.
20
+
21
+
## Running the attester
22
+
Build with Go 1.22+:
23
+
24
+
```bash
25
+
cd attester
26
+
go build -o attester
27
+
```
28
+
29
+
Run it against your node (adjust the sample values):
30
+
31
+
```bash
32
+
./attester \
33
+
--chain-id evmallus-1 \
34
+
--node tcp://localhost:26657 \
35
+
--api-addr http://localhost:1317 \
36
+
--home /path/to/validator/home \
37
+
--mnemonic "word1 word2 … word24" \
38
+
--verbose
39
+
```
40
+
41
+
### Important flags
42
+
-`--home` – validator home directory containing the CometBFT private validator files.
43
+
-`--mnemonic` – Cosmos SDK mnemonic for the operator account that pays fees.
44
+
-`--bech32-account-prefix` and friends – override if your chain does not use the defaults (`gm`, `gmvaloper`, etc.).
45
+
-`--node` / `--api-addr` – RPC and REST endpoints used for account queries and block data.
46
+
47
+
## Operational notes
48
+
- The attester assumes the node accepts `MsgAttest` at every height. Current networks only process attestations at checkpoint heights (multiples of the epoch length); out-of-window submissions will be rejected with code 18 (`invalid request`).
49
+
- Sequence numbers are cached in memory. Restarting the process while transactions are pending can still produce sequence mismatches.
50
+
- HTTP polling currently drives block detection. There is no WebSocket subscription or backoff logic yet, so running it against remote nodes may require proxying/caching to avoid throttling.
51
+
- Logging is verbose by default to aid debugging. Remove `--verbose` once the setup is stable.
52
+
53
+
## Limitations and future work
54
+
- No automatic key rotation or secure storage – mnemonic and consensus keys must be provided manually.
55
+
- No persistence of attestation state across restarts beyond what the chain tracks.
56
+
- Lacks production monitoring hooks, metrics, and alerting.
57
+
- Error handling focuses on known happy paths; unexpected RPC responses will cause retries or exits.
58
+
59
+
Feedback is welcome. Please treat this module as beta software and be prepared for rapid iteration as the attester mode matures.
0 commit comments