Skip to content

Conversation

@0xRVE
Copy link
Contributor

@0xRVE 0xRVE commented Jan 28, 2026

Small safety and completeness improvements for pallet-revive:

  • Add selfdestruct call tracing: Emit terminate trace after successful SELFDESTRUCT
  • Add debug assertions for unsafe bytecode operations: in relative_jump, absolute_jump, and read_slice
  • Remove transmute in i256 sign detection: Replace unsafe { core::mem::transmute } with explicit conditional logic for determining Sign::Zero vs Sign::Plus

@0xRVE
Copy link
Contributor Author

0xRVE commented Jan 29, 2026

/cmd bench --runtime dev --pallet pallet_revive

@github-actions
Copy link
Contributor

Command "bench --runtime dev --pallet pallet_revive" has started 🚀 See logs here

@github-actions
Copy link
Contributor

Command "bench --runtime dev --pallet pallet_revive" has finished ✅ See logs here

Details

Subweight results:
File Extrinsic Old New Change [%]
substrate/frame/revive/src/weights.rs seal_terminate 1.07us 25.19us +2248.94
substrate/frame/revive/src/weights.rs set_transient_storage_empty 1.75us 2.31us +32.02
substrate/frame/revive/src/weights.rs deposit_eth_extrinsic_revert_event 3.27us 4.22us +29.02
substrate/frame/revive/src/weights.rs caller_is_root 1.19us 1.49us +25.08
substrate/frame/revive/src/weights.rs seal_base_fee 1.06us 1.31us +23.56
substrate/frame/revive/src/weights.rs caller_is_origin 1.26us 1.53us +21.96
substrate/frame/revive/src/weights.rs own_code_hash 10.11us 12.24us +21.13
substrate/frame/revive/src/weights.rs seal_gas_price 1.08us 1.29us +19.08
substrate/frame/revive/src/weights.rs set_transient_storage_full 2.06us 2.40us +16.38
substrate/frame/revive/src/weights.rs seal_balance 14.24us 16.51us +15.92
substrate/frame/revive/src/weights.rs seal_get_transient_storage 2.40us 2.71us +12.98
substrate/frame/revive/src/weights.rs weight_left 1.28us 1.45us +12.94
substrate/frame/revive/src/weights.rs get_transient_storage_empty 1.70us 1.91us +12.40
substrate/frame/revive/src/weights.rs seal_address 349.00ns 388.00ns +11.17
substrate/frame/revive/src/weights.rs minimum_balance 1.48us 1.64us +11.11
substrate/frame/revive/src/weights.rs seal_ref_time_left 1.93us 2.14us +10.83
substrate/frame/revive/src/weights.rs seal_contains_transient_storage 3.82us 4.21us +10.19
substrate/frame/revive/src/weights.rs seal_clear_transient_storage 4.29us 4.71us +9.62
substrate/frame/revive/src/weights.rs contains_storage 3.67us 4.00us +9.09
substrate/frame/revive/src/weights.rs get_transient_storage_full 1.89us 2.06us +8.87
substrate/frame/revive/src/weights.rs seal_take_transient_storage 4.59us 4.99us +8.66
substrate/frame/revive/src/weights.rs seal_set_transient_storage 2.89us 3.12us +8.11
substrate/frame/revive/src/weights.rs bn128_add 16.00us 17.19us +7.42
substrate/frame/revive/src/weights.rs seal_gas_limit 339.00ns 320.00ns -5.60
substrate/frame/revive/src/weights.rs seal_call_data_size 330.00ns 307.00ns -6.97
substrate/frame/revive/src/weights.rs evm_opcode 153.85us 143.08us -7.00
substrate/frame/revive/src/weights.rs seal_hash_keccak_256 3.73ms 3.47ms -7.06
substrate/frame/revive/src/weights.rs instr 1.30ms 1.18ms -9.00
substrate/frame/revive/src/weights.rs seal_now 347.00ns 313.00ns -9.80
substrate/frame/revive/src/weights.rs hash_blake2_256 1.48ms 1.23ms -16.91
substrate/frame/revive/src/weights.rs hash_blake2_128 1.48ms 1.22ms -17.83
substrate/frame/revive/src/weights.rs sha2_256 1.31ms 1.04ms -20.47
substrate/frame/revive/src/weights.rs upload_code 1.87ms 1.45ms -22.69
substrate/frame/revive/src/weights.rs instantiate_with_code 3.61ms 2.58ms -28.63
substrate/frame/revive/src/weights.rs get_storage_full 67.40us 47.65us -29.30
substrate/frame/revive/src/weights.rs eth_substrate_call 940.36us 609.96us -35.14
substrate/frame/revive/src/weights.rs eth_instantiate_with_code 3.24ms 1.95ms -39.83
substrate/frame/revive/src/weights.rs seal_instantiate 1.08ms 642.54us -40.48
substrate/frame/revive/src/weights.rs seal_deposit_event 84.55us 48.00us -43.23
substrate/frame/revive/src/weights.rs extcodecopy 46.93us 25.12us -46.46
substrate/frame/revive/src/weights.rs seal_block_author 47.36us 24.32us -48.66
substrate/frame/revive/src/weights.rs instantiate 1.34ms 685.98us -48.77
substrate/frame/revive/src/weights.rs evm_instantiate 1.43ms 675.32us -52.78
substrate/frame/revive/src/weights.rs call_with_pvm_code_per_byte 691.21us 286.61us -58.54
substrate/frame/revive/src/weights.rs to_account_id 37.02us 14.34us -61.27
substrate/frame/revive/src/weights.rs seal_delegate_call 111.01us 39.40us -64.51
substrate/frame/revive/src/weights.rs seal_code_hash 35.47us 12.21us -65.59
substrate/frame/revive/src/weights.rs seal_get_immutable_data 33.90us 11.52us -66.02
substrate/frame/revive/src/weights.rs seal_call_precompile 220.53us 74.20us -66.35
substrate/frame/revive/src/weights.rs seal_get_storage 35.23us 11.65us -66.94
substrate/frame/revive/src/weights.rs seal_call 449.44us 137.62us -69.38
substrate/frame/revive/src/weights.rs basic_block_compilation 551.56us 165.03us -70.08
substrate/frame/revive/src/weights.rs set_storage_full 169.57us 50.01us -70.51
substrate/frame/revive/src/weights.rs get_storage_empty 32.86us 8.91us -72.88
substrate/frame/revive/src/weights.rs seal_terminate_logic 1.05ms 275.24us -73.72
substrate/frame/revive/src/weights.rs seal_code_size 64.15us 16.25us -74.67
substrate/frame/revive/src/weights.rs seal_balance_of 96.37us 24.29us -74.79
substrate/frame/revive/src/weights.rs dispatch_as_fallback_account 94.78us 22.78us -75.97
substrate/frame/revive/src/weights.rs eth_call 918.21us 206.95us -77.46
substrate/frame/revive/src/weights.rs call 510.22us 113.79us -77.70
substrate/frame/revive/src/weights.rs seal_block_hash 31.20us 6.96us -77.71
substrate/frame/revive/src/weights.rs call_with_evm_code_per_byte 498.22us 107.52us -78.42
substrate/frame/revive/src/weights.rs map_account 336.87us 69.67us -79.32
substrate/frame/revive/src/weights.rs on_finalize_per_transaction 760.92us 153.19us -79.87
substrate/frame/revive/src/weights.rs unmap_account 266.92us 45.78us -82.85
substrate/frame/revive/src/weights.rs remove_code 404.24us 61.62us -84.76
substrate/frame/revive/src/weights.rs on_process_deletion_queue_batch 28.51us 3.65us -87.18
substrate/frame/revive/src/weights.rs v2_migration_step 590.30us 74.47us -87.38
substrate/frame/revive/src/weights.rs on_finalize_per_transaction_data 674.28us 79.81us -88.16
substrate/frame/revive/src/weights.rs take_storage 138.04us 15.42us -88.83
substrate/frame/revive/src/weights.rs clear_storage 137.31us 14.35us -89.55
substrate/frame/revive/src/weights.rs set_code 794.82us 77.73us -90.22
substrate/frame/revive/src/weights.rs seal_set_storage 135.67us 12.78us -90.58
substrate/frame/revive/src/weights.rs set_storage_empty 134.10us 11.08us -91.74
substrate/frame/revive/src/weights.rs on_finalize_per_event 671.95us 51.63us -92.32
substrate/frame/revive/src/weights.rs on_finalize_per_event_data 671.97us 51.55us -92.33
substrate/frame/revive/src/weights.rs seal_set_immutable_data 104.40us 6.09us -94.16
substrate/frame/revive/src/weights.rs v1_migration_step 262.87us 14.26us -94.58
substrate/frame/revive/src/weights.rs on_initialize_per_trie_key 129.50ms 1.40ms -98.92
Command output:

✅ Successful benchmarks of runtimes/pallets:
-- dev: ['pallet_revive']

@paritytech-workflow-stopper
Copy link

All GitHub workflows were cancelled due to failure one of the required jobs.
Failed workflow url: https://github.com/paritytech/polkadot-sdk/actions/runs/21481138670
Failed job name: test-linux-stable

@0xRVE
Copy link
Contributor Author

0xRVE commented Jan 30, 2026

/cmd prdoc --audience runtime_dev --bump patch

@0xRVE 0xRVE added the T7-smart_contracts This PR/Issue is related to smart contracts. label Jan 30, 2026
@0xRVE 0xRVE changed the title [WIP][pallet-revive] small improvements [pallet-revive] small improvements Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants