Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 silkworm/core/protocol/validation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ ValidationResult validate_requests_root(const BlockHeader& header, const std::ve
system_txn.data = Bytes{};
system_txn.set_sender(kSystemAddress);
const auto withdrawals = evm.execute(system_txn, kSystemCallGasLimit);
if (withdrawals.status != EVMC_SUCCESS) {
return ValidationResult::kSystemCallFailed;
}
evm.state().destruct_touched_dead();
requests.add_request(FlatRequestType::kWithdrawalRequest, withdrawals.data);
}
Expand All @@ -354,6 +357,9 @@ ValidationResult validate_requests_root(const BlockHeader& header, const std::ve
system_txn.data = Bytes{};
system_txn.set_sender(kSystemAddress);
const auto consolidations = evm.execute(system_txn, kSystemCallGasLimit);
if (consolidations.status != EVMC_SUCCESS) {
return ValidationResult::kSystemCallFailed;
}
evm.state().destruct_touched_dead();
requests.add_request(FlatRequestType::kConsolidationRequest, consolidations.data);
}
Expand Down
3 changes: 3 additions & 0 deletions silkworm/core/protocol/validation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ enum class [[nodiscard]] ValidationResult {
// EIP-7702 Set EOA account code
kIncorrectAuthorization,

// EIP-6110 and EIP-7002 system call failures
kSystemCallFailed,

// Bor validation errors. See https://github.com/erigontech/erigon/blob/main/consensus/bor/bor.go
kMissingVanity, // Block's extra-data section is shorter than 32 bytes, which is required to store the signer vanity
kMissingSignature, // Block's extra-data section doesn't seem to contain a 65 byte secp256k1 signature
Expand Down
Loading