Skip to content

Migrate sei-tendermint into sei-chain as mono repo#2421

Merged
masih merged 269 commits intomainfrom
masih/mono-ish-tendermint
Oct 2, 2025
Merged

Migrate sei-tendermint into sei-chain as mono repo#2421
masih merged 269 commits intomainfrom
masih/mono-ish-tendermint

Conversation

@masih
Copy link
Collaborator

@masih masih commented Oct 1, 2025

Merge git commit history from sei-tendermint into sei-chain and update the replace directive in root of sei-chain to use relative path.

Note

The merged commits from sei-tendermint point to v0.6.5, the release currently in use by head of main at sei-chain. This leaves behind one additional commit to sei-tendermint which will be separately ported over:

The reminder of changes done here are mechanical to fix CI runs and update the replace directive in go.mod to use relative path.

codchen and others added 30 commits August 26, 2022 22:20
…-seen-tx

Add flags to indicate txs that have been checked
* checkpoint

* set config

* more fixes

* Add logging

* more fixes

* fixes

* more fixes

* more logging

* fixes

* Add logs

* fix outerloop

* outerloop fixes 2

* fix proto

* more logging

* Add proposal event

* fix data block hash

* Add more logs

* add proposal block for prevote

* checkpoint

* checkpoint

* implement trycreateproposal

* lower logging, impl tx req

* Add metrics

* register labels

* fix typo metric

* cleanup

* continue gossiping block parts

* uncomment

* Add logging

* fix nil proposal

* more logs, gossip txn false

* set flag to true

* Fix added logic

* reduce logs

* less logging

* less loggign, gossip-tx=flase

* gossip-tx-key true

* code cleanup, turn off recheck

* fix config typo

* remove logs

* cleanup

* more cleanup

* Add try proposal span

* tryCreate once

* fix trycreate

* cleanup, fix metrics

* more fixes/cleanup

* address comments

* protogen
* checkpoint

* More fixes

* Reactor fixes

* more fixes

* fixes

* reactor

* set tx key to false

* Add reactor stopwaitsync

* Final fixes, add workflows

* rm lint

* Comment out byzantine test
* Cherry-pick rollback

* debug

* change log
* logs

* nil proposalblock
* CheckTx for txs from peer proposal

* address comments
* Error if there's dupe connections

* Go Routine

* evict

* Disconnect and error instead

* panic instead

* revert panic
* Update default configs

* Update params.go
* fix

* fix test

* fix

* sd

* sd
* [0 Gas] add counter for CheckTx failures

