diff --git a/core/authority_discovery/publisher/address_publisher.cpp b/core/authority_discovery/publisher/address_publisher.cpp index f29fede33e..a1a5a647db 100644 --- a/core/authority_discovery/publisher/address_publisher.cpp +++ b/core/authority_discovery/publisher/address_publisher.cpp @@ -10,6 +10,7 @@ #include "authority_discovery/timestamp.hpp" #include "crypto/sha/sha256.hpp" +#include "scale/kagome_scale.hpp" #define _PB_SPAN(f) \ [&](::kagome::common::BufferView a) { (f)(a.data(), a.size()); } diff --git a/core/common/empty.hpp b/core/common/empty.hpp index 35d92055f5..44985442f6 100644 --- a/core/common/empty.hpp +++ b/core/common/empty.hpp @@ -6,7 +6,7 @@ #pragma once -#include +#include "scale/encoder/external_scale.hpp" namespace kagome { diff --git a/core/common/tagged.hpp b/core/common/tagged.hpp index b0a858d860..fa2eb719be 100644 --- a/core/common/tagged.hpp +++ b/core/common/tagged.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include "scale/encoder/external_scale.hpp" namespace kagome { diff --git a/core/consensus/babe/types/babe_block_header.hpp b/core/consensus/babe/types/babe_block_header.hpp index b6af7a024b..4b9773252c 100644 --- a/core/consensus/babe/types/babe_block_header.hpp +++ b/core/consensus/babe/types/babe_block_header.hpp @@ -11,7 +11,7 @@ #include "consensus/timeline/types.hpp" #include "primitives/common.hpp" -#include +#include "scale/encoder/external_scale.hpp" namespace kagome::consensus::babe { /** diff --git a/core/network/notifications/encode.hpp b/core/network/notifications/encode.hpp index 532bc0c230..fba94e8f69 100644 --- a/core/network/notifications/encode.hpp +++ b/core/network/notifications/encode.hpp @@ -8,7 +8,7 @@ #include -#include +#include "scale/encoder/external_scale.hpp" #include "common/buffer.hpp" diff --git a/core/network/notifications/handshake.hpp b/core/network/notifications/handshake.hpp index 772f8f4ae6..0d6f5bb348 100644 --- a/core/network/notifications/handshake.hpp +++ b/core/network/notifications/handshake.hpp @@ -10,7 +10,7 @@ #include #include -#include +#include "scale/encoder/external_scale.hpp" namespace kagome::network::notifications { using libp2p::basic::MessageReadWriterUvarint; diff --git a/core/network/notifications/read_messages.hpp b/core/network/notifications/read_messages.hpp index 6a1d216286..8feb950134 100644 --- a/core/network/notifications/read_messages.hpp +++ b/core/network/notifications/read_messages.hpp @@ -8,7 +8,7 @@ #include #include -#include +#include "scale/encoder/external_scale.hpp" namespace kagome::network::notifications { using libp2p::basic::MessageReadWriterUvarint; diff --git a/core/parachain/pvf/secure_mode_precheck.cpp b/core/parachain/pvf/secure_mode_precheck.cpp index a673bc3cfc..462fe4eac6 100644 --- a/core/parachain/pvf/secure_mode_precheck.cpp +++ b/core/parachain/pvf/secure_mode_precheck.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include "scale/kagome_scale.hpp" #include #include "common/buffer.hpp" diff --git a/core/primitives/block_header.hpp b/core/primitives/block_header.hpp index 35c06d968a..62602a801f 100644 --- a/core/primitives/block_header.hpp +++ b/core/primitives/block_header.hpp @@ -9,7 +9,7 @@ #include #include -#include +#include "scale/encoder/external_scale.hpp" #include "common/blob.hpp" #include "crypto/hasher.hpp" diff --git a/core/primitives/runtime_dispatch_info.hpp b/core/primitives/runtime_dispatch_info.hpp index d0e1f21bd7..11100c9905 100644 --- a/core/primitives/runtime_dispatch_info.hpp +++ b/core/primitives/runtime_dispatch_info.hpp @@ -6,7 +6,7 @@ #pragma once -#include +#include "scale/encoder/external_scale.hpp" #include #include "common/unused.hpp" diff --git a/core/scale/encoder/external_scale.hpp b/core/scale/encoder/external_scale.hpp index 0cf866a208..1842b33e00 100644 --- a/core/scale/encoder/external_scale.hpp +++ b/core/scale/encoder/external_scale.hpp @@ -10,6 +10,7 @@ #include "scale/encode_append.hpp" #include "scale/encoder/concepts.hpp" #include "scale/libp2p_types.hpp" +#include #include "common/size_limited_containers.hpp" //#include "common/tagged.hpp" //#include "common/buffer.hpp" @@ -77,6 +78,8 @@ namespace kagome::scale { template using Compact = ::scale::Compact; using uint128_t = ::scale::uint128_t; + using Timestamp = scale::uint128_t; + using TimestampScale = scale::Fixed; using ::scale::decode; using ::scale::append_or_new_vec; diff --git a/core/utils/lru_encoded.hpp b/core/utils/lru_encoded.hpp index f60279c038..1178f16bc5 100644 --- a/core/utils/lru_encoded.hpp +++ b/core/utils/lru_encoded.hpp @@ -6,7 +6,7 @@ #pragma once -#include +#include "scale/encoder/external_scale.hpp" #include diff --git a/node/main.cpp b/node/main.cpp index 8fe1385b6b..1af7d867f8 100644 --- a/node/main.cpp +++ b/node/main.cpp @@ -24,6 +24,7 @@ #include "log/configurator.hpp" #include "log/logger.hpp" #include "parachain/pvf/kagome_pvf_worker.hpp" +#include "scale/kagome_scale.hpp" // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic) diff --git a/test/core/host_api/child_storage_extension_test.cpp b/test/core/host_api/child_storage_extension_test.cpp index 58f55deaaf..764a750e00 100644 --- a/test/core/host_api/child_storage_extension_test.cpp +++ b/test/core/host_api/child_storage_extension_test.cpp @@ -8,7 +8,7 @@ #include #include -#include +#include "scale/kagome_scale.hpp" #include "common/monadic_utils.hpp" #include "mock/core/runtime/memory_provider_mock.hpp" diff --git a/test/core/host_api/storage_extension_test.cpp b/test/core/host_api/storage_extension_test.cpp index 064521c792..54d235b7db 100644 --- a/test/core/host_api/storage_extension_test.cpp +++ b/test/core/host_api/storage_extension_test.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include "scale/kagome_scale.hpp" #include "crypto/hasher/hasher_impl.hpp" #include "mock/core/runtime/memory_provider_mock.hpp" diff --git a/test/core/network/types/block_direction_test.cpp b/test/core/network/types/block_direction_test.cpp index 0b7b023109..15872fa04d 100644 --- a/test/core/network/types/block_direction_test.cpp +++ b/test/core/network/types/block_direction_test.cpp @@ -7,7 +7,7 @@ #include "network/types/block_direction.hpp" #include -#include +#include "scale/kagome_scale.hpp" #include "testutil/outcome.hpp" #include "testutil/testparam.hpp" diff --git a/test/core/scale/big_fixed_integers_test.cpp b/test/core/scale/big_fixed_integers_test.cpp index a507d8eea8..91c5ba17d0 100644 --- a/test/core/scale/big_fixed_integers_test.cpp +++ b/test/core/scale/big_fixed_integers_test.cpp @@ -7,7 +7,7 @@ #include "scale/big_fixed_integers.hpp" #include -#include +#include "scale/encoder/external_scale.hpp" #include "testutil/literals.hpp" #include "testutil/outcome.hpp" diff --git a/test/testutil/runtime/memory.hpp b/test/testutil/runtime/memory.hpp index 2103bcb054..39f3b94ab1 100644 --- a/test/testutil/runtime/memory.hpp +++ b/test/testutil/runtime/memory.hpp @@ -7,7 +7,7 @@ #pragma once #include -#include +#include "scale/encoder/external_scale.hpp" #include "common/buffer.hpp" #include "common/span_adl.hpp"