Skip to content

Conversation

@philipsu522
Copy link
Contributor

Describe your changes and provide context

Testing performed to validate your change

@github-actions
Copy link

github-actions bot commented Nov 28, 2025

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedDec 3, 2025, 5:59 PM

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 15.38289% with 3779 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.39%. Comparing base (0156e75) to head (ad93525).
⚠️ Report is 111 commits behind head on main.

Files with missing lines Patch % Lines
sei-cosmos/x/staking/simulation/operations.go 0.00% 291 Missing ⚠️
sei-cosmos/x/gov/simulation/operations.go 0.00% 288 Missing ⚠️
evmrpc/worker_pool_metrics.go 36.22% 252 Missing and 5 partials ⚠️
sei-cosmos/x/bank/simulation/operations.go 0.00% 228 Missing ⚠️
sei-cosmos/x/simulation/simulate.go 0.00% 196 Missing ⚠️
sei-cosmos/x/authz/simulation/operations.go 0.00% 181 Missing ⚠️
sei-cosmos/x/distribution/simulation/operations.go 0.00% 154 Missing ⚠️
precompiles/staking/staking.go 76.06% 73 Missing and 51 partials ⚠️
sei-cosmos/x/simulation/mock_tendermint.go 0.00% 109 Missing ⚠️
sei-wasmd/x/wasm/simulation/operations.go 0.00% 98 Missing ⚠️
... and 77 more

❌ Your patch check has failed because the patch coverage (15.38%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2575      +/-   ##
==========================================
- Coverage   46.17%   43.39%   -2.79%     
==========================================
  Files        1171     1799     +628     
  Lines      101445   147630   +46185     
==========================================
+ Hits        46841    64059   +17218     
- Misses      50510    77937   +27427     
- Partials     4094     5634    +1540     
Flag Coverage Δ
sei-chain 42.50% <48.14%> (+0.10%) ⬆️
sei-cosmos 37.95% <0.73%> (?)
sei-db 69.06% <ø> (+24.16%) ⬆️
sei-ibc-go 55.96% <0.00%> (-0.43%) ⬇️
sei-tendermint 47.52% <ø> (-0.02%) ⬇️
sei-wasmd 42.08% <2.33%> (-0.51%) ⬇️
sei-wasmvm 39.88% <ø> (ø)

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

Files with missing lines Coverage Δ
app/params/config.go 23.28% <100.00%> (ø)
cmd/seid/cmd/app_config.go 100.00% <100.00%> (ø)
evmrpc/config/config.go 88.63% <ø> (ø)
evmrpc/rpcstack.go 75.53% <100.00%> (+0.17%) ⬆️
evmrpc/server.go 91.54% <100.00%> (+0.35%) ⬆️
evmrpc/tests/utils.go 70.16% <100.00%> (ø)
evmrpc/tracers.go 44.32% <ø> (ø)
oracle/price-feeder/oracle/oracle.go 82.38% <100.00%> (+0.08%) ⬆️
precompiles/utils/expected_keepers.go 0.00% <ø> (ø)
sei-cosmos/x/auth/types/genesis.go 68.11% <ø> (ø)
... and 88 more

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

stevenlanders and others added 7 commits December 3, 2025 12:58
## Describe your changes and provide context
- run `/scripts/benchmark.sh`, and it'll auto-produce 1000-tx blocks of
evm transfers and measure tps

## Testing performed to validate your change
- local testing 
- unit tests

---------

Co-authored-by: Jeremy Wei <jeremy.t.wei@gmail.com>
- implement CreateContract() to mark account as created for EIP-6780
- previously, prefunded addresses bypassed EIP-6780 because
CreateAccount() was not called when Exist() returned true
- createContract() is called unconditionally during contract creation,
ensuring proper AccountCreated flag is set"

## Describe your changes and provide context

## Testing performed to validate your change
* Also removed some unused code from BitArray
* Also fixed bugs introduced in
#2558
## Describe your changes and provide context

### Context

Different precompile error messages lead to app hash.
Reproduction suite:
https://github.com/sei-protocol/sei-chain/pull/2545/files

### Mechanism
`resultsHash` which is part of consensus is derived by hashing
marshalled transaction results, only deterministic fields should be
included during the marshalling
[operation](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/abci/types/types.go#L199-L214)
- [error
code](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L429),
[data](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L430),
[gas_wanted](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L433),
[gas_used](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L434).

Initially I thought that the error code is being [decoded
indeterministically](https://github.com/sei-protocol/sei-chain/blob/06a4e242bf80fff303be607734e121bd2f0f6916/sei-cosmos/types/errors/abci.go#L39)
which turned out
[untrue](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-cosmos/baseapp/abci.go#L283-L289).
It turned out that the data field is indeterministic.

Return data gets [populated with a stringified error
](https://github.com/sei-protocol/sei-chain/blob/07441d7bfcd7f9fc69119cf3002be7d6912b3a87/precompiles/common/precompiles.go#L159-L166)if
the precompile errors out, this bubbles up as aforementioned
[data](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L430),
stringified error can among other things contain the path to executable
by way of including the call stack.

PR that introduced the issue -
#1757.

### Potential Solutions
One of the reasons ABCI decodes errors and excludes
[log](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L293),
[info](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L294),
[events](https://github.com/sei-protocol/sei-chain/blob/fe95a1ff76a108ff37347a16ee6139509322e058/sei-tendermint/proto/tendermint/abci/types.proto#L297)
fields from consensus is to guard from indeterminism.
Ethereum on the other side discerns between two types of errors during
transaction execution - vmerrors and consensus/client errors - vmerrors
are not part of consensus in any way and errors coming from precompile
runs fall into this category.
Broadly there are a couple of ways to solve this:
1. Remove all inderterminism from errors - do not wrap errors, etc. -
short term this will work for the specific scenario we encountered, long
term we will have exactly the same issue because we will forget that
changing an error message is an app hash break
2. Populate return data deterministically if a precompile errors out -
this approach would be similar to what ABCI does by reducing errors to
codes/codespaces by decoding them
3. Do not populate return data if a precompile errors out - precompiles
that error out should never have side effects (to be confirmed) which
makes this approach viable and it is the most right/Ethereum equivalent
way of doing things

### Solution

[1.] is a hotfix - which we already have - but not a long running
solution as every precompile error message diff would lead to app hash
break.

[2.] does work but we've got no additional benefits from reducing
precompile errors to error codes/spaces.

Therefore picked [3.]

What we lose by this solution is visibility into the specific error that
happened - we can retain that by concatenate the error string to the
execution reverted error.

Comment on security concerns (proof by negation): 
This won't affect security - the only way in which including a
precompile error message into consensus can boost security is by making
sure the precompile run of every actor ended at exactly the same point -
this can easily be bypassed (both with or without this PR) by a
malicious actor executing the actual precompile and additional code
besides that so guardrails should be elsewhere.

## Testing performed to validate your change

Ran a local chain against the testing suite, also CI/CD.
## Describe your changes and provide context
Cosmos simulation logics were removed in an earlier commit
https://github.com/sei-protocol/sei-chain/pull/2507/files#diff-0f1d2976054440336a576d47a44a37b80cdf6701dd9113012bce0e3c425819b7
However these logics are still needed by Cosmos-based wallets, so we
cannot remove them just yet.

## Testing performed to validate your change
add back old logics
sigs := make([]signing.SignatureV2, len(priv))

// create a random length memo
r := rand.New(rand.NewSource(time.Now().UnixNano()))

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
func RandomizedGenState(simState *module.SimulationState) {
mintDenom := sdk.DefaultBondDenom
randomProvision := uint64(rand.Int63n(1000000)) //nolint:gosec
currentDate := time.Now()

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
github-actions bot and others added 2 commits December 16, 2025 13:59
…om code (#2613)

Backport of #2597 to `release/v6.3`.

Co-authored-by: Masih H. Derkani <m@derkani.org>
…arly rejection and backpressure (#2617)

Backport of #2591 to `release/v6.3`.

Co-authored-by: yirenz <blindchaser@users.noreply.github.com>
Co-authored-by: Yiming Zang <50607998+yzang2019@users.noreply.github.com>
Co-authored-by: yzang2019 <zymfrank@gmail.com>
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 and others added 5 commits December 16, 2025 18:17
… better libwasmvm handling (#2615)

Backport of #2598 to `release/v6.3`.
#2616)

Backport of #2595 to `release/v6.3`.

Co-authored-by: Steven Landers <steven@seinetwork.io>
…to include fixes (#2637)

Backport of #2605 to `release/v6.3`.

Co-authored-by: Uday Patil <udpatil@gmail.com>
…ompiles (#2643)

Backport of #2623 to `release/v6.3`.

Co-authored-by: Tony Chen <codchen03@gmail.com>
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.

8 participants