Skip to content

Commit 48cf4a0

Browse files
committed
feat: rename Rollkit to Evolve in main application and update README
1 parent 65a1111 commit 48cf4a0

2 files changed

Lines changed: 70 additions & 14 deletions

File tree

attester/README.md

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1-
# Attest everything attester
1+
# Evolve Attester (beta)
22

3-
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.

attester/main.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import (
3737
"github.com/spf13/cobra"
3838

3939
networktypes "github.com/evstack/ev-abci/modules/network/types"
40-
rlktypes "github.com/evstack/ev-node/types"
40+
evolvetypes "github.com/evstack/ev-node/types"
4141
)
4242

4343
const (
@@ -70,8 +70,8 @@ type Config struct {
7070
func main() {
7171
rootCmd := &cobra.Command{
7272
Use: "attester",
73-
Short: "Attester client for Rollkit",
74-
Long: `Attester client for Rollkit that joins the attester set and attests to blocks`,
73+
Short: "Attester client for Evolve",
74+
Long: `Attester client for Evolve that joins the attester set and attests to blocks`,
7575
DisableFlagParsing: false,
7676
SuggestionsMinimumDistance: 2,
7777
RunE: runAttester,
@@ -778,9 +778,9 @@ func submitAttestation(
778778
pv *pvm.FilePV,
779779
clientCtx client.Context,
780780
) error {
781-
header, err := getRollkitHeader(ctx, config.Node, height)
781+
header, err := getEvolveHeader(config.Node, height)
782782
if err != nil {
783-
return fmt.Errorf("getting rollkit header: %w", err)
783+
return fmt.Errorf("getting Evolve header: %w", err)
784784
}
785785

786786
// Get BlockID from store like the sequencer does via SignaturePayloadProvider
@@ -863,8 +863,8 @@ func submitAttestation(
863863
return nil
864864
}
865865

866-
// getRollkitHeader gets the rollkit header for a given height
867-
func getRollkitHeader(ctx context.Context, node string, height int64) (*rlktypes.Header, error) {
866+
// getEvolveHeader gets the Evolve header for a given height
867+
func getEvolveHeader(node string, height int64) (*evolvetypes.Header, error) {
868868
// Parse node URL
869869
parsed, err := url.Parse(node)
870870
if err != nil {
@@ -941,14 +941,14 @@ func getRollkitHeader(ctx context.Context, node string, height int64) (*rlktypes
941941
// Parse version
942942
appVersion, _ := strconv.ParseUint(header.Version.App, 10, 64)
943943

944-
// Create rollkit header
945-
rlkHeader := &rlktypes.Header{
946-
BaseHeader: rlktypes.BaseHeader{
944+
// Create Evolve header
945+
evHeader := &evolvetypes.Header{
946+
BaseHeader: evolvetypes.BaseHeader{
947947
Height: heightUint,
948948
Time: uint64(timeStamp.UnixNano()),
949949
ChainID: header.ChainID,
950950
},
951-
Version: rlktypes.Version{
951+
Version: evolvetypes.Version{
952952
Block: 1, // Default block version
953953
App: appVersion,
954954
},
@@ -962,7 +962,7 @@ func getRollkitHeader(ctx context.Context, node string, height int64) (*rlktypes
962962
ValidatorHash: validatorsHash,
963963
}
964964

965-
return rlkHeader, nil
965+
return evHeader, nil
966966
}
967967

968968
// getOriginalBlockID gets the BlockID from the RPC endpoint

0 commit comments

Comments
 (0)