Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
138e561
feat(autobahn): rpc-only mode forwards eth_sendRawTransaction (CON-309)
wen-coding May 30, 2026
bf586c0
ci(autobahn): rename job to "Integration Test (Autobahn Basic)"
wen-coding May 30, 2026
7afda0c
fix(autobahn): bugbot review fixes
wen-coding May 30, 2026
b1b1de0
fix(app): fire EVM RPC gate from InitChainer too
wen-coding May 30, 2026
f29e647
fix(setup): drop unused nodeKey param in buildRPCOnlyGigaConfig
wen-coding May 30, 2026
9ff1a12
fix(app): also fire EVM RPC gate from Info on restart-with-state
wen-coding May 30, 2026
0cb13f5
docs(app): TODO to delete Info wrapper when read-side milestone lands
wen-coding May 30, 2026
c06c5d4
refactor(setup): extract loadAutobahnCommittee to dedupe map build
wen-coding May 30, 2026
8fd8bd1
docs(app): clarify Info override exists for Autobahn rpc-only
wen-coding May 30, 2026
01a636e
fix(app): scope Info gate-fire to rpc-only; polish review nits
wen-coding May 30, 2026
4e16b89
fix(autobahn-integ): match seid CLI's R/S/V encoding for sei_associate
wen-coding May 30, 2026
e25d6b1
fix: address fresh-eyes review (sync.Once, sentinel, fold teardown)
wen-coding May 31, 2026
4c27f7e
docs(app): tighten Info override comment
wen-coding Jun 1, 2026
eaedbb4
fix(autobahn): derive rpc-only from Mode; tmutils.Once gate; Run retu…
wen-coding Jun 1, 2026
12b7c79
feat(autobahn): rpc-only read path; drop write-only hacks
wen-coding Jun 1, 2026
f1f0302
test(autobahn): drive entire rpc-only flow through the rpc-only EVM RPC
wen-coding Jun 1, 2026
624a2e3
refactor(giga-router): Option-wrap validator-only state
wen-coding Jun 1, 2026
ade32f8
feat(autobahn): rpc-only single-active-subscriber dial loop
wen-coding Jun 1, 2026
7d12c51
test(autobahn): route entire suite through rpc-only; poll for state c…
wen-coding Jun 1, 2026
27f127a
fix(config): place autobahn keys at top level in TOML template
wen-coding Jun 1, 2026
8319c67
fix(giga-router): wrap Producer in utils.Option
wen-coding Jun 1, 2026
c3df5d4
fix(giga-router): update p2p tests for Producer Option wrapper
wen-coding Jun 1, 2026
d8ab800
fix(autobahn): tighten rpc-only mode check + genesis MaxGas validation
wen-coding Jun 1, 2026
c103514
test(autobahn): trim integration test time budget
wen-coding Jun 2, 2026
83a74c9
revert(app): match main's gate-fire pattern in app.go
wen-coding Jun 2, 2026
7c9d2eb
test(autobahn): fold rpc-only sidecar lifecycle into autobahn_test.go
wen-coding Jun 2, 2026
69a4095
chore(giga-router): TODO for trusted-peer / rate-limit redesign
wen-coding Jun 2, 2026
1eb6ff4
feat(autobahn): cap inbound rpc-only peers per validator (default 10)
wen-coding Jun 2, 2026
1acb3bf
fix(autobahn): cap rpc-only retry backoff instead of panicking
wen-coding Jun 2, 2026
f4f60e8
fix(autobahn): gate rpc-only backoff escalation on time-since-healthy
wen-coding Jun 2, 2026
d161dff
fix(giga-router): reject DialInterval <= 0 at construction
wen-coding Jun 2, 2026
9610e05
docs(autobahn): fix stale read-path reference in buildRPCOnlyGigaConf…
wen-coding Jun 2, 2026
111d977
test(autobahn): restore halt-detection timeout headroom for CI
wen-coding Jun 2, 2026
4365e26
refactor(giga-router): split into validator + rpc-only sibling impls
wen-coding Jun 2, 2026
bd784ab
fix(giga-router): reject rpc-only configs with missing EVMRPC URLs
wen-coding Jun 2, 2026
e995f70
style(autobahn-toml-test): hoist raw-string content out of WriteFile …
wen-coding Jun 2, 2026
d26cbe4
refactor(giga-router): dedupe read-path spawns and cache producerConfig
wen-coding Jun 2, 2026
196409f
refactor(autobahn): rpc-only cap uses pointer/Option with 0=off
wen-coding Jun 2, 2026
cdf8cff
rename: RPCOnly → Fullnode
wen-coding Jun 2, 2026
f37b2db
refactor(autobahn): hoist EvmProxy to gigaRouterCommon
wen-coding Jun 2, 2026
91ddcb7
refactor(autobahn): split GigaRouter into validator/fullnode types
wen-coding Jun 2, 2026
5a421a7
refactor(autobahn): phase 3 cleanups from pompon0 review
wen-coding Jun 2, 2026
542a89c
revert(giga): drop Option wrap on Service.state
wen-coding Jun 2, 2026
3c9632f
fix(autobahn): track executed height for LastCommittedBlockNumber
wen-coding Jun 3, 2026
bf1f20f
Merge branch 'main' into wen/autobahn_rpc_write_side
wen-coding Jun 3, 2026
b8e9d21
fix(autobahn): derive role from committee membership, not Mode
wen-coding Jun 3, 2026
bdf99de
Merge remote-tracking branch 'origin/main' into wen/autobahn_rpc_writ…
wen-coding Jun 16, 2026
d2eac5b
fix(autobahn): publish executed height inside executeBlock
wen-coding Jun 16, 2026
5c37bcd
refactor(autobahn): hoist App back to GigaRouterCommonConfig
wen-coding Jun 17, 2026
18f2b91
refactor(autobahn): GigaRouter.AsValidator instead of Mempool Option
wen-coding Jun 17, 2026
11b6691
style(autobahn): trim redundant docs
wen-coding Jun 17, 2026
81d5374
refactor(autobahn): inline spawnReadPath, drop scope.Scope cross-call
wen-coding Jun 17, 2026
5ef5b01
refactor(autobahn): validatorKey + EvmProxy onto validator router only
wen-coding Jun 17, 2026
cea4825
ci(autobahn): adopt main's GHCR-based image distribution
wen-coding Jun 17, 2026
e8758dc
Merge remote-tracking branch 'origin/main' into wen/autobahn_rpc_writ…
wen-coding Jun 17, 2026
4d8e0cf
fix(autobahn): update import path after types moved out of internal
wen-coding Jun 17, 2026
5159145
fix(autobahn): seed lastExecutedBlock before spawning runExecute
wen-coding Jun 17, 2026
a20a387
fix(autobahn): close stalled fullnode block-sync connections
wen-coding Jun 17, 2026
686c4f3
fix(makefile): point ensure-integration-ci-images at GHCR
wen-coding Jun 17, 2026
b843cb0
refactor(autobahn): drop empty GigaFullnodeConfig wrapper
wen-coding Jun 17, 2026
7411f64
fix(autobahn): dispatch role from cfg.Mode, warn on committee mismatch
wen-coding Jun 18, 2026
c23b5b1
fix(autobahn): reset fullnode backoff on progress alone
wen-coding Jun 18, 2026
139a375
docs(autobahn): trim added comments to minimize diff vs main
wen-coding Jun 18, 2026
756a4ab
refactor(autobahn): rename validateCommonAndBuildData → buildDataState
wen-coding Jun 18, 2026
f828e79
docs(autobahn): TODO to move App out of producer.Config
wen-coding Jun 18, 2026
c118760
refactor(autobahn): address reviewer nits on fullnode subscriber + co…
wen-coding Jun 18, 2026
bd66804
refactor(autobahn): make EVMRPC required (drop Option wrapper)
wen-coding Jun 18, 2026
d63a562
refactor(autobahn): replace AsValidator wrapper with Mempool() Option…
wen-coding Jun 18, 2026
914deda
refactor(giga): wrap Service.state in Option[*consensus.State]
wen-coding Jun 18, 2026
2ca8660
test(autobahn): give makeValidator a default EVMRPC URL
wen-coding Jun 18, 2026
408f87d
refactor(autobahn): EvmProxy on Common; RunInboundConn on GigaRouter
wen-coding Jun 18, 2026
8120c3e
refactor(autobahn): replace fullnode watchProgress polling with WaitF…
wen-coding Jun 18, 2026
a667bbc
refactor(autobahn): own GigaRouter.Run at the construction site
wen-coding Jun 18, 2026
4e27aab
refactor(autobahn): drop lastExecutedBlock, read app.LastBlockHeight …
wen-coding Jun 18, 2026
8a566a5
feat(autobahn): fullnodes accept inbound giga block-sync connections
wen-coding Jun 18, 2026
3beddd8
fix(autobahn): drop fullnode stall watchdog; poll for validator dirs
wen-coding Jun 18, 2026
6aa4f61
fix(abci): regenerate Application mock; add LastBlockHeight to test s…
wen-coding Jun 18, 2026
b577f21
fix: harden rpc-node init script + discover cluster size dynamically
wen-coding Jun 18, 2026
f795a7e
fix(rpcnode): fail fast if validator dirs missing after autobahn poll
wen-coding Jun 18, 2026
209dfeb
refactor(autobahn): make expected peer key optional in dialAndRunConn
wen-coding Jun 18, 2026
f761e15
fix(rpcnode): pass --overwrite to seid init so re-runs don't fail und…
wen-coding Jun 18, 2026
7063a90
fix(kvstore): override LastBlockHeight to return app.state.Height
wen-coding Jun 18, 2026
5f2afed
docs(autobahn): fix two stale comments after fullnode/lastExecutedBlo…
wen-coding Jun 19, 2026
c9645e3
refactor(autobahn): EvmProxy returns Option[*url.URL]
wen-coding Jun 19, 2026
a411391
test(evmrpc): update mock EvmProxy stubs to return Option[*url.URL]
wen-coding Jun 19, 2026
2af0f50
refactor(giga): move inbound dispatch into Service, drop HasConsensus…
wen-coding Jun 20, 2026
aa81ec8
refactor(giga): refuse committee peer on non-validator service
wen-coding Jun 20, 2026
8886ed8
docs(autobahn): autobahn-max-inbound-fullnode-peers applies on both r…
wen-coding Jun 20, 2026
206e239
fix(rpcnode): drop set -e; keep explicit fail-fast checks
wen-coding Jun 20, 2026
4332adc
docs(rpcnode): explain best-effort init semantics in script header
wen-coding Jun 20, 2026
5b2ebe5
cleanup(autobahn): stale comments, dead nil-check, MaxInt32 bound
wen-coding Jun 20, 2026
fdb328e
refactor(autobahn): split giga_router.go by role
wen-coding Jun 20, 2026
7381d02
refactor(autobahn): split giga_router tests by role
wen-coding Jun 20, 2026
1ed4f74
refactor(autobahn): rename giga_router_test.go to _testhelper
wen-coding Jun 20, 2026
cf7709e
refactor(autobahn): tag init log by role + bound MaxInboundFullnodePeers
wen-coding Jun 20, 2026
6f902a8
fix(autobahn): widen inboundFullnodeCap to int64 to satisfy gosec
wen-coding Jun 20, 2026
2046407
Merge branch 'main' into wen/autobahn_rpc_write_side
wen-coding Jun 22, 2026
77c0cc3
refactor(autobahn): consolidate config + drop producer.App + tighten …
wen-coding Jun 23, 2026
3859442
refactor(autobahn): warn instead of error on mode/committee mismatch …
wen-coding Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,82 @@ jobs:
path: integration_test/rpc_tests/reports/merged
if-no-files-found: ignore

