Skip to content

Commit 7c2e0fc

Browse files
committed
cleanup
1 parent f2a73ca commit 7c2e0fc

File tree

5 files changed

+9
-59
lines changed

5 files changed

+9
-59
lines changed

internal/consensus/metrics.gen.go

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/consensus/metrics.go

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ type Metrics struct {
8888
ProposalBlockCreatedOnPropose metrics.Counter `metrics_labels:"success"`
8989
ProposalTxs metrics.Gauge
9090
ProposalMissingTxs metrics.Gauge
91+
MissingTxs metrics.Gauge `metrics_labels:"proposer_address"`
9192

9293
// QuroumPrevoteMessageDelay is the interval in seconds between the proposal
9394
// timestamp and the timestamp of the earliest prevote that achieved a quorum

internal/consensus/reactor.go

+1
Original file line numberDiff line numberDiff line change
@@ -1157,6 +1157,7 @@ func (r *Reactor) handleDataMessage(ctx context.Context, envelope *p2p.Envelope,
11571157
if r.state.config.GossipTransactionHashOnly {
11581158
missingTxKeys := r.state.blockExec.GetMissingTxs(proposalTxs)
11591159
//logger.Info("PSULOG - checking for missing keys", "proposal height", pMsg.Proposal.Height, "proposal round", pMsg.Proposal.Round, "txkeys", pMsg.Proposal.TxKeys, "missingTxKeys", missingTxKeys)
1160+
r.Metrics.MissingTxs.With("proposer_address", pMsg.Proposal.ProposerAddress.String()).Set(float64(len(missingTxKeys)))
11601161
if len(missingTxKeys) > 0 {
11611162
var txKeys []*tmproto.TxKey
11621163
for _, txKey := range missingTxKeys {

internal/consensus/state.go

-17
Original file line numberDiff line numberDiff line change
@@ -1066,22 +1066,6 @@ func (cs *State) handleMsg(ctx context.Context, mi msgInfo, fsyncUponCompletion
10661066

10671067
cs.mtx.Lock()
10681068
if added && cs.ProposalBlockParts.IsComplete() {
1069-
// We also need to check we have all txs if we're only gossiping
1070-
// tx keys.
1071-
// TODO(psu): Figure out how to trigger handleCompleteProposal once all txs are received
1072-
//if cs.config.GossipTransactionHashOnly {
1073-
// if cs.ProposalBlock == nil || len(cs.blockExec.GetMissingTxs(cs.ProposalBlock.TxKeys)) != 0 {
1074-
// cs.logger.Info("PSULOG - proposal is complete but proposal block is still nil or missing txs", "proposal", cs.Proposal)
1075-
// if cs.ProposalBlock != nil {
1076-
// cs.logger.Info("PSULOG proposal is complete but proposal block is still nil or missing txs", "missing txs", cs.blockExec.GetMissingTxs(cs.ProposalBlock.TxKeys))
1077-
// }
1078-
// return
1079-
// } else if len(cs.blockExec.GetMissingTxs(cs.ProposalBlock.TxKeys)) != 0 {
1080-
// cs.logger.Info("PSULOG - received all proposal blocks but still missing txs")
1081-
// return
1082-
// }
1083-
//}
1084-
10851069
if fsyncUponCompletion {
10861070
_, fsyncSpan := cs.tracer.Start(spanCtx, "cs.state.handleBlockPartMsg.fsync")
10871071
if err := cs.wal.FlushAndSync(); err != nil { // fsync
@@ -1574,7 +1558,6 @@ func (cs *State) createProposalBlock(ctx context.Context) (*types.Block, error)
15741558

15751559
proposerAddr := cs.privValidatorPubKey.Address()
15761560

1577-
//ret, err := cs.blockExec.CreateProposalBlock(ctx, cs.Height, cs.state, lastExtCommit, proposerAddr, cs.config.GossipTransactionHashOnly)
15781561
ret, err := cs.blockExec.CreateProposalBlock(ctx, cs.Height, cs.state, lastExtCommit, proposerAddr, false)
15791562
//cs.logger.Info("PSULOG - created proposal block", "height", ret.Height, "txs", ret.Txs, "txkeys", ret.TxKeys)
15801563
if err != nil {

proto/tendermint/types/evidence.proto

-42
This file was deleted.

0 commit comments

Comments
 (0)