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

all: apply flock for locking file and upgrade golang from 1.20 to 1.22 #602

Conversation

huyngopt1994
Copy link
Collaborator

@huyngopt1994 huyngopt1994 commented Oct 14, 2024

Build locally

Sending build context to Docker daemon  204.5MB
Step 1/30 : FROM golang:1.22.8-alpine3.19@sha256:fe5bea2e1ab3ffebe0267393fea88fcb197e2dbbb1e2dbabeec6dd9ccb0e1871 as builder
 ---> abb558d050b4
Step 2/30 : RUN apk add --no-cache make gcc musl-dev linux-headers git libstdc++-dev
 ---> Running in 9fc5e2451b12
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
...
Step 25/30 : ENV GENERATE_BLS_PROOF 'false'
 ---> Running in 9024682ae04b
Removing intermediate container 9024682ae04b
 ---> d4bd472519f6
Step 26/30 : COPY --from=builder /opt/build/bin/ronin /usr/local/bin/ronin
 ---> 681a4b1a79f7
Step 27/30 : COPY --from=builder /opt/genesis/ ./
 ---> a93d3e46e6fe
Step 28/30 : COPY --from=builder /opt/docker/chainnode/entrypoint.sh ./
 ---> eb2cab8c7dde
Step 29/30 : EXPOSE 7000 6060 8545 8546 30303 30303/udp
 ---> Running in 3caf83bb4d9e
Removing intermediate container 3caf83bb4d9e
 ---> 77fcc88c7c23
Step 30/30 : ENTRYPOINT ["./entrypoint.sh"]
 ---> Running in a3e5866e8537
Removing intermediate container a3e5866e8537
 ---> f37dab5acfbb
Successfully built f37dab5acfbb
Successfully tagged test:latest

Francesco4203 and others added 12 commits September 25, 2024 22:37
* trie: track deleted nodes

* core: track deleted nodes
* all: prep for path-based trie storage

* all: use rawdb.HasLegacyNode() to check for node existance instead of check for length
* trie: implement NodeBlob API for trie iterator

This functionality is needed in new path-based storage scheme, but
can be implemented in a seperate PR though.

When an account is deleted, then all the storage slots should be
nuked out from the disk as well. In hash-based storage scheme they
are still left in the disk but in new scheme, they will be iterated
and marked as deleted.

But why the NodeBlob API is needed in this scenario? Because when
the node is marked deleted, the previous value is also required to
be recorded to construct the reverse diff.

* fuzzers/stacktrie: enable test

---------

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
* trie: refactor tracer

* fix: add description
…27842) (#587)

Co-authored-by: Péter Szilágyi <peterke@gmail.com>
* trie: add wrapper for database

* trie: refactor trie node

* all: fix test

* rawdb, trie: fix comment

trie: change name WithPrev => NodeWithPrev
rawdb: add schema_test
* trie: triestate/Set to track changes

* core/state: track state changes

journal.go: in resetObjectChange
- add account in resetObjectChange (ref ethereum/go-ethereum#27339)
- add prevAccount and prevStorage (ref ethereum/go-ethereum#27376)
- add prevAccountOrigin and prevStorageOrigin to track changes
state_object.go: add origin for tracking the original StateAccount before change
statedb.go:
- add accountsOrigin and storagesOrigin, same functions as above
- stateObjectsDestruct now track the previous state before destruct
- add functions for handle destructing old states

* all: apply changes to tests
* core/state: clean up: db already exist in stateObject

* core, trie: statedb also commit the block number
* all: clean up overall structure, preparing for path-based (#594)

* trie/triedb/pathdb: init pathdb components

* core, trie: track state change with address instead of hash

Reference: ethereum/go-ethereum@817553c

* trie: refactor

* rawdb: implement freezer resettable & state freezer  (#596)

* rawdb: implement freezer resettable

* rawdb: implement state freezer

* rawdb: update description

* trie: path based scheme implementing (#598)

* core/state: move account definition to core/types

Reference: ethereum/go-ethereum#27323

* trie: add path base utils

* triedb: implement history and adding some test utils

* trie/triedb/pathdb: implement difflayer and disklayer

* Fix some issues related to history, and add logic checking maxbyte when is zero for retrieving ancient ranges with maxbyte is zero

* trie/triedb/pathdb: implement database.go

* freezer: Add unit test and docs for support freezer reading with no limit size

* trie/triedb/pathdb: add database and difflayer tests

* triedb/pathdb: implement journal and add more comments

---------

Co-authored-by: Huy Ngo <huyngopt1994@gmail.com>

---------

Co-authored-by: Francesco4203 <100074926+Francesco4203@users.noreply.github.com>
@huyngopt1994 huyngopt1994 force-pushed the apply-flopck-when-locking-file-upgrade-golang-to-1.22 branch from 1628535 to 0ab0831 Compare October 14, 2024 09:56
@huyngopt1994
Copy link
Collaborator Author

Let me create the other PR for only upgrading the go version from go 1.20 to 1.22 for reducing the impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants