state: build_diff() reports deletions for accounts that never existed
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- 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
- Sôi nổi
- Công nghệ
- cpp
- Lĩnh vực
- blockchain
Hướng nghiên cứu
Start at build_diff() in test/state/state.cpp (the erase_if_empty / deleted_accounts path around the linked lines). Reproduce with state_transition.tx_legacy and state_transition.touch_nonexistent_sd, then add the pre.contains check on receipt.state_diff.deleted_accounts (fails 28/132). Decide a flag or skip for accounts inserted only because they were touched; #1717’s in_diff expectation can pin the chosen behaviour. Done when those accounts are not listed as deleted and related modified_accounts TODOs are considered.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
#1709 fixed one instance of this: an account warmed up by a cold access and then reverted was reported in StateDiff::deleted_accounts. The artifact still appears when the account is inserted some other way and ends up empty.
The shortest case is a transaction to an address that does not exist — state_transition.tx_legacy, where 0xc0de is not in the pre-state:
tx.to = To; // no code, no value
execute_message() inserts the recipient with erase_if_empty, it ends empty, and build_diff() puts it in deleted_accounts. Same for a non-existent SELFDESTRUCT beneficiary (state_transition.touch_nonexistent_sd, 0x4e).
build_diff() skips m.nonexistent (set only when a revert restores the account) and m.just_created (set only by CREATE). There is no flag for "inserted because it was touched", so these fall through to the erase_if_empty branch.
As with #1709 the state is correct — applying such a delete is a no-op — so only the diff is affected.
Scale: adding this to the state_transition fixture fails 28 of 132 tests on master:
for (const auto& a : receipt.state_diff.deleted_accounts)
EXPECT_TRUE(pre.contains(a)) << a << ": deleted, never existed";
Related, and already noted in the TODO below: modified_accounts also lists accounts that were only read or warmed, with nonce and balance unchanged — e.g. state_transition.touch_access_list_storage_only, where 0x5a is warmed by the access list alone.
#1717 adds an in_diff expectation to the state_transition fixture, which can be used to pin down whatever behaviour is decided here.
- Ngôn ngữ chính
- C++
- Star
- 979
- Fork
- 340
- Merge trung bình
- 12 giờ 16 phút
- Pull request đã merge (30 ngày)
- 25
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
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 ipsilon/evmone
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 12/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của ipsilon/evmone
Issue tương tự
-
ai_p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
ClickHouse/ClickHouse#132519 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
patch_advisor_json_integration fails when the build tree is reached through a symbolic linkCó thể đã có người làm @DerKarussellbremser đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
boykopovar/AnyPS5#22581 ·
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 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: VST3 getMidiControllerAssignment reads past midiControllerToParameter for program changeĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
juce-framework/JUCE#1810 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
petercorke/robotics-toolbox-python#952 ·
Maintainer thường phản hồi trong vòng 1 ngày