Constants

Git Source

AGENT_TREE_HEIGHT

Height of the Agent Merkle Tree

uint256 constant AGENT_TREE_HEIGHT = 32;

ORIGIN_TREE_HEIGHT

Height of the Origin Merkle Tree

uint256 constant ORIGIN_TREE_HEIGHT = 32;

SNAPSHOT_TREE_HEIGHT

Height of the Snapshot Merkle Tree. Allows up to 64 leafs, e.g. up to 32 states

uint256 constant SNAPSHOT_TREE_HEIGHT = 6;

ATTESTATION_LENGTH

See Attestation.sol: (bytes32,bytes32,uint32,uint40,uint40): 32+32+4+5+5

uint256 constant ATTESTATION_LENGTH = 78;

GAS_DATA_LENGTH

See GasData.sol: (uint16,uint16,uint16,uint16,uint16,uint16): 2+2+2+2+2+2

uint256 constant GAS_DATA_LENGTH = 12;

RECEIPT_LENGTH

See Receipt.sol: (uint32,uint32,bytes32,bytes32,uint8,address,address,address): 4+4+32+32+1+20+20+20

uint256 constant RECEIPT_LENGTH = 133;

STATE_LENGTH

See State.sol: (bytes32,uint32,uint32,uint40,uint40,GasData): 32+4+4+5+5+len(GasData)

uint256 constant STATE_LENGTH = 50 + GAS_DATA_LENGTH;

SNAPSHOT_MAX_STATES

Maximum amount of states in a single snapshot. Each state produces two leafs in the tree

uint256 constant SNAPSHOT_MAX_STATES = 1 << (SNAPSHOT_TREE_HEIGHT - 1);

HEADER_LENGTH

See Header.sol: (uint8,uint32,uint32,uint32,uint32): 1+4+4+4+4

uint256 constant HEADER_LENGTH = 17;

REQUEST_LENGTH

See Request.sol: (uint96,uint64,uint32): 12+8+4

uint256 constant REQUEST_LENGTH = 24;

TIPS_LENGTH

See Tips.sol: (uint64,uint64,uint64,uint64): 8+8+8+8

uint256 constant TIPS_LENGTH = 32;

TIPS_GRANULARITY

The amount of discarded last bits when encoding tip values

uint256 constant TIPS_GRANULARITY = 32;

TIPS_MULTIPLIER

Tip values could be only the multiples of TIPS_MULTIPLIER

uint256 constant TIPS_MULTIPLIER = 1 << TIPS_GRANULARITY;

ATTESTATION_VALID_SALT

Salts for signing various statements

bytes32 constant ATTESTATION_VALID_SALT = keccak256("ATTESTATION_VALID_SALT");

ATTESTATION_INVALID_SALT

bytes32 constant ATTESTATION_INVALID_SALT = keccak256("ATTESTATION_INVALID_SALT");

RECEIPT_VALID_SALT

bytes32 constant RECEIPT_VALID_SALT = keccak256("RECEIPT_VALID_SALT");

RECEIPT_INVALID_SALT

bytes32 constant RECEIPT_INVALID_SALT = keccak256("RECEIPT_INVALID_SALT");

SNAPSHOT_VALID_SALT

bytes32 constant SNAPSHOT_VALID_SALT = keccak256("SNAPSHOT_VALID_SALT");

STATE_INVALID_SALT

bytes32 constant STATE_INVALID_SALT = keccak256("STATE_INVALID_SALT");

AGENT_ROOT_OPTIMISTIC_PERIOD

Optimistic period for new agent roots in LightManager

uint32 constant AGENT_ROOT_OPTIMISTIC_PERIOD = 1 days;

AGENT_ROOT_PROPOSAL_TIMEOUT

Timeout between the agent root could be proposed and resolved in LightManager

uint32 constant AGENT_ROOT_PROPOSAL_TIMEOUT = 12 hours;

BONDING_OPTIMISTIC_PERIOD

uint32 constant BONDING_OPTIMISTIC_PERIOD = 1 days;

DISPUTE_TIMEOUT_NOTARY

Amount of time that the Notary will not be considered active after they won a dispute

uint32 constant DISPUTE_TIMEOUT_NOTARY = 12 hours;

FRESH_DATA_TIMEOUT

Amount of time without fresh data from Notaries before contract owner can resolve stuck disputes manually

uint256 constant FRESH_DATA_TIMEOUT = 4 hours;

MAX_CONTENT_BYTES

Maximum bytes per message = 2 KiB (somewhat arbitrarily set to begin)

uint256 constant MAX_CONTENT_BYTES = 2 * 2 ** 10;

MAX_SUMMIT_TIP

Maximum value for the summit tip that could be set in GasOracle

uint256 constant MAX_SUMMIT_TIP = 0.01 ether;