A Go implementation of the StakeWise V3 Operator — the service a StakeWise Vault operator runs to register validators, rotate exit signatures, process withdrawals and update vault state.
Status: early work in progress. Only the
initcommand is implemented;runis a skeleton. Use the Python operator for anything real.
The goal is to cover the core operator features, taking advantage of Go's concurrency model: CPU-bound work such as key generation and BLS signature verification parallelises with goroutines, without the memory cost of the Python version's multiprocessing.
- Go 1.23 or later
- A C compiler — BLS operations use
herumi/bls-eth-go-binary, so builds require cgo (CGO_ENABLED=1, the default); cross-compiling needs a matching C toolchain.
go build -o v3-operator ./cmdGenerates a BIP39 mnemonic and creates the vault configuration directory.
./v3-operator init --vault 0xYourVaultAddressThe mnemonic is printed once and you are asked to type it back to confirm it was recorded. It is the only way
to recover your validator keys — write it down and store it safely. Pass --no-verify to skip the confirmation
step.
| Flag | Default | Description |
|---|---|---|
--vault |
(required) | Vault address |
--network |
mainnet |
Network of your vault |
--data-dir |
$HOME/.stakewise |
Where keystores and config are stored |
--no-verify |
false |
Skip mnemonic verification |
This writes <data-dir>/<vault-address-lowercase>/config.json:
{
"network": "mainnet",
"mnemonic_next_index": 0,
"first_public_key": "0xb3e445d43871965d890a398f719348a1405ac72e35b92727cc570026f54471af7ea7b2040622a8fd0b5bfb2a209b5911"
}The file format matches the Python operator, so the two implementations read the same configuration. Validator
keys are BLS12-381 keys derived per EIP-2333 along the
EIP-2334 path m/12381/3600/<index>/0/0.
Unlike the Python operator, mnemonics are generated from the English wordlist only.
Starts the background worker. Currently a skeleton that idles until interrupted.
./v3-operator rungo test ./...
go vet ./...
gofmt -l .