mirror of
https://github.com/tendermint/tendermint.git
synced 2026-07-29 03:22:51 +00:00
Add more comments about the hard-coded limits (#4100)
* crypto: expose MaxAunts for documentation purposes * types: update godoc for new maxes * docs: make hard-coded limits more explicit * wal: add todo to clarify max size * shorten lines in test
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ const (
|
||||
// BlockPartSizeBytes is the size of one block part.
|
||||
BlockPartSizeBytes = 65536 // 64kB
|
||||
|
||||
// MaxBlockPartsCount is the maximum count of block parts.
|
||||
// MaxBlockPartsCount is the maximum number of block parts.
|
||||
MaxBlockPartsCount = (MaxBlockSizeBytes / BlockPartSizeBytes) + 1
|
||||
)
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ type ValidatorSet struct {
|
||||
// the new ValidatorSet will have an empty list of Validators.
|
||||
// The addresses of validators in `valz` must be unique otherwise the
|
||||
// function panics.
|
||||
// Note the validator set size has an implied limit equal to that of the MaxVotesCount -
|
||||
// commits by a validator set larger than this will fail validation.
|
||||
func NewValidatorSet(valz []*Validator) *ValidatorSet {
|
||||
vals := &ValidatorSet{}
|
||||
err := vals.updateWithChangeSet(valz, false)
|
||||
|
||||
+3
-2
@@ -12,8 +12,9 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
// MaxVotesCount is the maximum votes count. Used in ValidateBasic funcs for
|
||||
// protection against DOS attacks.
|
||||
// MaxVotesCount is the maximum number of votes in a set. Used in ValidateBasic funcs for
|
||||
// protection against DOS attacks. Note this implies a corresponding equal limit to
|
||||
// the number of validators.
|
||||
MaxVotesCount = 10000
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user