Skip to content
This repository has been archived by the owner on Jun 9, 2024. It is now read-only.

Commit

Permalink
feat(runtime): Polaris Runtime Module (#1215)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
### Summary by CodeRabbit

- New Feature: Introduced a new Go package `runtime` that provides a
function `ProvidePolarisRuntime` for creating a new Polaris runtime.
- Refactor: Updated the `Keeper` struct in the `cosmos/x/evm/keeper`
package to include a `chain` field of type `Blockchain` and removed
several methods.
- New Feature: Added `Precommit` and `PrepareCheckState` functions to
the `Keeper` struct in the `cosmos/x/evm/keeper` package.
- Refactor: Updated the `AppModule` struct in the `cosmos/x/evm` package
to include `PrepareCheckState` and `Precommit` methods.
- New Feature: Added a new contract `DeployAndConsumeGas` in the
`contracts/scripts` directory that consumes gas in a loop.
- Refactor: Updated the `MakeAppConfig` function in the `e2e/testapp`
package to include `evmtypes.ModuleName` in the `PrepareCheckStaters`
and `Precommiters` lists.
- New Feature: Added a safety check on the JSON-RPC config in the
`eth/polar/config.go` file.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Cal Bera <[email protected]>
  • Loading branch information
Devon Bear and calbera authored Oct 12, 2023
1 parent 05b91e4 commit c1edabd
Show file tree
Hide file tree
Showing 31 changed files with 880 additions and 1,826 deletions.
2 changes: 2 additions & 0 deletions contracts/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ=
golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
Expand Down Expand Up @@ -215,6 +216,7 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
22 changes: 11 additions & 11 deletions contracts/scripts/DeployAndCallERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ import "../lib/forge-std/src/Script.sol";
import "../src/testing/SolmateERC20.sol";

contract DeployAndCallERC20 is Script {
function run() public {
address dropAddress = address(12);
uint256 quantity = 50000;
function run() public {
address dropAddress = address(12);
uint256 quantity = 50000;

vm.startBroadcast();
SolmateERC20 drop = new SolmateERC20();
vm.startBroadcast();
SolmateERC20 drop = new SolmateERC20();

for (uint256 i = 0; i < 66; i++) {
quantity += 50000;
drop.mint(dropAddress, quantity);
}

vm.stopBroadcast();
for (uint256 i = 0; i < 66; i++) {
quantity += 50000;
drop.mint(dropAddress, quantity);
}

vm.stopBroadcast();
}
}
46 changes: 46 additions & 0 deletions contracts/scripts/DeployAndConsumeGas.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// SPDX-License-Identifier: MIT
//
// Copyright (c) 2023 Berachain Foundation
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following
// conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

pragma solidity ^0.8.17;

import "../lib/forge-std/src/Script.sol";
import "../src/testing/SolmateERC20.sol";
import "../src/testing/ConsumeGas.sol";

contract DeployAndConsumeGas is Script {
function run() public {
address dropAddress = address(12);
uint256 quantity = 50000;

vm.startBroadcast();
ConsumeGas drop = new ConsumeGas();

for (uint256 i = 0; i < 1000; i++) {
drop.consumeGas(300000);
}

vm.stopBroadcast();
}
}
7 changes: 3 additions & 4 deletions cosmos/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ require (
google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect
google.golang.org/grpc v1.58.1
google.golang.org/protobuf v1.31.0
pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354
pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354
pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354
pkg.berachain.dev/polaris/contracts v0.0.0-20231010191645-a5ed99983be4
pkg.berachain.dev/polaris/eth v0.0.0-20231010191645-a5ed99983be4
pkg.berachain.dev/polaris/lib v0.0.0-20231010191645-a5ed99983be4
)

require (
filippo.io/edwards25519 v1.0.0 // indirect
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
github.com/99designs/keyring v1.2.1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/DataDog/zstd v1.5.5 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
Expand Down
14 changes: 6 additions & 8 deletions cosmos/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ github.com/99designs/keyring v1.2.1/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwR
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
Expand Down Expand Up @@ -1461,12 +1459,12 @@ nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0
nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50=
pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw=
pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04=
pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354 h1:ot7e/6InxTBcPq8Rg/4cog4JbsAxnPakaghUaI+vYXY=
pkg.berachain.dev/polaris/contracts v0.0.0-20230928142528-23cc5f141354/go.mod h1:aM6e6GYmu5YPNUWGs0Qy3pL8N5MsRHO3QvcUruwF2Rc=
pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354 h1:xVRqWkLJmjExDCWHg/mCGFqSif51+eucyP8TJuLseiM=
pkg.berachain.dev/polaris/eth v0.0.0-20230928142528-23cc5f141354/go.mod h1:eI+YNq3Nc4J9Di6RyZNOif5ejWGHmWfxRi/dS8gSE6A=
pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354 h1:QcNeLF3LUwwaEOsV6fdILiLH+BAsCcO+Um/nU1NsZ1w=
pkg.berachain.dev/polaris/lib v0.0.0-20230928142528-23cc5f141354/go.mod h1:PyX74/6+6XhSJ9gXmE/xFYp1gZCcQ36suVk8hh4s36M=
pkg.berachain.dev/polaris/contracts v0.0.0-20231010191645-a5ed99983be4 h1:q9gSJk2kQQbz/3cPcXGCW+JdQvxAm+7ukcDqzZiUcmw=
pkg.berachain.dev/polaris/contracts v0.0.0-20231010191645-a5ed99983be4/go.mod h1:LwuVx7lVFkIa/EXGNz2536i+YTK/mEU4A1vQJFZ8y4Q=
pkg.berachain.dev/polaris/eth v0.0.0-20231010191645-a5ed99983be4 h1:gOqKP7ZCzIU1NZrwdISnxswAatut/6Xi7JjdSpHbZk8=
pkg.berachain.dev/polaris/eth v0.0.0-20231010191645-a5ed99983be4/go.mod h1:HuT/i4PZCz3ItXAvDWHA31z4OZ10we6RH6xz+Fq0Nlw=
pkg.berachain.dev/polaris/lib v0.0.0-20231010191645-a5ed99983be4 h1:3zGPs5JJpBtysLMNWa5wKEhwC+j3p5AAK0gZ1fWuEc8=
pkg.berachain.dev/polaris/lib v0.0.0-20231010191645-a5ed99983be4/go.mod h1:OcMl9wH8872Q4++ikKXIm1FC4FbuGUWHxrjb6LCzvIY=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
Expand Down
83 changes: 83 additions & 0 deletions cosmos/runtime/depinject.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// SPDX-License-Identifier: BUSL-1.1
//
// Copyright (C) 2023, Berachain Foundation. All rights reserved.
// Use of this software is govered by the Business Source License included
// in the LICENSE file of this repository and at www.mariadb.com/bsl11.
//
// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY
// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER
// VERSIONS OF THE LICENSED WORK.
//
// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF
// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF
// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE).
//
// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
// TITLE.

package runtime

import (
"cosmossdk.io/depinject"
"cosmossdk.io/log"

"pkg.berachain.dev/polaris/cosmos/config"
evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper"
ethlog "pkg.berachain.dev/polaris/eth/log"
"pkg.berachain.dev/polaris/eth/polar"
)

// DepInjectInput is the input for the dep inject framework.
type DepInjectInput struct {
depinject.In

Logger log.Logger
EVMKeeper *evmkeeper.Keeper
Config func() *config.Config
}

// DepInjectOutput is the output for the dep inject framework.
type DepInjectOutput struct {
depinject.Out

Polaris *Polaris
}

// ProvidePolarisRuntime creates a new Polaris runtime from the provided
// dependencies.
func ProvidePolarisRuntime(input DepInjectInput) DepInjectOutput {
cfg := input.Config()
node, err := polar.NewGethNetworkingStack(&cfg.Node)
if err != nil {
panic(err)
}

polaris := polar.NewWithNetworkingStack(
&cfg.Polar, input.EVMKeeper.Host, node, ethlog.FuncHandler(
func(r *ethlog.Record) error {
polarisGethLogger := input.Logger.With("module", "polaris-geth")
switch r.Lvl { //nolint:nolintlint,exhaustive // linter is bugged.
case ethlog.LvlTrace:
case ethlog.LvlDebug:
polarisGethLogger.Debug(r.Msg, r.Ctx...)
case ethlog.LvlInfo:
polarisGethLogger.Info(r.Msg, r.Ctx...)
case ethlog.LvlWarn:
case ethlog.LvlCrit:
case ethlog.LvlError:
polarisGethLogger.Error(r.Msg, r.Ctx...)
}
return nil
}),
)

return DepInjectOutput{
Polaris: &Polaris{
Polaris: polaris,
EVMKeeper: input.EVMKeeper,
},
}
}
117 changes: 117 additions & 0 deletions cosmos/runtime/runtime.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// SPDX-License-Identifier: BUSL-1.1
//
// Copyright (C) 2023, Berachain Foundation. All rights reserved.
// Use of this software is govered by the Business Source License included
// in the LICENSE file of this repository and at www.mariadb.com/bsl11.
//
// ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY
// TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER
// VERSIONS OF THE LICENSED WORK.
//
// THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF
// LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF
// LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE).
//
// TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
// AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
// EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
// TITLE.

package runtime

import (
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/ethereum/go-ethereum/beacon/engine"
"github.com/ethereum/go-ethereum/node"

libtx "pkg.berachain.dev/polaris/cosmos/lib/tx"
"pkg.berachain.dev/polaris/cosmos/miner"
"pkg.berachain.dev/polaris/cosmos/txpool"
evmkeeper "pkg.berachain.dev/polaris/cosmos/x/evm/keeper"
enginep "pkg.berachain.dev/polaris/cosmos/x/evm/plugins/engine"
evmtypes "pkg.berachain.dev/polaris/cosmos/x/evm/types"
coretypes "pkg.berachain.dev/polaris/eth/core/types"
"pkg.berachain.dev/polaris/eth/polar"
)

type Polaris struct {
*polar.Polaris

// polaris keepers
EVMKeeper *evmkeeper.Keeper

// polaris componets
WrappedMiner *miner.Miner
WrappedTxPool *txpool.Mempool
}

func (p *Polaris) Setup(bApp *baseapp.BaseApp) error {
// SetupPrecompiles is used to setup the precompile contracts post depinject.
if err := p.EVMKeeper.SetupPrecompiles(); err != nil {
return err
}

// Init is used to setup the polaris struct.
if err := p.Polaris.Init(); err != nil {
return err
}

// Setup TxPool Wrapper
p.WrappedTxPool = txpool.New(p.TxPool())
bApp.SetMempool(p.WrappedTxPool)

p.WrappedMiner = miner.New(p.Miner())
bApp.SetPrepareProposal(p.WrappedMiner.PrepareProposal)

// TODO: deprecate this
p.EVMKeeper.SetBlockchain(p.Blockchain())

return nil
}

func (p *Polaris) Init(clientCtx client.Context, logger log.Logger) error {
// Initialize services.
p.WrappedMiner.Init(libtx.NewSerializer[*engine.ExecutionPayloadEnvelope](
clientCtx.TxConfig, evmtypes.WrapPayload))

p.WrappedTxPool.Init(logger, clientCtx, libtx.NewSerializer[*coretypes.Transaction](
clientCtx.TxConfig, evmtypes.WrapTx))

// Register services with Polaris.
p.RegisterServices(clientCtx, []node.Lifecycle{
p.WrappedTxPool,
})
return nil
}

// Register Services allows for the application to register lifecycles with the evm
// networking stack.
func (p *Polaris) RegisterServices(clientContext client.Context, lcs []node.Lifecycle) {
// TODO: probably get rid of engine plugin or something and handle rpc methods better.
p.EVMKeeper.Host.GetEnginePlugin().(enginep.Plugin).Start(clientContext)

// Register the services with polaris.
for _, lc := range lcs {
p.RegisterService(lc)
}

// Start the services.
if err := p.StartServices(); err != nil {
panic(err)
}
}

func (p *Polaris) LoadLastState(cms storetypes.CommitMultiStore, appHeight uint64) error {
cmsCtx := sdk.Context{}.
WithMultiStore(cms).
WithGasMeter(storetypes.NewInfiniteGasMeter()).
WithBlockGasMeter(storetypes.NewInfiniteGasMeter()).WithEventManager(sdk.NewEventManager())
return p.Blockchain().LoadLastState(cmsCtx, appHeight)
}
14 changes: 10 additions & 4 deletions cosmos/x/evm/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

"github.com/ethereum/go-ethereum/consensus/beacon"

"pkg.berachain.dev/polaris/cosmos/config"
"pkg.berachain.dev/polaris/cosmos/precompile/staking"
testutil "pkg.berachain.dev/polaris/cosmos/testutil"
Expand Down Expand Up @@ -90,6 +92,10 @@ var _ = Describe("", func() {
log.NewTestLogger(GinkgoT()),
cfg,
)
k.SetBlockchain(
core.NewChain(k.Host, beacon.NewFaker()),
)

err = k.SetupPrecompiles()
Expect(err).ToNot(HaveOccurred())
am = evm.NewAppModule(k, ak)
Expand All @@ -112,28 +118,28 @@ var _ = Describe("", func() {
Expect(err).ToNot(HaveOccurred())
})
It("should contain the same genesis header values", func() {
bp := k.Polaris().Host().GetBlockPlugin()
bp := k.Host.GetBlockPlugin()
expectedHeader := ethGen.ToBlock().Header()
Expect(bp.GetHeaderByNumber(0)).To(Equal(expectedHeader))
})
It("should have the correct balances", func() {
sp := k.Polaris().Host().GetStatePlugin()
sp := k.Host.GetStatePlugin()
for addr, acc := range ethGen.Alloc {
balance := sp.GetBalance(addr)
cmp := balance.Cmp(acc.Balance)
Expect(cmp).To(BeZero())
}
})
It("should have the correct code", func() {
sp := k.Polaris().Host().GetStatePlugin()
sp := k.Host.GetStatePlugin()
for addr, acc := range ethGen.Alloc {
code := sp.GetCode(addr)
cmp := bytes.Compare(code, acc.Code)
Expect(cmp).To(BeZero())
}
})
It("should have the correct hash", func() {
sp := k.Polaris().Host().GetStatePlugin()
sp := k.Host.GetStatePlugin()
for addr, acc := range ethGen.Alloc {
for key, expectedHash := range acc.Storage {
actualHash := sp.GetState(addr, key)
Expand Down
Loading

0 comments on commit c1edabd

Please sign in to comment.