* test
…ing CheckTx (#34)

* [0 Gas] evict peer connection if they send too many transactions failing CheckTx

* fix test
…s #7781" (#40)

Fix state sync failure caused by duplicates RPC endpoints providers

Co-authored-by: Yiming Zang <yzang@twitter.com>
masih and others added 4 commits September 29, 2025 15:39
Extends the ABCI interface with a side-effect free `GetTxPriorityHint` method and connects transaction priority hints to the mempool. The change gives the network a straightforward way to apply backpressure when the mempool is congested, without blocking liveness-critical transactions. By making the dropping logic priority-aware, nodes can favor important traffic under load.

Three new configuration options are introduced:

* **`DropUtilisationThreshold`** – the utilisation level (0.0–1.0) at which dropping starts. For example, `0.8` means the mempool must be at least 80% full before the policy takes effect.
* **`DropPriorityThreshold`** – the fraction of lowest-priority transactions to drop once the utilisation threshold is exceeded. The default `0.1` drops the bottom 10%.
* **`DropPriorityReservoirSize`** – the number of samples used to estimate the distribution of transaction priorities. Defaults to 10,240 entries (\~80KB). Larger values improve accuracy at the cost of memory.

The reservoir approach is designed to avoid tracking every transaction’s priority directly, which would be inefficient. Instead, the mempool keeps a statistically representative sample (the reservoir) of observed priorities. This sample makes it possible to estimate percentile cutoffs with good accuracy, without storing all values. Operators can tune the reservoir size depending on whether memory savings or precision is more important for their setup.

The combination of the utilisation threshold, priority cutoff, and reservoir sampling introduces a low-risk form of backpressure. Only the least important transactions are dropped when space is tight, ensuring new, high-priority transactions can still enter. This improves resilience under load while keeping the policy simple and predictable.
TCP transport is good enough to use in tests. Using the TCP transport in
all tests significantly improves the transport logic coverage.
@codecov
Copy link

codecov bot commented Oct 1, 2025

Codecov Report

❌ Patch coverage is 5.03670% with 3752 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.11%. Comparing base (6a5c937) to head (a9fd600).
⚠️ Report is 270 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/abci/example/kvstore/kvstore.go 0.00% 303 Missing ⚠️
sei-tendermint/abci/client/socket_client.go 0.00% 297 Missing ⚠️
sei-tendermint/cmd/tendermint/commands/testnet.go 0.00% 256 Missing ⚠️
sei-tendermint/abci/server/socket_server.go 0.00% 235 Missing ⚠️
...endermint/cmd/tendermint/commands/reindex_event.go 0.00% 199 Missing ⚠️
sei-tendermint/cmd/tendermint/commands/light.go 0.00% 185 Missing ⚠️
sei-tendermint/cmd/tendermint/commands/reset.go 0.00% 156 Missing ⚠️
sei-tendermint/abci/types/messages.go 0.00% 151 Missing ⚠️
sei-tendermint/cmd/tendermint/commands/run_node.go 0.00% 126 Missing ⚠️
...i-tendermint/cmd/tendermint/commands/debug/dump.go 0.00% 114 Missing ⚠️
... and 46 more

❌ Your patch status has failed because the patch coverage (5.03%) 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 (27.11%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2421      +/-   ##
==========================================
- Coverage   36.68%   27.11%   -9.57%     
==========================================
  Files        1166     1464     +298     
  Lines      104522   144402   +39880     
==========================================
+ Hits        38340    39151     +811     
- Misses      62924   101895   +38971     
- Partials     3258     3356      +98     
Files with missing lines Coverage Δ
sei-tendermint/crypto/sr25519/encoding.go 100.00% <100.00%> (ø)
sei-tendermint/crypto/merkle/hash.go 90.47% <90.47%> (ø)
sei-tendermint/cmd/tendermint/commands/version.go 0.00% <0.00%> (ø)
sei-tendermint/config/db.go 0.00% <0.00%> (ø)
sei-tendermint/abci/types/util.go 0.00% <0.00%> (ø)
sei-tendermint/crypto/random.go 0.00% <0.00%> (ø)
sei-tendermint/crypto/merkle/types.go 0.00% <0.00%> (ø)
sei-tendermint/abci/server/server.go 0.00% <0.00%> (ø)
...tendermint/cmd/tendermint/commands/gen_node_key.go 0.00% <0.00%> (ø)
...tendermint/cmd/tendermint/commands/show_node_id.go 0.00% <0.00%> (ø)
... and 47 more

... and 250 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.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@masih masih force-pushed the masih/mono-ish-tendermint branch from 842ee5e to 23f4765 Compare October 1, 2025 19:33
masih added 3 commits October 2, 2025 11:06
We have Buf configuration across almost all submoduels. They need to be
aggregated and reworked using Buf Workspace config.

This is big enough that I want to separate it into its own body of work.
masih added a commit to sei-protocol/sei-tendermint that referenced this pull request Oct 2, 2025
Update readme with notice of archive/move to sei-chain.

Relates to:
* sei-protocol/sei-chain#2421
@masih masih marked this pull request as ready for review October 2, 2025 10:29
@sei-protocol sei-protocol deleted a comment from github-actions bot Oct 2, 2025
@masih masih requested a review from pompon0 October 2, 2025 10:38
masih added a commit to sei-protocol/sei-tendermint that referenced this pull request Oct 2, 2025
Update readme with notice of archive/move to sei-chain.

Relates to:
* sei-protocol/sei-chain#2421
@masih masih merged commit 0687069 into main Oct 2, 2025
90 of 93 checks passed
@masih masih deleted the masih/mono-ish-tendermint branch October 2, 2025 13:25
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.