Browse Source

abci: remove TotalTxs and NumTxs from Header (#3783)

* Removal of TotalTx & NumTx

- Removed totalTx and numTx

closes #2521

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* abci proto changes

* proto number fix

* txfilter_test fix

* comments on PR

* further changes

* bring back metrics

* fix indexer

* fix TestBlockMaxDataBytes and TestBlockMaxDataBytesUnknownEvidence

* indexer service back to header

* statistics.go fix

* fix ci

* listen for blocks, not headers

to be able to record txs throughput

* fix TestNetworkNewBlock

* fix tests

* fix tests in types package

* fixes after Anton's review

* fix tests

* bring back `consensus_total_txs` metric

I mistakenly thought it was removed.

* improve changelog

* remove LastBlockTotalTx from state

* docs: remove getNumTxs from BeginBlock Java example
pull/4139/head
Marko 5 years ago
committed by Anton Kaliaev
parent
commit
1604047c39
37 changed files with 327 additions and 534 deletions
  1. +4
    -0
      CHANGELOG_PENDING.md
  2. +2
    -1
      abci/types/messages_test.go
  3. +177
    -265
      abci/types/types.pb.go
  4. +10
    -12
      abci/types/types.proto
  5. +1
    -1
      consensus/mempool_test.go
  6. +7
    -5
      consensus/state.go
  7. +0
    -1
      docs/app-dev/app-development.md
  8. +0
    -3
      docs/spec/abci/abci.md
  9. +1
    -22
      docs/spec/blockchain/blockchain.md
  10. +1
    -1
      docs/tendermint-core/metrics.md
  11. +3
    -5
      lite/helpers.go
  12. +0
    -16
      rpc/swagger/swagger.yaml
  13. +2
    -2
      state/execution.go
  14. +7
    -9
      state/state.go
  15. +2
    -2
      state/store.go
  16. +4
    -4
      state/tx_filter_test.go
  17. +7
    -6
      state/txindex/indexer_service.go
  18. +2
    -1
      state/txindex/indexer_service_test.go
  19. +0
    -8
      state/validation.go
  20. +0
    -2
      state/validation_test.go
  21. +0
    -1
      store/store_test.go
  22. +2
    -2
      tools/tm-bench/statistics.go
  23. +2
    -2
      tools/tm-monitor/monitor/monitor.go
  24. +2
    -2
      tools/tm-monitor/monitor/network.go
  25. +3
    -1
      tools/tm-monitor/monitor/network_test.go
  26. +5
    -5
      tools/tm-monitor/monitor/node.go
  27. +4
    -4
      tools/tm-monitor/monitor/node_test.go
  28. +6
    -31
      types/block.go
  29. +6
    -4
      types/block_meta.go
  30. +8
    -17
      types/block_test.go
  31. +1
    -0
      types/events.go
  32. +42
    -60
      types/proto3/block.pb.go
  33. +10
    -12
      types/proto3/block.proto
  34. +0
    -8
      types/proto3_test.go
  35. +3
    -5
      types/protobuf.go
  36. +3
    -13
      types/protobuf_test.go
  37. +0
    -1
      types/test_util.go

+ 4
- 0
CHANGELOG_PENDING.md View File

@ -32,6 +32,9 @@ program](https://hackerone.com/tendermint).
- Go API
- [libs/pubsub] [\#4070](https://github.com/tendermint/tendermint/pull/4070) `Query#(Matches|Conditions)` returns an error.
- Blockchain Protocol
- [abci] \#2521 Remove `TotalTxs` and `NumTxs` from `Header`
- P2P Protocol
- [p2p] [\3668](https://github.com/tendermint/tendermint/pull/3668) Make `SecretConnection` non-malleable
@ -48,6 +51,7 @@ program](https://hackerone.com/tendermint).
- [rpc] [\#4077](https://github.com/tendermint/tendermint/pull/4077) Added support for `EXISTS` clause to the Websocket query interface.
- [privval] Add `SignerDialerEndpointRetryWaitInterval` option (@cosmostuba)
- [crypto] Add `RegisterKeyType` to amino to allow external key types registration (@austinabell)
- [types] \#2521 Add `NumTxs` to `BlockMeta` and `EventDataNewBlockHeader`
### BUG FIXES:


+ 2
- 1
abci/types/messages_test.go View File

@ -62,7 +62,8 @@ func TestWriteReadMessageSimple(t *testing.T) {
func TestWriteReadMessage(t *testing.T) {
cases := []proto.Message{
&Header{
NumTxs: 4,
Height: 4,
ChainID: "test",
},
// TODO: add the rest
}


+ 177
- 265
abci/types/types.pb.go View File

@ -2241,26 +2241,24 @@ func (m *Event) GetAttributes() []common.KVPair {
type Header struct {
// basic block info
Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
NumTxs int64 `protobuf:"varint,5,opt,name=num_txs,json=numTxs,proto3" json:"num_txs,omitempty"`
TotalTxs int64 `protobuf:"varint,6,opt,name=total_txs,json=totalTxs,proto3" json:"total_txs,omitempty"`
Version Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
Time time.Time `protobuf:"bytes,4,opt,name=time,proto3,stdtime" json:"time"`
// prev block info
LastBlockId BlockID `protobuf:"bytes,7,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
LastBlockId BlockID `protobuf:"bytes,5,opt,name=last_block_id,json=lastBlockId,proto3" json:"last_block_id"`
// hashes of block data
LastCommitHash []byte `protobuf:"bytes,8,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
DataHash []byte `protobuf:"bytes,9,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
LastCommitHash []byte `protobuf:"bytes,6,opt,name=last_commit_hash,json=lastCommitHash,proto3" json:"last_commit_hash,omitempty"`
DataHash []byte `protobuf:"bytes,7,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`
// hashes from the app output from the prev block
ValidatorsHash []byte `protobuf:"bytes,10,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
NextValidatorsHash []byte `protobuf:"bytes,11,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
ConsensusHash []byte `protobuf:"bytes,12,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
AppHash []byte `protobuf:"bytes,13,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
LastResultsHash []byte `protobuf:"bytes,14,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
ValidatorsHash []byte `protobuf:"bytes,8,opt,name=validators_hash,json=validatorsHash,proto3" json:"validators_hash,omitempty"`
NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=next_validators_hash,json=nextValidatorsHash,proto3" json:"next_validators_hash,omitempty"`
ConsensusHash []byte `protobuf:"bytes,10,opt,name=consensus_hash,json=consensusHash,proto3" json:"consensus_hash,omitempty"`
AppHash []byte `protobuf:"bytes,11,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"`
LastResultsHash []byte `protobuf:"bytes,12,opt,name=last_results_hash,json=lastResultsHash,proto3" json:"last_results_hash,omitempty"`
// consensus info
EvidenceHash []byte `protobuf:"bytes,15,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
ProposerAddress []byte `protobuf:"bytes,16,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
EvidenceHash []byte `protobuf:"bytes,13,opt,name=evidence_hash,json=evidenceHash,proto3" json:"evidence_hash,omitempty"`
ProposerAddress []byte `protobuf:"bytes,14,opt,name=proposer_address,json=proposerAddress,proto3" json:"proposer_address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -2327,20 +2325,6 @@ func (m *Header) GetTime() time.Time {
return time.Time{}
}
func (m *Header) GetNumTxs() int64 {
if m != nil {
return m.NumTxs
}
return 0
}
func (m *Header) GetTotalTxs() int64 {
if m != nil {
return m.TotalTxs
}
return 0
}
func (m *Header) GetLastBlockId() BlockID {
if m != nil {
return m.LastBlockId
@ -2968,150 +2952,148 @@ func init() { proto.RegisterFile("abci/types/types.proto", fileDescriptor_9f1eaa
func init() { golang_proto.RegisterFile("abci/types/types.proto", fileDescriptor_9f1eaa49c51fa1ac) }
var fileDescriptor_9f1eaa49c51fa1ac = []byte{
// 2279 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 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x30,
0x8f, 0x6c, 0x7d, 0x8a, 0x9e, 0xb2, 0x7b, 0x85, 0xef, 0x0c, 0xe4, 0x2e, 0xac, 0xab, 0x72, 0xa8,
0xf0, 0xbd, 0xb7, 0x57, 0xdc, 0x88, 0x0b, 0x25, 0x93, 0xe6, 0x6f, 0xd5, 0x73, 0x7b, 0x6f, 0xe5,
0x83, 0x08, 0x39, 0x04, 0x48, 0x75, 0x30, 0x2b, 0xdf, 0xd1, 0x7b, 0xab, 0x1f, 0x3a, 0xc8, 0x7d,
0xa8, 0x27, 0x8f, 0x57, 0xc5, 0xef, 0xdb, 0xbd, 0x55, 0x6f, 0x0f, 0x83, 0x1b, 0xff, 0xfa, 0xcb,
0x96, 0xf6, 0x9b, 0xf3, 0x2d, 0xed, 0x8b, 0xf3, 0x2d, 0xed, 0xcb, 0xf3, 0x2d, 0xed, 0x0f, 0xe7,
0x5b, 0xda, 0x9f, 0xcf, 0xb7, 0xb4, 0xdf, 0xfe, 0x75, 0x4b, 0x1b, 0xae, 0x63, 0x8c, 0x7c, 0xf0,
0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, 0x10, 0x0d, 0x97, 0x09, 0x1a, 0x00, 0x00,
}
func (this *Request) Equal(that interface{}) bool {
@ -4742,12 +4724,6 @@ func (this *Header) Equal(that interface{}) bool {
if !this.Time.Equal(that1.Time) {
return false
}
if this.NumTxs != that1.NumTxs {
return false
}
if this.TotalTxs != that1.TotalTxs {
return false
}
if !this.LastBlockId.Equal(&that1.LastBlockId) {
return false
}
@ -7426,65 +7402,63 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
copy(dAtA[i:], m.ProposerAddress)
i = encodeVarintTypes(dAtA, i, uint64(len(m.ProposerAddress)))
i--
dAtA[i] = 0x1
i--
dAtA[i] = 0x82
dAtA[i] = 0x72
}
if len(m.EvidenceHash) > 0 {
i -= len(m.EvidenceHash)
copy(dAtA[i:], m.EvidenceHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.EvidenceHash)))
i--
dAtA[i] = 0x7a
dAtA[i] = 0x6a
}
if len(m.LastResultsHash) > 0 {
i -= len(m.LastResultsHash)
copy(dAtA[i:], m.LastResultsHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.LastResultsHash)))
i--
dAtA[i] = 0x72
dAtA[i] = 0x62
}
if len(m.AppHash) > 0 {
i -= len(m.AppHash)
copy(dAtA[i:], m.AppHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.AppHash)))
i--
dAtA[i] = 0x6a
dAtA[i] = 0x5a
}
if len(m.ConsensusHash) > 0 {
i -= len(m.ConsensusHash)
copy(dAtA[i:], m.ConsensusHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.ConsensusHash)))
i--
dAtA[i] = 0x62
dAtA[i] = 0x52
}
if len(m.NextValidatorsHash) > 0 {
i -= len(m.NextValidatorsHash)
copy(dAtA[i:], m.NextValidatorsHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.NextValidatorsHash)))
i--
dAtA[i] = 0x5a
dAtA[i] = 0x4a
}
if len(m.ValidatorsHash) > 0 {
i -= len(m.ValidatorsHash)
copy(dAtA[i:], m.ValidatorsHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.ValidatorsHash)))
i--
dAtA[i] = 0x52
dAtA[i] = 0x42
}
if len(m.DataHash) > 0 {
i -= len(m.DataHash)
copy(dAtA[i:], m.DataHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.DataHash)))
i--
dAtA[i] = 0x4a
dAtA[i] = 0x3a
}
if len(m.LastCommitHash) > 0 {
i -= len(m.LastCommitHash)
copy(dAtA[i:], m.LastCommitHash)
i = encodeVarintTypes(dAtA, i, uint64(len(m.LastCommitHash)))
i--
dAtA[i] = 0x42
dAtA[i] = 0x32
}
{
size, err := m.LastBlockId.MarshalToSizedBuffer(dAtA[:i])
@ -7495,17 +7469,7 @@ func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintTypes(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x3a
if m.TotalTxs != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.TotalTxs))
i--
dAtA[i] = 0x30
}
if m.NumTxs != 0 {
i = encodeVarintTypes(dAtA, i, uint64(m.NumTxs))
i--
dAtA[i] = 0x28
}
dAtA[i] = 0x2a
n35, err35 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Time, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Time):])
if err35 != nil {
return 0, err35
@ -8577,14 +8541,6 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header {
}
v37 := github_com_gogo_protobuf_types.NewPopulatedStdTime(r, easy)
this.Time = *v37
this.NumTxs = int64(r.Int63())
if r.Intn(2) == 0 {
this.NumTxs *= -1
}
this.TotalTxs = int64(r.Int63())
if r.Intn(2) == 0 {
this.TotalTxs *= -1
}
v38 := NewPopulatedBlockID(r, easy)
this.LastBlockId = *v38
v39 := r.Intn(100)
@ -8633,7 +8589,7 @@ func NewPopulatedHeader(r randyTypes, easy bool) *Header {
this.ProposerAddress[i] = byte(r.Intn(256))
}
if !easy && r.Intn(10) != 0 {
this.XXX_unrecognized = randUnrecognizedTypes(r, 17)
this.XXX_unrecognized = randUnrecognizedTypes(r, 15)
}
return this
}
@ -9798,12 +9754,6 @@ func (m *Header) Size() (n int) {
}
l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Time)
n += 1 + l + sovTypes(uint64(l))
if m.NumTxs != 0 {
n += 1 + sovTypes(uint64(m.NumTxs))
}
if m.TotalTxs != 0 {
n += 1 + sovTypes(uint64(m.TotalTxs))
}
l = m.LastBlockId.Size()
n += 1 + l + sovTypes(uint64(l))
l = len(m.LastCommitHash)
@ -9840,7 +9790,7 @@ func (m *Header) Size() (n int) {
}
l = len(m.ProposerAddress)
if l > 0 {
n += 2 + l + sovTypes(uint64(l))
n += 1 + l + sovTypes(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
@ -14854,44 +14804,6 @@ func (m *Header) Unmarshal(dAtA []byte) error {
}
iNdEx = postIndex
case 5:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field NumTxs", wireType)
}
m.NumTxs = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.NumTxs |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 6:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field TotalTxs", wireType)
}
m.TotalTxs = 0
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTypes
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
m.TotalTxs |= int64(b&0x7F) << shift
if b < 0x80 {
break
}
}
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastBlockId", wireType)
}
@ -14924,7 +14836,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
case 8:
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastCommitHash", wireType)
}
@ -14958,7 +14870,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.LastCommitHash = []byte{}
}
iNdEx = postIndex
case 9:
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field DataHash", wireType)
}
@ -14992,7 +14904,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.DataHash = []byte{}
}
iNdEx = postIndex
case 10:
case 8:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ValidatorsHash", wireType)
}
@ -15026,7 +14938,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.ValidatorsHash = []byte{}
}
iNdEx = postIndex
case 11:
case 9:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field NextValidatorsHash", wireType)
}
@ -15060,7 +14972,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.NextValidatorsHash = []byte{}
}
iNdEx = postIndex
case 12:
case 10:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ConsensusHash", wireType)
}
@ -15094,7 +15006,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.ConsensusHash = []byte{}
}
iNdEx = postIndex
case 13:
case 11:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType)
}
@ -15128,7 +15040,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.AppHash = []byte{}
}
iNdEx = postIndex
case 14:
case 12:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field LastResultsHash", wireType)
}
@ -15162,7 +15074,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.LastResultsHash = []byte{}
}
iNdEx = postIndex
case 15:
case 13:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field EvidenceHash", wireType)
}
@ -15196,7 +15108,7 @@ func (m *Header) Unmarshal(dAtA []byte) error {
m.EvidenceHash = []byte{}
}
iNdEx = postIndex
case 16:
case 14:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ProposerAddress", wireType)
}


+ 10
- 12
abci/types/types.proto View File

@ -256,26 +256,24 @@ message Header {
string chain_id = 2 [(gogoproto.customname)="ChainID"];
int64 height = 3;
google.protobuf.Timestamp time = 4 [(gogoproto.nullable)=false, (gogoproto.stdtime)=true];
int64 num_txs = 5;
int64 total_txs = 6;
// prev block info
BlockID last_block_id = 7 [(gogoproto.nullable)=false];
BlockID last_block_id = 5 [(gogoproto.nullable)=false];
// hashes of block data
bytes last_commit_hash = 8; // commit from validators from the last block
bytes data_hash = 9; // transactions
bytes last_commit_hash = 6; // commit from validators from the last block
bytes data_hash = 7; // transactions
// hashes from the app output from the prev block
bytes validators_hash = 10; // validators for the current block
bytes next_validators_hash = 11; // validators for the next block
bytes consensus_hash = 12; // consensus params for current block
bytes app_hash = 13; // state after txs from the previous block
bytes last_results_hash = 14;// root hash of all results from the txs from the previous block
bytes validators_hash = 8; // validators for the current block
bytes next_validators_hash = 9; // validators for the next block
bytes consensus_hash = 10; // consensus params for current block
bytes app_hash = 11; // state after txs from the previous block
bytes last_results_hash = 12;// root hash of all results from the txs from the previous block
// consensus info
bytes evidence_hash = 15; // evidence included in the block
bytes proposer_address = 16; // original proposer of the block
bytes evidence_hash = 13; // evidence included in the block
bytes proposer_address = 14; // original proposer of the block
}
message Version {


+ 1
- 1
consensus/mempool_test.go View File

@ -123,7 +123,7 @@ func TestMempoolTxConcurrentWithCommit(t *testing.T) {
select {
case msg := <-newBlockCh:
blockEvent := msg.Data().(types.EventDataNewBlock)
nTxs += int(blockEvent.Block.Header.NumTxs)
nTxs += len(blockEvent.Block.Txs)
case <-ticker.C:
panic("Timed out waiting to commit blocks with transactions")
}


+ 7
- 5
consensus/state.go View File

@ -1376,8 +1376,11 @@ func (cs *ConsensusState) finalizeCommit(height int64) {
panic(fmt.Sprintf("+2/3 committed an invalid block: %v", err))
}
cs.Logger.Info(fmt.Sprintf("Finalizing commit of block with %d txs", block.NumTxs),
"height", block.Height, "hash", block.Hash(), "root", block.AppHash)
cs.Logger.Info("Finalizing commit of block with N txs",
"height", block.Height,
"hash", block.Hash(),
"root", block.AppHash,
"N", len(block.Txs))
cs.Logger.Info(fmt.Sprintf("%v", block))
fail.Fail() // XXX
@ -1488,11 +1491,10 @@ func (cs *ConsensusState) recordMetrics(height int64, block *types.Block) {
)
}
cs.metrics.NumTxs.Set(float64(block.NumTxs))
cs.metrics.NumTxs.Set(float64(len(block.Data.Txs)))
cs.metrics.TotalTxs.Add(float64(len(block.Data.Txs)))
cs.metrics.BlockSizeBytes.Set(float64(block.Size()))
cs.metrics.TotalTxs.Set(float64(block.TotalTxs))
cs.metrics.CommittedHeight.Set(float64(block.Height))
}
//-----------------------------------------------------------------------------


+ 0
- 1
docs/app-dev/app-development.md View File

@ -298,7 +298,6 @@ ResponseBeginBlock requestBeginBlock(RequestBeginBlock req) {
Header header = req.getHeader();
byte[] prevAppHash = header.getAppHash().toByteArray();
long prevHeight = header.getHeight();
long numTxs = header.getNumTxs();
// run your pre-block logic. Maybe prepare a state snapshot, message components, etc


+ 0
- 3
docs/spec/abci/abci.md View File

@ -393,9 +393,6 @@ Commit are included in the header of the next block.
For heights > 1, it's the weighted median of the timestamps of the valid
votes in the block.LastCommit.
For height == 1, it's genesis time.
- `NumTxs (int32)`: Number of transactions in the block
- `TotalTxs (int64)`: Total number of transactions in the blockchain until
now
- `LastBlockID (BlockID)`: Hash of the previous (parent) block
- `LastCommitHash ([]byte)`: Hash of the previous block's commit
- `ValidatorsHash ([]byte)`: Hash of the validator set for this block


+ 1
- 22
docs/spec/blockchain/blockchain.md View File

@ -29,7 +29,7 @@ type Block struct {
}
```
Note the `LastCommit` is the set of votes that committed the last block.
Note the `LastCommit` is the set of votes that committed the last block.
## Header
@ -43,8 +43,6 @@ type Header struct {
ChainID string
Height int64
Time Time
NumTxs int64
TotalTxs int64
// prev block info
LastBlockID BlockID
@ -79,7 +77,6 @@ type Version struct {
}
```
## BlockID
The `BlockID` contains two distinct Merkle roots of the block.
@ -265,24 +262,6 @@ if block.Header.Height == 1 {
See the section on [BFT time](../consensus/bft-time.md) for more details.
### NumTxs
```go
block.Header.NumTxs == len(block.Txs.Txs)
```
Number of transactions included in the block.
### TotalTxs
```go
block.Header.TotalTxs == prevBlock.Header.TotalTxs + block.Header.NumTxs
```
The cumulative sum of all transactions included in this blockchain.
The first block has `block.Header.TotalTxs = block.Header.NumberTxs`.
### LastBlockID
LastBlockID is the previous block's BlockID:


+ 1
- 1
docs/tendermint-core/metrics.md View File

@ -30,10 +30,10 @@ The following metrics are available:
| consensus\_block\_interval\_seconds | Histogram | 0.21.0 | | Time between this and last block (Block.Header.Time) in seconds |
| consensus\_rounds | Gauge | 0.21.0 | | Number of rounds |
| consensus\_num\_txs | Gauge | 0.21.0 | | Number of transactions |
| consensus\_total\_txs | Gauge | 0.21.0 | | Total number of transactions committed |
| consensus\_block\_parts | counter | on dev | peer\_id | number of blockparts transmitted by peer |
| consensus\_latest\_block\_height | gauge | on dev | | /status sync\_info number |
| consensus\_fast\_syncing | gauge | on dev | | either 0 (not fast syncing) or 1 (syncing) |
| consensus\_total\_txs | Gauge | 0.21.0 | | Total number of transactions committed |
| consensus\_block\_size\_bytes | Gauge | 0.21.0 | | Block size in bytes |
| p2p\_peers | Gauge | 0.21.0 | | Number of peers node's connected to |
| p2p\_peer\_receive\_bytes\_total | counter | on dev | peer\_id, chID | number of bytes per channel received from a given peer |


+ 3
- 5
lite/helpers.go View File

@ -112,11 +112,9 @@ func genHeader(chainID string, height int64, txs types.Txs,
valset, nextValset *types.ValidatorSet, appHash, consHash, resHash []byte) *types.Header {
return &types.Header{
ChainID: chainID,
Height: height,
Time: tmtime.Now(),
NumTxs: int64(len(txs)),
TotalTxs: int64(len(txs)),
ChainID: chainID,
Height: height,
Time: tmtime.Now(),
// LastBlockID
// LastCommitHash
ValidatorsHash: valset.Hash(),


+ 0
- 16
rpc/swagger/swagger.yaml View File

@ -1168,8 +1168,6 @@ definitions:
- "chain_id"
- "height"
- "time"
- "num_txs"
- "total_txs"
- "last_block_id"
- "last_commit_hash"
- "data_hash"
@ -1202,12 +1200,6 @@ definitions:
time:
type: string
x-example: "2019-04-22T17:01:51.701356223Z"
num_txs:
type: string
x-example: "2"
total_txs:
type: string
x-example: "3"
last_block_id:
$ref: "#/definitions/BlockID"
last_commit_hash:
@ -1596,8 +1588,6 @@ definitions:
- "chain_id"
- "height"
- "time"
- "num_txs"
- "total_txs"
- "last_block_id"
- "last_commit_hash"
- "data_hash"
@ -1630,12 +1620,6 @@ definitions:
time:
type: "string"
example: "2019-04-22T17:01:51.701356223Z"
num_txs:
type: "string"
example: "2"
total_txs:
type: "string"
example: "3"
last_block_id:
required:
- "hash"


+ 2
- 2
state/execution.go View File

@ -222,7 +222,7 @@ func (blockExec *BlockExecutor) Commit(
blockExec.logger.Info(
"Committed state",
"height", block.Height,
"txs", block.NumTxs,
"txs", len(block.Txs),
"appHash", fmt.Sprintf("%X", res.Data),
)
@ -435,7 +435,6 @@ func updateState(
Version: nextVersion,
ChainID: state.ChainID,
LastBlockHeight: header.Height,
LastBlockTotalTx: state.LastBlockTotalTx + header.NumTxs,
LastBlockID: blockID,
LastBlockTime: header.Time,
NextValidators: nValSet,
@ -466,6 +465,7 @@ func fireEvents(
})
eventBus.PublishEventNewBlockHeader(types.EventDataNewBlockHeader{
Header: block.Header,
NumTxs: int64(len(block.Txs)),
ResultBeginBlock: *abciResponses.BeginBlock,
ResultEndBlock: *abciResponses.EndBlock,
})


+ 7
- 9
state/state.go View File

@ -55,10 +55,9 @@ type State struct {
ChainID string
// LastBlockHeight=0 at genesis (ie. block(H=0) does not exist)
LastBlockHeight int64
LastBlockTotalTx int64
LastBlockID types.BlockID
LastBlockTime time.Time
LastBlockHeight int64
LastBlockID types.BlockID
LastBlockTime time.Time
// LastValidators is used to validate block.LastCommit.
// Validators are persisted to the database separately every time they change,
@ -89,10 +88,9 @@ func (state State) Copy() State {
Version: state.Version,
ChainID: state.ChainID,
LastBlockHeight: state.LastBlockHeight,
LastBlockTotalTx: state.LastBlockTotalTx,
LastBlockID: state.LastBlockID,
LastBlockTime: state.LastBlockTime,
LastBlockHeight: state.LastBlockHeight,
LastBlockID: state.LastBlockID,
LastBlockTime: state.LastBlockTime,
NextValidators: state.NextValidators.Copy(),
Validators: state.Validators.Copy(),
@ -152,7 +150,7 @@ func (state State) MakeBlock(
// Fill rest of header with state data.
block.Header.Populate(
state.Version.Consensus, state.ChainID,
timestamp, state.LastBlockID, state.LastBlockTotalTx+block.NumTxs,
timestamp, state.LastBlockID,
state.Validators.Hash(), state.NextValidators.Hash(),
state.ConsensusParams.Hash(), state.AppHash, state.LastResultsHash,
proposerAddress,


+ 2
- 2
state/store.go View File

@ -122,8 +122,8 @@ type ABCIResponses struct {
// NewABCIResponses returns a new ABCIResponses
func NewABCIResponses(block *types.Block) *ABCIResponses {
resDeliverTxs := make([]*abci.ResponseDeliverTx, block.NumTxs)
if block.NumTxs == 0 {
resDeliverTxs := make([]*abci.ResponseDeliverTx, len(block.Data.Txs))
if len(block.Data.Txs) == 0 {
// This makes Amino encoding/decoding consistent.
resDeliverTxs = nil
}


+ 4
- 4
state/tx_filter_test.go View File

@ -24,10 +24,10 @@ func TestTxFilter(t *testing.T) {
isErr bool
}{
{types.Tx(cmn.RandBytes(250)), false},
{types.Tx(cmn.RandBytes(1809)), false},
{types.Tx(cmn.RandBytes(1810)), false},
{types.Tx(cmn.RandBytes(1811)), true},
{types.Tx(cmn.RandBytes(1812)), true},
{types.Tx(cmn.RandBytes(1811)), false},
{types.Tx(cmn.RandBytes(1831)), false},
{types.Tx(cmn.RandBytes(1838)), true},
{types.Tx(cmn.RandBytes(1839)), true},
{types.Tx(cmn.RandBytes(3000)), true},
}


+ 7
- 6
state/txindex/indexer_service.go View File

@ -51,22 +51,23 @@ func (is *IndexerService) OnStart() error {
go func() {
for {
msg := <-blockHeadersSub.Out()
header := msg.Data().(types.EventDataNewBlockHeader).Header
batch := NewBatch(header.NumTxs)
for i := int64(0); i < header.NumTxs; i++ {
eventDataHeader := msg.Data().(types.EventDataNewBlockHeader)
height := eventDataHeader.Header.Height
batch := NewBatch(eventDataHeader.NumTxs)
for i := int64(0); i < eventDataHeader.NumTxs; i++ {
msg2 := <-txsSub.Out()
txResult := msg2.Data().(types.EventDataTx).TxResult
if err = batch.Add(&txResult); err != nil {
is.Logger.Error("Can't add tx to batch",
"height", header.Height,
"height", height,
"index", txResult.Index,
"err", err)
}
}
if err = is.idr.AddBatch(batch); err != nil {
is.Logger.Error("Failed to index block", "height", header.Height, "err", err)
is.Logger.Error("Failed to index block", "height", height, "err", err)
} else {
is.Logger.Info("Indexed block", "height", header.Height)
is.Logger.Info("Indexed block", "height", height)
}
}
}()


+ 2
- 1
state/txindex/indexer_service_test.go View File

@ -35,7 +35,8 @@ func TestIndexerServiceIndexesBlocks(t *testing.T) {
// publish block with txs
eventBus.PublishEventNewBlockHeader(types.EventDataNewBlockHeader{
Header: types.Header{Height: 1, NumTxs: 2},
Header: types.Header{Height: 1},
NumTxs: int64(2),
})
txResult1 := &types.TxResult{
Height: 1,


+ 0
- 8
state/validation.go View File

@ -47,14 +47,6 @@ func validateBlock(evidencePool EvidencePool, stateDB dbm.DB, state State, block
)
}
newTxs := int64(len(block.Data.Txs))
if block.TotalTxs != state.LastBlockTotalTx+newTxs {
return fmt.Errorf("Wrong Block.Header.TotalTxs. Expected %v, got %v",
state.LastBlockTotalTx+newTxs,
block.TotalTxs,
)
}
// Validate app info
if !bytes.Equal(block.AppHash, state.AppHash) {
return fmt.Errorf("Wrong Block.Header.AppHash. Expected %X, got %v",


+ 0
- 2
state/validation_test.go View File

@ -49,8 +49,6 @@ func TestValidateBlockHeader(t *testing.T) {
{"ChainID wrong", func(block *types.Block) { block.ChainID = "not-the-real-one" }},
{"Height wrong", func(block *types.Block) { block.Height += 10 }},
{"Time wrong", func(block *types.Block) { block.Time = block.Time.Add(-time.Second * 1) }},
{"NumTxs wrong", func(block *types.Block) { block.NumTxs += 10 }},
{"TotalTxs wrong", func(block *types.Block) { block.TotalTxs += 10 }},
{"LastBlockID wrong", func(block *types.Block) { block.LastBlockID.PartsHeader.Total += 10 }},
{"LastCommitHash wrong", func(block *types.Block) { block.LastCommitHash = wrongHash }},


+ 0
- 1
store/store_test.go View File

@ -155,7 +155,6 @@ func TestBlockStoreSaveLoadBlock(t *testing.T) {
header1 := types.Header{
Height: 1,
NumTxs: 100,
ChainID: "block_test",
Time: tmtime.Now(),
}


+ 2
- 2
tools/tm-bench/statistics.go View File

@ -67,8 +67,8 @@ func calculateStatistics(
numBlocksPerSec[sec]++
// increase number of txs for that second
numTxsPerSec[sec] += blockMeta.Header.NumTxs
logger.Debug(fmt.Sprintf("%d txs at block height %d", blockMeta.Header.NumTxs, blockMeta.Header.Height))
numTxsPerSec[sec] += blockMeta.NumTxs
logger.Debug(fmt.Sprintf("%d txs at block height %d", blockMeta.NumTxs, blockMeta.Header.Height))
}
for i := int64(0); i < int64(duration); i++ {


+ 2
- 2
tools/tm-monitor/monitor/monitor.go View File

@ -82,7 +82,7 @@ func (m *Monitor) Monitor(n *Node) error {
m.Nodes = append(m.Nodes, n)
m.mtx.Unlock()
blockCh := make(chan tmtypes.Header, 10)
blockCh := make(chan *tmtypes.Block, 10)
n.SendBlocksTo(blockCh)
blockLatencyCh := make(chan float64, 10)
n.SendBlockLatenciesTo(blockLatencyCh)
@ -167,7 +167,7 @@ func (m *Monitor) Stop() {
// main loop where we listen for events from the node
func (m *Monitor) listen(
nodeName string,
blockCh <-chan tmtypes.Header,
blockCh <-chan *tmtypes.Block,
blockLatencyCh <-chan float64,
disconnectCh <-chan bool,
quit <-chan struct{}) {


+ 2
- 2
tools/tm-monitor/monitor/network.go View File

@ -69,7 +69,7 @@ func NewNetwork() *Network {
}
}
func (n *Network) NewBlock(b tmtypes.Header) {
func (n *Network) NewBlock(b *tmtypes.Block) {
n.mu.Lock()
defer n.mu.Unlock()
@ -85,7 +85,7 @@ func (n *Network) NewBlock(b tmtypes.Header) {
} else {
n.AvgBlockTime = 0.0
}
n.txThroughputMeter.Mark(b.NumTxs)
n.txThroughputMeter.Mark(int64(len(b.Data.Txs)))
n.AvgTxThroughput = n.txThroughputMeter.Rate1()
}


+ 3
- 1
tools/tm-monitor/monitor/network_test.go View File

@ -13,7 +13,9 @@ import (
func TestNetworkNewBlock(t *testing.T) {
n := monitor.NewNetwork()
n.NewBlock(tmtypes.Header{Height: 5, NumTxs: 100})
n.NewBlock(&tmtypes.Block{
Header: tmtypes.Header{Height: 5},
})
assert.Equal(t, int64(5), n.Height)
assert.Equal(t, 0.0, n.AvgBlockTime)
assert.Equal(t, 0.0, n.AvgTxThroughput)


+ 5
- 5
tools/tm-monitor/monitor/node.go View File

@ -35,7 +35,7 @@ type Node struct {
// rpcClient is an client for making RPC calls to TM
rpcClient rpc_client.HTTPClient
blockCh chan<- tmtypes.Header
blockCh chan<- *tmtypes.Block
blockLatencyCh chan<- float64
disconnectCh chan<- bool
@ -83,7 +83,7 @@ func SetCheckIsValidatorInterval(d time.Duration) func(n *Node) {
}
}
func (n *Node) SendBlocksTo(ch chan<- tmtypes.Header) {
func (n *Node) SendBlocksTo(ch chan<- *tmtypes.Block) {
n.blockCh = ch
}
@ -107,7 +107,7 @@ func (n *Node) Start() error {
}
n.em.RegisterLatencyCallback(latencyCallback(n))
err := n.em.Subscribe(tmtypes.EventQueryNewBlockHeader.String(), newBlockCallback(n))
err := n.em.Subscribe(tmtypes.EventQueryNewBlock.String(), newBlockCallback(n))
if err != nil {
return err
}
@ -132,10 +132,10 @@ func (n *Node) Stop() {
// implements eventmeter.EventCallbackFunc
func newBlockCallback(n *Node) em.EventCallbackFunc {
return func(metric *em.EventMetric, data interface{}) {
block := data.(tmtypes.TMEventData).(tmtypes.EventDataNewBlockHeader).Header
block := data.(tmtypes.TMEventData).(tmtypes.EventDataNewBlock).Block
n.Height = block.Height
n.logger.Info("new block", "height", block.Height, "numTxs", block.NumTxs)
n.logger.Info("new block", "height", block.Height)
if n.blockCh != nil {
n.blockCh <- block


+ 4
- 4
tools/tm-monitor/monitor/node_test.go View File

@ -28,16 +28,16 @@ func TestNodeStartStop(t *testing.T) {
}
func TestNodeNewBlockReceived(t *testing.T) {
blockCh := make(chan tmtypes.Header, 100)
blockCh := make(chan *tmtypes.Block, 100)
n, emMock := startValidatorNode(t)
defer n.Stop()
n.SendBlocksTo(blockCh)
blockHeader := tmtypes.Header{Height: 5}
emMock.Call("eventCallback", &em.EventMetric{}, tmtypes.EventDataNewBlockHeader{Header: blockHeader})
block := &tmtypes.Block{Header: tmtypes.Header{Height: 5}}
emMock.Call("eventCallback", &em.EventMetric{}, tmtypes.EventDataNewBlock{Block: block})
assert.Equal(t, int64(5), n.Height)
assert.Equal(t, blockHeader, <-blockCh)
assert.Equal(t, block, <-blockCh)
}
func TestNodeNewBlockLatencyReceived(t *testing.T) {


+ 6
- 31
types/block.go View File

@ -18,7 +18,7 @@ import (
const (
// MaxHeaderBytes is a maximum header size (including amino overhead).
MaxHeaderBytes int64 = 653
MaxHeaderBytes int64 = 632
// MaxAminoOverheadForBlock - maximum amino overhead to encode a block (up to
// MaxBlockSizeBytes in size) not including it's parts except Data.
@ -63,22 +63,6 @@ func (b *Block) ValidateBasic() error {
// NOTE: Timestamp validation is subtle and handled elsewhere.
newTxs := int64(len(b.Data.Txs))
if b.NumTxs != newTxs {
return fmt.Errorf("Wrong Header.NumTxs. Expected %v, got %v",
newTxs,
b.NumTxs,
)
}
// TODO: fix tests so we can do this
/*if b.TotalTxs < b.NumTxs {
return fmt.Errorf("Header.TotalTxs (%d) is less than Header.NumTxs (%d)", b.TotalTxs, b.NumTxs)
}*/
if b.TotalTxs < 0 {
return errors.New("Negative Header.TotalTxs")
}
if err := b.LastBlockID.ValidateBasic(); err != nil {
return fmt.Errorf("Wrong Header.LastBlockID: %v", err)
}
@ -336,12 +320,10 @@ func MaxDataBytesUnknownEvidence(maxBytes int64, valsCount int) int64 {
// - /docs/spec/blockchain/blockchain.md
type Header struct {
// basic block info
Version version.Consensus `json:"version"`
ChainID string `json:"chain_id"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
NumTxs int64 `json:"num_txs"`
TotalTxs int64 `json:"total_txs"`
Version version.Consensus `json:"version"`
ChainID string `json:"chain_id"`
Height int64 `json:"height"`
Time time.Time `json:"time"`
// prev block info
LastBlockID BlockID `json:"last_block_id"`
@ -367,7 +349,7 @@ type Header struct {
// Call this after MakeBlock to complete the Header.
func (h *Header) Populate(
version version.Consensus, chainID string,
timestamp time.Time, lastBlockID BlockID, totalTxs int64,
timestamp time.Time, lastBlockID BlockID,
valHash, nextValHash []byte,
consensusHash, appHash, lastResultsHash []byte,
proposerAddress Address,
@ -376,7 +358,6 @@ func (h *Header) Populate(
h.ChainID = chainID
h.Time = timestamp
h.LastBlockID = lastBlockID
h.TotalTxs = totalTxs
h.ValidatorsHash = valHash
h.NextValidatorsHash = nextValHash
h.ConsensusHash = consensusHash
@ -400,8 +381,6 @@ func (h *Header) Hash() cmn.HexBytes {
cdcEncode(h.ChainID),
cdcEncode(h.Height),
cdcEncode(h.Time),
cdcEncode(h.NumTxs),
cdcEncode(h.TotalTxs),
cdcEncode(h.LastBlockID),
cdcEncode(h.LastCommitHash),
cdcEncode(h.DataHash),
@ -425,8 +404,6 @@ func (h *Header) StringIndented(indent string) string {
%s ChainID: %v
%s Height: %v
%s Time: %v
%s NumTxs: %v
%s TotalTxs: %v
%s LastBlockID: %v
%s LastCommit: %v
%s Data: %v
@ -442,8 +419,6 @@ func (h *Header) StringIndented(indent string) string {
indent, h.ChainID,
indent, h.Height,
indent, h.Time,
indent, h.NumTxs,
indent, h.TotalTxs,
indent, h.LastBlockID,
indent, h.LastCommitHash,
indent, h.DataHash,


+ 6
- 4
types/block_meta.go View File

@ -1,16 +1,18 @@
package types
// BlockMeta contains meta information about a block - namely, it's ID and Header.
// BlockMeta contains meta information.
type BlockMeta struct {
BlockID BlockID `json:"block_id"` // the block hash and partsethash
Header Header `json:"header"` // The block's Header
BlockID BlockID `json:"block_id"`
Header Header `json:"header"`
NumTxs int64 `json:"number_txs"`
}
// NewBlockMeta returns a new BlockMeta from the block and its blockParts.
// NewBlockMeta returns a new block meta.
func NewBlockMeta(block *Block, blockParts *PartSet) *BlockMeta {
return &BlockMeta{
BlockID: BlockID{block.Hash(), blockParts.Header()},
Header: block.Header,
NumTxs: int64(len(block.Data.Txs)),
}
}


+ 8
- 17
types/block_test.go View File

@ -69,7 +69,6 @@ func TestBlockValidateBasic(t *testing.T) {
{"Make Block", func(blk *Block) {}, false},
{"Make Block w/ proposer Addr", func(blk *Block) { blk.ProposerAddress = valSet.GetProposer().Address }, false},
{"Negative Height", func(blk *Block) { blk.Height = -1 }, true},
{"Increase NumTxs", func(blk *Block) { blk.NumTxs++ }, true},
{"Remove 1/2 the commits", func(blk *Block) {
blk.LastCommit.Precommits = commit.Precommits[:commit.Size()/2]
blk.LastCommit.hash = nil // clear hash or change wont be noticed
@ -254,8 +253,6 @@ func TestHeaderHash(t *testing.T) {
ChainID: "chainId",
Height: 3,
Time: time.Date(2019, 10, 13, 16, 14, 44, 0, time.UTC),
NumTxs: 4,
TotalTxs: 5,
LastBlockID: makeBlockID(make([]byte, tmhash.Size), 6, make([]byte, tmhash.Size)),
LastCommitHash: tmhash.Sum([]byte("last_commit_hash")),
DataHash: tmhash.Sum([]byte("data_hash")),
@ -266,15 +263,13 @@ func TestHeaderHash(t *testing.T) {
LastResultsHash: tmhash.Sum([]byte("last_results_hash")),
EvidenceHash: tmhash.Sum([]byte("evidence_hash")),
ProposerAddress: crypto.AddressHash([]byte("proposer_address")),
}, hexBytesFromString("A37A7A69D89D3A66D599B0914A53F959EFE490EE9B449C95852F6FB331D58D07")},
}, hexBytesFromString("ABDC78921B18A47EE6BEF5E31637BADB0F3E587E3C0F4DB2D1E93E9FF0533862")},
{"nil header yields nil", nil, nil},
{"nil ValidatorsHash yields nil", &Header{
Version: version.Consensus{Block: 1, App: 2},
ChainID: "chainId",
Height: 3,
Time: time.Date(2019, 10, 13, 16, 14, 44, 0, time.UTC),
NumTxs: 4,
TotalTxs: 5,
LastBlockID: makeBlockID(make([]byte, tmhash.Size), 6, make([]byte, tmhash.Size)),
LastCommitHash: tmhash.Sum([]byte("last_commit_hash")),
DataHash: tmhash.Sum([]byte("data_hash")),
@ -329,8 +324,6 @@ func TestMaxHeaderBytes(t *testing.T) {
ChainID: maxChainID,
Height: math.MaxInt64,
Time: timestamp,
NumTxs: math.MaxInt64,
TotalTxs: math.MaxInt64,
LastBlockID: makeBlockID(make([]byte, tmhash.Size), math.MaxInt64, make([]byte, tmhash.Size)),
LastCommitHash: tmhash.Sum([]byte("last_commit_hash")),
DataHash: tmhash.Sum([]byte("data_hash")),
@ -346,7 +339,7 @@ func TestMaxHeaderBytes(t *testing.T) {
bz, err := cdc.MarshalBinaryLengthPrefixed(h)
require.NoError(t, err)
assert.EqualValues(t, MaxHeaderBytes, len(bz))
assert.EqualValues(t, MaxHeaderBytes, int64(len(bz)))
}
func randCommit() *Commit {
@ -378,9 +371,9 @@ func TestBlockMaxDataBytes(t *testing.T) {
}{
0: {-10, 1, 0, true, 0},
1: {10, 1, 0, true, 0},
2: {886, 1, 0, true, 0},
3: {887, 1, 0, false, 0},
4: {888, 1, 0, false, 1},
2: {865, 1, 0, true, 0},
3: {866, 1, 0, false, 0},
4: {867, 1, 0, false, 1},
}
for i, tc := range testCases {
@ -407,9 +400,9 @@ func TestBlockMaxDataBytesUnknownEvidence(t *testing.T) {
}{
0: {-10, 1, true, 0},
1: {10, 1, true, 0},
2: {984, 1, true, 0},
3: {985, 1, false, 0},
4: {986, 1, false, 1},
2: {961, 1, true, 0},
3: {962, 1, false, 0},
4: {963, 1, false, 1},
}
for i, tc := range testCases {
@ -517,8 +510,6 @@ func TestSignedHeaderValidateBasic(t *testing.T) {
ChainID: chainID,
Height: commit.Height(),
Time: timestamp,
NumTxs: math.MaxInt64,
TotalTxs: math.MaxInt64,
LastBlockID: commit.BlockID,
LastCommitHash: commit.Hash(),
DataHash: commit.Hash(),


+ 1
- 0
types/events.go View File

@ -73,6 +73,7 @@ type EventDataNewBlock struct {
type EventDataNewBlockHeader struct {
Header Header `json:"header"`
NumTxs int64 `json:"number_txs"` // Number of txs in a block
ResultBeginBlock abci.ResponseBeginBlock `json:"result_begin_block"`
ResultEndBlock abci.ResponseEndBlock `json:"result_end_block"`
}


+ 42
- 60
types/proto3/block.pb.go View File

@ -114,26 +114,24 @@ func (m *BlockID) GetPartsHeader() *PartSetHeader {
type Header struct {
// basic block info
Version *Version `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
ChainID string `protobuf:"bytes,2,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"`
Time *Timestamp `protobuf:"bytes,4,opt,name=Time,proto3" json:"Time,omitempty"`
NumTxs int64 `protobuf:"varint,5,opt,name=NumTxs,proto3" json:"NumTxs,omitempty"`
TotalTxs int64 `protobuf:"varint,6,opt,name=TotalTxs,proto3" json:"TotalTxs,omitempty"`
Version *Version `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
ChainID string `protobuf:"bytes,2,opt,name=ChainID,proto3" json:"ChainID,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=Height,proto3" json:"Height,omitempty"`
Time *Timestamp `protobuf:"bytes,4,opt,name=Time,proto3" json:"Time,omitempty"`
// prev block info
LastBlockID *BlockID `protobuf:"bytes,7,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"`
LastBlockID *BlockID `protobuf:"bytes,5,opt,name=LastBlockID,proto3" json:"LastBlockID,omitempty"`
// hashes of block data
LastCommitHash []byte `protobuf:"bytes,8,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"`
DataHash []byte `protobuf:"bytes,9,opt,name=DataHash,proto3" json:"DataHash,omitempty"`
LastCommitHash []byte `protobuf:"bytes,6,opt,name=LastCommitHash,proto3" json:"LastCommitHash,omitempty"`
DataHash []byte `protobuf:"bytes,7,opt,name=DataHash,proto3" json:"DataHash,omitempty"`
// hashes from the app output from the prev block
ValidatorsHash []byte `protobuf:"bytes,10,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"`
NextValidatorsHash []byte `protobuf:"bytes,11,opt,name=NextValidatorsHash,proto3" json:"NextValidatorsHash,omitempty"`
ConsensusHash []byte `protobuf:"bytes,12,opt,name=ConsensusHash,proto3" json:"ConsensusHash,omitempty"`
AppHash []byte `protobuf:"bytes,13,opt,name=AppHash,proto3" json:"AppHash,omitempty"`
LastResultsHash []byte `protobuf:"bytes,14,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"`
ValidatorsHash []byte `protobuf:"bytes,8,opt,name=ValidatorsHash,proto3" json:"ValidatorsHash,omitempty"`
NextValidatorsHash []byte `protobuf:"bytes,9,opt,name=NextValidatorsHash,proto3" json:"NextValidatorsHash,omitempty"`
ConsensusHash []byte `protobuf:"bytes,10,opt,name=ConsensusHash,proto3" json:"ConsensusHash,omitempty"`
AppHash []byte `protobuf:"bytes,11,opt,name=AppHash,proto3" json:"AppHash,omitempty"`
LastResultsHash []byte `protobuf:"bytes,12,opt,name=LastResultsHash,proto3" json:"LastResultsHash,omitempty"`
// consensus info
EvidenceHash []byte `protobuf:"bytes,15,opt,name=EvidenceHash,proto3" json:"EvidenceHash,omitempty"`
ProposerAddress []byte `protobuf:"bytes,16,opt,name=ProposerAddress,proto3" json:"ProposerAddress,omitempty"`
EvidenceHash []byte `protobuf:"bytes,13,opt,name=EvidenceHash,proto3" json:"EvidenceHash,omitempty"`
ProposerAddress []byte `protobuf:"bytes,14,opt,name=ProposerAddress,proto3" json:"ProposerAddress,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -191,20 +189,6 @@ func (m *Header) GetTime() *Timestamp {
return nil
}
func (m *Header) GetNumTxs() int64 {
if m != nil {
return m.NumTxs
}
return 0
}
func (m *Header) GetTotalTxs() int64 {
if m != nil {
return m.TotalTxs
}
return 0
}
func (m *Header) GetLastBlockID() *BlockID {
if m != nil {
return m.LastBlockID
@ -383,34 +367,32 @@ func init() {
func init() { proto.RegisterFile("types/proto3/block.proto", fileDescriptor_760f4d5ceb2a11f0) }
var fileDescriptor_760f4d5ceb2a11f0 = []byte{
// 451 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x53, 0x5f, 0x6f, 0xd3, 0x30,
0x10, 0x57, 0x68, 0xda, 0xae, 0x97, 0x76, 0x1d, 0x27, 0x40, 0x16, 0x4f, 0x55, 0x04, 0xa8, 0xbc,
0x74, 0xda, 0xf6, 0x80, 0x10, 0x4f, 0xa5, 0x45, 0x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x81, 0x51, 0xb3, 0x00, 0xee, 0x45, 0xa4,
0x77, 0x26, 0x4f, 0x88, 0xcb, 0x7a, 0xb2, 0x86, 0x2e, 0x2e, 0x57, 0xb9, 0x21, 0x2e, 0xed, 0x4b,
0x0f, 0x1e, 0xab, 0x9f, 0xea, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4f, 0x84, 0xb5, 0xf8, 0x77,
0x03, 0x00, 0x00,
// 432 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0x41, 0x6f, 0x13, 0x31,
0x10, 0x85, 0xb5, 0x64, 0x93, 0x34, 0xb3, 0x49, 0x0b, 0x23, 0x40, 0x16, 0xa7, 0x68, 0x05, 0x28,
0x5c, 0x52, 0xb5, 0x3d, 0x20, 0xc4, 0x29, 0x24, 0x48, 0xad, 0x84, 0x50, 0x65, 0xaa, 0xdc, 0xdd,
0xac, 0x45, 0x56, 0x24, 0xb6, 0xe5, 0x71, 0x11, 0xfc, 0x0e, 0xfe, 0x30, 0xf2, 0x78, 0x37, 0x74,
0x23, 0x6e, 0xfb, 0xde, 0xbc, 0xf9, 0x6c, 0x8f, 0xbd, 0x20, 0xc2, 0x6f, 0xa7, 0xe9, 0xdc, 0x79,
0x1b, 0xec, 0xd5, 0xf9, 0xfd, 0xce, 0x6e, 0x7e, 0xcc, 0x59, 0xe0, 0x20, 0x79, 0xe5, 0x07, 0x98,
0xdc, 0x2a, 0x1f, 0xbe, 0xe9, 0x70, 0xad, 0x55, 0xa5, 0x3d, 0x3e, 0x87, 0xfe, 0x9d, 0x0d, 0x6a,
0x27, 0xb2, 0x69, 0x36, 0xeb, 0xcb, 0x24, 0x10, 0x21, 0xbf, 0x56, 0xb4, 0x15, 0x4f, 0xa6, 0xd9,
0x6c, 0x2c, 0xf9, 0xbb, 0x5c, 0xc3, 0xf0, 0x53, 0x24, 0xde, 0xac, 0x0e, 0xe5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, 0x21, 0x35, 0x3d, 0xec, 0x42, 0x22, 0x8c, 0x39, 0x71, 0x6c, 0x63,
0x09, 0xe3, 0xcf, 0x3f, 0xeb, 0x4a, 0x9b, 0x8d, 0xe6, 0xd8, 0x84, 0x63, 0x1d, 0x2f, 0xd2, 0x6e,
0xbd, 0x75, 0x96, 0xb4, 0x5f, 0x54, 0x95, 0xd7, 0x44, 0xe2, 0x34, 0xd1, 0x8e, 0xec, 0xf2, 0xe2,
0xf0, 0x14, 0xe2, 0x13, 0xe5, 0x49, 0xf3, 0x9b, 0xc8, 0x65, 0x12, 0xf8, 0x14, 0x7a, 0x0b, 0xe7,
0xf8, 0xf2, 0x73, 0x19, 0x3f, 0xcb, 0x8f, 0x30, 0x3a, 0x5c, 0x66, 0x3c, 0x11, 0xe9, 0x8d, 0x35,
0x15, 0x71, 0x5b, 0x4f, 0xb6, 0x32, 0xe2, 0x8c, 0x32, 0x96, 0xb8, 0xb5, 0x2f, 0x93, 0xb8, 0x6f,
0x7e, 0x90, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x7a, 0x17, 0xe4, 0x46, 0x43, 0x03, 0x00, 0x00,
}

+ 10
- 12
types/proto3/block.proto View File

@ -19,26 +19,24 @@ message Header {
string ChainID = 2;
int64 Height = 3;
Timestamp Time = 4;
int64 NumTxs = 5;
int64 TotalTxs = 6;
// prev block info
BlockID LastBlockID = 7;
BlockID LastBlockID = 5;
// hashes of block data
bytes LastCommitHash = 8; // commit from validators from the last block
bytes DataHash = 9; // transactions
bytes LastCommitHash = 6; // commit from validators from the last block
bytes DataHash = 7; // transactions
// hashes from the app output from the prev block
bytes ValidatorsHash = 10; // validators for the current block
bytes NextValidatorsHash = 11; // validators for the next block
bytes ConsensusHash = 12; // consensus params for current block
bytes AppHash = 13; // state after txs from the previous block
bytes LastResultsHash = 14; // root hash of all results from the txs from the previous block
bytes ValidatorsHash = 8; // validators for the current block
bytes NextValidatorsHash = 9; // validators for the next block
bytes ConsensusHash = 10; // consensus params for current block
bytes AppHash = 11; // state after txs from the previous block
bytes LastResultsHash = 12; // root hash of all results from the txs from the previous block
// consensus info
bytes EvidenceHash = 15; // evidence included in the block
bytes ProposerAddress = 16; // original proposer of the block
bytes EvidenceHash = 13; // evidence included in the block
bytes ProposerAddress = 14; // original proposer of the block
}
message Version {


+ 0
- 8
types/proto3_test.go View File

@ -24,7 +24,6 @@ func TestProto3Compatibility(t *testing.T) {
ChainID: "cosmos",
Height: 150,
Time: &proto3.Timestamp{Seconds: seconds, Nanos: nanos},
NumTxs: 7,
LastBlockID: &proto3.BlockID{
Hash: []byte("some serious hashing"),
PartsHeader: &proto3.PartSetHeader{
@ -32,7 +31,6 @@ func TestProto3Compatibility(t *testing.T) {
Hash: []byte("some more serious hashing"),
},
},
TotalTxs: 100,
LastCommitHash: []byte("commit hash"),
DataHash: []byte("data hash"),
ValidatorsHash: []byte("validators hash"),
@ -41,7 +39,6 @@ func TestProto3Compatibility(t *testing.T) {
ChainID: "cosmos",
Height: 150,
Time: tm,
NumTxs: 7,
LastBlockID: BlockID{
Hash: []byte("some serious hashing"),
PartsHeader: PartSetHeader{
@ -49,7 +46,6 @@ func TestProto3Compatibility(t *testing.T) {
Hash: []byte("some more serious hashing"),
},
},
TotalTxs: 100,
LastCommitHash: []byte("commit hash"),
DataHash: []byte("data hash"),
ValidatorsHash: []byte("validators hash"),
@ -66,8 +62,6 @@ func TestProto3Compatibility(t *testing.T) {
ChainID: "cosmos",
Height: 150,
Time: &proto3.Timestamp{Seconds: seconds, Nanos: nanos},
NumTxs: 7,
TotalTxs: 100,
LastCommitHash: []byte("commit hash"),
DataHash: []byte("data hash"),
ValidatorsHash: []byte("validators hash"),
@ -76,8 +70,6 @@ func TestProto3Compatibility(t *testing.T) {
ChainID: "cosmos",
Height: 150,
Time: tm,
NumTxs: 7,
TotalTxs: 100,
LastCommitHash: []byte("commit hash"),
DataHash: []byte("data hash"),
ValidatorsHash: []byte("validators hash"),


+ 3
- 5
types/protobuf.go View File

@ -44,11 +44,9 @@ func (tm2pb) Header(header *Header) abci.Header {
Block: header.Version.Block.Uint64(),
App: header.Version.App.Uint64(),
},
ChainID: header.ChainID,
Height: header.Height,
Time: header.Time,
NumTxs: header.NumTxs,
TotalTxs: header.TotalTxs,
ChainID: header.ChainID,
Height: header.Height,
Time: header.Time,
LastBlockId: TM2PB.BlockID(header.LastBlockID),


+ 3
- 13
types/protobuf_test.go View File

@ -70,12 +70,10 @@ func TestABCIConsensusParams(t *testing.T) {
}
func newHeader(
height, numTxs int64,
commitHash, dataHash, evidenceHash []byte,
height int64, commitHash, dataHash, evidenceHash []byte,
) *Header {
return &Header{
Height: height,
NumTxs: numTxs,
LastCommitHash: commitHash,
DataHash: dataHash,
EvidenceHash: evidenceHash,
@ -85,11 +83,7 @@ func newHeader(
func TestABCIHeader(t *testing.T) {
// build a full header
var height int64 = 5
var numTxs int64 = 3
header := newHeader(
height, numTxs,
[]byte("lastCommitHash"), []byte("dataHash"), []byte("evidenceHash"),
)
header := newHeader(height, []byte("lastCommitHash"), []byte("dataHash"), []byte("evidenceHash"))
protocolVersion := version.Consensus{Block: 7, App: 8}
timestamp := time.Now()
lastBlockID := BlockID{
@ -99,10 +93,8 @@ func TestABCIHeader(t *testing.T) {
Hash: []byte("hash"),
},
}
var totalTxs int64 = 100
header.Populate(
protocolVersion, "chainID",
timestamp, lastBlockID, totalTxs,
protocolVersion, "chainID", timestamp, lastBlockID,
[]byte("valHash"), []byte("nextValHash"),
[]byte("consHash"), []byte("appHash"), []byte("lastResultsHash"),
[]byte("proposerAddress"),
@ -121,8 +113,6 @@ func TestABCIHeader(t *testing.T) {
assert.EqualValues(t, "chainID", pbHeader.ChainID)
assert.EqualValues(t, height, pbHeader.Height)
assert.EqualValues(t, timestamp, pbHeader.Time)
assert.EqualValues(t, numTxs, pbHeader.NumTxs)
assert.EqualValues(t, totalTxs, pbHeader.TotalTxs)
assert.EqualValues(t, lastBlockID.Hash, pbHeader.LastBlockId.Hash)
assert.EqualValues(t, []byte("lastCommitHash"), pbHeader.LastCommitHash)
assert.Equal(t, []byte("proposerAddress"), pbHeader.ProposerAddress)


+ 0
- 1
types/test_util.go View File

@ -68,7 +68,6 @@ func MakeBlock(height int64, txs []Tx, lastCommit *Commit, evidence []Evidence)
block := &Block{
Header: Header{
Height: height,
NumTxs: int64(len(txs)),
},
Data: Data{
Txs: txs,


Loading…
Cancel
Save