-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
rebase verkle tree PR over kiln changes #24561
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline process engine. | ||
# See: https://circleci.com/docs/2.0/configuration-reference | ||
version: 2.1 | ||
|
||
# Define a job to be invoked later in a workflow. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#jobs | ||
jobs: | ||
build: | ||
working_directory: ~/repo | ||
# Specify the execution environment. You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub. | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#docker-machine-macos-windows-executor | ||
docker: | ||
- image: circleci/golang:1.16.10 | ||
# Add steps to the job | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#steps | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- go-mod-v4-{{ checksum "go.sum" }} | ||
- run: | ||
name: Install Dependencies | ||
command: go mod download | ||
- save_cache: | ||
key: go-mod-v4-{{ checksum "go.sum" }} | ||
paths: | ||
- "/go/pkg/mod" | ||
#- run: | ||
# name: Run linter | ||
# command: | | ||
# go run build/ci.go lint | ||
- run: | ||
name: Run tests | ||
command: | | ||
go run build/ci.go test -coverage | ||
- store_test_results: | ||
path: /tmp/test-reports | ||
|
||
# Invoke jobs via workflows | ||
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows | ||
workflows: | ||
sample: # This is the name of the workflow, feel free to change it to better match your workflow. | ||
# Inside the workflow, you define the jobs you want to run. | ||
jobs: | ||
- build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -226,15 +226,10 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par | |
futureBlocks, _ := lru.New(maxFutureBlocks) | ||
|
||
bc := &BlockChain{ | ||
chainConfig: chainConfig, | ||
cacheConfig: cacheConfig, | ||
db: db, | ||
triegc: prque.New(nil), | ||
stateCache: state.NewDatabaseWithConfig(db, &trie.Config{ | ||
Cache: cacheConfig.TrieCleanLimit, | ||
Journal: cacheConfig.TrieCleanJournal, | ||
Preimages: cacheConfig.Preimages, | ||
}), | ||
chainConfig: chainConfig, | ||
cacheConfig: cacheConfig, | ||
db: db, | ||
triegc: prque.New(nil), | ||
quit: make(chan struct{}), | ||
chainmu: syncx.NewClosableMutex(), | ||
bodyCache: bodyCache, | ||
|
@@ -283,6 +278,13 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par | |
|
||
// Make sure the state associated with the block is available | ||
head := bc.CurrentBlock() | ||
bc.stateCache = state.NewDatabaseWithConfig(db, &trie.Config{ | ||
Cache: cacheConfig.TrieCleanLimit, | ||
Journal: cacheConfig.TrieCleanJournal, | ||
Preimages: cacheConfig.Preimages, | ||
UseVerkle: chainConfig.IsCancun(head.Header().Number), | ||
}) | ||
|
||
if _, err := state.New(head.Root(), bc.stateCache, bc.snaps); err != nil { | ||
// Head state is missing, before the state recovery, find out the | ||
// disk layer point of snapshot(if it's enabled). Make sure the | ||
|
@@ -375,7 +377,7 @@ func NewBlockChain(db ethdb.Database, cacheConfig *CacheConfig, chainConfig *par | |
log.Warn("Enabling snapshot recovery", "chainhead", head.NumberU64(), "diskbase", *layer) | ||
recover = true | ||
} | ||
bc.snaps, _ = snapshot.New(bc.db, bc.stateCache.TrieDB(), bc.cacheConfig.SnapshotLimit, head.Root(), !bc.cacheConfig.SnapshotWait, true, recover) | ||
bc.snaps, _ = snapshot.New(bc.db, bc.stateCache.TrieDB(), bc.cacheConfig.SnapshotLimit, head.Root(), !bc.cacheConfig.SnapshotWait, true, recover, chainConfig.IsCancun(head.Header().Number)) | ||
} | ||
|
||
// Start future block processor. | ||
|
@@ -1591,7 +1593,12 @@ func (bc *BlockChain) insertChain(chain types.Blocks, verifySeals, setHead bool) | |
|
||
// Process block using the parent state as reference point | ||
substart := time.Now() | ||
receipts, logs, usedGas, err := bc.processor.Process(block, statedb, bc.vmConfig) | ||
var ( | ||
usedGas uint64 | ||
receipts types.Receipts | ||
logs []*types.Log | ||
) | ||
receipts, logs, usedGas, err = bc.processor.Process(block, statedb, bc.vmConfig) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks like a leftover merge issue 🤔 |
||
if err != nil { | ||
bc.reportBlock(block, receipts, err) | ||
atomic.StoreUint32(&followupInterrupt, 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: this should happen in
GetBalance
/AddBalance
and no change should appear in this file