From 05cc0543e47cc7c940c8e5fdfd4112d432e97ef5 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Thu, 4 Dec 2025 15:20:38 +0000 Subject: [PATCH 1/4] Teztale: Data: Add DAL attested_slots type --- teztale/lib_teztale_base/data.ml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/teztale/lib_teztale_base/data.ml b/teztale/lib_teztale_base/data.ml index 779a6bb12dc3..574c57927b5c 100644 --- a/teztale/lib_teztale_base/data.ml +++ b/teztale/lib_teztale_base/data.ml @@ -412,4 +412,20 @@ module Dal = struct (dft "assigned_shard_indices" (list int16) [])) let shard_assignments_encoding = Data_encoding.list shard_assignment_encoding + + type attested_slots = { + operation_hash : Operation_hash.t; + attested_slot_indices : int list; + } + + let attested_slots_encoding = + let open Data_encoding in + conv + (fun {operation_hash; attested_slot_indices} -> + (operation_hash, attested_slot_indices)) + (fun (operation_hash, attested_slot_indices) -> + {operation_hash; attested_slot_indices}) + (obj2 + (req "operation_hash" Operation_hash.encoding) + (dft "attested_slot_indices" (list int16) [])) end -- GitLab From 0cb25608b90bcfb32d13f975c8756a0565d3c3c1 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Fri, 5 Dec 2025 11:35:32 +0000 Subject: [PATCH 2/4] Teztale: Add SQL support for DAL attested slots --- teztale/bin_teztale_archiver/converter.ml | 10 +++- teztale/bin_teztale_archiver/json_archiver.ml | 15 ++++- teztale/bin_teztale_server/exporter.ml | 59 +++++++++++++++---- teztale/bin_teztale_server/sql_requests.ml | 16 +++++ teztale/bin_teztale_server/sql_requests.mli | 2 + teztale/lib_teztale_base/data.ml | 55 ++++++++++++++--- 6 files changed, 135 insertions(+), 22 deletions(-) diff --git a/teztale/bin_teztale_archiver/converter.ml b/teztale/bin_teztale_archiver/converter.ml index a8d21ac288d3..4ffc63cb64f0 100644 --- a/teztale/bin_teztale_archiver/converter.ml +++ b/teztale/bin_teztale_archiver/converter.ml @@ -38,6 +38,7 @@ let to_received_ops ctx endpoint auth level data = round; mempool_inclusion; block_inclusion = _; + attested_slot_indices = _; } -> List.map @@ -103,7 +104,14 @@ let included_ops_map level data = List.fold_left (fun acc Data.Delegate_operations. - {hash; kind; round; mempool_inclusion = _; block_inclusion} + { + hash; + kind; + round; + mempool_inclusion = _; + block_inclusion; + attested_slot_indices = _; + } -> List.fold_left (fun acc block -> diff --git a/teztale/bin_teztale_archiver/json_archiver.ml b/teztale/bin_teztale_archiver/json_archiver.ml index 47218b92e001..b249522ec782 100644 --- a/teztale/bin_teztale_archiver/json_archiver.ml +++ b/teztale/bin_teztale_archiver/json_archiver.ml @@ -80,7 +80,14 @@ let add_to_operations block_hash ops_hash ops_kind ?ops_round operations = operations with | ( Data.Delegate_operations. - {hash; kind; round = _; mempool_inclusion; block_inclusion} + { + hash; + kind; + round = _; + mempool_inclusion; + block_inclusion; + attested_slot_indices; + } :: _, operations' ) -> Data.Delegate_operations. @@ -90,6 +97,7 @@ let add_to_operations block_hash ops_hash ops_kind ?ops_round operations = round = ops_round; mempool_inclusion; block_inclusion = block_hash :: block_inclusion; + attested_slot_indices; } :: operations' | [], _ -> @@ -99,6 +107,7 @@ let add_to_operations block_hash ops_hash ops_kind ?ops_round operations = round = ops_round; mempool_inclusion = []; block_inclusion = [block_hash]; + attested_slot_indices = []; } :: operations @@ -166,6 +175,7 @@ let add_inclusion_in_block block_hash validators delegate_operations = round = op.op.round; mempool_inclusion = []; block_inclusion = [block_hash]; + attested_slot_indices = []; }; ]; assigned_shard_indices = []; @@ -336,6 +346,7 @@ let merge_operations = mempool_inclusion = [{source = "archiver"; reception_time; errors}]; block_inclusion; + attested_slot_indices = []; } :: acc' | _ :: _, _ -> acc @@ -346,6 +357,7 @@ let merge_operations = round; mempool_inclusion = [{source = "archiver"; reception_time; errors}]; block_inclusion = []; + attested_slot_indices = []; } :: acc) @@ -427,6 +439,7 @@ let dump_received logger path ?unaccurate level received_ops = }; ]; block_inclusion = []; + attested_slot_indices = []; }) ops; assigned_shard_indices = []; diff --git a/teztale/bin_teztale_server/exporter.ml b/teztale/bin_teztale_server/exporter.ml index af32b638c7e4..f1813cfe607d 100644 --- a/teztale/bin_teztale_server/exporter.ml +++ b/teztale/bin_teztale_server/exporter.ml @@ -214,6 +214,7 @@ type op_info = { round : Int32.t option; included : Tezos_crypto.Hashed.Block_hash.t list; received : Lib_teztale_base.Data.Delegate_operations.reception list; + attested_slot_indices : int list; } let kind_of_bool = function @@ -241,11 +242,15 @@ let select_ops conf db_pool boundaries = ->* Caqti_type.( t2 (t4 int32 Sql_requests.Type.public_key_hash bool (option int32)) - (t2 Sql_requests.Type.operation_hash Sql_requests.Type.block_hash))) - "SELECT o.level, d.address, o.endorsement, o.round, o.hash, b.hash FROM \ - operations o JOIN operations_inclusion i ON i.operation = o.id JOIN \ - delegates d ON o.endorser = d.id JOIN blocks b ON i.block = b.id WHERE \ - o.level >= ? AND o.level <= ?" + (t3 + (option int) + Sql_requests.Type.operation_hash + Sql_requests.Type.block_hash))) + "SELECT o.level, d.address, o.endorsement, o.round, das.slot_index, \ + o.hash, b.hash FROM operations o JOIN operations_inclusion i ON \ + i.operation = o.id JOIN delegates d ON o.endorser = d.id JOIN blocks b \ + ON i.block = b.id LEFT JOIN dal_attested_slots das ON das.operation = \ + o.id WHERE o.level >= ? AND o.level <= ?" in let q_received = Caqti_request.Infix.( @@ -279,8 +284,9 @@ let select_ops conf db_pool boundaries = in Int32Map.add level ops info in - let cb_included ((level, delegate, attestation, round), (op_hash, block_hash)) - info = + let cb_included + ( (level, delegate, attestation, round), + (slot_index_opt, op_hash, block_hash) ) info = let ops = match Int32Map.find_opt level info with Some m -> m | None -> Ops.empty in @@ -295,8 +301,32 @@ let select_ops conf db_pool boundaries = Tezos_crypto.Hashed.Operation_hash.Map.find_opt op_hash ops with | Some op_info -> - {op_info with included = block_hash :: op_info.included} - | None -> {kind; round; included = [block_hash]; received = []} + let included = + if List.mem block_hash op_info.included then + op_info.included + else block_hash :: op_info.included + in + let attested_slot_indices = + match slot_index_opt with + | None -> op_info.attested_slot_indices + | Some slot_index -> + if List.mem slot_index op_info.attested_slot_indices + then op_info.attested_slot_indices + else slot_index :: op_info.attested_slot_indices + in + {op_info with included; attested_slot_indices} + | None -> + { + kind; + round; + included = [block_hash]; + received = []; + attested_slot_indices = + Option.fold + ~none:[] + ~some:(fun slot_index -> [slot_index]) + slot_index_opt; + } in let ops' = Tezos_crypto.Hashed.Operation_hash.Map.add op_hash op ops @@ -330,7 +360,13 @@ let select_ops conf db_pool boundaries = | Some op_info -> {op_info with received = received_info :: op_info.received} | None -> - {kind; round; included = []; received = [received_info]} + { + kind; + round; + included = []; + received = [received_info]; + attested_slot_indices = []; + } in let ops' = Tezos_crypto.Hashed.Operation_hash.Map.add op_hash op ops @@ -402,7 +438,7 @@ let select_ops conf db_pool boundaries = let translate_ops info = let translate pkh_ops = Tezos_crypto.Hashed.Operation_hash.Map.fold - (fun hash {kind; round; included; received} acc -> + (fun hash {kind; round; included; received; attested_slot_indices} acc -> Lib_teztale_base.Data.Delegate_operations. { hash; @@ -410,6 +446,7 @@ let translate_ops info = round; mempool_inclusion = received; block_inclusion = included; + attested_slot_indices = List.sort_uniq compare attested_slot_indices; } :: acc) pkh_ops diff --git a/teztale/bin_teztale_server/sql_requests.ml b/teztale/bin_teztale_server/sql_requests.ml index dd7d54207e77..734d5afa6920 100644 --- a/teztale/bin_teztale_server/sql_requests.ml +++ b/teztale/bin_teztale_server/sql_requests.ml @@ -125,6 +125,14 @@ let create_dal_shard_assignments = \ FOREIGN KEY (endorsing_right) REFERENCES endorsing_rights(id),\n\ \ UNIQUE (endorsing_right, shard_index))" +let create_dal_attested_slots = + "CREATE TABLE IF NOT EXISTS dal_attested_slots(\n\ + \ id $(PRIMARY_INCREMENTING_INT) PRIMARY KEY,\n\ + \ operation $(PRIMARY_INCREMENTING_INT_REF) NOT NULL,\n\ + \ slot_index INTEGER NOT NULL,\n\ + \ FOREIGN KEY (operation) REFERENCES operations(id),\n\ + \ UNIQUE (operation, slot_index))" + module Mutex = struct let delegates = Lwt_mutex.create () @@ -147,6 +155,8 @@ module Mutex = struct let missing_blocks = Lwt_mutex.create () let dal_shard_assignments = Lwt_mutex.create () + + let dal_attested_slots = Lwt_mutex.create () end let create_endorsing_rights_level_idx = @@ -181,6 +191,10 @@ let create_dal_shard_assignments_endorsing_right_idx = "CREATE INDEX IF NOT EXISTS dal_shard_assignments_endorsing_right_idx ON \ dal_shard_assignments(endorsing_right)" +let create_dal_attested_slots_operation_idx = + "CREATE INDEX IF NOT EXISTS dal_attested_slots_operation_idx\n\ + ON dal_attested_slots(operation)" + let create_tables = [ create_delegates; @@ -194,6 +208,7 @@ let create_tables = create_cycles; create_missing_blocks; create_dal_shard_assignments; + create_dal_attested_slots; create_endorsing_rights_level_idx; create_blocks_level_idx; create_operations_level_idx; @@ -203,6 +218,7 @@ let create_tables = create_cycles_level_idx; create_missing_blocks_level_idx; create_dal_shard_assignments_endorsing_right_idx; + create_dal_attested_slots_operation_idx; ] let alter_blocks = diff --git a/teztale/bin_teztale_server/sql_requests.mli b/teztale/bin_teztale_server/sql_requests.mli index 5d8dbe93f534..05031b2df54a 100644 --- a/teztale/bin_teztale_server/sql_requests.mli +++ b/teztale/bin_teztale_server/sql_requests.mli @@ -43,6 +43,8 @@ module Mutex : sig val missing_blocks : Lwt_mutex.t val dal_shard_assignments : Lwt_mutex.t + + val dal_attested_slots : Lwt_mutex.t end val create_tables : string list diff --git a/teztale/lib_teztale_base/data.ml b/teztale/lib_teztale_base/data.ml index 574c57927b5c..ab5a9f0858ae 100644 --- a/teztale/lib_teztale_base/data.ml +++ b/teztale/lib_teztale_base/data.ml @@ -28,13 +28,20 @@ module Delegate_operations = struct round : Int32.t option; mempool_inclusion : reception list; block_inclusion : Block_hash.t list; + attested_slot_indices : int list; } let legacy_operation_encoding = let open Data_encoding in conv (fun _ -> assert false) - (fun (kind, round, reception_time, errors, block_inclusion) -> + (fun ( kind, + round, + reception_time, + errors, + block_inclusion, + attested_slot_indices ) + -> let mempool_inclusion = match reception_time with | None -> [] @@ -47,8 +54,9 @@ module Delegate_operations = struct round; mempool_inclusion; block_inclusion; + attested_slot_indices; }) - (obj5 + (obj6 (dft "kind" Consensus_ops.operation_kind_encoding @@ -56,16 +64,43 @@ module Delegate_operations = struct (opt "round" int32) (req "reception_time" (option Time.System.encoding)) (dft "errors" Tezos_rpc.Error.opt_encoding None) - (dft "included_in_blocks" (list Block_hash.encoding) [])) + (dft "included_in_blocks" (list Block_hash.encoding) []) + (dft "attested_slot_indices" (list int16) [])) let operation_encoding = let open Data_encoding in conv - (fun {hash; kind; round; mempool_inclusion; block_inclusion} -> - (hash, kind, round, mempool_inclusion, block_inclusion)) - (fun (hash, kind, round, mempool_inclusion, block_inclusion) -> - {hash; kind; round; mempool_inclusion; block_inclusion}) - (obj5 + (fun { + hash; + kind; + round; + mempool_inclusion; + block_inclusion; + attested_slot_indices; + } + -> + ( hash, + kind, + round, + mempool_inclusion, + block_inclusion, + attested_slot_indices )) + (fun ( hash, + kind, + round, + mempool_inclusion, + block_inclusion, + attested_slot_indices ) + -> + { + hash; + kind; + round; + mempool_inclusion; + block_inclusion; + attested_slot_indices; + }) + (obj6 (dft "hash" Operation_hash.encoding Operation_hash.zero) (dft "kind" @@ -73,7 +108,8 @@ module Delegate_operations = struct Consensus_ops.Attestation) (opt "round" int32) (dft "received_in_mempools" (list reception_encoding) []) - (dft "included_in_blocks" (list Block_hash.encoding) [])) + (dft "included_in_blocks" (list Block_hash.encoding) []) + (dft "attested_slot_indices" (list int16) [])) let operation_encoding = let open Data_encoding in @@ -137,6 +173,7 @@ module Delegate_operations = struct mempool_inclusion; round = None; block_inclusion; + attested_slot_indices = []; }; ]; assigned_shard_indices = []; -- GitLab From 2813e418eb31034c470392c2cd82559843eb5f36 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Tue, 2 Dec 2025 13:45:02 +0000 Subject: [PATCH 3/4] Teztale: Server: Add DAL attested slots in callback --- teztale/bin_teztale_server/sql_requests.ml | 14 +++++ teztale/bin_teztale_server/sql_requests.mli | 6 ++ .../bin_teztale_server/teztale_server_main.ml | 59 +++++++++++++++++++ teztale/lib_teztale_base/data.ml | 2 + 4 files changed, 81 insertions(+) diff --git a/teztale/bin_teztale_server/sql_requests.ml b/teztale/bin_teztale_server/sql_requests.ml index 734d5afa6920..7609f809f366 100644 --- a/teztale/bin_teztale_server/sql_requests.ml +++ b/teztale/bin_teztale_server/sql_requests.ml @@ -447,5 +447,19 @@ let insert_dal_shard_assignment = AND delegates.address = $2\n\ ON CONFLICT DO NOTHING" +let insert_dal_attested_slot = + Caqti_request.Infix.( + Caqti_type.( + t3 + (* $1 level *) int32 + (* $2 operation_hash *) Type.operation_hash + (* $3 slot_index *) int + ->. unit)) + "INSERT INTO dal_attested_slots (operation, slot_index)\n\ + SELECT o.id AS operation, $3 AS slot_index\n\ + FROM operations o\n\ + WHERE o.level = $1 AND o.hash = $2\n\ + ON CONFLICT DO NOTHING" + let maybe_with_metrics (c : Config.t) (name : string) (f : unit -> 'a Lwt.t) = if c.with_metrics then Metrics.sql name f else f () diff --git a/teztale/bin_teztale_server/sql_requests.mli b/teztale/bin_teztale_server/sql_requests.mli index 05031b2df54a..f1f41a54d389 100644 --- a/teztale/bin_teztale_server/sql_requests.mli +++ b/teztale/bin_teztale_server/sql_requests.mli @@ -130,4 +130,10 @@ val insert_dal_shard_assignment : [`Zero] ) Caqti_request.t +val insert_dal_attested_slot : + ( int32 * Tezos_crypto.Hashed.Operation_hash.t * int, + unit, + [`Zero] ) + Caqti_request.t + val maybe_with_metrics : Config.t -> string -> (unit -> 'a Lwt.t) -> 'a Lwt.t diff --git a/teztale/bin_teztale_server/teztale_server_main.ml b/teztale/bin_teztale_server/teztale_server_main.ml index bf1b9a9ade5f..96ef508410b3 100644 --- a/teztale/bin_teztale_server/teztale_server_main.ml +++ b/teztale/bin_teztale_server/teztale_server_main.ml @@ -942,6 +942,23 @@ let import_callback ~logger conf db_pool g data = operations) data.Lib_teztale_base.Data.delegate_operations in + (* DAL attested slots *) + let* () = + Tezos_lwt_result_stdlib.Lwtreslib.Bare.List.iter_es + (fun Lib_teztale_base.Data.Delegate_operations.{operations; _} -> + Tezos_lwt_result_stdlib.Lwtreslib.Bare.List.iter_es + (fun Lib_teztale_base.Data.Delegate_operations. + {hash; attested_slot_indices; _} + -> + Tezos_lwt_result_stdlib.Lwtreslib.Bare.List.iter_es + (fun slot_index -> + Db.exec + Sql_requests.insert_dal_attested_slot + (level, hash, slot_index)) + attested_slot_indices) + operations) + data.Lib_teztale_base.Data.delegate_operations + in (* block reception *) let* () = Tezos_lwt_result_stdlib.Lwtreslib.Bare.List.iter_es @@ -1056,6 +1073,38 @@ let dal_shards_callback ~logger conf db_pool g shard_assignments = ~body:"DAL shard assignments" ()) +let dal_attested_slots_callback ~logger conf db_pool g attested_slots = + let level = Int32.of_string (Re.Group.get g 1) in + let out = + Caqti_lwt_unix.Pool.use + (fun (module Db : Caqti_lwt.CONNECTION) -> + let rows = + List.concat_map + (fun Lib_teztale_base.Data.Dal. + {operation_hash; attested_slot_indices} + -> + List.map + (fun slot_index -> (level, operation_hash, slot_index)) + attested_slot_indices) + attested_slots + in + maybe_with_metrics conf "insert_dal_attested_slots" @@ fun () -> + without_cache + Sql_requests.Mutex.dal_attested_slots + Sql_requests.insert_dal_attested_slot + (module Db) + conf + rows) + db_pool + in + with_caqti_error ~logger out (fun () -> + Cohttp_lwt_unix.Server.respond_string + ~headers: + (Cohttp.Header.init_with "content-type" "text/plain; charset=UTF-8") + ~status:`OK + ~body:"DAL attested slots" + ()) + let extract_boundaries g = let min = Re.Group.get g 1 in let max = Re.Group.get g 2 in @@ -1072,6 +1121,8 @@ let extract_boundaries g = Used by archiver to import past data recorded locally. - //dal_shards Used by archiver to send DAL shard assignments per delegate for a given level. + - //dal_attested_slots + Used by archiver to send DAL attested slots per delegate for a given level. - /timestamp/ Get the levels (if any) before and after a given timestamp. - /ping @@ -1144,6 +1195,14 @@ let routes : Lib_teztale_base.Data.Dal.shard_assignments_encoding body (dal_shards_callback ~logger conf db_pool g)) ); + ( Re.seq + [Re.str "/"; Re.group (Re.rep1 Re.digit); Re.str "/dal_attested_slots"], + fun g ~logger ~conf ~admins:_ ~users db_pool header meth body -> + post_only_endpoint !users header meth (fun _source -> + with_data + Lib_teztale_base.Data.Dal.attested_slots_list_encoding + body + (dal_attested_slots_callback ~logger conf db_pool g)) ); ( Re.seq [Re.str "/timestamp/"; Re.group (Re.rep1 Re.digit)], fun g ~logger ~conf:_ ~admins:_ ~users:_ db_pool _header meth _body -> get_only_endpoint meth (fun () -> diff --git a/teztale/lib_teztale_base/data.ml b/teztale/lib_teztale_base/data.ml index ab5a9f0858ae..39a210e0360b 100644 --- a/teztale/lib_teztale_base/data.ml +++ b/teztale/lib_teztale_base/data.ml @@ -465,4 +465,6 @@ module Dal = struct (obj2 (req "operation_hash" Operation_hash.encoding) (dft "attested_slot_indices" (list int16) [])) + + let attested_slots_list_encoding = Data_encoding.list attested_slots_encoding end -- GitLab From d899f40dbb231ba7c52294fec3773556c6b6d4f9 Mon Sep 17 00:00:00 2001 From: Gabriel Moise Date: Thu, 4 Dec 2025 15:36:22 +0000 Subject: [PATCH 4/4] Teztale: Dump_month: Update script with new table --- teztale/scripts/db/dump_month.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/teztale/scripts/db/dump_month.sh b/teztale/scripts/db/dump_month.sh index d7df29597338..c46367362163 100755 --- a/teztale/scripts/db/dump_month.sh +++ b/teztale/scripts/db/dump_month.sh @@ -54,6 +54,7 @@ DROP VIEW IF EXISTS monthly_view_operations_reception CASCADE; DROP VIEW IF EXISTS monthly_view_operations_inclusion CASCADE; DROP VIEW IF EXISTS monthly_view_endorsing_rights CASCADE; DROP VIEW IF EXISTS monthly_view_dal_shard_assignments CASCADE; +DROP VIEW IF EXISTS monthly_view_dal_attested_slots CASCADE; DROP VIEW IF EXISTS monthly_view_delegates CASCADE; DROP VIEW IF EXISTS monthly_view_cycles CASCADE; DROP VIEW IF EXISTS monthly_view_missing_blocks CASCADE; @@ -97,6 +98,11 @@ CREATE VIEW monthly_view_dal_shard_assignments AS SELECT dsa.* FROM dal_shard_assignments dsa JOIN monthly_view_endorsing_rights er ON er.id = dsa.endorsing_right; +-- Create view for related DAL attested slots +CREATE VIEW monthly_view_dal_attested_slots AS +SELECT das.* FROM dal_attested_slots das +JOIN monthly_view_operations o ON o.id = das.operation; + -- Create view for related delegates CREATE VIEW monthly_view_delegates AS SELECT DISTINCT d.* FROM delegates d @@ -141,6 +147,7 @@ SELECT (SELECT COUNT(*) FROM monthly_view_operations_reception) as operation_reception_count, (SELECT COUNT(*) FROM monthly_view_endorsing_rights) as endorsing_rights_count, (SELECT COUNT(*) FROM monthly_view_dal_shard_assignments) as dal_shard_assignments_count, + (SELECT COUNT(*) FROM monthly_view_dal_attested_slots) as dal_attested_slots_count, (SELECT COUNT(*) FROM monthly_view_delegates) as delegate_count, (SELECT COUNT(*) FROM monthly_view_cycles) as cycle_count, (SELECT COUNT(*) FROM monthly_view_missing_blocks) as missing_block_count, @@ -182,6 +189,9 @@ CREATE TABLE temp_monthly_view_endorsing_rights AS TABLE monthly_view_endorsing_ DROP TABLE IF EXISTS temp_monthly_view_dal_shard_assignments; CREATE TABLE temp_monthly_view_dal_shard_assignments AS TABLE monthly_view_dal_shard_assignments; +DROP TABLE IF EXISTS temp_monthly_view_dal_attested_slots; +CREATE TABLE temp_monthly_view_dal_attested_slots AS TABLE monthly_view_dal_attested_slots; + DROP TABLE IF EXISTS temp_monthly_view_delegates; CREATE TABLE temp_monthly_view_delegates AS TABLE monthly_view_delegates; @@ -224,6 +234,7 @@ pg_dump \ --table=temp_monthly_view_operations_inclusion \ --table=temp_monthly_view_endorsing_rights \ --table=temp_monthly_view_dal_shard_assignments \ + --table=temp_monthly_view_dal_attested_slots \ --table=temp_monthly_view_delegates \ --table=temp_monthly_view_cycles \ --table=temp_monthly_view_missing_blocks \ @@ -240,6 +251,7 @@ DROP VIEW IF EXISTS monthly_view_operations_reception CASCADE; DROP VIEW IF EXISTS monthly_view_operations_inclusion CASCADE; DROP VIEW IF EXISTS monthly_view_endorsing_rights CASCADE; DROP VIEW IF EXISTS monthly_view_dal_shard_assignments CASCADE; +DROP VIEW IF EXISTS monthly_view_dal_attested_slots CASCADE; DROP VIEW IF EXISTS monthly_view_delegates CASCADE; DROP VIEW IF EXISTS monthly_view_cycles CASCADE; DROP VIEW IF EXISTS monthly_view_missing_blocks CASCADE; @@ -253,6 +265,7 @@ DROP TABLE IF EXISTS temp_monthly_view_operations_reception; DROP TABLE IF EXISTS temp_monthly_view_operations_inclusion; DROP TABLE IF EXISTS temp_monthly_view_endorsing_rights; DROP TABLE IF EXISTS temp_monthly_view_dal_shard_assignments; +DROP TABLE IF EXISTS temp_monthly_view_dal_attested_slots; DROP TABLE IF EXISTS temp_monthly_view_delegates; DROP TABLE IF EXISTS temp_monthly_view_cycles; DROP TABLE IF EXISTS temp_monthly_view_missing_blocks; -- GitLab