Skip to content

Commit

Permalink
Merge pull request #220 from testinprod-io/upstream-2.60.8
Browse files Browse the repository at this point in the history
Upstream 2.60.8
  • Loading branch information
mininny authored Sep 19, 2024
2 parents 7fe2cdc + 5f4906e commit 782c79d
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 145 deletions.
141 changes: 8 additions & 133 deletions .github/workflows/qa-rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Checkout RPC Tests Repository & Install Requirements
run: |
rm -rf ${{ runner.workspace }}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.42.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.47.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{ runner.workspace }}/rpc-tests
pip3 install -r requirements.txt
Expand Down Expand Up @@ -86,143 +86,31 @@ jobs:
rm -rf ./mainnet/results/
# Run RPC integration test runner via http
python3 ./run_tests.py -p 8545 --continue -f -x debug_accountRange/test_09.tar,\
debug_accountRange/test_12.tar,\
debug_accountRange/test_14.json,\
debug_getModifiedAccountsByHash/test_01.json,\
debug_getModifiedAccountsByHash/test_02.json,\
debug_getModifiedAccountsByHash/test_03.json,\
debug_getModifiedAccountsByHash/test_04.json,\
debug_getModifiedAccountsByHash/test_05.tar,\
debug_getModifiedAccountsByHash/test_06.tar,\
debug_getModifiedAccountsByHash/test_07.tar,\
debug_getModifiedAccountsByHash/test_08.json,\
debug_getModifiedAccountsByHash/test_09.json,\
debug_getModifiedAccountsByHash/test_10.json,\
debug_getModifiedAccountsByHash/test_11.json,\
debug_getModifiedAccountsByHash/test_12.json,\
debug_getModifiedAccountsByHash/test_13.tar,\
debug_getModifiedAccountsByHash/test_14.json,\
debug_getModifiedAccountsByHash/test_15.tar,\
debug_getModifiedAccountsByHash/test_16.tar,\
debug_getModifiedAccountsByHash/test_17.tar,\
debug_getModifiedAccountsByHash/test_18.tar,\
debug_getModifiedAccountsByNumber/test_01.json,\
debug_getModifiedAccountsByNumber/test_02.json,\
debug_getModifiedAccountsByNumber/test_03.json,\
debug_getModifiedAccountsByNumber/test_04.json,\
debug_getModifiedAccountsByNumber/test_05.tar,\
debug_getModifiedAccountsByNumber/test_06.tar,\
debug_getModifiedAccountsByNumber/test_07.tar,\
debug_getModifiedAccountsByNumber/test_08.json,\
debug_getModifiedAccountsByNumber/test_09.json,\
debug_getModifiedAccountsByNumber/test_10.json,\
debug_getModifiedAccountsByNumber/test_11.json,\
debug_getModifiedAccountsByNumber/test_12.json,\
debug_getModifiedAccountsByNumber/test_13.tar,\
debug_getModifiedAccountsByNumber/test_14.json,\
debug_getModifiedAccountsByNumber/test_15.tar,\
debug_getModifiedAccountsByNumber/test_16.tar,\
debug_getModifiedAccountsByNumber/test_17.tar,\
debug_getModifiedAccountsByNumber/test_18.json,\
debug_traceBlockByHash/test_01.tar,\
debug_traceBlockByHash/test_02.tar,\
debug_traceBlockByHash/test_03.tar,\
debug_traceBlockByNumber/test_03.tar,\
debug_traceBlockByNumber/test_05.tar,\
debug_traceBlockByNumber/test_06.tar,\
python3 ./run_tests.py -p 8545 --continue -f --json-diff -x debug_traceBlockByNumber/test_05.tar,\
debug_traceBlockByNumber/test_08.tar,\
debug_traceBlockByNumber/test_09.tar,\
debug_traceBlockByNumber/test_10.tar,\
debug_traceBlockByNumber/test_11.tar,\
debug_traceBlockByNumber/test_12.tar,\
debug_traceCall/test_01.json,\
debug_traceCall/test_02.json,\
debug_traceCall/test_05.tar,\
debug_traceCall/test_06.tar,\
debug_traceCall/test_07.tar,\
debug_traceCall/test_08.tar,\
debug_traceCall/test_09.json,\
debug_traceCall/test_10.tar,\
debug_traceCallMany/test_01.json,\
debug_traceCallMany/test_02.json,\
debug_traceCallMany/test_05.tar,\
debug_traceCallMany/test_06.tar,\
debug_traceCallMany/test_07.tar,\
debug_traceCallMany/test_08.tar,\
debug_traceCallMany/test_09.json,\
debug_traceCallMany/test_10.tar,\
debug_traceTransaction/test_02.tar,\
debug_traceTransaction/test_03.tar,\
debug_traceTransaction/test_05.tar,\
debug_traceTransaction/test_06.tar,\
debug_traceTransaction/test_07.tar,\
debug_traceTransaction/test_10.tar,\
debug_traceTransaction/test_11.tar,\
debug_traceTransaction/test_13.tar,\
debug_traceTransaction/test_16.json,\
debug_traceTransaction/test_17.tar,\
debug_traceTransaction/test_18.tar,\
debug_traceTransaction/test_19.json,\
debug_traceTransaction/test_20.json,\
debug_traceTransaction/test_21.json,\
debug_traceTransaction/test_23.json,\
debug_traceTransaction/test_24.json,\
debug_traceTransaction/test_25.json,\
debug_traceTransaction/test_26.json,\
debug_traceTransaction/test_27.json,\
debug_traceTransaction/test_28.tar,\
engine_exchangeCapabilities/test_1.json,\
engine_exchangeTransitionConfigurationV1/test_01.json,\
engine_getClientVersionV1/test_1.json,\
erigon_getLogsByHash/test_04.json,\
eth_callBundle/test_09.json,\
eth_callBundle/test_12.json,\
eth_createAccessList/test_06.json,\
eth_createAccessList/test_07.json,\
eth_createAccessList/test_15.json,\
eth_createAccessList/test_16.json,\
eth_getBlockTransactionCountByHash/test_02.json,\
eth_getBlockTransactionCountByNumber/test_08.json,\
eth_getUncleCountByBlockHash/test_03.json,\
parity_getBlockReceipts/test_01.json,\
parity_getBlockReceipts/test_02.json,\
parity_getBlockReceipts/test_03.json,\
parity_getBlockReceipts/test_04.json,\
parity_getBlockReceipts/test_05.json,\
parity_getBlockReceipts/test_06.json,\
parity_getBlockReceipts/test_07.json,\
parity_getBlockReceipts/test_08.json,\
parity_getBlockReceipts/test_09.json,\
parity_getBlockReceipts/test_10.json,\
trace_call/test_02.json,\
trace_call/test_04.tar,\
trace_call/test_08.tar,\
trace_call/test_11.tar,\
trace_call/test_13.json,\
trace_call/test_17.tar,\
trace_call/test_19.tar,\
trace_call/test_20.json,\
trace_callMany/test_01.json,\
trace_callMany/test_02.json,\
trace_callMany/test_03.json,\
trace_callMany/test_04.json,\
trace_callMany/test_05.json,\
trace_callMany/test_06.json,\
trace_callMany/test_08.json,\
trace_callMany/test_09.json,\
trace_callMany/test_10.json,\
trace_callMany/test_11.json,\
trace_rawTransaction/test_01.json,\
trace_rawTransaction/test_03.json,\
engine_getClientVersionV1,\
parity_getBlockReceipts,\
trace_rawTransaction,\
trace_replayTransaction/test_24.json,\
trace_replayBlockTransactions/test_01.tar,\
trace_replayBlockTransactions/test_02.tar,\
trace_replayBlockTransactions/test_03.tar,\
trace_replayBlockTransactions/test_04.tar,\
trace_replayBlockTransactions/test_05.tar,\
trace_replayBlockTransactions/test_08.tar,\
trace_replayBlockTransactions/test_10.json,\
trace_replayBlockTransactions/test_11.json,\
trace_replayBlockTransactions/test_13.tar,\
trace_replayBlockTransactions/test_14.tar,\
trace_replayBlockTransactions/test_15.tar,\
Expand All @@ -235,21 +123,8 @@ jobs:
trace_replayBlockTransactions/test_22.tar,\
trace_replayBlockTransactions/test_23.tar,\
trace_replayBlockTransactions/test_24.tar,\
trace_replayBlockTransactions/test_25.tar,\
trace_replayTransaction/test_02.tar,\
trace_replayTransaction/test_03.tar,\
trace_replayTransaction/test_04.tar,\
trace_replayTransaction/test_05.tar,\
trace_replayTransaction/test_06.tar,\
trace_replayTransaction/test_07.tar,\
trace_replayTransaction/test_10.tar,\
trace_replayTransaction/test_11.tar,\
trace_replayTransaction/test_14.tar,\
trace_replayTransaction/test_16.tar,\
trace_replayTransaction/test_18.tar,\
trace_replayTransaction/test_23.tar,\
trace_replayTransaction/test_24.json,\
trace_replayTransaction/test_29.tar
trace_replayBlockTransactions/test_28.tar,\
trace_replayBlockTransactions/test_29.tar
# Capture test runner script exit status
test_exit_status=$?
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Release

