Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ff65055
[wip] account migration
AkKoks Apr 16, 2026
af926a4
[wip] tacchain migration to cosmos-evm 0.6.0
AkKoks Apr 24, 2026
a8689bf
ignore
AkKoks Apr 24, 2026
c11ea5e
fix(upgrade): set to default HistoryServeWindow
AkKoks Apr 27, 2026
d5ac453
fix localnet scripts
AkKoks Apr 27, 2026
96ac8c4
rename upgrade version
AkKoks Apr 27, 2026
ef2707d
helper: add helper scripts for tacchain-local repo
AkKoks May 4, 2026
e4ed624
fix(migration): migrate dynamic precompile param
AkKoks May 5, 2026
51eba91
feat(upgrade): move rescue addresses to plan info
AkKoks May 5, 2026
c08c215
feat(cmd): add `debug` cmd from evm
AkKoks May 5, 2026
a473f16
fix: replace `evm-chain-id` in app config for localnet init
AkKoks May 5, 2026
987c43f
docs: add changelog for v.1.0.4 -> v1.6.0 upgrading
AkKoks May 5, 2026
41a074e
fix: rescue config
AkKoks May 5, 2026
b3a25db
fix: get from app cfg chain id for evm chain config
AkKoks May 6, 2026
c8bb85f
update go.mod with bumped fork versions of sdk and evm
AkKoks May 7, 2026
f3fd57f
github release workflow
AkKoks May 7, 2026
62a2941
remove depricated: x/params and crisis keepers
AkKoks May 8, 2026
91c5635
docs: sepparate changlelog and migration guide
AkKoks May 8, 2026
8017686
docs: fix migration doc
AkKoks May 8, 2026
89ac8b5
bump evm module ver (fix liquidstake)
AkKoks May 8, 2026
a3fd1f8
fix(upgrade): refactor evm migration
AkKoks May 8, 2026
ff11924
fix(ante): add pending tx notifier
AkKoks May 8, 2026
a73f850
fix: DefaultStaticPrecompiles args pos
AkKoks May 8, 2026
f971213
fix: gen localnode script and docker files refactor
AkKoks May 9, 2026
23ef02b
fix: e2e tests
AkKoks May 11, 2026
7469765
bump evm version
AkKoks May 11, 2026
2bef9b5
remove solidity tests (moved to another repo)
AkKoks May 11, 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
94 changes: 94 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Release

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # v1.2.3
- "v[0-9]+.[0-9]+.[0-9]+-beta*" # v1.2.3-beta, v1.2.3-beta.1

permissions:
contents: write

jobs:
build:
name: Build ${{ matrix.goos }}/${{ matrix.goarch }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true

- name: Build binary
env:
GONOSUMDB: "github.com/TacBuild/*"
GOPROXY: "direct,https://proxy.golang.org"
run: |
mkdir -p dist
make build-${{ matrix.goos }}-${{ matrix.goarch }}
cp build/tacchaind-${{ matrix.goos }}-${{ matrix.goarch }} dist/

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tacchaind-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/tacchaind-${{ matrix.goos }}-${{ matrix.goarch }}
retention-days: 1

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true

- name: Compute checksums
run: |
cd dist
sha256sum tacchaind-linux-amd64 tacchaind-linux-arm64 > checksums.txt
cat checksums.txt

- name: Determine pre-release
id: meta
run: |
TAG="${GITHUB_REF_NAME}"
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
if [[ "${TAG}" == *"-beta"* ]]; then
echo "prerelease=true" >> "$GITHUB_OUTPUT"
else
echo "prerelease=false" >> "$GITHUB_OUTPUT"
fi

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.meta.outputs.tag }}
name: ${{ steps.meta.outputs.tag }}
prerelease: ${{ steps.meta.outputs.prerelease }}
generate_release_notes: true
files: |
dist/tacchaind-linux-amd64
dist/tacchaind-linux-arm64
dist/checksums.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ coverage.txt
.test-localnet-params
.test-localnet-evm
.mainnet
.vscode/tacchain+evm-module.code-workspace
18 changes: 11 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# docker build . -t tacchaind:latest
# docker run --rm -it tacchaind:latest tacchaind --help

FROM golang:1.23.8-bookworm AS go-builder
FROM golang:1.23.8-alpine3.21 AS go-builder

