Anton Kaliaev
8d50bb9dad
conesnsu: follow up to removing some consensus params ( #2427 )
* follow up to removing some consensus params Refs #2382
* change args type to int64 in state#makeParams
* make valsCount and evidenceCount ints again
* MaxEvidenceBytesPerBlock: include magic number in godoc
* [spec] creating a proposal
* test state#TxFilter
* panic if MaxDataBytes is less than 0
* fixes after review
* use amino#UvarintSize to calculate overhead
0c74291f3b/encoder.go (L85-L90)
* avoid cyclic imports
* you can do better Go, come on
* remove testdouble package
6 years ago
Anton Kaliaev
0e1cd88863
Remove ConsensusParams.TxSize and ConsensusParams.BlockGossip ( #2364 )
* remove ConsensusParams.TxSize and ConsensusParams.BlockGossip
Refs #2347
* block part size is now fixed
Refs #2347
* use max data size, not max bytes for tx limit
Refs #2347
6 years ago
Zach
7f6bd5c161
docs & spec: deduplicate block-structure.md ( #2331 )
6 years ago
Anton Kaliaev
166fd82b70
max-bytes PR follow-up ( #2318 )
* ReapMaxTxs: return all txs if max is negative
this mirrors ReapMaxBytes behavior
See https://github.com/tendermint/tendermint/pull/2184#discussion_r214439950
* increase MaxAminoOverheadForBlock
tested with:
```
func TestMaxAminoOverheadForBlock(t *testing.T) {
maxChainID := ""
for i := 0; i < MaxChainIDLen; i++ {
maxChainID += "𠜎"
}
h := Header{
ChainID: maxChainID,
Height: 10,
Time: time.Now().UTC(),
NumTxs: 100,
TotalTxs: 200,
LastBlockID: makeBlockID(make([]byte, 20), 300, make([]byte, 20)),
LastCommitHash: tmhash.Sum([]byte("last_commit_hash")),
DataHash: tmhash.Sum([]byte("data_hash")),
ValidatorsHash: tmhash.Sum([]byte("validators_hash")),
NextValidatorsHash: tmhash.Sum([]byte("next_validators_hash")),
ConsensusHash: tmhash.Sum([]byte("consensus_hash")),
AppHash: tmhash.Sum([]byte("app_hash")),
LastResultsHash: tmhash.Sum([]byte("last_results_hash")),
EvidenceHash: tmhash.Sum([]byte("evidence_hash")),
ProposerAddress: tmhash.Sum([]byte("proposer_address")),
}
b := Block{
Header: h,
Data: Data{Txs: makeTxs(10000, 100)},
Evidence: EvidenceData{},
LastCommit: &Commit{},
}
bz, err := cdc.MarshalBinary(b)
require.NoError(t, err)
assert.Equal(t, MaxHeaderBytes+MaxAminoOverheadForBlock-2, len(bz)-1000000-20000-1)
}
```
* fix MaxYYY constants calculation
by using math.MaxInt64
See https://github.com/tendermint/tendermint/pull/2184#discussion_r214444244
* pass mempool filter as an option
See https://github.com/tendermint/tendermint/pull/2184#discussion_r214445869
* fixes after Dev's comments
6 years ago
Zarko Milosevic
7b88172f41
Implement BFT time ( #2203 )
* Implement BFT time
* set LastValidators when creating state in state helper
for heights >= 2
6 years ago
Anton Kaliaev
02d1b03abb
update comment for MaxBlockSizeBytes
6 years ago
Anton Kaliaev
e957f322c7
be more precise in comments
6 years ago
Anton Kaliaev
0f7485690e
limit chain ID to 50 symbols max
6 years ago
Anton Kaliaev
d73c5cbdb1
reap max bytes from the mempool & check transaction size
See ADR 020: Limiting txs size inside a block docs/architecture/adr-020-block-size.md
Refs #2035
6 years ago
Anton Kaliaev
d7035abe73
change ABCI header to match Tendermint exactly
Now that Tendermint Amino will be compatible with proto3, the Header in ABCI
should exactly match the Tendermint header - they will then be encoded
identically in ABCI and in Tendermint Core.
Refs #265
6 years ago
Anton Kaliaev
bec9d5cba9
add proposer address to block's Header
Refs #1134
Validation:
- ignored in block.ValidateBasic since it's stateful information
- checked in blockExec.ValidateBlock
6 years ago
Jae Kwon
e719a93d1d
Addressed review for #1815 except those marked as 'TODO make issue'
6 years ago
Ethan Buchman
6046b99197
consensus: include evidence in proposed block parts. fixes #2050
6 years ago
ValarDragon
99e582d79a
crypto: Refactor to move files out of the top level directory
Currently the top level directory contains basically all of the code
for the crypto package. This PR moves the crypto code into submodules
in a similar manner to what `golang/x/crypto` does. This improves code
organization.
Ref discussion: https://github.com/tendermint/tendermint/pull/1966
Closes #1956
6 years ago
Anton Kaliaev
270659f03f
make Block Header and Data non-pointers
make BlockMeta Header a non-pointer
Refs #693
6 years ago
Anton Kaliaev
95980d944b
[types] add tests for Block and Commit
Refs #693
6 years ago
Zach Ramsay
44dad6d70b
Revert "detele everything"
This reverts commit d02c5d1e30
.
6 years ago
Zach Ramsay
d02c5d1e30
detele everything
6 years ago
Ethan Buchman
ec710395b7
RIPEMD160 -> SHA256
6 years ago
Ethan Buchman
d55243f0e6
fix import paths
6 years ago
Anton Kaliaev
9563927bbd
print only tx's hash and size when logging blocks
Closes #1799
6 years ago
Jae Kwon
bf0ff212b9
Refactor "lite" to handle delayed validator set changes.
Also, fix consensus liveness issue.
7 years ago
Jae Kwon
a5b7ea93c4
Delay validator set changes by 1 block.
7 years ago
Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
This reverts commit 96a3502
7 years ago
Liamsi
96a3502126
delete everything
7 years ago
Anton Kaliaev
489d9b9184
more metrics
7 years ago
Ethan Buchman
162811476a
update some comments
7 years ago
Jae Kwon
b42d5a2211
blockID -> block_id for JSON
7 years ago
Ethan Buchman
bb1b249e8a
types: lock block on MakePartSet
7 years ago
Jae Kwon
02531ca5a3
Fix race testing (cont;) Bump version to 0.19.0
7 years ago
Jae Kwon
d24e4cb821
Fix race testing
7 years ago
Jae Kwon
45ec5fd170
WIP consensus
7 years ago
Jae Kwon
1b9323f105
Fix blockchain tests
7 years ago
Ethan Buchman
39ff4d22e9
minor cleanup
7 years ago
Jae Kwon
89cdde7f1e
Fix state tests
7 years ago
Thomas Corbière
2644a529f0
Fix lint errors ( #1390 )
* use increment and decrement operators.
* remove unnecessary else branches.
* fix package comment with leading space.
* fix receiver names.
* fix error strings.
* remove omittable code.
* remove redundant return statement.
* Revert changes (code is generated.)
* use cfg as receiver name for all config-related types.
* use lsi as the receiver name for the LastSignedInfo type.
7 years ago
Jae Kwon
34974e3932
Make types use Amino; Refactor PrivValidator* to FilePV/SocketPV
7 years ago
Alex Hernandez
575a46d9d4
fix typo on block header ( #1387 )
7 years ago
Emmanuel T Odeke
8723c91db9
types: Hash invoked for nil Data and Header should not panic
Fixes https://github.com/tendermint/tendermint/issues/1298
Fixes https://github.com/tendermint/tendermint/issues/1299
Found while writing tests in https://github.com/tendermint/tendermint/pull/1300
7 years ago
Ethan Buchman
c394eef7b8
types: TestValidatorSetVerifyCommit
7 years ago
Ethan Buchman
3395f5fb0e
types: builds
7 years ago
Ethan Buchman
200787ede2
types: update for new go-wire. WriteSignBytes -> SignBytes
7 years ago
Ethan Buchman
7a5060dc52
replace data.Bytes with cmn.HexBytes
7 years ago
Ethan Buchman
4e3488c677
update types
7 years ago
Ethan Buchman
3271634e7a
types: evidence cleanup
7 years ago
Ethan Buchman
10c43c9edc
introduce evidence store
7 years ago
Ethan Buchman
7d086e9524
check if we already have evidence
7 years ago
Ethan Buchman
77e45756f2
types: Evidences for merkle hashing; Evidence.String()
7 years ago
Ethan Buchman
7928659f70
track evidence, include in block
7 years ago
Ethan Buchman
028ee58580
call it LastResultsHash
7 years ago