env:
APPLICATION: "op-erigon"
BUILDER_IMAGE: "ghcr.io/goreleaser/goreleaser-cross:v1.21.13"
DOCKER_BASE_IMAGE: "alpine:3.20.2"
BUILDER_IMAGE: "ghcr.io/goreleaser/goreleaser-cross:v1.22.7"
DOCKER_BASE_IMAGE: "alpine:3.20.3"
APP_REPO: "testinprod-io/op-erigon"
PACKAGE: "github.com/testinprod-io/op-erigon"
DOCKERHUB_REPOSITORY: "testinprod/op-erigon"
Expand Down Expand Up @@ -209,6 +209,7 @@ jobs:
DOCKER_TAGS: ${{ env.DOCKERHUB_REPOSITORY }}:${{ inputs.release_version }}
GITHUB_RELEASE_TARGET: ${{ inputs.checkout_ref }}
run: |
cd dist
gh release create ${{ inputs.release_version }} *.tar.gz *_checksums.txt \
--generate-notes \
--target ${GITHUB_RELEASE_TARGET} \
Expand Down
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ archives:
# - linux-arm64-evm
# - linux-arm64-caplin
# - linux-arm64-diag
# - linux-arm64-integration
- linux-arm64-integration
# - linux-arm64-rpcdaemon
# - linux-arm64-sentry
# - linux-arm64-txpool
Expand All @@ -1116,7 +1116,7 @@ archives:
# - linux-amd64-evm
# - linux-amd64-caplin
# - linux-amd64-diag
# - linux-amd64-integration
- linux-amd64-integration
# - linux-amd64-rpcdaemon
# - linux-amd64-sentry
# - linux-amd64-txpool
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.release
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ RUN --mount=type=bind,from=temporary,source=/tmp/${APPLICATION},target=/tmp/${AP
addgroup ${GROUP} && \
adduser -D -h /home/${USER} -G ${GROUP} ${USER} && \
install -d -o ${USER} -g ${GROUP} /home/${USER}/.local /home/${USER}/.local/share /home/${USER}/.local/share/erigon && \
install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/erigon /usr/local/bin/
# install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/integration /usr/local/bin/ && \
install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/erigon /usr/local/bin/ && \
install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/integration /usr/local/bin/
# install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/diag /usr/local/bin/ && \
# install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/sentry /usr/local/bin/ && \
# install -o ${USER} -g ${GROUP} /tmp/${APPLICATION}/txpool /usr/local/bin/ && \
Expand Down
21 changes: 17 additions & 4 deletions core/state/plain_readonly.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ import (
"bytes"
"encoding/binary"
"fmt"
"github.com/ledgerwatch/erigon-lib/kv/dbutils"
"sort"

"github.com/google/btree"
"github.com/holiman/uint256"
"github.com/ledgerwatch/log/v3"

libcommon "github.com/ledgerwatch/erigon-lib/common"
"github.com/ledgerwatch/erigon-lib/common/length"
"github.com/ledgerwatch/erigon-lib/kv"
"github.com/ledgerwatch/erigon-lib/kv/dbutils"
"github.com/ledgerwatch/erigon-lib/kv/kvcfg"
"github.com/ledgerwatch/log/v3"

"github.com/ledgerwatch/erigon/core/state/historyv2read"
"github.com/ledgerwatch/erigon/core/types/accounts"
Expand Down Expand Up @@ -186,11 +187,23 @@ func (s *PlainState) ReadAccountData(address libcommon.Address) (*accounts.Accou
if fromHistory {
//restore codehash
if records, ok := s.systemContractLookup[address]; ok {
// Find the first system contract record after the block number
p := sort.Search(len(records), func(i int) bool {
return records[i].BlockNumber > s.blockNr
})
a.CodeHash = records[p-1].CodeHash
} else if a.Incarnation > 0 && a.IsEmptyCodeHash() {
if p > 0 {
a.CodeHash = records[p-1].CodeHash
if s.trace {
fmt.Printf("ReadAccountData [%x] => (systemContractLookup) [nonce: %d, balance: %d, codeHash: %x]\n", address, a.Nonce, &a.Balance, a.CodeHash)
}
return &a, nil
}
// All system contract records are after the block number
if s.trace {
fmt.Printf("ReadAccountData [%x] systemContract was created after %d, at %d\n", address, s.blockNr, records[0].BlockNumber)
}
}
if a.Incarnation > 0 && a.IsEmptyCodeHash() {
if codeHash, err1 := s.tx.GetOne(kv.PlainContractCode, dbutils.PlainGenerateStoragePrefix(address[:], a.Incarnation)); err1 == nil {
if len(codeHash) > 0 {
a.CodeHash = libcommon.BytesToHash(codeHash)
Expand Down
Loading

0 comments on commit 782c79d

Please sign in to comment.