diff --git a/etherlink/bin_node/lib_dev/encodings/helpers.ml b/etherlink/bin_node/lib_dev/encodings/helpers.ml index 93886ddec1413dc2ca3c917f876912015a5e8042..acf8d24593a752d0c379b5c302ddb3ff54423ed0 100644 --- a/etherlink/bin_node/lib_dev/encodings/helpers.ml +++ b/etherlink/bin_node/lib_dev/encodings/helpers.ml @@ -12,11 +12,6 @@ let keccak256 (Hex s) = let bytes = Hex.to_bytes_exn (`Hex s) in Tezos_crypto.Hacl.Hash.Keccak_256.digest bytes -let encode_u8 i = - let bytes = Bytes.make 1 '\000' in - Bytes.set_uint8 bytes 0 i ; - bytes - let encode_i32_le i = let bytes = Bytes.make 4 '\000' in Bytes.set_int32_le bytes 0 i ; diff --git a/etherlink/bin_node/lib_dev/sequencer_signal.ml b/etherlink/bin_node/lib_dev/sequencer_signal.ml index 0a7a233807e6d875d37873dd9e94c7ffc3a520d4..5490a5833b9a51342ec40f4ff3fae23107e5a201 100644 --- a/etherlink/bin_node/lib_dev/sequencer_signal.ml +++ b/etherlink/bin_node/lib_dev/sequencer_signal.ml @@ -52,7 +52,7 @@ let create ~cctxt ~sequencer_key ~smart_rollup_address ~slot_ids = List (compact_levels_slots ~slot_ids |> List.map (fun (published_level, slots) -> - let slots = List.map (fun idx -> Value (encode_u8 idx)) slots in + let slots = List.map (fun idx -> Value (encode_int idx)) slots in List [Value (encode_i32_le published_level); List slots])) in let rlp_unsigned_signal = encoded_levels_to_slots |> encode in diff --git a/etherlink/tezt/lib/setup.ml b/etherlink/tezt/lib/setup.ml index f5b7fe715573ca60744a03d8b517a8bf33ce0dca..4e34ee83c362838d55c1e2dba75323714a0c1789 100644 --- a/etherlink/tezt/lib/setup.ml +++ b/etherlink/tezt/lib/setup.ml @@ -432,8 +432,8 @@ let register_test_for_kernels ~__FILE__ ?block_storage_sqlite3 ?minimum_base_fee_per_gas ?preimages_dir ?maximum_allowed_ticks ?maximum_gas_per_transaction ?max_blueprint_lookahead_in_seconds ?enable_fa_bridge ?history_mode ?commitment_period ?challenge_window - ?additional_uses ~threshold_encryption ~enable_dal ~title ~tags body - protocols = + ?additional_uses ~threshold_encryption ~enable_dal ?dal_slots ~title ~tags + body protocols = List.iter (fun kernel -> register_test @@ -467,6 +467,7 @@ let register_test_for_kernels ~__FILE__ ?block_storage_sqlite3 ~threshold_encryption ?history_mode ~enable_dal + ?dal_slots ~title ~tags body diff --git a/etherlink/tezt/lib/setup.mli b/etherlink/tezt/lib/setup.mli index db39f09dd6baac8c379d916b2682fc2779a15931..20c4a440e2eda3357e4f237e92fa0c8e92e77a70 100644 --- a/etherlink/tezt/lib/setup.mli +++ b/etherlink/tezt/lib/setup.mli @@ -124,6 +124,7 @@ val register_test_for_kernels : ?additional_uses:Tezt_wrapper.Uses.t list -> threshold_encryption:bool -> enable_dal:bool -> + ?dal_slots:int list option -> title:string -> tags:string list -> (sequencer_setup -> Protocol.t -> unit Lwt.t) -> diff --git a/etherlink/tezt/tests/dal_sequencer.ml b/etherlink/tezt/tests/dal_sequencer.ml index dbf2d3495d976f1e6f888dd83d27e67bc0e75ea0..5e69c40d60324ad5d3a8a4318428e79f429a0c72 100644 --- a/etherlink/tezt/tests/dal_sequencer.ml +++ b/etherlink/tezt/tests/dal_sequencer.ml @@ -41,11 +41,13 @@ let count_blueprint_sent_on_inbox sequencer counter = (* This test is similar to {Evm_sequencer.test_publish_blueprints} but it also checks that all 5 blueprints sent from the sequencer were published on the DAL (and none on the inbox). *) -let test_publish_blueprints_on_dal = +let test_publish_blueprints_on_dal ~dal_slot = register_test ~time_between_blocks:Nothing ~tags:["evm"; "sequencer"; "data"] - ~title:"Sequencer publishes the blueprints to the DAL" + ~title: + (sf "Sequencer publishes the blueprints on DAL slot index %d" dal_slot) + ~dal_slots:(Some [dal_slot]) (* We want this test in the CI so we put no extra tags when DAL is active to avoid having the [ci_disabled] or [slow] tag. *) @@ @@ -181,5 +183,8 @@ let test_chunked_blueprints_on_dal = let protocols = Protocol.all let () = - test_publish_blueprints_on_dal protocols ; + test_publish_blueprints_on_dal protocols ~dal_slot:4 ; + (* Also run the test for slot index 0 because it is a particular + case in the RLP encoding used to send signals to the rollup. *) + test_publish_blueprints_on_dal protocols ~dal_slot:0 ; test_chunked_blueprints_on_dal protocols