Ethan Buchman
dea34506fb
types/time: add note about stripping monotonic part
6 years ago
Zach
7f6bd5c161
docs & spec: deduplicate block-structure.md ( #2331 )
6 years ago
Ethan Buchman
eabb1ece8e
tmtime: Canonical, some comments ( #2312 )
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
e873fed815
calculate amino overhead on the fly
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
Ethan Buchman
6dde320591
fixes from review
6 years ago
Ethan Buchman
0701d79046
minor fixes
6 years ago
Ethan Buchman
4f61b97bbe
update dep for proto. fix types/proto3/block.proto
6 years ago
Ethan Buchman
e3f54ece2f
abci: VoteInfo, ValidatorUpdate. See ADR-018
6 years ago
Anton Kaliaev
eb98f1c3a9
add missing changelog entries ( #2224 )
6 years ago
Anton Kaliaev
80e49abada
send ValidatorSetUpdates event when validator set changes ( #2161 )
Refs #1916
6 years ago
b00f
0f931eeb10
types: allow genesis file to have 0 validators ( #2148 )
* fixing issue 2015
* Remove comments for code review
* Update tests
6 years ago
Dev Ojha
2756be5a59
libs: Remove usage of custom Fmt, in favor of fmt.Sprintf ( #2199 )
* libs: Remove usage of custom Fmt, in favor of fmt.Sprintf
Closes #2193
* Fix bug that was masked by custom Fmt!
6 years ago
Anton Kaliaev
fc7c298cc0
Remove gogoproto from Makefile's TOOLS ( #2198 )
* remove gogoproto from tools
because it's not a binary
* update protobuf version to 3.6.1 in `make get_protoc`
* update libs/common/types.pb.go and rpc/grpc/types.pb.go
* fix app tests
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
Ethan Buchman
309a6772d7
types: fix formatting when printing signatures
- use cmn.Fingerprint and %X
6 years ago
ValarDragon
f903947ff3
crypto: Remove interface from crypto.Signature
Signatures are now []byte, which saves on the number of bytes after
amino encoding
(squash this) address Ismail's comment
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
Ismail Khoffi
24ae878b9f
update encoding test to how amino skips empty pointers
6 years ago
Anton Kaliaev
0c7338c5f0
abci: Change validators to last_commit_info in RequestBeginBlock ( #2074 )
* change validators to last_commit_info in RequestBeginBlock
* do not send pubkeys with RequestBeginBlock
Refs #1856
6 years ago
Anton Kaliaev
96ae535fb8
proto3 timestamp ( #2064 )
This PR changes ABCI time format from int64 (Unix seconds) to WKT (WellKnownType) google.protobuf.Timestamp.
Refs #1857
Reasons:
better precision
standard DT for proto
* update Gopkg.lock
* [makefile] remove extra grep
- go list excludes vendor by default now
* proto3 timestamp
* [docs/abci-spec] note about serialisation format
* make time non-nullable
6 years ago
Jae Kwon
d542d2c394
Fix 0.22.7, bump to 0.22.8
6 years ago
Hendrik Hofstadt
49b52ee3c7
Add test for MakePartSet with evidence
6 years ago
Ethan Buchman
0e127562bf
register evidence interface wherever its used
6 years ago
Ethan Buchman
6046b99197
consensus: include evidence in proposed block parts. fixes #2050
6 years ago
Anton Kaliaev
60378fd7f9
abci: remove fee ( #2043 )
Refs #1861
We don't use the fee field and its likely just confusing.
We can add backwards compatible priority (instead of fee) later.
Note priority is better than fee because it lets the app do the math on how to rank order transactions, rather than forcing that into tendermint (ie. if we return fee, priority would be fee/gas)
6 years ago
Ethan Buchman
f6705f02c7
fixes post merge
6 years ago
ValarDragon
c798702764
crypto: Remove Ed25519 and Secp256k1 suffix on GenPrivKey
6 years ago
Liamsi
96818af9d5
fix protos to make all tests pass, document differences
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
Liamsi
a81ca93139
update to new (timestamp & empty structs) encoding in amino
- timestamps no longer have fixed length encoding
-
6 years ago
Liamsi
2744682e77
update to latest amino (pre) release v0.11.1
- also reformat code and order imports
6 years ago
Liamsi
d665c79cc9
WIP: more empty struct examples
7 years ago
Liamsi
3c38a25bbb
add empty struct examples
7 years ago
Liamsi
0cd82fa166
add empty struct examples
7 years ago
Liamsi
99fa7f8132
everything works with https://github.com/tendermint/go-amino/pull/178
7 years ago
Liamsi
82104c9329
almost
7 years ago
Dev Ojha
dae7dc30e0
Switch usage of math/rand to cmn's rand ( #1980 )
This commit switches all usage of math/rand to cmn's rand. The only
exceptions are within the random file itself, the tools package, and the
crypto package. In tools you don't want it to lock between the go-routines.
The crypto package doesn't use it so the crypto package have no other
dependencies within tendermint/tendermint for easier portability.
Crypto/rand usage is unadjusted.
Closes #1343
6 years ago
Ethan Buchman
d903057011
fix stopping pubsub
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
3ffda994c2
Revert "rename privval#GetAddress and GetPubKey to Address and PubKey"
This reverts commit 58d0c8de89
.
6 years ago
Anton Kaliaev
6a85aecfb7
fix linter issues
6 years ago
Anton Kaliaev
d103aaf53f
add test for Vote#Verify
remove test for String (very brittle)
6 years ago
Anton Kaliaev
17e1df0cbd
test validator set more thoroughly
Refs #693
6 years ago