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
7a914da
lcp: update speculative batch stream bindings
May 12, 2026
3b90048
relay: configure explicit-state update clients
May 12, 2026
196a493
relay: stream explicit-state update clients
May 12, 2026
246ef67
relay: test explicit-state update clients
May 12, 2026
6b0d62e
relay: address speculative update review
May 14, 2026
ed3dbac
relay: clear processed fallback units
May 14, 2026
7ec481d
relay: bound speculative fallback retention
May 14, 2026
09b164e
Fallback incomplete non-leading speculative base states
May 22, 2026
41745b5
Fallback incomplete speculative base states
May 22, 2026
ca6dde1
Validate complete speculative unit base states
May 22, 2026
5f4819c
relay: address explicit-state update review
Jun 4, 2026
f27bd88
relay: make explicit-state update client opt-in
Jun 4, 2026
b077938
relay: fall back on explicit-state base mismatch
Jun 4, 2026
d0a794e
Revert "relay: fall back on explicit-state base mismatch"
Jun 4, 2026
3a53bdd
relay: retry explicit-state from canonical base
Jun 4, 2026
0757055
relay: log canonical explicit-state base
Jun 5, 2026
f451fb0
relay: detect stored base mismatch retries
Jun 5, 2026
0b90dcd
Remove speculative batch byte split
Jun 9, 2026
2010de1
Query canonical base for explicit state updates
Jun 9, 2026
aa355f4
Simplify explicit-state update client retries
Jun 9, 2026
0d47e07
Use on-chain LCP state for explicit-state base
Jun 9, 2026
6e833fe
Bind explicit-state batches to committed base
Jun 10, 2026
dba1bc3
Update lcp submodule
Jun 10, 2026
90e42c8
Separate explicit-state gate from execution
Jun 10, 2026
5e3763e
Remove explicit-state ELC update wrapper
Jun 11, 2026
3fb53e4
Split explicit-state base paths by caller
Jun 11, 2026
75619d7
Simplify explicit-state update client internals
Jun 11, 2026
4822895
Drop constant includeState from on-chain base path
Jun 11, 2026
f73c0b4
relay: retry explicit-state batch on transient stream failure
Jun 17, 2026
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: 1 addition & 1 deletion lcp
Submodule lcp updated 41 files
+8 −1 Cargo.lock
+2 −2 app/src/commands/elc.rs
+46 −11 app/src/commands/service.rs
+20 −1 app/src/enclave.rs
+11 −1 enclave-modules/ecall-handler/src/light_client/init_client.rs
+3 −1 enclave-modules/ecall-handler/src/light_client/update_client.rs
+1 −1 enclave-modules/host-api/src/api.rs
+1 −1 enclave/Enclave.config.xml
+5 −2 modules/enclave-api/src/api.rs
+187 −4 modules/enclave-api/src/api/command.rs
+78 −15 modules/enclave-api/src/api/primitive.rs
+264 −5 modules/enclave-api/src/enclave.rs
+5 −1 modules/enclave-api/src/lib.rs
+2 −0 modules/enclave-api/src/memory.rs
+2 −0 modules/enclave-api/src/rocksdb.rs
+0 −1 modules/light-client/Cargo.toml
+31 −17 modules/light-client/src/context.rs
+0 −1 modules/light-client/src/lib.rs
+0 −40 modules/light-client/src/path.rs
+10 −0 modules/service/Cargo.toml
+100 −0 modules/service/src/client_lock.rs
+149 −14 modules/service/src/elc.rs
+11 −1 modules/service/src/lib.rs
+67 −7 modules/service/src/service.rs
+15 −0 modules/service/src/speculative/mod.rs
+93 −0 modules/service/src/speculative/permit.rs
+291 −0 modules/service/src/speculative/scheduler.rs
+1,385 −0 modules/service/src/speculative/service.rs
+875 −0 modules/service/src/speculative/stream.rs
+123 −0 modules/service/src/speculative/types.rs
+127 −0 modules/service/src/speculative/validation.rs
+4 −0 modules/store/src/lib.rs
+132 −17 modules/store/src/memory.rs
+101 −0 modules/store/src/overlay.rs
+155 −8 modules/store/src/rocksdb.rs
+15 −1 modules/store/src/transaction.rs
+6 −0 modules/types/src/lib.rs
+69 −0 modules/types/src/store_key.rs
+109 −0 proto/definitions/lcp/service/elc/v1/tx.proto
+337 −267 proto/src/prost/lcp.service.elc.v1.rs
+1 −1 tests/integration/src/lib.rs
10 changes: 10 additions & 0 deletions proto/relayer/provers/lcp/config/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ message ProverConfig {
// if empty (default), local implementation will be used
// if specified, SetupHeadersForUpdate will use this gRPC server instead
string elc_updater_grpc_address = 34;

// Max speculative UpdateClient units per request.
// Zero uses the relayer default. Values above the current LCP service
// protocol limit are rejected by config validation.
uint32 max_speculative_batch_units_per_request = 35;

// Enable the explicit-state UpdateClient path for this prover.
// Disabled by default so upgrades keep using the legacy serial path unless
// this experimental path is explicitly enabled.
bool enable_explicit_state_update_client = 36;
}

