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

Commit

Permalink
bing bong
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed Nov 22, 2023
1 parent ee59d43 commit 313d3d8
Show file tree
Hide file tree
Showing 24 changed files with 513 additions and 25 deletions.
6 changes: 5 additions & 1 deletion cosmos/config/mocks/app_options.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 0 additions & 5 deletions cosmos/runtime/miner/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ import (
abci "github.com/cometbft/cometbft/abci/types"

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

"github.com/ethereum/go-ethereum/common"
)

// emptyHash is a common.Hash initialized to all zeros.
var emptyHash = common.Hash{}

// PrepareProposal implements baseapp.PrepareProposal.
func (m *Miner) PrepareProposal(
ctx sdk.Context, req *abci.RequestPrepareProposal,
Expand Down
3 changes: 2 additions & 1 deletion cosmos/runtime/miner/miner.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@ func (m *Miner) submitPayloadForBuilding(ctx context.Context) error {

// constructPayloadArgs builds a payload to submit to the miner.
func (m *Miner) constructPayloadArgs(ctx sdk.Context) *miner.BuildPayloadArgs {
parentBeaconHash := (common.BytesToHash(ctx.BlockHeader().LastBlockId.Hash))
return &miner.BuildPayloadArgs{
Timestamp: uint64(ctx.BlockTime().Unix()),
FeeRecipient: m.Etherbase(),
Random: common.Hash{}, /* todo: generated random */
Withdrawals: make(types.Withdrawals, 0),
BeaconRoot: &emptyHash,
BeaconRoot: &parentBeaconHash,
}
}

Expand Down
22 changes: 21 additions & 1 deletion cosmos/runtime/txpool/mocks/geth_tx_pool.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion cosmos/runtime/txpool/mocks/lifecycle.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion cosmos/runtime/txpool/mocks/sdk_tx.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cosmos/runtime/txpool/mocks/subscription.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cosmos/runtime/txpool/mocks/tx_broadcaster.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion cosmos/runtime/txpool/mocks/tx_serializer.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion cosmos/runtime/txpool/mocks/tx_sub_provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions cosmos/x/evm/plugins/state/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ func (p *plugin) Finalize() {
p.Controller.Finalize()
}

func (p *plugin) StateRoot() common.Hash {
return common.BytesToHash(p.ctx.BlockHeader().AppHash)
}

// ===========================================================================
// Accounts
// ===========================================================================
Expand Down
37 changes: 37 additions & 0 deletions eth/core/mock/state_plugin.mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions eth/core/state/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,7 @@ type Plugin interface {
// ForEachStorage iterates over the storage of an account and calls the given callback
// function.
ForEachStorage(common.Address, func(common.Hash, common.Hash) bool) error

// StateRoot retrieves the latest state root of the host chain.
StateRoot() common.Hash
}
22 changes: 21 additions & 1 deletion eth/core/state/journal/mocks/accesslist.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 313d3d8

Please sign in to comment.