-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathpredefined_keys.hpp
74 lines (49 loc) · 2.37 KB
/
predefined_keys.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/**
* Copyright Quadrivium LLC
* All Rights Reserved
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include "common/buffer.hpp"
#include <fmt/format.h>
namespace kagome::storage {
using common::literals::operator""_buf;
inline const common::Buffer kRuntimeCodeKey = ":code"_buf;
inline const common::Buffer kRuntimeHeappagesKey = ":heappages"_buf;
inline const common::Buffer kExtrinsicIndexKey = ":extrinsic_index"_buf;
inline const common::Buffer kBlockTreeLeavesLookupKey =
":kagome:block_tree_leaves"_buf;
inline const common::Buffer kActivePeersKey = ":kagome:last_active_peers"_buf;
inline const common::Buffer kRuntimeHashesLookupKey =
":kagome:runtime_hashes"_buf;
inline const common::Buffer kOffchainWorkerStoragePrefix = ":kagome:ocw"_buf;
inline const common::Buffer kChildStoragePrefix = ":child_storage:"_buf;
inline const common::Buffer kChildStorageDefaultPrefix =
":child_storage:default:"_buf;
inline const common::Buffer kApplyingBlockInfoLookupKey =
":kagome:applying_block"_buf;
inline const common::Buffer kWarpSyncCacheBlocksPrefix =
":kagome:WarpSyncCache:blocks:"_buf;
inline const common::Buffer kWarpSyncOp = ":kagome:WarpSync:op"_buf;
inline const common::Buffer kFirstBlockSlot = ":kagome:first_block_slot"_buf;
inline const common::Buffer kBabeConfigRepositoryImplIndexerPrefix =
":kagome:BabeConfigRepositoryImpl:Indexer:"_buf;
inline const common::Buffer kAuthorityManagerImplIndexerPrefix =
":kagome:AuthorityManagerImpl:Indexer:"_buf;
inline const common::Buffer kGrandpaHistoricalVotesPrefix =
":kagome:Grandpa:historical_votes:"_buf;
inline const common::Buffer kRecentDisputeLookupKey = "recent_disputes"_buf;
inline const common::Buffer kSessionsWindowLookupKey =
"rolling_session_window"_buf;
inline const common::Buffer kEarliestSessionLookupKey =
"earliest-session"_buf;
template <typename SessionT, typename CandidateHashT>
inline common::Buffer kCandidateVotesLookupKey(
SessionT session, const CandidateHashT &candidate) {
return common::Buffer::fromString(
fmt::format("candidate-votes:{:0>10}:{:l}", session, candidate));
}
/// Until what session have votes been cleaned up already?
inline const common::Buffer kCleanedVotesWatermarkLookupKey =
"cleaned-votes-watermark"_buf;
} // namespace kagome::storage