invalid opcode: opcode 0x5f not defined
问题
在低版本geth(quorum)上使用高版本solidity合约和编译(0.8.20及以上),部署时报以下错误
Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
Returned error: invalid opcode: opcode 0x5f not defined
OR the EVM version used by the selected environment is not compatible with the compiler EVM version.
分析
原因是因为当前版本Evm未支持eip-3855
查看代码,代码未支持 PUSH0 0x5f
https://github.com/Consensys/quorum/blob/643b5dcb8e2f0c68a8c78dc01c778a11f0ed14ba/core/vm/opcodes.go#L109-L121
const (
POP OpCode = 0x50
MLOAD OpCode = 0x51
MSTORE OpCode = 0x52
MSTORE8 OpCode = 0x53
SLOAD OpCode = 0x54
SSTORE OpCode = 0x55
JUMP OpCode = 0x56
JUMPI OpCode = 0x57
PC OpCode = 0x58
MSIZE OpCode = 0x59
GAS OpCode = 0x5a
JUMPDEST OpCode = 0x5b
)
对标以太坊,https://github.com/ethereum/go-ethereum/pull/24039/files
添加了对eip-3855的支持
后续
将EIP合并,并测试
版权属于:区块链中文技术社区 / 转载原创者
本文链接:https://www.HTZKW.com/index.php/archives/1859.html
相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!
版权声明
本文仅代表作者观点,不代表区块链技术网立场。
本文系作者授权本站发表,未经许可,不得转载。
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。