message Fraction {
Expand Down
22 changes: 21 additions & 1 deletion relay/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@ const (
DefaultDialTimeout = 20 // seconds
DefaultMessageAggregationBatchSize = 8
// It is necessary to subtract from 4 MB to account for metadata size.
DefaultMaxChunkSize = 4*1024*1024 - 1024
DefaultMaxChunkSize = 4*1024*1024 - 1024
MaxSpeculativeBatchHeaderChunkSize = DefaultMaxChunkSize
// MaxSpeculativeBatchUnitsLimit is the peer LCP service protocol limit, not
// just a relayer default. Keep it in sync with LCP's
// MAX_SPECULATIVE_BATCH_UNITS and raise both sides together before allowing
// larger requests.
MaxSpeculativeBatchUnitsLimit = 256
DefaultMaxSpeculativeBatchUnits = 64
)

var _ core.ProverConfig = (*ProverConfig)(nil)
Expand Down Expand Up @@ -100,6 +107,13 @@ func (pc ProverConfig) GetMaxChunkSizeForUpdateClient() uint32 {
}
}

func (pc ProverConfig) GetMaxSpeculativeBatchUnitsPerRequest() int {
if pc.MaxSpeculativeBatchUnitsPerRequest == 0 {
return DefaultMaxSpeculativeBatchUnits
}
return int(pc.MaxSpeculativeBatchUnitsPerRequest)
}

func (pc ProverConfig) Validate() error {
// origin prover config validation
if err := pc.OriginProver.GetCachedValue().(core.ProverConfig).Validate(); err != nil {
Expand All @@ -117,6 +131,12 @@ func (pc ProverConfig) Validate() error {
if pc.MessageAggregation && pc.MessageAggregationBatchSize == 1 {
return fmt.Errorf("MessageAggregationBatchSize must be greater than 1 if MessageAggregation is true and MessageAggregationBatchSize is set")
}
if pc.EnableExplicitStateUpdateClient && pc.MaxChunkSizeForUpdateClient > MaxSpeculativeBatchHeaderChunkSize {
return fmt.Errorf("MaxChunkSizeForUpdateClient must be less than or equal to %d", MaxSpeculativeBatchHeaderChunkSize)
}
if pc.MaxSpeculativeBatchUnitsPerRequest > MaxSpeculativeBatchUnitsLimit {
return fmt.Errorf("MaxSpeculativeBatchUnitsPerRequest must be less than or equal to %d", MaxSpeculativeBatchUnitsLimit)
}
if pc.KeyUpdateBufferTime == 0 {
return fmt.Errorf("KeyUpdateBufferTime must be greater than 0")
}
Expand Down
68 changes: 68 additions & 0 deletions relay/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading