Skip to content

Conversation

@arajasek
Copy link
Contributor

@arajasek arajasek commented Jan 15, 2026

Describe your changes and provide context

This PR supports running a Giga node, in consensus with other non-Giga nodes. It only supports sequential execution for Giga, falling back to the v2 logic for cosmos and interop transactions.

TODO:

Testing performed to validate your change

@github-actions
Copy link

github-actions bot commented Jan 15, 2026

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedJan 21, 2026, 3:22 PM

@codecov
Copy link

codecov bot commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 23.77049% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.96%. Comparing base (ec08797) to head (f524fbe).

Files with missing lines Patch % Lines
app/app.go 3.52% 79 Missing and 3 partials ⚠️
giga/executor/utils/errors.go 0.00% 5 Missing ⚠️
giga/executor/precompiles/failfast.go 0.00% 4 Missing ⚠️
sei-tendermint/internal/state/execution.go 92.85% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2708   +/-   ##
=======================================
  Coverage   43.96%   43.96%           
=======================================
  Files        1978     1978           
  Lines      162479   162571   +92     
=======================================
+ Hits        71439    71481   +42     
- Misses      84544    84597   +53     
+ Partials     6496     6493    -3     
Flag Coverage Δ
sei-chain 46.16% <3.19%> (-0.03%) ⬇️
sei-cosmos 38.06% <ø> (-0.01%) ⬇️
sei-db 68.72% <ø> (ø)
sei-tendermint 47.33% <92.85%> (+0.06%) ⬆️

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

Files with missing lines Coverage Δ
sei-tendermint/internal/state/execution.go 63.17% <92.85%> (+1.70%) ⬆️
giga/executor/precompiles/failfast.go 0.00% <0.00%> (ø)
giga/executor/utils/errors.go 0.00% <0.00%> (ø)
app/app.go 54.58% <3.52%> (-2.44%) ⬇️

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

}

func (app *App) ProcessTxsSynchronousGiga(ctx sdk.Context, txs [][]byte, typedTxs []sdk.Tx, absoluteTxIndices []int) []*abci.ExecTxResult {
defer metrics.BlockProcessLatency(time.Now(), metrics.SYNCHRONOUS)

Check warning

Code scanning / CodeQL

Calling the system time Warning

Calling the system time may be a possible source of non-determinism
# Fix: Giga Executor LastResultsHash Mismatch

## Summary

Fixed critical issues causing `LastResultsHash` mismatch between the
standard and giga executors, which was causing consensus failures when
running nodes with `GIGA_EXECUTOR` enabled.

## Root Cause

The `LastResultsHash` is computed from only 4 deterministic fields of
each `ExecTxResult` (defined in `deterministicExecTxResult` in
`sei-tendermint/abci/types/types.go`):
- `Code`
- `Data`
- `GasWanted`
- `GasUsed`

The giga executor was producing different values for two of these
fields.

## Fixes

### 1. Missing `GasWanted` field (`app/app.go`)

The giga executor was not setting `GasWanted` (defaulted to 0), while
the standard executor sets it to the transaction's gas limit.

```go
// Before: GasWanted not set (defaults to 0)
// After:
gasWanted := int64(ethTx.Gas())
```

### 2. Different `Data` field format (`app/app.go`)

The giga executor was putting raw receipt bytes in the `Data` field,
while the standard executor wraps `MsgEVMTransactionResponse` in
`TxMsgData`:

```go
// Before: Data = receiptBytes (raw marshaled receipt)

// After: Matches standard executor format
evmResponse := &evmtypes.MsgEVMTransactionResponse{
    GasUsed:    execResult.UsedGas,
    VmError:    vmError,
    ReturnData: execResult.ReturnData,
    Hash:       ethTx.Hash().Hex(),
    Logs:       evmtypes.NewLogsFromEth(stateDB.GetAllLogs()),
}
txMsgData := &sdk.TxMsgData{Data: []*sdk.MsgData{{MsgType: msgTypeURL, Data: evmResponseBytes}}}
// Data = marshaled txMsgData
```

## Logging Improvements (`sei-tendermint/internal/state/execution.go`)

Added logging to aid future debugging of consensus issues:

| Level | Location | What's Logged |
|-------|----------|---------------|
| **Error** | `ValidateBlock` on mismatch | Expected vs got hash, block
height, numTxs, blockHash |
| **Info** | `ApplyBlock` after hash computation | Computed hash,
height, txCount |
| **Debug** | `ApplyBlock` per-tx | Code, GasWanted, GasUsed, dataLen
for each tx |

## Files Changed

- `app/app.go` - Fixed giga executor `GasWanted` and `Data` field format
- `sei-tendermint/internal/state/execution.go` - Added LastResultsHash
debugging logs

## Testing

Run a multi-node cluster with one node using `GIGA_EXECUTOR=true` and
verify blocks reach consensus without `LastResultsHash` mismatch errors.
@arajasek arajasek marked this pull request as ready for review January 20, 2026 20:51
@arajasek arajasek changed the title WIP: Giga RPC node feat: Giga RPC node (sequential execution) Jan 21, 2026
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.

3 participants