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
//! `MultiversX` protocol constants.
//!
//! This module provides shared protocol constants used across the entire workspace.
//! All crates should import these constants from mx-core to ensure consistency.
/// Special shard ID for metachain (0xFFFFFFFF).
///
/// This value represents `u32::MAX` and is used throughout the `MultiversX` protocol
/// to identify operations and data structures that belong to the metachain.
///
/// Prefer [`METACHAIN_SHARD_ID`] which is the canonical name used across
/// the codebase. Both constants hold the same value (`0xFFFF_FFFF`).
pub const META_SHARD_ID: u32 = u32MAX;
/// Alias for metachain shard ID used in P2P topics.
///
/// This is identical to `META_SHARD_ID` (both are `0xFFFF_FFFF`) and exists
/// for clarity when working with gossipsub topic names.
pub const METACHAIN_SHARD_ID: u32 = 0xFFFF_FFFF;
/// Shard ID representing all shards in P2P topics.
///
/// This special value (`0xFFFF_FFF0`) is used in gossipsub topic suffixes
/// to indicate that a message should be broadcast to all shards.
pub const ALL_SHARD_ID: u32 = 0xFFFF_FFF0;
/// Transaction option flag for hash signing (keccak256 hash instead of raw JSON).
///
/// When this flag is set in the transaction options field, the signature
/// is computed over the keccak256 hash of the transaction JSON payload
/// rather than the raw JSON bytes.
pub const TX_OPTION_HASH_SIGN: u32 = 1;
/// Transaction option flag for guarded transactions.
///
/// When this flag is set, the transaction includes a guardian signature
/// for additional security.
pub const TX_OPTION_GUARDED: u32 = 2;