Skip to content

Conversation

@pompon0
Copy link
Contributor

@pompon0 pompon0 commented Oct 22, 2025

Made tendermint reactors open channels in constructor, rather than expect the channels to be set externally. It is more manageable this way. Also moved SendError method from Channel to PeerManager.

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 27, 2025, 1:38 PM

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 53.71025% with 131 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.33%. Comparing base (6ef9735) to head (d67fe2e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/internal/dbsync/reactor.go 0.00% 49 Missing ⚠️
sei-tendermint/internal/consensus/reactor.go 64.70% 17 Missing and 7 partials ⚠️
sei-tendermint/node/node.go 50.00% 6 Missing and 6 partials ⚠️
sei-tendermint/internal/statesync/reactor.go 64.00% 5 Missing and 4 partials ⚠️
sei-tendermint/internal/p2p/testonly.go 27.27% 7 Missing and 1 partial ⚠️
sei-tendermint/internal/blocksync/reactor.go 57.14% 5 Missing and 1 partial ⚠️
sei-tendermint/internal/evidence/reactor.go 78.26% 3 Missing and 2 partials ⚠️
sei-tendermint/internal/mempool/reactor.go 76.19% 3 Missing and 2 partials ⚠️
sei-tendermint/internal/p2p/peermanager.go 70.58% 4 Missing and 1 partial ⚠️
sei-tendermint/node/setup.go 60.00% 2 Missing and 2 partials ⚠️
... and 2 more

❌ Your patch status has failed because the patch coverage (53.71%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.
❌ Your project status has failed because the head coverage (47.03%) is below the target coverage (50.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2487      +/-   ##
==========================================
- Coverage   43.33%   43.33%   -0.01%     
==========================================
  Files        1650     1650              
  Lines      139967   139993      +26     
==========================================
+ Hits        60658    60662       +4     
+ Misses      73975    73964      -11     
- Partials     5334     5367      +33     
Flag Coverage Δ
sei-chain 31.48% <ø> (-0.01%) ⬇️
sei-cosmos 52.37% <ø> (+<0.01%) ⬆️
sei-db 69.06% <ø> (ø)
sei-tendermint 47.02% <53.71%> (-0.01%) ⬇️
sei-wasmd 45.81% <ø> (-0.03%) ⬇️
sei-wasmvm 40.37% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/internal/p2p/channel.go 80.95% <ø> (+4.16%) ⬆️
sei-tendermint/internal/p2p/router.go 74.05% <100.00%> (+0.21%) ⬆️
sei-tendermint/internal/p2p/pex/reactor.go 78.08% <86.66%> (-1.01%) ⬇️
sei-tendermint/node/seed.go 49.15% <50.00%> (-1.28%) ⬇️
sei-tendermint/node/setup.go 68.40% <60.00%> (-0.97%) ⬇️
sei-tendermint/internal/evidence/reactor.go 72.88% <78.26%> (+6.80%) ⬆️
sei-tendermint/internal/mempool/reactor.go 70.51% <76.19%> (-1.49%) ⬇️
sei-tendermint/internal/p2p/peermanager.go 76.15% <70.58%> (-0.55%) ⬇️
sei-tendermint/internal/blocksync/reactor.go 58.69% <57.14%> (+2.65%) ⬆️
sei-tendermint/internal/p2p/testonly.go 70.37% <27.27%> (-0.13%) ⬇️
... and 4 more

... and 12 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pompon0 pompon0 changed the title Gprusak consensus Made tendermin reactors open channels in constructor Oct 22, 2025
@pompon0 pompon0 changed the title Made tendermin reactors open channels in constructor Made tendermint reactors open channels in constructor Oct 22, 2025
@pompon0 pompon0 marked this pull request as ready for review October 22, 2025 10:37
// TODO: Evaluate if we need this to be synchronized via WaitGroup as to not
// leak the goroutine when stopping the reactor.
go r.peerStatsRoutine(ctx, peerUpdates)
go r.peerStatsRoutine(ctx)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
go r.processVoteCh(ctx)
go r.processVoteSetBitsCh(ctx)
go r.processPeerUpdates(ctx, peerUpdates, *r.channels)
go r.processPeerUpdates(ctx)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
go r.gossipDataRoutine(ctx, ps, chans.data)
go r.gossipVotesRoutine(ctx, ps, chans.vote)
go r.queryMaj23Routine(ctx, ps, chans.state)
go r.gossipDataRoutine(ctx, ps)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
go r.gossipVotesRoutine(ctx, ps, chans.vote)
go r.queryMaj23Routine(ctx, ps, chans.state)
go r.gossipDataRoutine(ctx, ps)
go r.gossipVotesRoutine(ctx, ps)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
go r.queryMaj23Routine(ctx, ps, chans.state)
go r.gossipDataRoutine(ctx, ps)
go r.gossipVotesRoutine(ctx, ps)
go r.queryMaj23Routine(ctx, ps)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism

func (r *Reactor) OnStart(ctx context.Context) error {
go r.processPeerUpdates(ctx, r.peerEvents(ctx))
go r.processPeerUpdates(ctx)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
}
go r.processMempoolCh(ctx, r.channel)
go r.processPeerUpdates(ctx, r.peerEvents(ctx), r.channel)
go r.processMempoolCh(ctx)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
go r.processMempoolCh(ctx, r.channel)
go r.processPeerUpdates(ctx, r.peerEvents(ctx), r.channel)
go r.processMempoolCh(ctx)
go r.processPeerUpdates(ctx)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
Base automatically changed from gprusak-channel to main October 27, 2025 11:32
@pompon0 pompon0 enabled auto-merge (squash) October 27, 2025 11:48
@pompon0 pompon0 disabled auto-merge October 27, 2025 11:49
@pompon0 pompon0 enabled auto-merge (squash) October 27, 2025 13:28
@pompon0 pompon0 merged commit 3a77ecc into main Oct 27, 2025
47 of 53 checks passed
@pompon0 pompon0 deleted the gprusak-consensus branch October 27, 2025 14:04
yzang2019 added a commit that referenced this pull request Oct 27, 2025
* main:
  Fixed flaky TestReactor_ValidatorSetChanges (CON-100) (#2498)
  Made tendermint reactors open channels in constructor (#2487)
  Skip `TestNodeStartStop` flaky test until fixed (#2502)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants