Skip to content
Merged
Show file tree
Hide file tree
Changes from 30 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
7e84843
Merge pull request #3170 from bnb-chain/develop
zzzckck Jun 17, 2025
d689f3b
core: warm key TransactionIndexTail by writing (#3196)
buddh0 Jun 24, 2025
88763b2
Merge pull request #3229 from bnb-chain/develop
zzzckck Jul 14, 2025
651069f
Merge pull request #3242 from bnb-chain/develop
zzzckck Jul 21, 2025
e7b198c
Merge pull request #3253 from bnb-chain/develop
zzzckck Jul 28, 2025
fca6a6b
Merge pull request #3323 from bnb-chain/develop
alex-10072 Aug 28, 2025
9830cea
feat: SuperInstruction implementation in EVM
cbh876 Aug 29, 2025
dcf3b08
feat: si patch (#3335)
annielz Sep 2, 2025
91e0d26
Merge pull request #3356 from bnb-chain/develop
brilliant-lx Sep 22, 2025
3b2f0e5
feat: SuperInstruction implementation in EVM
cbh876 Aug 29, 2025
e03ceed
feat: si patch (#3335)
annielz Sep 2, 2025
87b5d4f
Merge branch 'feature-optimization' of github.com:bnb-chain/bsc into …
cbh876 Sep 26, 2025
3fe7b98
perf: delete debug log
cbh876 Oct 9, 2025
960edca
fix: conflict
cbh876 Oct 11, 2025
7656b8c
chore: fix some minor issues in comment (#3301)
deepdring Sep 9, 2025
86d96c9
cmd/geth: remove subcmd hbss2pbss and insecure-prune-all (#3346)
allformless Sep 10, 2025
00eab83
fix: discovery AyncFilter deadlock on shutdown (#3347)
zzzckck Sep 10, 2025
ed3acc0
core: rework fast node (#3340)
allformless Sep 11, 2025
832a616
freezer: add debug log for out of bounds access (#3354)
zzzckck Sep 12, 2025
78f52fb
core/rawdb: align more code with upstream (#3348)
allformless Sep 12, 2025
fd277e1
log: lower the spam log level (#3357)
zzzckck Sep 12, 2025
a95e952
release: prepare for release v1.6.1-beta (#3355)
zzzckck Sep 15, 2025
053e7a6
log: downgrade log level when header fetch failed (#3359)
zzzckck Sep 17, 2025
54f1f4c
chore: fix SnapSyncWithBlobs UT issues; (#3362)
galaio Sep 22, 2025
6422089
cmd/utils: set journalfile default to true (#3361)
allformless Sep 22, 2025
e82f812
feat: SuperInstruction implementation in EVM
cbh876 Aug 29, 2025
9f9b220
feat: si patch (#3335)
annielz Sep 2, 2025
fdef5d7
perf: delete debug log
cbh876 Oct 9, 2025
e90f7ca
Merge branch 'feature-optimization' of github.com:bnb-chain/bsc into …
cbh876 Oct 11, 2025
54c731d
fix: develop conflict
cbh876 Oct 11, 2025
a1df727
perf: opcode cache size
cbh876 Oct 11, 2025
1f6d316
perf: remove useless variables
cbh876 Oct 11, 2025
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
6 changes: 6 additions & 0 deletions cmd/evm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ var (
Category: traceCategory,
}

// Vm flags.
VMOpcodeOptimizeFlag = &cli.BoolFlag{
Name: "vm.opcode.optimize",
Usage: "enable opcode optimization",
}

// Deprecated flags.
DebugFlag = &cli.BoolFlag{
Name: "debug",
Expand Down
3 changes: 2 additions & 1 deletion cmd/evm/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ func runCmd(ctx *cli.Context) error {
BlobHashes: blobHashes,
BlobBaseFee: blobBaseFee,
EVMConfig: vm.Config{
Tracer: tracer,
Tracer: tracer,
EnableOpcodeOptimizations: ctx.Bool(VMOpcodeOptimizeFlag.Name),
},
}

Expand Down
66 changes: 33 additions & 33 deletions cmd/evm/testdata/eof/results.initcode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,38 +202,38 @@ ERR: undefined instruction: op opcode 0xac not defined, pos 0
ERR: undefined instruction: op opcode 0xad not defined, pos 0
ERR: undefined instruction: op opcode 0xae not defined, pos 0
ERR: undefined instruction: op opcode 0xaf not defined, pos 0
ERR: undefined instruction: op opcode 0xb0 not defined, pos 0
ERR: undefined instruction: op opcode 0xb1 not defined, pos 0
ERR: undefined instruction: op opcode 0xb2 not defined, pos 0
ERR: undefined instruction: op opcode 0xb3 not defined, pos 0
ERR: undefined instruction: op opcode 0xb4 not defined, pos 0
ERR: undefined instruction: op opcode 0xb5 not defined, pos 0
ERR: undefined instruction: op opcode 0xb6 not defined, pos 0
ERR: undefined instruction: op opcode 0xb7 not defined, pos 0
ERR: undefined instruction: op opcode 0xb8 not defined, pos 0
ERR: undefined instruction: op opcode 0xb9 not defined, pos 0
ERR: undefined instruction: op opcode 0xba not defined, pos 0
ERR: undefined instruction: op opcode 0xbb not defined, pos 0
ERR: undefined instruction: op opcode 0xbc not defined, pos 0
ERR: undefined instruction: op opcode 0xbd not defined, pos 0
ERR: undefined instruction: op opcode 0xbe not defined, pos 0
ERR: undefined instruction: op opcode 0xbf not defined, pos 0
ERR: undefined instruction: op opcode 0xc0 not defined, pos 0
ERR: undefined instruction: op opcode 0xc1 not defined, pos 0
ERR: undefined instruction: op opcode 0xc2 not defined, pos 0
ERR: undefined instruction: op opcode 0xc3 not defined, pos 0
ERR: undefined instruction: op opcode 0xc4 not defined, pos 0
ERR: undefined instruction: op opcode 0xc5 not defined, pos 0
ERR: undefined instruction: op opcode 0xc6 not defined, pos 0
ERR: undefined instruction: op opcode 0xc7 not defined, pos 0
ERR: undefined instruction: op opcode 0xc8 not defined, pos 0
ERR: undefined instruction: op opcode 0xc9 not defined, pos 0
ERR: undefined instruction: op opcode 0xca not defined, pos 0
ERR: undefined instruction: op opcode 0xcb not defined, pos 0
ERR: undefined instruction: op opcode 0xcc not defined, pos 0
ERR: undefined instruction: op opcode 0xcd not defined, pos 0
ERR: undefined instruction: op opcode 0xce not defined, pos 0
ERR: undefined instruction: op opcode 0xcf not defined, pos 0
ERR: undefined instruction: op NOP, pos 0
ERR: undefined instruction: op ANDSWAP1POPSWAP2SWAP1, pos 0
ERR: undefined instruction: op SWAP2SWAP1POPJUMP, pos 0
ERR: undefined instruction: op SWAP1POPSWAP2SWAP1, pos 0
ERR: undefined instruction: op POPSWAP2SWAP1POP, pos 0
ERR: undefined instruction: op PUSH2JUMP, pos 0
ERR: undefined instruction: op PUSH2JUMPI, pos 0
ERR: undefined instruction: op PUSH1PUSH1, pos 0
ERR: undefined instruction: op PUSH1ADD, pos 0
ERR: undefined instruction: op PUSH1SHL, pos 0
ERR: undefined instruction: op PUSH1DUP1, pos 0
ERR: undefined instruction: op SWAP1POP, pos 0
ERR: undefined instruction: op POPJUMP, pos 0
ERR: undefined instruction: op POP2, pos 0
ERR: undefined instruction: op SWAP2SWAP1, pos 0
ERR: undefined instruction: op SWAP2POP, pos 0
ERR: undefined instruction: op DUP2LT, pos 0
ERR: undefined instruction: op JUMPIFZERO, pos 0
ERR: undefined instruction: op ISZEROPUSH2, pos 0
ERR: undefined instruction: op DUP2MSTOREPUSH1ADD, pos 0
ERR: undefined instruction: op DUP1PUSH4EQPUSH2, pos 0
ERR: undefined instruction: op PUSH1CALLDATALOADPUSH1SHRDUP1PUSH4GTPUSH2, pos 0
ERR: undefined instruction: op PUSH1PUSH1PUSH1SHLSUB, pos 0
ERR: undefined instruction: op ANDDUP2ADDSWAP1DUP2LT, pos 0
ERR: undefined instruction: op SWAP1PUSH1DUP1NOTSWAP2ADDANDDUP2ADDSWAP1DUP2LT, pos 0
ERR: undefined instruction: op DUP3AND, pos 0
ERR: undefined instruction: op SWAP2SWAP1DUP3SUBSWAP2DUP3GTPUSH2, pos 0
ERR: undefined instruction: op SWAP1DUP2, pos 0
ERR: undefined instruction: op SHRSHRDUP1MULDUP1, pos 0
ERR: undefined instruction: op SWAP3POPPOPPOP, pos 0
ERR: undefined instruction: op SUBSLTISZEROPUSH2, pos 0
ERR: undefined instruction: op DUP11MULDUP3SUBMULDUP1, pos 0
ERR: undefined instruction: op opcode 0xd4 not defined, pos 0
ERR: undefined instruction: op opcode 0xd5 not defined, pos 0
ERR: undefined instruction: op opcode 0xd6 not defined, pos 0
Expand Down Expand Up @@ -2250,7 +2250,7 @@ ERR: invalid jump destination: out-of-bounds offset: offset -21151, dest -20628,
ERR: initcode contains a RETURN or STOP opcode
ERR: initcode contains a RETURN or STOP opcode
ERR: initcode contains a RETURN or STOP opcode
ERR: undefined instruction: op opcode 0xc8 not defined, pos 1179
ERR: undefined instruction: op SWAP1PUSH1DUP1NOTSWAP2ADDANDDUP2ADDSWAP1DUP2LT, pos 1179
ERR: invalid dataloadN argument: arg 5, last 32, pos 1728
ERR: invalid dataloadN argument: arg 62719, last 32, pos 945
ERR: invalid dataloadN argument: arg 16, last 32, pos 771
Expand Down
66 changes: 33 additions & 33 deletions cmd/evm/testdata/eof/results.regular.txt
Original file line number Diff line number Diff line change
Expand Up @@ -202,38 +202,38 @@ ERR: undefined instruction: op opcode 0xac not defined, pos 0
ERR: undefined instruction: op opcode 0xad not defined, pos 0
ERR: undefined instruction: op opcode 0xae not defined, pos 0
ERR: undefined instruction: op opcode 0xaf not defined, pos 0
ERR: undefined instruction: op opcode 0xb0 not defined, pos 0
ERR: undefined instruction: op opcode 0xb1 not defined, pos 0
ERR: undefined instruction: op opcode 0xb2 not defined, pos 0
ERR: undefined instruction: op opcode 0xb3 not defined, pos 0
ERR: undefined instruction: op opcode 0xb4 not defined, pos 0
ERR: undefined instruction: op opcode 0xb5 not defined, pos 0
ERR: undefined instruction: op opcode 0xb6 not defined, pos 0
ERR: undefined instruction: op opcode 0xb7 not defined, pos 0
ERR: undefined instruction: op opcode 0xb8 not defined, pos 0
ERR: undefined instruction: op opcode 0xb9 not defined, pos 0
ERR: undefined instruction: op opcode 0xba not defined, pos 0
ERR: undefined instruction: op opcode 0xbb not defined, pos 0
ERR: undefined instruction: op opcode 0xbc not defined, pos 0
ERR: undefined instruction: op opcode 0xbd not defined, pos 0
ERR: undefined instruction: op opcode 0xbe not defined, pos 0
ERR: undefined instruction: op opcode 0xbf not defined, pos 0
ERR: undefined instruction: op opcode 0xc0 not defined, pos 0
ERR: undefined instruction: op opcode 0xc1 not defined, pos 0
ERR: undefined instruction: op opcode 0xc2 not defined, pos 0
ERR: undefined instruction: op opcode 0xc3 not defined, pos 0
ERR: undefined instruction: op opcode 0xc4 not defined, pos 0
ERR: undefined instruction: op opcode 0xc5 not defined, pos 0
ERR: undefined instruction: op opcode 0xc6 not defined, pos 0
ERR: undefined instruction: op opcode 0xc7 not defined, pos 0
ERR: undefined instruction: op opcode 0xc8 not defined, pos 0
ERR: undefined instruction: op opcode 0xc9 not defined, pos 0
ERR: undefined instruction: op opcode 0xca not defined, pos 0
ERR: undefined instruction: op opcode 0xcb not defined, pos 0
ERR: undefined instruction: op opcode 0xcc not defined, pos 0
ERR: undefined instruction: op opcode 0xcd not defined, pos 0
ERR: undefined instruction: op opcode 0xce not defined, pos 0
ERR: undefined instruction: op opcode 0xcf not defined, pos 0
ERR: undefined instruction: op NOP, pos 0
ERR: undefined instruction: op ANDSWAP1POPSWAP2SWAP1, pos 0
ERR: undefined instruction: op SWAP2SWAP1POPJUMP, pos 0
ERR: undefined instruction: op SWAP1POPSWAP2SWAP1, pos 0
ERR: undefined instruction: op POPSWAP2SWAP1POP, pos 0
ERR: undefined instruction: op PUSH2JUMP, pos 0
ERR: undefined instruction: op PUSH2JUMPI, pos 0
ERR: undefined instruction: op PUSH1PUSH1, pos 0
ERR: undefined instruction: op PUSH1ADD, pos 0
ERR: undefined instruction: op PUSH1SHL, pos 0
ERR: undefined instruction: op PUSH1DUP1, pos 0
ERR: undefined instruction: op SWAP1POP, pos 0
ERR: undefined instruction: op POPJUMP, pos 0
ERR: undefined instruction: op POP2, pos 0
ERR: undefined instruction: op SWAP2SWAP1, pos 0
ERR: undefined instruction: op SWAP2POP, pos 0
ERR: undefined instruction: op DUP2LT, pos 0
ERR: undefined instruction: op JUMPIFZERO, pos 0
ERR: undefined instruction: op ISZEROPUSH2, pos 0
ERR: undefined instruction: op DUP2MSTOREPUSH1ADD, pos 0
ERR: undefined instruction: op DUP1PUSH4EQPUSH2, pos 0
ERR: undefined instruction: op PUSH1CALLDATALOADPUSH1SHRDUP1PUSH4GTPUSH2, pos 0
ERR: undefined instruction: op PUSH1PUSH1PUSH1SHLSUB, pos 0
ERR: undefined instruction: op ANDDUP2ADDSWAP1DUP2LT, pos 0
ERR: undefined instruction: op SWAP1PUSH1DUP1NOTSWAP2ADDANDDUP2ADDSWAP1DUP2LT, pos 0
ERR: undefined instruction: op DUP3AND, pos 0
ERR: undefined instruction: op SWAP2SWAP1DUP3SUBSWAP2DUP3GTPUSH2, pos 0
ERR: undefined instruction: op SWAP1DUP2, pos 0
ERR: undefined instruction: op SHRSHRDUP1MULDUP1, pos 0
ERR: undefined instruction: op SWAP3POPPOPPOP, pos 0
ERR: undefined instruction: op SUBSLTISZEROPUSH2, pos 0
ERR: undefined instruction: op DUP11MULDUP3SUBMULDUP1, pos 0
ERR: undefined instruction: op opcode 0xd4 not defined, pos 0
ERR: undefined instruction: op opcode 0xd5 not defined, pos 0
ERR: undefined instruction: op opcode 0xd6 not defined, pos 0
Expand Down Expand Up @@ -2250,7 +2250,7 @@ ERR: invalid jump destination: out-of-bounds offset: offset -21151, dest -20628,
ERR: invalid dataloadN argument: arg 24833, last 0, pos 1397
ERR: invalid jump destination: out-of-bounds offset: offset 24833, dest 26278, pos 1443
ERR: stack limit reached 1048 (1024): at pos 75
ERR: undefined instruction: op opcode 0xc8 not defined, pos 1179
ERR: undefined instruction: op SWAP1PUSH1DUP1NOTSWAP2ADDANDDUP2ADDSWAP1DUP2LT, pos 1179
ERR: invalid dataloadN argument: arg 5, last 32, pos 1728
ERR: invalid dataloadN argument: arg 62719, last 32, pos 945
ERR: invalid dataloadN argument: arg 16, last 32, pos 771
Expand Down
1 change: 1 addition & 0 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ var (
utils.LogDebugFlag,
utils.LogBacktraceAtFlag,
utils.BlobExtraReserveFlag,
utils.VMOpcodeOptimizeFlag,
utils.EnableIncrSnapshotFlag,
utils.IncrSnapshotPathFlag,
utils.IncrSnapshotBlockIntervalFlag,
Expand Down
21 changes: 20 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/fdlimit"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/opcodeCompiler/compiler"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/txpool/blobpool"
"github.com/ethereum/go-ethereum/core/txpool/legacypool"
Expand Down Expand Up @@ -1200,6 +1201,12 @@ Please note that --` + MetricsHTTPFlag.Name + ` must be set to start the server.
Category: flags.MetricsCategory,
}

VMOpcodeOptimizeFlag = &cli.BoolFlag{
Name: "vm.opcode.optimize",
Usage: "enable opcode optimization",
Category: flags.VMCategory,
}

CheckSnapshotWithMPT = &cli.BoolFlag{
Name: "check-snapshot-with-mpt",
Usage: "Enable checking between snapshot and MPT ",
Expand Down Expand Up @@ -2204,6 +2211,13 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
cfg.EnablePreimageRecording = ctx.Bool(VMEnableDebugFlag.Name)
}

if ctx.IsSet(VMOpcodeOptimizeFlag.Name) {
cfg.EnableOpcodeOptimizing = ctx.Bool(VMOpcodeOptimizeFlag.Name)
if cfg.EnableOpcodeOptimizing {
compiler.EnableOptimization()
}
}

if ctx.IsSet(RPCGlobalGasCapFlag.Name) {
cfg.RPCGasCap = ctx.Uint64(RPCGlobalGasCapFlag.Name)
}
Expand Down Expand Up @@ -2820,7 +2834,12 @@ func MakeChain(ctx *cli.Context, stack *node.Node, readonly bool) (*core.BlockCh
options.TriesInMemory = ctx.Uint64(TriesInMemoryFlag.Name)
}
vmcfg := vm.Config{
EnablePreimageRecording: ctx.Bool(VMEnableDebugFlag.Name),
EnablePreimageRecording: ctx.Bool(VMEnableDebugFlag.Name),
EnableOpcodeOptimizations: ctx.Bool(VMOpcodeOptimizeFlag.Name),
}

if vmcfg.EnableOpcodeOptimizations {
compiler.EnableOptimization()
}
if ctx.IsSet(VMTraceFlag.Name) {
if name := ctx.String(VMTraceFlag.Name); name != "" {
Expand Down
Loading