# Autobahn integration suite (Autobahn Basic) — boots its own cluster via
# TestMain (docker-cluster-start / -stop), so it runs in a separate job
# rather than as a matrix entry that would share the integration-tests
# cluster.
autobahn-integration-tests:
name: Integration Test (Autobahn Basic)
runs-on: ubuntu-large
timeout-minutes: 45
needs: prepare-cluster
permissions:
packages: read
contents: read
env:
GHCR_LOCALNODE: ghcr.io/sei-protocol/sei-chain-integration-test-localnode
GHCR_RPCNODE: ghcr.io/sei-protocol/sei-chain-integration-test-rpcnode
steps:
- uses: actions/checkout@v5
- uses: actions/setup-go@v6
with:
go-version: '1.25.6'
- name: Install jq
run: sudo apt-get install -y jq
- name: Login to Docker Hub
uses: docker/login-action@v3
if: env.DOCKERHUB_USERNAME != ''
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Download integration CI artifacts
uses: actions/download-artifact@v4
with:
name: integration-ci-artifacts
- name: Load prebuilt seid and pull Docker images
run: |
tar -xzf integration-build.tar.gz
docker pull "${GHCR_LOCALNODE}:${{ github.run_id }}"
docker pull "${GHCR_RPCNODE}:${{ github.run_id }}"
docker tag "${GHCR_LOCALNODE}:${{ github.run_id }}" sei-chain/localnode
docker tag "${GHCR_RPCNODE}:${{ github.run_id }}" sei-chain/rpcnode
- name: Run autobahn integration tests
run: make autobahn-integration-test
- name: Print node logs on failure
if: ${{ failure() }}
run: |
set -euo pipefail
for c in sei-node-0 sei-node-1 sei-node-2 sei-node-3 sei-rpc-node; do
echo "==================== ${c} (docker logs tail) ===================="
docker logs --tail 200 "${c}" || true
done
- name: Collect logs directory
if: ${{ always() }}
run: |
mkdir -p artifacts/sei-autobahn-integration
if [ -d build/generated/logs ]; then
cp -r build/generated/logs artifacts/sei-autobahn-integration/
fi
- name: Upload logs directory
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: integration-logs-autobahn-integration
path: artifacts/sei-autobahn-integration
if-no-files-found: warn

