Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cf0fbf1
feat: add primev keyper definition and commitment gossip message
blockchainluffy Jul 24, 2025
0941870
feat: add basic database queries and schema
blockchainluffy Jul 25, 2025
42865d9
feat: add provider registry event syncer
blockchainluffy Jul 29, 2025
535106e
fix: sql definition issue
blockchainluffy Aug 28, 2025
ccae033
update commitment message to include identities
blockchainluffy Sep 2, 2025
f16acd2
update config to include primev chain config and update providerSynce…
blockchainluffy Sep 2, 2025
e099c72
fix: CI to build docker image
blockchainluffy Sep 2, 2025
5909157
fix CI for build
blockchainluffy Sep 2, 2025
868cb00
fix primev keyper database mismatch
blockchainluffy Sep 2, 2025
4b56c49
fix: getting block header for primev chain
blockchainluffy Sep 3, 2025
fc0e18c
primev: identity calculation to use bidder node address
blockchainluffy Sep 5, 2025
dfc6fbd
add logs for commitment message
blockchainluffy Sep 8, 2025
7130772
update message middleware
blockchainluffy Sep 8, 2025
bdfb398
update bidder node address verification
blockchainluffy Sep 8, 2025
08baf1d
update commitment handler to check msg type
blockchainluffy Sep 8, 2025
b00a818
update commitment message handling to include correct identity genera…
blockchainluffy Sep 8, 2025
9178d2f
update commitment table to include bid related fields
blockchainluffy Sep 10, 2025
4212a0f
primev: use random generated identity prefix
blockchainluffy Sep 22, 2025
6436aad
primev: use provider registry contract binding as dependancy from mev…
blockchainluffy Sep 24, 2025
47f2300
primev: update schema primary and foreign keys and queries
blockchainluffy Sep 24, 2025
5d6d4ae
primev: include commitment message in the existing message file
blockchainluffy Sep 24, 2025
b8e1b10
primev: update config to not include http enabled flags
blockchainluffy Sep 24, 2025
a7c0d0c
primev: update commitment handler to generate dec trigger at the end
blockchainluffy Sep 24, 2025
1947f4e
Merge branch 'main' into primev-poc
blockchainluffy Sep 24, 2025
f0a5508
primev: resolve build after merging main
blockchainluffy Sep 24, 2025
52f62fc
fix: rs-generate ci
blockchainluffy Sep 26, 2025
a32b372
update example config values
blockchainluffy Oct 14, 2025
6ef165e
fix: add identity prefix in committed tx table and update queries
blockchainluffy Nov 7, 2025
c8696aa
fix: commitment handler to non-blocking
blockchainluffy Nov 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rolling-shutter/cmd/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/gnosiskeyper"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/optimism"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/p2pnode"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/primevkeyper"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/shutterservicekeyper"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/snapshot"
"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/snapshotkeyper"
Expand All @@ -29,6 +30,7 @@ func Subcommands() []*cobra.Command {
cryptocmd.Cmd(),
p2pnode.Cmd(),
shutterservicekeyper.Cmd(),
primevkeyper.Cmd(),
}
}

Expand Down
53 changes: 53 additions & 0 deletions rolling-shutter/cmd/primevkeyper/keyper.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package primevkeyper

import (
"context"

"github.com/jackc/pgx/v4/pgxpool"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"

"github.com/shutter-network/rolling-shutter/rolling-shutter/cmd/shversion"
keyper "github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/primev"
"github.com/shutter-network/rolling-shutter/rolling-shutter/keyperimpl/primev/database"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/configuration/command"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/db"
"github.com/shutter-network/rolling-shutter/rolling-shutter/medley/service"
)

func Cmd() *cobra.Command {
builder := command.Build(
main,
command.Usage(
"Run a Shutter keyper for PrimeV POC",
`This command runs a keyper node. It will connect to both a PrimeV and a
Shuttermint node which have to be started separately in advance.`,
),
command.WithGenerateConfigSubcommand(),
command.WithDumpConfigSubcommand(),
)
builder.AddInitDBCommand(initDB)
return builder.Command()
}

func main(config *keyper.Config) error {
log.Info().
Str("version", shversion.Version()).
Str("address", config.GetAddress().Hex()).
Str("shuttermint", config.Shuttermint.ShuttermintURL).
Msg("starting primev keyper")

kpr := keyper.New(config)
return service.RunWithSighandler(context.Background(), kpr)
}

