Playground editor does not rename opcode 0x44 from DIFFICULTY to PREVRANDAO post-merge
还没有人认领这个 Issue。
- #220 来自 @ardislu —— 已关闭,未合并
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- blockchain, frontend
调研方向
在 Merge playground URL 复现该行为,然后阅读 ethereumContext.tsx,尤其是 loadInstructions 和现有的 extractDocFromOpcode 检查。验证在 Bytecode 和 Mnemonic 模式之间切换时如何加载 opcode 0x44。完成的标准是 Merge fork 显示 PREVRANDAO,并将其转换回 44,且不会产生 undefined。
由索引模型根据 Issue 内容生成。
描述
Steps to reproduce the issue:
- Go to https://www.evm.codes/playground?fork=merge
- Set the editor language to "Bytecode"
- Enter "44" into the editor
- Change the editor language to "Mnemonic"
- Change the editor language back to "Bytecode"
Expected result: the "44" opcode is recognized as "PREVRANDAO" in the "Mnemonic" setting, and the value "PREVRANDAO" is converted to "44" when switched back to bytecode.
Actual result: the "44" opcode is recognized as "DIFFICULTY" in the "Mnemonic" setting, and the value "DIFFICULTY" is converted to "undefined" when switched back to bytecode.
I see there was the prior issue #172 and PR #180 to address this, additionally in ethereumContext.tsx there's already this logic in extractDocFromOpcode to account for this change:
// TODO: need to implement proper selection of doc according to selected fork (maybe similar to dynamic gas fee)
// Hack for "difficulty" -> "prevrandao" replacement for "merge" HF
if (selectedFork?.name === mergeHardforkName && toHex(op.code) == '44') {
return {
...meta[prevrandaoDocName],
...{
opcodeOrAddress: toHex(op.code),
staticFee: op.fee,
minimumFee: 0,
name: 'PREVRANDAO',
},
}
}
So I think this issue was a small oversight in the larger PR. I believe the specific issue I described can be fixed by adding a check in the loadInstructions function in ethereumContext.tsx, similar to the check in extractDocFromOpcode.
- 主要语言
- TypeScript
- 星标
- 833
- 派生
- 197
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
duneanalytics/evm.codes 的其他 Issue
-
improvement
难度 2/5 1-3 小时 新手友好度 65/100
duneanalytics/evm.codes#184 ·
-
难度 3/5 1-2 天 新手友好度 68/100
duneanalytics/evm.codes#416 ·
-
## PR Summary未关闭
难度 3/5 1-2 天 新手友好度 35/100
duneanalytics/evm.codes#413 ·
-
难度 3/5 1-2 天 新手友好度 48/100
duneanalytics/evm.codes#411 ·
-
难度 5/5 一周以上 新手友好度 25/100
duneanalytics/evm.codes#407 ·
查看 duneanalytics/evm.codes 的全部 Issue
相似的 Issue
-
good first issue help wanted
难度 1/5 1 小时以内 新手友好度 92/100
Mikiyas-Meles-Assefa/opensourcebook#154 · 1 条评论 ·
维护者通常 1 天内回复
-
rowbinary: typeStringToReader keeps Variant members in text order, so Variant(Int64, Float64) reads 7 as 3.5e-323可能已有人在做 @rwits08 今天认领。 未关闭bug data-types
难度 2/5 1-3 小时 新手友好度 88/100
ClickHouse/clickhouse-js#1293 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
sidebandstudio/clawtrate#1863 ·
维护者通常 1 天内回复
-
agent/quality testing
难度 1/5 1 小时以内 新手友好度 95/100
维护者通常 1 天内回复
-
GitHub registry install via `gh` credentials rewrites `\u0000`–`\u001f` escapes in source files to `^@`–`^_`可能已有人在做 @carlosrobert0 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 2 天内回复