integration-test-check:
name: Integration Test Check
runs-on: ubuntu-latest
needs: [prepare-cluster, integration-tests]
needs: [prepare-cluster, integration-tests, autobahn-integration-tests]
if: always()
steps:
- name: Verify prepare and test jobs succeeded
Expand All @@ -563,4 +635,8 @@ jobs:
echo "integration-tests job did not succeed (${{ needs.integration-tests.result }})"
exit 1
fi
if [[ "${{ needs.autobahn-integration-tests.result }}" != "success" ]]; then
echo "autobahn-integration-tests job did not succeed (${{ needs.autobahn-integration-tests.result }})"
exit 1
fi
echo "All integration test jobs passed."
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# - Prefer tag if bases are equal; otherwise use whichever base is newer.
BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD)
BRANCH_VERSION := $(shell echo "$(BRANCH_NAME)" | sed -E -n 's|.*(v[0-9]+\.[0-9]+\.[0-9]+[-A-Za-z0-9._]*).*|\1|p')
TAG_VERSION := $(shell echo $(shell git describe --tags))
TAG_VERSION := $(shell echo $(shell git describe --tags 2>/dev/null))
VERSION := $(shell \
bv="$(BRANCH_VERSION)"; tv="$(TAG_VERSION)"; \
bb=$$(echo "$$bv" | sed 's/^\(v[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'); \
Expand Down Expand Up @@ -225,13 +225,13 @@ build-docker-node:
.PHONY: build-docker-node

build-rpc-node:
@cd docker && docker build --tag sei-chain/rpcnode rpcnode --platform linux/x86_64
@cd docker && docker build --tag sei-chain/rpcnode rpcnode --platform $(DOCKER_PLATFORM)
Comment thread
cursor[bot] marked this conversation as resolved.
.PHONY: build-rpc-node

# Integration-test CI: verify images loaded from prepare-cluster artifacts.
# Integration-test CI: verify images pulled from GHCR by the matrix job.
ensure-integration-ci-images:
@docker image inspect sei-chain/localnode >/dev/null 2>&1 || (echo "sei-chain/localnode image missing; load integration-docker-images.tar.zst from prepare-cluster" && exit 1)
@docker image inspect sei-chain/rpcnode >/dev/null 2>&1 || (echo "sei-chain/rpcnode image missing; load integration-docker-images.tar.zst from prepare-cluster" && exit 1)
@docker image inspect sei-chain/localnode >/dev/null 2>&1 || (echo "sei-chain/localnode image missing; pull from GHCR (see prepare-cluster job)" && exit 1)
@docker image inspect sei-chain/rpcnode >/dev/null 2>&1 || (echo "sei-chain/rpcnode image missing; pull from GHCR (see prepare-cluster job)" && exit 1)
.PHONY: ensure-integration-ci-images

# Build seid once inside the localnode image (integration-test prepare job).
Expand Down Expand Up @@ -279,7 +279,7 @@ run-local-node: kill-sei-node build-docker-node
-v $(PROJECT_HOME):/sei-protocol/sei-chain:Z \
-v $(GO_PKG_PATH)/mod:/root/go/pkg/mod:Z \
-v $(shell go env GOCACHE):/root/.cache/go-build:Z \
--platform linux/x86_64 \
--platform $(DOCKER_PLATFORM) \
sei-chain/localnode
.PHONY: run-local-node

Expand All @@ -296,9 +296,11 @@ run-rpc-node: build-rpc-node
-v $(GO_PKG_PATH)/mod:/root/go/pkg/mod:Z \
-v $(shell go env GOCACHE):/root/.cache/go-build:Z \
-p 26668-26670:26656-26658 \
--platform linux/x86_64 \
--platform $(DOCKER_PLATFORM) \
--env GIGA_STORAGE=${GIGA_STORAGE} \
--env GIGA_FLATKV_ONLY=${GIGA_FLATKV_ONLY} \
--env AUTOBAHN=${AUTOBAHN} \
--env CLUSTER_SIZE=${CLUSTER_SIZE} \
--env RECEIPT_BACKEND=${RECEIPT_BACKEND} \
sei-chain/rpcnode
.PHONY: run-rpc-node
Expand All @@ -315,10 +317,12 @@ run-rpc-node-skipbuild: build-rpc-node
-v $(GO_PKG_PATH)/mod:/root/go/pkg/mod:Z \
-v $(shell go env GOCACHE):/root/.cache/go-build:Z \
-p 26668-26670:26656-26658 \
--platform linux/x86_64 \
--platform $(DOCKER_PLATFORM) \
--env SKIP_BUILD=true \
--env GIGA_STORAGE=${GIGA_STORAGE} \
--env GIGA_FLATKV_ONLY=${GIGA_FLATKV_ONLY} \
--env AUTOBAHN=${AUTOBAHN} \
--env CLUSTER_SIZE=${CLUSTER_SIZE} \
--env RECEIPT_BACKEND=${RECEIPT_BACKEND} \
sei-chain/rpcnode
.PHONY: run-rpc-node
Expand All @@ -345,7 +349,7 @@ run-rpc-node-integration-ci: kill-rpc-node ensure-integration-ci-images
-v $(GO_PKG_PATH)/mod:/root/go/pkg/mod:Z \
-v $(shell go env GOCACHE):/root/.cache/go-build:Z \
-p 26668-26670:26656-26658 \
--platform linux/x86_64 \
--platform $(DOCKER_PLATFORM) \
--env SKIP_BUILD=true \
--env GIGA_STORAGE=${GIGA_STORAGE} \
--env GIGA_FLATKV_ONLY=${GIGA_FLATKV_ONLY} \
Expand Down
81 changes: 78 additions & 3 deletions docker/rpcnode/scripts/step1_configure_init.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
#!/usr/bin/env sh
#
# rpcnode init script for the integration-test docker setup. NOT a
# production deploy script. Best-effort by design — curl probes against
# the validator RPC are allowed to fail (the script proceeds with
# whatever values came back, the container then converges as the cluster
# stabilises). The few cases where we DO want fail-fast — genesis file
# missing after the bounded wait, autobahn validator dirs missing — are
# guarded by explicit `if [ ! -f ]; exit 1` checks below. Don't add
# `set -e`: it makes those transient curl probes fatal and breaks
# init when the cluster is still warming up.

# Set up GO PATH
echo "Configure and initialize environment"
Expand All @@ -7,14 +17,30 @@ echo "Configure and initialize environment"
seid version # Uncomment the below line if there are any dependency issues
# ldd build/seid

# Initialize validator node
# Initialize validator node. --overwrite so this is safe to re-run inside
# a recycled container; the script writes new configs over whatever was
# already on the previous run.
MONIKER="sei-rpc-node"
seid init --chain-id sei "$MONIKER"
seid init --overwrite --chain-id sei "$MONIKER"

# Wait for the chain genesis.json (validator step3 writes it). The test
# setup may spawn the rpc node in parallel with the cluster, so this can
# still be missing here — poll up to 5 minutes.
GENESIS_SRC="build/generated/genesis.json"
i=0
while [ ! -f "$GENESIS_SRC" ] && [ "$i" -lt 300 ]; do
sleep 1
i=$((i + 1))
done
if [ ! -f "$GENESIS_SRC" ]; then
echo "ERROR: $GENESIS_SRC missing after 5 minutes; aborting." >&2
exit 1
fi

# Copy configs
cp docker/rpcnode/config/app.toml ~/.sei/config/app.toml
cp docker/rpcnode/config/config.toml ~/.sei/config/config.toml
cp build/generated/genesis.json ~/.sei/config/genesis.json
cp "$GENESIS_SRC" ~/.sei/config/genesis.json
Comment thread
cursor[bot] marked this conversation as resolved.

# Apply Giga Storage overrides so the RPC node's app hash matches the validators.
GIGA_STORAGE=${GIGA_STORAGE:-false}
Expand Down Expand Up @@ -59,6 +85,55 @@ if [ -n "$RECEIPT_BACKEND" ]; then
fi
fi

# Generate Autobahn (GigaRouter) config when the validators are running
# Autobahn consensus. The RPC node uses mode = "full" (see config.toml),
# which makes it an fullnode autobahn participant — loads the committee
# for routing only and forwards eth_sendRawTransaction to the shard owner.
# Reuse the validator node directories under build/generated/ (mounted
# into the container) so the committee description matches the cluster.
AUTOBAHN=${AUTOBAHN:-false}
if [ "$AUTOBAHN" = "true" ]; then
echo "Generating Autobahn config for RPC node (fullnode via mode=full)..."
AUTOBAHN_CONFIG="$HOME/.sei/config/autobahn.json"

# Default to 4 (the docker-compose cluster size) when CLUSTER_SIZE is unset.
CLUSTER_SIZE=${CLUSTER_SIZE:-4}
NODE_DIRS=""
i=0
while [ "$i" -lt "$CLUSTER_SIZE" ]; do
NODE_DIRS="$NODE_DIRS build/generated/node_${i}"
i=$((i + 1))
done

# Wait for each validator dir to be fully populated. gen-autobahn-config
# reads validator_pubkey, node_pubkey, autobahn_address, evmrpc_url; the
# rpc container can be spawned in parallel with the cluster, so any of
# these may not yet exist. Poll up to 5 minutes for evmrpc_url.txt (the
# autobahn-specific file each validator step writes last).
for d in $NODE_DIRS; do
i=0
while [ ! -f "$d/evmrpc_url.txt" ] && [ "$i" -lt 300 ]; do
sleep 1
i=$((i + 1))
done
if [ ! -f "$d/evmrpc_url.txt" ]; then
echo "ERROR: $d/evmrpc_url.txt missing after 5 minutes; aborting." >&2
exit 1
fi
done

seid tendermint gen-autobahn-config $NODE_DIRS --output "$AUTOBAHN_CONFIG"
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
cursor[bot] marked this conversation as resolved.

# Inject autobahn-config-file as a top-level key in config.toml. It must
# precede any [section] header so the TOML parser sees it at root scope.
if grep -q "autobahn-config-file" ~/.sei/config/config.toml; then
sed -i 's|autobahn-config-file = .*|autobahn-config-file = "'"$AUTOBAHN_CONFIG"'"|' ~/.sei/config/config.toml
else
sed -i '1s|^|autobahn-config-file = "'"$AUTOBAHN_CONFIG"'"\n|' ~/.sei/config/config.toml
fi
echo "Autobahn config written to $AUTOBAHN_CONFIG (fullnode via mode=full)"
fi

# Override state sync configs
STATE_SYNC_RPC="192.168.10.10:26657"
STATE_SYNC_PEER="2f9846450b7a3dcf4af1ac0082e3279c16744df8@172.31.9.18:26656,ec98c4a28a2023f4f976828c8a8e7127bfef4e1b@172.31.4.96:26656,b03014d67384fb0ef6ad992c77cefe4f9d2c1640@172.31.4.219:26656"
Expand Down
5 changes: 3 additions & 2 deletions evmrpc/block_txcount_parity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"github.com/sei-protocol/sei-chain/sei-cosmos/client"
sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types"
tmbytes "github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/utils"
tmmock "github.com/sei-protocol/sei-chain/sei-tendermint/rpc/client/mock"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/coretypes"
tmtypes "github.com/sei-protocol/sei-chain/sei-tendermint/types"
Expand All @@ -40,8 +41,8 @@ func (*parityTxCountTMClient) EvmTxByHash(common.Hash) (tmtypes.Tx, bool) {
return nil, false
}

func (*parityTxCountTMClient) EvmProxy(common.Address) (*url.URL, bool) {
return nil, false
func (*parityTxCountTMClient) EvmProxy(common.Address) utils.Option[*url.URL] {
return utils.None[*url.URL]()
}

func (c *parityTxCountTMClient) Block(_ context.Context, h *int64) (*coretypes.ResultBlock, error) {
Expand Down
5 changes: 3 additions & 2 deletions evmrpc/height_availability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/sei-protocol/sei-chain/sei-cosmos/client"
sdk "github.com/sei-protocol/sei-chain/sei-cosmos/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/utils"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/client/mock"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/coretypes"
tmtypes "github.com/sei-protocol/sei-chain/sei-tendermint/types"
Expand All @@ -38,8 +39,8 @@ func (*heightTestClient) EvmTxByHash(common.Hash) (tmtypes.Tx, bool) {
return nil, false
}

func (*heightTestClient) EvmProxy(common.Address) (*url.URL, bool) {
return nil, false
func (*heightTestClient) EvmProxy(common.Address) utils.Option[*url.URL] {
return utils.None[*url.URL]()
}

func newHeightTestClient(highHeight, earliest, latest int64) *heightTestClient {
Expand Down
2 changes: 1 addition & 1 deletion evmrpc/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (s *SendAPI) SendRawTransaction(ctx context.Context, input hexutil.Bytes) (
// but we still need to handle it.
sender, senderErr := getSender(tx, s.keeper.ChainID(s.ctxProvider(LatestCtxHeight)))
if senderErr == nil {
if url, ok := s.tmClient.EvmProxy(sender); ok {
if url, ok := s.tmClient.EvmProxy(sender).Get(); ok {
recordRedirectedRequest(ctx, "eth_sendRawTransaction", string(s.connectionType))
// HTTP transport pooling already happens globally underneath net/http, so
// creating a fresh RPC client per proxied request is fine here. If we
Expand Down
6 changes: 3 additions & 3 deletions evmrpc/send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ type sendProxyClient struct {
proxyURL *url.URL
}

func (c *sendProxyClient) EvmProxy(common.Address) (*url.URL, bool) {
func (c *sendProxyClient) EvmProxy(common.Address) utils.Option[*url.URL] {
if c.proxyURL == nil {
return nil, false
return utils.None[*url.URL]()
}
return c.proxyURL, true
return utils.Some(c.proxyURL)
}

func TestMnemonicToPrivateKey(t *testing.T) {
Expand Down
5 changes: 3 additions & 2 deletions evmrpc/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
sdkerrors "github.com/sei-protocol/sei-chain/sei-cosmos/types/errors"
abci "github.com/sei-protocol/sei-chain/sei-tendermint/abci/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes"
tmutils "github.com/sei-protocol/sei-chain/sei-tendermint/libs/utils"
types2 "github.com/sei-protocol/sei-chain/sei-tendermint/proto/tendermint/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/client/mock"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/coretypes"
Expand Down Expand Up @@ -158,8 +159,8 @@ func (*MockClient) EvmTxByHash(hash common.Hash) (tmtypes.Tx, bool) {
return tx, true
}

func (*MockClient) EvmProxy(common.Address) (*url.URL, bool) {
return nil, false
func (*MockClient) EvmProxy(common.Address) tmutils.Option[*url.URL] {
return tmutils.None[*url.URL]()
}

func NewMockClientWithLatest(latest int64) *MockClient {
Expand Down
5 changes: 3 additions & 2 deletions evmrpc/simulate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
receipt "github.com/sei-protocol/sei-chain/sei-db/ledger_db/receipt"
abci "github.com/sei-protocol/sei-chain/sei-tendermint/abci/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/utils"
tenderminttypes "github.com/sei-protocol/sei-chain/sei-tendermint/proto/tendermint/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/client/mock"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/coretypes"
Expand Down Expand Up @@ -882,8 +883,8 @@ func (c *fixedBlockClient) EvmTxByHash(common.Hash) (tmtypes.Tx, bool) {
return nil, false
}

func (c *fixedBlockClient) EvmProxy(common.Address) (*url.URL, bool) {
return nil, false
func (c *fixedBlockClient) EvmProxy(common.Address) utils.Option[*url.URL] {
return utils.None[*url.URL]()
}

func (c *fixedBlockClient) Block(_ context.Context, _ *int64) (*coretypes.ResultBlock, error) {
Expand Down
5 changes: 3 additions & 2 deletions evmrpc/tests/mock_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/sei-protocol/sei-chain/evmrpc"
abci "github.com/sei-protocol/sei-chain/sei-tendermint/abci/types"
tmbytes "github.com/sei-protocol/sei-chain/sei-tendermint/libs/bytes"
"github.com/sei-protocol/sei-chain/sei-tendermint/libs/utils"
tmproto "github.com/sei-protocol/sei-chain/sei-tendermint/proto/tendermint/types"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/client/mock"
"github.com/sei-protocol/sei-chain/sei-tendermint/rpc/coretypes"
Expand Down Expand Up @@ -45,8 +46,8 @@ func (*MockClient) EvmTxByHash(common.Hash) (tmtypes.Tx, bool) {
return nil, false
}

func (c *MockClient) EvmProxy(common.Address) (*url.URL, bool) {
return nil, false
func (c *MockClient) EvmProxy(common.Address) utils.Option[*url.URL] {
return utils.None[*url.URL]()
}

func (c *MockClient) Block(_ context.Context, h *int64) (*coretypes.ResultBlock, error) {
Expand Down
2 changes: 1 addition & 1 deletion evmrpc/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ func (t *TransactionAPI) GetTransactionCount(ctx context.Context, address common
}()

if blockNrOrHash.BlockHash == nil && *blockNrOrHash.BlockNumber == rpc.PendingBlockNumber {
if url, ok := t.tmClient.EvmProxy(address); ok {
if url, ok := t.tmClient.EvmProxy(address).Get(); ok {
recordRedirectedRequest(ctx, "eth_getTransactionCount", string(t.connectionType))

// HTTP transport pooling already happens globally underneath net/http, so
Expand Down
Loading
Loading