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: sync with upstream #1138

Merged
merged 10 commits into from
Oct 28, 2022
Merged

Conversation

qinglin89
Copy link
Contributor

@qinglin89 qinglin89 commented Oct 16, 2022

Description

Sync with go-ethereum 1.10.19:
mainly including some bug fixes, and together with some separate prs: #1139, #1140, #1141.

Rationale

N/A

Example

N/A

Changes

Notable changes:
N/A

MariusVanDerWijden and others added 10 commits October 16, 2022 17:17
This PR significantly reduces the memory consumption of a long reorg
core/vm: optimize PUSH opcode discrimination
Move locking into trieDB insert function
* eth/filters: fix pending for getLogs

* add pending method to test backend

* fix block range validation
accounts/url: add test logic what check null string to parseURL()
* common: improve pretty duration regex

* common: improve pretty duration regex
@@ -76,7 +76,7 @@ func codeBitmapInternal(code, bits bitvec) bitvec {
for pc := uint64(0); pc < uint64(len(code)); {
op := OpCode(code[pc])
pc++
if op < PUSH1 || op > PUSH32 {
if int8(op) < int8(PUSH1) { // If not PUSH (the int8(op) > int(PUSH32) is always false).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not PUSH (the int8(op) > int(PUSH32) is always false)
why?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The opcode of "PUSH1" is "0x60", and all the other PUSH opcodes have a greater opCode than "PUSH1". An opcode that is less than "0x60" can never be a "PUSH32" .

Copy link
Collaborator

@brilliant-lx brilliant-lx Oct 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but op > PUSH32 could be true, right? say if op is Dup1(0x80), while PUSH32 is 0x7f.

@junnmm
Copy link

junnmm commented Oct 26, 2022 via email

@junnmm
Copy link

junnmm commented Oct 26, 2022 via email

@brilliant-lx brilliant-lx merged commit bd79e2d into bnb-chain:develop Oct 28, 2022
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.