diff --git a/build/params_shared_vals.go b/build/params_shared_vals.go index db0d0ea63..f00c68ed0 100644 --- a/build/params_shared_vals.go +++ b/build/params_shared_vals.go @@ -21,8 +21,7 @@ const UnixfsLinksPerLevel = 1024 // ///// // Consensus / Network -// Seconds -const AllowableClockDrift = uint64(1) +const AllowableClockDriftSecs = uint64(1) // Epochs const ForkLengthThreshold = Finality diff --git a/build/params_testground.go b/build/params_testground.go index c171da625..df03124af 100644 --- a/build/params_testground.go +++ b/build/params_testground.go @@ -27,7 +27,7 @@ var ( BlockDelaySecs = uint64(builtin.EpochDurationSeconds) PropagationDelay = uint64(6) - AllowableClockDrift = uint64(1) + AllowableClockDriftSecs = uint64(1) Finality = miner.ChainFinalityish ForkLengthThreshold = Finality diff --git a/chain/sync.go b/chain/sync.go index 6e2e68cee..e1bcdd506 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -657,7 +657,7 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) (er // fast checks first now := uint64(time.Now().Unix()) - if h.Timestamp > now+build.AllowableClockDrift { + if h.Timestamp > now+build.AllowableClockDriftSecs { return xerrors.Errorf("block was from the future (now=%d, blk=%d): %w", now, h.Timestamp, ErrTemporal) } if h.Timestamp > now { diff --git a/documentation/en/block-validation.md b/documentation/en/block-validation.md index a5ee49c30..ccd83a904 100644 --- a/documentation/en/block-validation.md +++ b/documentation/en/block-validation.md @@ -43,7 +43,7 @@ Assemble a `FullTipSet` populated with the single block received earlier. This function contains most of the validation logic grouped in separate closures that run asynchronously, this list does not reflect validation order then. `V:` Block `Timestamp`: - * Is not bigger than current time plus `AllowableClockDrift`. + * Is not bigger than current time plus `AllowableClockDriftSecs`. * Is not smaller than previous block's `Timestamp` plus `BlockDelay` (including null blocks). ### Messages