Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimized changes for the merge #23761

Merged
merged 33 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
38eb641
all: work for eth1/2 transtition
rjl493456442 Jul 19, 2021
ed1c9ce
consensus/beacon, eth: change beacon difficulty to 0
rjl493456442 Jul 26, 2021
e234c25
eth: updates
rjl493456442 Jul 30, 2021
e3a3374
all: add terminalBlockDifficulty config, fix rebasing issues
rjl493456442 Jul 30, 2021
da9c5a4
eth: implemented merge interop spec
MariusVanDerWijden Sep 20, 2021
1037258
internal/ethapi: update to v1.0.0.alpha.2
MariusVanDerWijden Oct 1, 2021
6418972
all: sync polishes, other fixes + refactors
karalabe Oct 4, 2021
7727d0e
core, eth: correct semantics for LeavePoW, EnterPoS
MariusVanDerWijden Oct 20, 2021
0bc0bb2
core: fixed rebasing artifacts
MariusVanDerWijden Nov 2, 2021
16be60f
core: light: performance improvements
MariusVanDerWijden Nov 2, 2021
54c752a
core: use keyed field (f)
MariusVanDerWijden Nov 3, 2021
f7ce07b
Merge branch 'master' into test-branch
MariusVanDerWijden Nov 8, 2021
6963517
core: eth: fix compilation issues + tests
MariusVanDerWijden Nov 8, 2021
c0216eb
eth/catalyst: dbetter error codes
MariusVanDerWijden Nov 9, 2021
92fdcc4
all: move Merger to consensus/, remove reliance on it in bc
MariusVanDerWijden Nov 11, 2021
148f1fd
all: renamed EnterPoS and LeavePoW to ReachTDD and FinalizePoS
MariusVanDerWijden Nov 11, 2021
c9a852d
core: make mergelogs a function
MariusVanDerWijden Nov 11, 2021
7f54690
core: use InsertChain instead of InsertBlock
MariusVanDerWijden Nov 11, 2021
e8ce790
les: drop merger from lightchain object
MariusVanDerWijden Nov 11, 2021
9304474
consensus: add merger
MariusVanDerWijden Nov 11, 2021
6ccb36c
core: recoverAncestors in catalyst mode
MariusVanDerWijden Nov 15, 2021
5b1c3cc
core: fix nitpick
MariusVanDerWijden Nov 15, 2021
75bc816
all: removed merger from beacon, use TTD, nitpicks
MariusVanDerWijden Nov 16, 2021
fe45669
consensus: eth: add docstring, removed unnecessary code duplication
MariusVanDerWijden Nov 16, 2021
9b78e1e
consensus/beacon: better comment
MariusVanDerWijden Nov 16, 2021
153d85f
all: easy to fix nitpicks by karalabe
MariusVanDerWijden Nov 17, 2021
87686a1
consensus/beacon: verify known headers to be sure
MariusVanDerWijden Nov 17, 2021
082d6a8
core: comments
MariusVanDerWijden Nov 17, 2021
3440375
core: eth: don't drop peers who advertise blocks, nitpicks
MariusVanDerWijden Nov 19, 2021
d4212be
core: never add beacon blocks to the future queue
MariusVanDerWijden Nov 19, 2021
237fadc
core: fixed nitpicks
MariusVanDerWijden Nov 22, 2021
1a92d4a
consensus/beacon: simplify IsTTDReached check
MariusVanDerWijden Nov 23, 2021
dd22e9a
consensus/beacon: correct IsTTDReached check
MariusVanDerWijden Nov 23, 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
Prev Previous commit
Next Next commit
Merge branch 'master' into test-branch
  • Loading branch information
MariusVanDerWijden authored Nov 8, 2021
commit f7ce07b83a425306b56987465def16d41d9dedd6
4 changes: 2 additions & 2 deletions eth/api_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ func (b *EthAPIBackend) StartMining(threads int) error {
return b.eth.StartMining(threads)
}

func (b *EthAPIBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, checkLive bool) (*state.StateDB, error) {
return b.eth.StateAtBlock(block, reexec, base, checkLive)
func (b *EthAPIBackend) StateAtBlock(ctx context.Context, block *types.Block, reexec uint64, base *state.StateDB, checkLive, preferDisk bool) (*state.StateDB, error) {
return b.eth.StateAtBlock(block, reexec, base, checkLive, preferDisk)
}

func (b *EthAPIBackend) StateAtTransaction(ctx context.Context, block *types.Block, txIndex int, reexec uint64) (core.Message, vm.BlockContext, *state.StateDB, error) {
Expand Down
14 changes: 12 additions & 2 deletions eth/state_accessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,17 @@ import (
// are attempted to be reexecuted to generate the desired state. The optional
// base layer statedb can be passed then it's regarded as the statedb of the
// parent block.
func (eth *Ethereum) StateAtBlock(block *types.Block, reexec uint64, base *state.StateDB, checkLive bool) (statedb *state.StateDB, err error) {
// Parameters:
// - block: The block for which we want the state (== state at the stateRoot of the parent)
// - reexec: The maximum number of blocks to reprocess trying to obtain the desired state
// - base: If the caller is tracing multiple blocks, the caller can provide the parent state
// continuously from the callsite.
// - checklive: if true, then the live 'blockchain' state database is used. If the caller want to
// perform Commit or other 'save-to-disk' changes, this should be set to false to avoid
// storing trash persistently
// - preferDisk: this arg can be used by the caller to signal that even though the 'base' is provided,
// it would be preferrable to start from a fresh state, if we have it on disk.
func (eth *Ethereum) StateAtBlock(block *types.Block, reexec uint64, base *state.StateDB, checkLive bool, preferDisk bool) (statedb *state.StateDB, err error) {
var (
current *types.Block
database state.Database
Expand Down Expand Up @@ -161,7 +171,7 @@ func (eth *Ethereum) stateAtTransaction(block *types.Block, txIndex int, reexec
}
// Lookup the statedb of parent block from the live database,
// otherwise regenerate it on the flight.
statedb, err := eth.StateAtBlock(parent, reexec, nil, true)
statedb, err := eth.StateAtBlock(parent, reexec, nil, true, false)
if err != nil {
return nil, vm.BlockContext{}, nil, err
}
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.