RUN apt-get update && apt-get install -y \
RUN apk add --no-cache \
ca-certificates \
build-essential \
libusb-1.0-0-dev \
libc6 \
&& rm -rf /var/lib/apt/lists/*
build-base \
libusb-dev \
eudev-dev

WORKDIR /code
COPY . /code/
Expand All @@ -17,7 +16,12 @@ RUN LEDGER_ENABLED=true make build


# --------------------------------------------------------
FROM debian:bookworm-slim
FROM alpine:3.21

RUN apk upgrade --no-cache && \
apk add --no-cache \
ca-certificates \
libusb

COPY --from=go-builder /code/build/tacchaind /usr/bin/tacchaind

Expand Down
43 changes: 43 additions & 0 deletions Dockerfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# docker build . -t tacchaind:latest
# docker run --rm -it tacchaind:latest tacchaind --help

FROM golang:1.23.8-alpine3.21 AS go-builder


RUN apk add --no-cache \
ca-certificates \
build-base \
libusb-dev \
linux-headers

WORKDIR /code
COPY . /code/

RUN LEDGER_ENABLED=true make build


# --------------------------------------------------------
FROM alpine:3.21

RUN apk upgrade --no-cache && \
apk add --no-cache \
ca-certificates \
libusb

COPY --from=go-builder /code/build/tacchaind /usr/bin/tacchaind

WORKDIR /opt

# rest server
EXPOSE 1317
# tendermint p2p
EXPOSE 26656
# tendermint rpc
EXPOSE 26657
# evm rpc http
EXPOSE 8545
# evm rpc ws
EXPOSE 8546


CMD ["/usr/bin/tacchaind", "version"]
40 changes: 40 additions & 0 deletions Dockerfile.local.workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Build from workspace root (one level above tacchain/):
#
# The build context must be the workspace root so that sibling directories
# cosmos-sdk/ and evm/ are available (referenced via go.mod replace directives).

FROM golang:1.23.8-alpine3.21 AS go-builder

RUN apk add --no-cache \
ca-certificates \
build-base \
libusb-dev \
linux-headers

WORKDIR /workspace
# Copy all three repos that go.mod replace directives depend on
COPY tacchain/ /workspace/tacchain/
COPY cosmos-sdk/ /workspace/cosmos-sdk/
COPY evm/ /workspace/evm/

WORKDIR /workspace/tacchain
RUN LEDGER_ENABLED=true make build


FROM alpine:3.21
RUN apk upgrade --no-cache && \
apk add --no-cache ca-certificates libusb
COPY --from=go-builder /workspace/tacchain/build/tacchaind /usr/bin/tacchaind

# rest server
EXPOSE 1317
# tendermint p2p
EXPOSE 26656
# tendermint rpc
EXPOSE 26657
# evm rpc http
EXPOSE 8545
# evm rpc ws
EXPOSE 8546

CMD ["/usr/bin/tacchaind", "version"]
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ endif
build-windows-client: go.sum
GOOS=windows GOARCH=amd64 go build -mod=readonly $(BUILD_FLAGS) -o build/tacchaind.exe ./cmd/tacchaind

build-linux-amd64: go.sum
LEDGER_ENABLED=false GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -mod=readonly $(BUILD_FLAGS) -o build/tacchaind-linux-amd64 ./cmd/tacchaind

build-linux-arm64: go.sum
LEDGER_ENABLED=false GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -mod=readonly $(BUILD_FLAGS) -o build/tacchaind-linux-arm64 ./cmd/tacchaind

build-linux: build-linux-amd64 build-linux-arm64

go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify
Expand Down Expand Up @@ -129,19 +137,19 @@ test-solidity:
### Networks ###
###############################################################################

TACCHAIND := $(shell which tacchaind)
TACCHAIND ?= $(shell which tacchaind 2>/dev/null || echo ./build/tacchaind)

localnet: install localnet-init localnet-start
testnet: install testnet-init

localnet-init:
./contrib/localnet/init.sh
TACCHAIND=$(TACCHAIND) ./contrib/localnet/init.sh

localnet-init-multi-node:
./contrib/localnet/init-multi-node.sh
TACCHAIND=$(TACCHAIND) ./contrib/localnet/init-multi-node.sh

localnet-start:
./contrib/localnet/start.sh
TACCHAIND=$(TACCHAIND) ./contrib/localnet/start.sh

.PHONY: localnet-start localnet-init localnet-init-multi-node

37 changes: 23 additions & 14 deletions app/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ import (
"errors"
"fmt"

ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
"github.com/cosmos/ibc-go/v8/modules/core/keeper"
ibcante "github.com/cosmos/ibc-go/v10/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v10/modules/core/keeper"

corestoretypes "cosmossdk.io/core/store"
circuitante "cosmossdk.io/x/circuit/ante"
circuitkeeper "cosmossdk.io/x/circuit/keeper"

sdk "github.com/cosmos/cosmos-sdk/types"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"

evmtxlistener "github.com/cosmos/evm/ante"
evmcosmosante "github.com/cosmos/evm/ante/cosmos"
evmante "github.com/cosmos/evm/ante/evm"
evmanteinterfaces "github.com/cosmos/evm/ante/interfaces"
Expand All @@ -28,10 +28,12 @@ type HandlerOptions struct {

AccountKeeper evmanteinterfaces.AccountKeeper

IBCKeeper *keeper.Keeper
IBCKeeper *ibckeeper.Keeper

TXCounterStoreService corestoretypes.KVStoreService
CircuitKeeper *circuitkeeper.Keeper
CircuitKeeper *circuitkeeper.Keeper

// PendingTxListener is called during CheckTx for each pending EVM tx hash (used by JSON-RPC).
PendingTxListener evmtxlistener.PendingTxListener

// Cosmos EVM
FeeMarketKeeper evmanteinterfaces.FeeMarketKeeper
Expand Down Expand Up @@ -75,19 +77,24 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
switch typeURL := opts[0].GetTypeUrl(); typeURL {
case "/cosmos.evm.vm.v1.ExtensionOptionsEthereumTx":
// handle as *evmtypes.MsgEthereumTx
evmParams := options.EvmKeeper.GetParams(ctx)
feemarketParams := options.FeeMarketKeeper.GetParams(ctx)
anteHandler = sdk.ChainAnteDecorators(
evmante.NewEVMMonoDecorator(
options.AccountKeeper,
options.FeeMarketKeeper,
options.EvmKeeper,
options.MaxTxGasWanted,
&evmParams,
&feemarketParams,
),
evmtxlistener.NewTxListenerDecorator(options.PendingTxListener),
)
case "/cosmos.evm.types.v1.ExtensionOptionDynamicFeeTx":
case "/cosmos.evm.ante.v1.ExtensionOptionDynamicFeeTx":
// cosmos-sdk tx with dynamic fee extension
anteHandler, err = newCosmosAnteHandler(options)
anteHandler, err = newCosmosAnteHandler(ctx, options)
default:
return ctx, errors.New(fmt.Sprintf("rejecting tx with unsupported extension option: %s", typeURL))
return ctx, fmt.Errorf("rejecting tx with unsupported extension option: %s", typeURL)
}

if err != nil {
Expand All @@ -101,7 +108,7 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
// handle as totally normal Cosmos SDK tx
switch tx.(type) {
case sdk.Tx:
anteHandler, err = newCosmosAnteHandler(options)
anteHandler, err = newCosmosAnteHandler(ctx, options)
default:
return ctx, errors.New("invalid transaction type")
}
Expand All @@ -114,7 +121,9 @@ func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
}, nil
}

func newCosmosAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
func newCosmosAnteHandler(ctx sdk.Context, options HandlerOptions) (sdk.AnteHandler, error) {
feemarketParams := options.FeeMarketKeeper.GetParams(ctx)
txFeeChecker := evmante.NewDynamicFeeChecker(&feemarketParams)
return sdk.ChainAnteDecorators(
evmcosmosante.NewRejectMessagesDecorator(), // reject MsgEthereumTxs
evmcosmosante.NewAuthzLimiterDecorator( // disable the Msg types that cannot be included on an authz.MsgExec msgs field
Expand All @@ -127,16 +136,16 @@ func newCosmosAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) {
authante.NewValidateBasicDecorator(),
authante.NewTxTimeoutHeightDecorator(),
authante.NewValidateMemoDecorator(options.AccountKeeper),
evmcosmosante.NewMinGasPriceDecorator(options.FeeMarketKeeper, options.EvmKeeper),
evmcosmosante.NewMinGasPriceDecorator(&feemarketParams),
authante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
authante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, options.TxFeeChecker),
authante.NewDeductFeeDecorator(options.AccountKeeper, options.BankKeeper, options.FeegrantKeeper, txFeeChecker),
// SetPubKeyDecorator must be called before all signature verification decorators
authante.NewSetPubKeyDecorator(options.AccountKeeper),
authante.NewValidateSigCountDecorator(options.AccountKeeper),
authante.NewSigGasConsumeDecorator(options.AccountKeeper, options.SigGasConsumer),
authante.NewSigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
authante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
evmante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper, &feemarketParams),
), nil
}
Loading
Loading