Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 9 additions & 4 deletions app/ethermint.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,19 @@ func NewEthermintApp(logger tmlog.Logger, db dbm.DB, baseAppOpts ...func(*bam.Ba
bankSubspace := app.paramsKeeper.Subspace(bank.DefaultParamspace)

// account permissions
basicModuleAccs := []string{auth.FeeCollectorName, distr.ModuleName}
minterModuleAccs := []string{mint.ModuleName}
burnerModuleAccs := []string{staking.BondedPoolName, staking.NotBondedPoolName, gov.ModuleName}
maccPerms := map[string][]string{
auth.FeeCollectorName: []string{supply.Basic},
distr.ModuleName: []string{supply.Basic},
mint.ModuleName: []string{supply.Minter},
staking.BondedPoolName: []string{supply.Burner, supply.Staking},
staking.NotBondedPoolName: []string{supply.Burner, supply.Staking},
gov.ModuleName: []string{supply.Burner},
}

// Add keepers
app.accountKeeper = auth.NewAccountKeeper(app.cdc, app.accountKey, authSubspace, auth.ProtoBaseAccount)
app.bankKeeper = bank.NewBaseKeeper(app.accountKeeper, bankSubspace, bank.DefaultCodespace)
app.supplyKeeper = supply.NewKeeper(cdc, app.supplyKey, app.accountKeeper, app.bankKeeper, supply.DefaultCodespace, basicModuleAccs, minterModuleAccs, burnerModuleAccs)
app.supplyKeeper = supply.NewKeeper(cdc, app.supplyKey, app.accountKeeper, app.bankKeeper, supply.DefaultCodespace, maccPerms)

// register message handlers
app.Router().
Expand Down
15 changes: 12 additions & 3 deletions core/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,18 @@ func (cc *ChainContext) CalcDifficulty(_ ethcons.ChainReader, _ uint64, _ *ethty
//
// TODO: Figure out if this needs to be hooked up to any part of the ABCI?
func (cc *ChainContext) Finalize(
_ ethcons.ChainReader, _ *ethtypes.Header, _ ethstate.StateDB,
_ []*ethtypes.Transaction, _ []*ethtypes.Header, _ []*ethtypes.Receipt,
) (*ethtypes.Block, error) {
_ ethcons.ChainReader, _ *ethtypes.Header, _ *ethstate.StateDB,
_ []*ethtypes.Transaction, _ []*ethtypes.Header) {
}

// FinalizeAndAssemble runs any post-transaction state modifications (e.g. block
// rewards) and assembles the final block.
//
// Note: The block header and state database might be updated to reflect any
// consensus rules that happen at finalization (e.g. block rewards).
// TODO: Figure out if this needs to be hooked up to any part of the ABCI?
func (cc *ChainContext) FinalizeAndAssemble(_ ethcons.ChainReader, _ *ethtypes.Header, _ *ethstate.StateDB, _ []*ethtypes.Transaction,
_ []*ethtypes.Header, _ []*ethtypes.Receipt) (*ethtypes.Block, error) {
return nil, nil
}

Expand Down
4 changes: 1 addition & 3 deletions core/chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ func TestChainContextCalcDifficulty(t *testing.T) {
func TestChainContextFinalize(t *testing.T) {
cc := NewChainContext()

block, err := cc.Finalize(nil, nil, nil, nil, nil, nil)
require.Nil(t, err)
require.Nil(t, block)
cc.Finalize(nil, nil, nil, nil, nil)
}

func TestChainContextPrepare(t *testing.T) {
Expand Down
52 changes: 30 additions & 22 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,50 +3,58 @@ module github.com/cosmos/ethermint
go 1.12

require (
github.com/allegro/bigcache v1.2.1 // indirect
github.com/aristanetworks/goarista v0.0.0-20181101003910-5bb443fba8e0 // indirect
github.com/btcsuite/btcd v0.0.0-20190629003639-c26ffa870fd8 // indirect
github.com/cespare/cp v1.1.1 // indirect
github.com/cosmos/cosmos-sdk v0.28.2-0.20190704145406-01d442565807
github.com/cosmos/cosmos-sdk v0.28.2-0.20190709220430-3f519832a7a5
github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d // indirect
github.com/deckarep/golang-set v1.7.1 // indirect
github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712 // indirect
github.com/elastic/gosigar v0.10.3 // indirect
github.com/ethereum/go-ethereum v1.8.27
github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a // indirect
github.com/golangci/golangci-lint v1.17.1 // indirect
github.com/etcd-io/bbolt v1.3.3 // indirect
github.com/ethereum/go-ethereum v1.9.0
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
github.com/go-kit/kit v0.9.0 // indirect
github.com/golang/mock v1.3.1 // indirect
github.com/golang/protobuf v1.3.2 // indirect
github.com/google/uuid v1.0.0 // indirect
github.com/gordonklaus/ineffassign v0.0.0-20190601041439-ed7b1b5ee0f8 // indirect
github.com/gorilla/mux v1.7.0
github.com/hashicorp/golang-lru v0.5.0 // indirect
github.com/huin/goupnp v1.0.0 // indirect
github.com/influxdata/influxdb v1.7.7 // indirect
github.com/jackpal/go-nat-pmp v1.0.1 // indirect
github.com/karalabe/hid v0.0.0-20180420081245-2b4488a37358 // indirect
github.com/kisielk/errcheck v1.2.0 // indirect
github.com/karalabe/usb v0.0.0-20190703133951-9be757f914c0 // indirect
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-colorable v0.1.2 // indirect
github.com/mdempsky/unconvert v0.0.0-20190325185700-2f5dc3378ed3 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/onsi/ginkgo v1.8.0 // indirect
github.com/onsi/gomega v1.5.0 // indirect
github.com/pborman/uuid v0.0.0-20180906182336-adf5a7427709 // indirect
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/pkg/errors v0.8.1
github.com/prometheus/common v0.6.0 // indirect
github.com/prometheus/procfs v0.0.3 // indirect
github.com/prometheus/tsdb v0.9.1 // indirect
github.com/rakyll/statik v0.1.6 // indirect
github.com/rcrowley/go-metrics v0.0.0-20190706150252-9beb055b7962 // indirect
github.com/rjeczalik/notify v0.9.2 // indirect
github.com/spf13/cobra v0.0.5
github.com/spf13/viper v1.3.2
github.com/status-im/keycard-go v0.0.0-20190424133014-d95853db0f48 // indirect
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570 // indirect
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3 // indirect
github.com/stretchr/testify v1.3.0
github.com/syndtr/goleveldb v0.0.0-20181105012736-f9080354173f // indirect
github.com/tendermint/lint v0.0.1 // indirect
github.com/syndtr/goleveldb v1.0.0 // indirect
github.com/tendermint/tendermint v0.32.0
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 // indirect
github.com/tyler-smith/go-bip39 v1.0.0 // indirect
github.com/wsddn/go-ecdh v0.0.0-20161211032359-48726bab9208 // indirect
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
golang.org/x/net v0.0.0-20190628185345-da137c7871d7 // indirect
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb // indirect
golang.org/x/text v0.3.2 // indirect
google.golang.org/genproto v0.0.0-20181107211654-5fc9ac540362 // indirect
google.golang.org/appengine v1.4.0 // indirect
google.golang.org/genproto v0.0.0-20190708153700-3bdd9d9f5532 // indirect
google.golang.org/grpc v1.22.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/olebedev/go-duktape.v3 v3.0.0-20190213234257-ec84240a7772 // indirect
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
mvdan.cc/unparam v0.0.0-20190310220240-1b9ccfa71afe // indirect
)

replace (
github.com/ethereum/go-ethereum v1.8.27 => github.com/alexanderbez/go-ethereum v1.8.17-0.20181024144731-0a57b29f0c8e
golang.org/x/crypto => github.com/tendermint/crypto v0.0.0-20180820045704-3764759f34a5
)
Loading