func initDB(cfg *keyper.Config) error {
ctx := context.Background()
dbpool, err := pgxpool.Connect(ctx, cfg.DatabaseURL)
if err != nil {
return errors.Wrap(err, "failed to connect to database")
}
defer dbpool.Close()
return db.InitDB(ctx, dbpool, database.Definition.Name(), database.Definition)
}
1 change: 1 addition & 0 deletions rolling-shutter/docs/rolling-shutter.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ A collection of commands to run and interact with Rolling Shutter nodes
* [rolling-shutter op-bootstrap](rolling-shutter_op-bootstrap.md) - Bootstrap validator utility functions for a shuttermint chain
* [rolling-shutter op-keyper](rolling-shutter_op-keyper.md) - Run a Shutter optimism keyper node
* [rolling-shutter p2pnode](rolling-shutter_p2pnode.md) - Run a Shutter p2p bootstrap node
* [rolling-shutter primevkeyper](rolling-shutter_primevkeyper.md) - Run a Shutter keyper for PrimeV POC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(General) I think we should add a dedicated spec document for this new keyper implementation under the existing docs/spec.md that describes the high-level design, key components, and how it differs from other implementations. Ideally we should have that for all implementations, but we can start here as part of this PR.

* [rolling-shutter shutterservicekeyper](rolling-shutter_shutterservicekeyper.md) - Run a Shutter keyper for Shutter Service
* [rolling-shutter snapshot](rolling-shutter_snapshot.md) - Run the Snapshot Hub communication module
* [rolling-shutter snapshotkeyper](rolling-shutter_snapshotkeyper.md) - Run a Shutter snapshotkeyper node
Expand Down
35 changes: 35 additions & 0 deletions rolling-shutter/docs/rolling-shutter_primevkeyper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## rolling-shutter primevkeyper

Run a Shutter keyper for PrimeV POC

### Synopsis

This command runs a keyper node. It will connect to both a PrimeV and a
Shuttermint node which have to be started separately in advance.

```
rolling-shutter primevkeyper [flags]
```

### Options

```
--config string config file
-h, --help help for primevkeyper
```

### Options inherited from parent commands

```
--logformat string set log format, possible values: min, short, long, max (default "long")
--loglevel string set log level, possible values: warn, info, debug (default "info")
--no-color do not write colored logs
```

### SEE ALSO

* [rolling-shutter](rolling-shutter.md) - A collection of commands to run and interact with Rolling Shutter nodes
* [rolling-shutter primevkeyper dump-config](rolling-shutter_primevkeyper_dump-config.md) - Dump a 'primevkeyper' configuration file, based on given config and env vars
* [rolling-shutter primevkeyper generate-config](rolling-shutter_primevkeyper_generate-config.md) - Generate a 'primevkeyper' configuration file
* [rolling-shutter primevkeyper initdb](rolling-shutter_primevkeyper_initdb.md) - Initialize the database of the 'primevkeyper'

29 changes: 29 additions & 0 deletions rolling-shutter/docs/rolling-shutter_primevkeyper_dump-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## rolling-shutter primevkeyper dump-config

Dump a 'primevkeyper' configuration file, based on given config and env vars

```
rolling-shutter primevkeyper dump-config [flags]
```

### Options

```
--config string config file
-f, --force overwrite existing file
-h, --help help for dump-config
--output string output file
```

### Options inherited from parent commands

```
--logformat string set log format, possible values: min, short, long, max (default "long")
--loglevel string set log level, possible values: warn, info, debug (default "info")
--no-color do not write colored logs
```

### SEE ALSO

* [rolling-shutter primevkeyper](rolling-shutter_primevkeyper.md) - Run a Shutter keyper for PrimeV POC

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## rolling-shutter primevkeyper generate-config

Generate a 'primevkeyper' configuration file

```
rolling-shutter primevkeyper generate-config [flags]
```

### Options

```
-f, --force overwrite existing file
-h, --help help for generate-config
--output string output file
```

### Options inherited from parent commands

```
--config string config file
--logformat string set log format, possible values: min, short, long, max (default "long")
--loglevel string set log level, possible values: warn, info, debug (default "info")
--no-color do not write colored logs
```

### SEE ALSO

