Current Behavior
Notary contract uses MaxValidUntilBlockIncrement value that is not a part of Policy, i.e. not a part of the chain's state and hence, can be changed at any time the node is being reloaded:
|
maxInc := cfg.MaxValidUntilBlockIncrement |
|
if value > maxInc/2 || value < uint32(cfg.GetNumOfCNs(ic.BlockHeight())) { |
|
panic(fmt.Errorf("MaxNotValidBeforeDelta cannot be more than %d or less than %d", maxInc/2, cfg.GetNumOfCNs(ic.BlockHeight()))) |
|
} |
It may affect setMaxNotValidBeforeDelta transaction processing whereas we need a well-reproducible state processing results that don't depend on the node's config in that way.
Moreover, it will be affected by #3745:
|
cfg.MaxValidUntilBlockIncrement = uint32(timePerDay / cfg.TimePerBlock) |
Likely, we don't have such cases in our networks, but the possibility exists.
Expected Behavior
No such dependency should exist.
Possible Solution
Set MaxValidUntilBlockIncrement to a constant or move it to Policy.
Current Behavior
Notary contract uses
MaxValidUntilBlockIncrementvalue that is not a part of Policy, i.e. not a part of the chain's state and hence, can be changed at any time the node is being reloaded:neo-go/pkg/core/native/notary.go
Lines 424 to 427 in 24a6d84
It may affect
setMaxNotValidBeforeDeltatransaction processing whereas we need a well-reproducible state processing results that don't depend on the node's config in that way.Moreover, it will be affected by #3745:
neo-go/pkg/core/blockchain.go
Line 299 in 24a6d84
Likely, we don't have such cases in our networks, but the possibility exists.
Expected Behavior
No such dependency should exist.
Possible Solution
Set MaxValidUntilBlockIncrement to a constant or move it to Policy.