Playground editor does not rename opcode 0x44 from DIFFICULTY to PREVRANDAO post-merge
Chưa có ai nhận issue này.
- #220 của @ardislu — đã đóng, không merge
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- blockchain, frontend
Hướng nghiên cứu
Tái hiện hành vi tại URL playground của Merge, sau đó đọc ethereumContext.tsx, đặc biệt là loadInstructions và kiểm tra extractDocFromOpcode hiện có. Xác minh cách opcode 0x44 được tải khi chuyển đổi giữa các chế độ Bytecode và Mnemonic. Được xem là hoàn tất khi Merge fork hiển thị PREVRANDAO và chuyển đổi nó trở lại thành 44 mà không tạo ra undefined.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 833
- Fork
- 197
- Merge trung bình
- 5 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của duneanalytics/evm.codes
-
improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
duneanalytics/evm.codes#184 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
duneanalytics/evm.codes#416 ·
-
## PR SummaryĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
duneanalytics/evm.codes#413 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
duneanalytics/evm.codes#411 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
duneanalytics/evm.codes#407 ·
Tất cả issue của duneanalytics/evm.codes
Issue tương tự
-
Translate the appĐang mởgood first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Mikiyas-Meles-Assefa/opensourcebook#154 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
rowbinary: typeStringToReader keeps Variant members in text order, so Variant(Int64, Float64) reads 7 as 3.5e-323Có thể đã có người làm @rwits08 đã nhận hôm nay. Đang mởbug data-types
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ClickHouse/clickhouse-js#1293 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
sidebandstudio/clawtrate#1863 ·
Maintainer thường phản hồi trong vòng 1 ngày