* [rolling-shutter primevkeyper](rolling-shutter_primevkeyper.md) - Run a Shutter keyper for PrimeV POC

27 changes: 27 additions & 0 deletions rolling-shutter/docs/rolling-shutter_primevkeyper_initdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## rolling-shutter primevkeyper initdb

Initialize the database of the 'primevkeyper'

```
rolling-shutter primevkeyper initdb [flags]
```

### Options

```
-h, --help help for initdb
```

### Options inherited from parent commands

```
--config string config file
--logformat string set log format, possible values: min, short, long, max (default "long")
--loglevel string set log level, possible values: warn, info, debug (default "info")
--no-color do not write colored logs
```

### SEE ALSO

* [rolling-shutter primevkeyper](rolling-shutter_primevkeyper.md) - Run a Shutter keyper for PrimeV POC

24 changes: 11 additions & 13 deletions rolling-shutter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/bitwurx/jrpc2 v0.0.0-20220302204700-52c6dbbeb536
github.com/deckarep/golang-set/v2 v2.6.0
github.com/deepmap/oapi-codegen v1.9.1
github.com/ethereum/go-ethereum v1.15.7
github.com/ethereum/go-ethereum v1.15.11
github.com/ferranbt/fastssz v0.1.3
github.com/getkin/kin-openapi v0.87.0
github.com/go-chi/chi/v5 v5.0.10
Expand All @@ -30,6 +30,7 @@ require (
github.com/oapi-codegen/runtime v1.1.1
github.com/pelletier/go-toml/v2 v2.1.0
github.com/pkg/errors v0.9.1
github.com/primev/mev-commit/contracts-abi v0.0.0-20250922193515-6d402958637d
github.com/prometheus/client_golang v1.22.0
github.com/rs/zerolog v1.28.0
github.com/shutter-network/contracts/v2 v2.0.0-beta.2.0.20250908105003-7e53b1579b04
Expand Down Expand Up @@ -59,25 +60,24 @@ require (
)

require (
github.com/DataDog/zstd v1.5.2 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/apapsch/go-jsonmerge/v2 v2.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.17.0 // indirect
github.com/bits-and-blooms/bitset v1.20.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.2 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/consensys/bavard v0.1.22 // indirect
github.com/consensys/gnark-crypto v0.14.0 // indirect
github.com/consensys/bavard v0.1.27 // indirect
github.com/consensys/gnark-crypto v0.16.0 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cosmos/gogoproto v1.4.1 // indirect
github.com/cosmos/gorocksdb v1.2.0 // indirect
github.com/crate-crypto/go-eth-kzg v1.3.0 // indirect
github.com/crate-crypto/go-ipa v0.0.0-20240724233137-53bbb0ceb27a // indirect
github.com/crate-crypto/go-kzg-4844 v1.1.0 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.4.0 // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
Expand All @@ -86,7 +86,7 @@ require (
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elastic/gosigar v0.14.3 // indirect
github.com/ethereum/c-kzg-4844 v1.0.0 // indirect
github.com/ethereum/c-kzg-4844/v2 v2.1.0 // indirect
github.com/ethereum/go-verkle v0.2.2 // indirect
github.com/flynn/noise v1.1.0 // indirect
github.com/francoispqt/gojay v1.2.13 // indirect
Expand Down Expand Up @@ -158,7 +158,6 @@ require (
github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/miekg/dns v1.1.66 // indirect
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect
Expand Down Expand Up @@ -201,7 +200,7 @@ require (
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pion/turn/v4 v4.0.0 // indirect
github.com/pion/webrtc/v4 v4.0.10 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/polydawn/refmt v0.89.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.63.0 // indirect
Expand All @@ -211,7 +210,6 @@ require (
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect
github.com/raulk/go-watchdog v1.3.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.4.3 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/rs/cors v1.9.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
Expand All @@ -222,8 +220,8 @@ require (
github.com/subosito/gotenv v1.4.2 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220614013038-64ee5596c38a // indirect
github.com/tendermint/tm-db v0.6.7 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/tklauser/go-sysconf v0.3.13 // indirect
github.com/tklauser/numcpus v0.7.0 // indirect
github.com/whyrusleeping/go-keyspace v0.0.0-20160322163242-5b898ac5add1 // indirect
github.com/wlynxg/anet v0.0.5 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
Expand Down
Loading