Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Stargate #546

Closed
wants to merge 100 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
b3f6762
changelog
fedekunze Sep 24, 2020
dd782b6
stargate release
fedekunze Sep 28, 2020
5730012
rename codec
fedekunze Sep 28, 2020
df05b2b
update ante handler
fedekunze Sep 28, 2020
2ff8cb5
update ante test
fedekunze Sep 28, 2020
3b78044
Merge branch 'development' of github.com:ChainSafe/ethermint into rc0…
fedekunze Sep 30, 2020
42cd419
update changelog
fedekunze Sep 30, 2020
9e6f38e
crypto: refactor for stargate
fedekunze Oct 1, 2020
9196272
Merge branch 'development' of github.com:ChainSafe/ethermint into cry…
fedekunze Oct 6, 2020
c82547d
fixes
fedekunze Oct 6, 2020
e0f70db
fix keys
fedekunze Oct 6, 2020
56d67cd
Merge branch 'changelog' of github.com:ChainSafe/ethermint into crypt…
fedekunze Oct 6, 2020
eaa1f4c
changelog
fedekunze Oct 6, 2020
ce4160d
Merge branch 'development' into crypto-refactor
fedekunze Oct 6, 2020
8a3121f
conflicts
fedekunze Oct 6, 2020
d15e36c
crypto refactor changes
fedekunze Oct 6, 2020
1420a51
Stargate 8 (#568)
fedekunze Oct 9, 2020
0daf3a4
more fixes
fedekunze Oct 9, 2020
5d7bb08
logs and other evm updates
fedekunze Oct 9, 2020
41d7320
remove faucet
fedekunze Oct 9, 2020
e22b1d6
update ante
fedekunze Oct 9, 2020
00ed0ba
evm updates
fedekunze Oct 12, 2020
3813468
more fixes
fedekunze Oct 12, 2020
ec75144
update app
fedekunze Oct 12, 2020
423198e
more evm changes
fedekunze Oct 12, 2020
6becc34
fix conflicts
fedekunze Oct 13, 2020
7a931b4
fixes
fedekunze Oct 13, 2020
0321865
app changes
fedekunze Oct 13, 2020
60e4c47
gRPC service
fedekunze Oct 13, 2020
2ccc67a
use v0.40.0 rc0 tag
fedekunze Oct 13, 2020
5a2cba7
remove Querier
fedekunze Oct 13, 2020
84c8b49
rpc changes
fedekunze Oct 14, 2020
8ab8567
rpc fixes
fedekunze Oct 14, 2020
f1ac322
binary update and sims
fedekunze Oct 14, 2020
7773ce6
LGTM audit
fedekunze Oct 14, 2020
f2b2c2f
proto changes
fedekunze Oct 14, 2020
d1d4448
rpc updates
fedekunze Oct 14, 2020
de12cbf
more rpc updates
fedekunze Oct 15, 2020
5190c0a
finish rpc changes
fedekunze Oct 15, 2020
3e3fafa
update deps
fedekunze Oct 15, 2020
d05ea9b
lint|
fedekunze Oct 15, 2020
f255412
format
fedekunze Oct 15, 2020
d488e29
fix tests build errors
fedekunze Oct 15, 2020
c752527
crypto tests
fedekunze Oct 16, 2020
c60cc05
ethsecp256k1 tests
fedekunze Oct 16, 2020
a1bd9c7
fixes; switch GenesisAccount balance to sdk.Int
fedekunze Oct 16, 2020
4bc1212
more test build fixes
fedekunze Oct 16, 2020
887120a
evm: test fixes
fedekunze Oct 16, 2020
2a0150d
fix test exporter
fedekunze Oct 16, 2020
09c26f7
begin server config
fedekunze Oct 19, 2020
a145632
custom server
fedekunze Oct 20, 2020
8d18470
WIP: config rpc
fedekunze Oct 20, 2020
a16818a
changes from development
fedekunze Oct 20, 2020
a5cc8c7
sdk: stargate rc1
fedekunze Oct 20, 2020
a9e3df4
fixes from rc1
fedekunze Oct 20, 2020
1b169cc
more rc1 changes
fedekunze Oct 20, 2020
7a662b5
Merge branch 'development' of https://github.com/cosmos/ethermint int…
fedekunze Oct 22, 2020
30bc477
log and response data
fedekunze Oct 22, 2020
2842edf
fix conflicts
fedekunze Oct 26, 2020
e60363f
build
fedekunze Oct 26, 2020
a174b50
build
fedekunze Oct 26, 2020
eb215e6
fixes
fedekunze Oct 26, 2020
0dae6cb
codec updates
fedekunze Oct 26, 2020
334ccbf
grpc test
fedekunze Oct 27, 2020
d98d7f8
fixes
fedekunze Oct 29, 2020
b0203e9
update msg server
fedekunze Oct 29, 2020
f84b97a
replace cmds
fedekunze Nov 2, 2020
20ead7a
update to rc3
fedekunze Nov 9, 2020
d3e4df2
fix compilation errors (#596)
chengwenxi Nov 13, 2020
189d6c7
merge develop
fedekunze Nov 17, 2020
4ee7eea
stargate: fix ethereum transaction (#604)
chengwenxi Dec 10, 2020
ede2dbc
stargate: fix conflicts (#650)
fedekunze Dec 14, 2020
9a5f5f7
Merge branch 'development' of https://github.com/cosmos/ethermint int…
fedekunze Dec 14, 2020
30b3d89
fix evm tests
fedekunze Dec 14, 2020
1ad2d00
refactor rpc
fedekunze Dec 21, 2020
53c5df8
rc6
fedekunze Jan 5, 2021
a97d761
fix conflicts with development
fedekunze Jan 7, 2021
7b0d136
more fixes
fedekunze Jan 7, 2021
ed953f9
fix conflicts with development
fedekunze Jan 7, 2021
41e5080
fix conflicts with development
fedekunze Jan 8, 2021
36b85ad
update to stargate final
fedekunze Jan 11, 2021
08c93c6
fix conflicts with development
fedekunze Jan 11, 2021
68a1f90
docs: revert changes
fedekunze Jan 11, 2021
52698d3
Merge branch 'fedekunze/stargate-8' of https://github.com/cosmos/ethe…
fedekunze Jan 11, 2021
18ae4c1
Merge branch 'fedekunze/stargate-8' of https://github.com/cosmos/ethe…
fedekunze Jan 15, 2021
1fe0b79
update services
fedekunze Jan 15, 2021
02b5448
fork server
fedekunze Jan 16, 2021
cccae75
int.go
fedekunze Jan 18, 2021
9905012
server fixes
fedekunze Jan 18, 2021
0bb5974
bump sdk version to v0.41.0
fedekunze Jan 26, 2021
a0fd185
rm alias, rpc fixes
fedekunze Jan 27, 2021
80b7e45
fix genesis account supply
fedekunze Jan 29, 2021
44331b3
fix rpc Call fee
fedekunze Jan 30, 2021
761ab44
rm gas limit field
fedekunze Jan 30, 2021
6eb238d
server fixes
fedekunze Jan 30, 2021
5884ba0
cmd fixes
fedekunze Jan 30, 2021
e16081f
go version workflows
fedekunze Jan 30, 2021
bf2f2aa
Stargate binary fix (#784)
freddyli7 Feb 8, 2021
8348e32
add cmd flag for rpc api modules - stargate (#825)
araskachoi Mar 12, 2021
8c30756
Update rpcapi changelog (#844)
araskachoi Mar 12, 2021
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
1 change: 0 additions & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,3 @@ Standard: Cpp11
TabWidth: 8
UseTab: Never
...

18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -56,6 +59,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -92,6 +98,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -128,6 +137,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -164,6 +176,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down Expand Up @@ -199,6 +214,9 @@ jobs:
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
go-version: 1.15
- uses: technote-space/get-diff-action@v4
id: git_diff
with:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (evm) [\#674](https://github.com/cosmos/ethermint/issues/674) Reset all cache after account data has been committed in `EndBlock` to make sure every node state consistent.
* (evm) [\#672](https://github.com/cosmos/ethermint/issues/672) Fix panic of `wrong Block.Header.AppHash` when restart a node with snapshot.

### Features
* (api) [\#825](https://github.com/cosmos/ethermint/pull/825) Individually enable the api modules. Will be implemented in the latest version of ethermint with the upcoming stargate upgrade.

## [v0.4.0] - 2020-12-15

### API Breaking
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ WORKDIR /root

# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/ethermintd /usr/bin/ethermintd
COPY --from=build-env /go/src/github.com/cosmos/ethermint/build/ethermintcli /usr/bin/ethermintcli

# Run ethermintd by default
CMD ["ethermintd"]
6 changes: 1 addition & 5 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ func NewAnteHandler(
authante.NewRejectExtensionOptionsDecorator(),
NewEthMempoolFeeDecorator(evmKeeper),
authante.NewValidateBasicDecorator(),
// TODO: add timeout for MsgEthereumTx
// authante.TxTimeoutHeightDecorator{},
// authante.NewValidateMemoDecorator(ak),
NewEthSigVerificationDecorator(),
NewAccountVerificationDecorator(ak, bankKeeper, evmKeeper),
NewNonceVerificationDecorator(ak),
Expand Down Expand Up @@ -102,7 +99,7 @@ func DefaultSigVerificationGasConsumer(
switch pubkey := pubkey.(type) {
case *ed25519.PubKey:
meter.ConsumeGas(params.SigVerifyCostED25519, "ante verify: ed25519")
return sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, "ED25519 public keys are unsupported")
return nil

case *secp256k1.PubKey:
meter.ConsumeGas(params.SigVerifyCostSecp256k1, "ante verify: secp256k1")
Expand All @@ -123,7 +120,6 @@ func DefaultSigVerificationGasConsumer(
return err
}
return nil

default:
return sdkerrors.Wrapf(sdkerrors.ErrInvalidPubKey, "unrecognized public key type: %T", pubkey)
}
Expand Down
35 changes: 5 additions & 30 deletions app/ethermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth"
authrest "github.com/cosmos/cosmos-sdk/x/auth/client/rest"
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
Expand Down Expand Up @@ -87,9 +86,6 @@ import (
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"

"github.com/cosmos/ethermint/app/ante"
"github.com/cosmos/ethermint/server"
"github.com/cosmos/ethermint/server/api"
"github.com/cosmos/ethermint/server/config"
ethermint "github.com/cosmos/ethermint/types"
"github.com/cosmos/ethermint/x/evm"

Expand Down Expand Up @@ -161,8 +157,8 @@ var (
)

var (
_ simapp.App = (*EthermintApp)(nil)
_ server.Application = (*EthermintApp)(nil)
_ simapp.App = (*EthermintApp)(nil)
_ servertypes.Application = (*EthermintApp)(nil)
)

// EthermintApp implements an extended ABCI application. It is an application
Expand Down Expand Up @@ -406,10 +402,12 @@ func NewEthermintApp(
app.mm.SetOrderInitGenesis(
// SDK modules
capabilitytypes.ModuleName, authtypes.ModuleName, banktypes.ModuleName, distrtypes.ModuleName, stakingtypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName, crisistypes.ModuleName,
slashingtypes.ModuleName, govtypes.ModuleName, minttypes.ModuleName,
ibchost.ModuleName, genutiltypes.ModuleName, evidencetypes.ModuleName, ibctransfertypes.ModuleName,
// Ethermint modules
evmtypes.ModuleName,
// NOTE: crisis module must go at the end to check for invariants on each module
crisistypes.ModuleName,
)

app.mm.RegisterInvariants(&app.CrisisKeeper)
Expand Down Expand Up @@ -589,14 +587,10 @@ func (app *EthermintApp) RegisterAPIRoutes(apiSvr *sdkapi.Server, apiConfig sdkc
clientCtx := apiSvr.ClientCtx
rpc.RegisterRoutes(clientCtx, apiSvr.Router)
evmrest.RegisterTxRoutes(clientCtx, apiSvr.Router)
authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)

ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
ModuleBasics.RegisterGRPCGatewayRoutes(apiSvr.ClientCtx, apiSvr.GRPCGatewayRouter)

// // Register Ethereum namespaces
// ethermintrpc.RegisterEthereum(clientCtx, apiSvr.Router)

// register swagger API from root so that other applications can override easily
if apiConfig.Swagger {
simapp.RegisterSwaggerAPI(clientCtx, apiSvr.Router)
Expand All @@ -613,25 +607,6 @@ func (app *EthermintApp) RegisterTendermintService(clientCtx client.Context) {
tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry)
}

// RegisterEthereumServers registers all application ethereum routes with the provided
// API server.
func (app *EthermintApp) RegisterEthereumServers(apiSvr *api.Server, apiConfig config.EthereumConfig) {
// clientCtx := apiSvr.ClientCtx
// rpc.RegisterRoutes(clientCtx, apiSvr.Router)
// authrest.RegisterTxRoutes(clientCtx, apiSvr.Router)

// ModuleBasics.RegisterRESTRoutes(clientCtx, apiSvr.Router)
// ModuleBasics.RegisterGRPCRoutes(apiSvr.ClientCtx, apiSvr.GRPCRouter)

// // Register Ethereum namespaces
// // ethermintrpc.RegisterRoutes(clientCtx, apiSvr.Router)

// // register swagger API from root so that other applications can override easily
// if apiConfig.Swagger {
// simapp.RegisterSwaggerAPI(clientCtx, apiSvr.Router)
// }
}

// GetMaccPerms returns a copy of the module account permissions
func GetMaccPerms() map[string][]string {
dupMaccPerms := make(map[string][]string)
Expand Down
114 changes: 0 additions & 114 deletions client/keys.go

This file was deleted.

2 changes: 1 addition & 1 deletion client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/cosmos/cosmos-sdk/crypto/keyring"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
"github.com/cosmos/cosmos-sdk/server"
srvconfig "github.com/cosmos/cosmos-sdk/server/config"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
Expand All @@ -40,6 +39,7 @@ import (
ethcrypto "github.com/ethereum/go-ethereum/crypto"

"github.com/cosmos/ethermint/crypto/hd"
srvconfig "github.com/cosmos/ethermint/server/config"
ethermint "github.com/cosmos/ethermint/types"
evmtypes "github.com/cosmos/ethermint/x/evm/types"
)
Expand Down
4 changes: 3 additions & 1 deletion cmd/ethermintd/cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import (
"github.com/stretchr/testify/require"

"github.com/cosmos/cosmos-sdk/client/flags"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"
"github.com/cosmos/cosmos-sdk/x/genutil/client/cli"

"github.com/cosmos/ethermint/app"
ethermintd "github.com/cosmos/ethermint/cmd/ethermintd"
)

Expand All @@ -21,6 +23,6 @@ func TestInitCmd(t *testing.T) {
fmt.Sprintf("--%s=%s", flags.FlagChainID, "ethermint-1"),
})

err := ethermintd.Execute(rootCmd)
err := svrcmd.Execute(rootCmd, app.DefaultNodeHome)
require.NoError(t, err)
}
1 change: 1 addition & 0 deletions cmd/ethermintd/genaccounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa
bankGenState := banktypes.GetGenesisStateFromAppState(depCdc, appState)
bankGenState.Balances = append(bankGenState.Balances, balances)
bankGenState.Balances = banktypes.SanitizeGenesisBalances(bankGenState.Balances)
bankGenState.Supply = bankGenState.Supply.Add(balances.Coins...)

bankGenStateBz, err := cdc.MarshalJSON(bankGenState)
if err != nil {
Expand Down
16 changes: 14 additions & 2 deletions cmd/ethermintd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@ package main

import (
"os"

"github.com/cosmos/cosmos-sdk/server"
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd"

"github.com/cosmos/ethermint/app"
)

func main() {
rootCmd, _ := NewRootCmd()
if err := Execute(rootCmd); err != nil {
os.Exit(1)

if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil {
switch e := err.(type) {
case server.ErrorCode:
os.Exit(e.Code)

default:
os.Exit(1)
}
}
}
Loading