diff --git a/consensus/reactor.go b/consensus/reactor.go index c2874df2..b97a45a2 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -91,9 +91,9 @@ func (conR *ConsensusReactor) GetChannels() []*p2p.ChannelDescriptor { SendQueueCapacity: 100, }, &p2p.ChannelDescriptor{ - ID: DataChannel, - Priority: 2, - SendQueueCapacity: 50, + ID: DataChannel, // maybe split between gossiping current block and catchup stuff + Priority: 200, // once we gossip the whole block there's nothing left to send until next height or round + SendQueueCapacity: 100, RecvBufferCapacity: 50 * 4096, }, &p2p.ChannelDescriptor{ diff --git a/consensus/state.go b/consensus/state.go index aafef7ec..7dcb6eb0 100644 --- a/consensus/state.go +++ b/consensus/state.go @@ -835,8 +835,8 @@ func (cs *ConsensusState) decideProposal(height, round int) { part := blockParts.GetPart(i) cs.sendInternalMessage(msgInfo{&BlockPartMessage{cs.Height, cs.Round, part}, ""}) } - log.Info("Signed and sent proposal", "height", height, "round", round, "proposal", proposal) - log.Debug(Fmt("Signed and sent proposal block: %v", block)) + log.Info("Signed proposal", "height", height, "round", round, "proposal", proposal) + log.Debug(Fmt("Signed proposal block: %v", block)) } else { log.Warn("enterPropose: Error signing proposal", "height", height, "round", round, "error", err) } diff --git a/types/block.go b/types/block.go index f2d1ef57..739a61b1 100644 --- a/types/block.go +++ b/types/block.go @@ -337,6 +337,7 @@ type Data struct { func (data *Data) Hash() []byte { if config.GetBool("disable_data_hash") { + // we could use the part_set hash instead data.hash = []byte{} return data.hash } diff --git a/types/part_set.go b/types/part_set.go index 5940a85d..bb7d11b1 100644 --- a/types/part_set.go +++ b/types/part_set.go @@ -15,7 +15,7 @@ import ( ) const ( - partSize = 4096 // 4KB + partSize = 65536 // 64KB ... 4096 // 4KB ) var ( @@ -203,6 +203,7 @@ func (ps *PartSet) AddPart(part *Part) (bool, error) { } // Check hash proof + // TODO: minor gains for not checking part sets we made if !part.Proof.Verify(part.Index, ps.total, part.Hash(), ps.Hash()) { return false, ErrPartSetInvalidProof }