Commit ec2b8a39 authored by protolambda's avatar protolambda

relax p2p propagation time, it was too close to L1 block time

parent cc4af3b8
...@@ -226,8 +226,8 @@ func BuildBlocksValidator(log log.Logger, cfg *rollup.Config) pubsub.ValidatorEx ...@@ -226,8 +226,8 @@ func BuildBlocksValidator(log log.Logger, cfg *rollup.Config) pubsub.ValidatorEx
// rounding down to seconds is fine here. // rounding down to seconds is fine here.
now := uint64(time.Now().Unix()) now := uint64(time.Now().Unix())
// [REJECT] if the `payload.timestamp` is older than 20 seconds in the past // [REJECT] if the `payload.timestamp` is older than 60 seconds in the past
if uint64(payload.Timestamp) < now-20 { if uint64(payload.Timestamp) < now-60 {
log.Warn("payload is too old", "timestamp", uint64(payload.Timestamp)) log.Warn("payload is too old", "timestamp", uint64(payload.Timestamp))
return pubsub.ValidationReject return pubsub.ValidationReject
} }
......
...@@ -276,7 +276,7 @@ An [extended-validator] checks the incoming messages as follows, in order of ope ...@@ -276,7 +276,7 @@ An [extended-validator] checks the incoming messages as follows, in order of ope
- `[REJECT]` if the compression is not valid - `[REJECT]` if the compression is not valid
- `[REJECT]` if the block encoding is not valid - `[REJECT]` if the block encoding is not valid
- `[REJECT]` if the `payload.timestamp` is older than 20 seconds in the past - `[REJECT]` if the `payload.timestamp` is older than 60 seconds in the past
(graceful boundary for worst-case propagation and clock skew) (graceful boundary for worst-case propagation and clock skew)
- `[REJECT]` if the `payload.timestamp` is more than 5 seconds into the future - `[REJECT]` if the `payload.timestamp` is more than 5 seconds into the future
- `[REJECT]` if the `block_hash` in the `payload` is not valid - `[REJECT]` if the `block_hash` in the `payload` is not valid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment