Skip to main content

Module msg_pool

Module msg_pool 

Source

Structsยง

MessagePool
This contains all necessary information needed for the message pool. Keeps track of messages to apply, as well as context needed for verifying transactions.
MsgSet
Simple structure that contains a hash-map of messages where k: a message from address, v: a message which corresponds to that address.
StateNonceCacheKey ๐Ÿ”’

Enumsยง

StrictnessPolicy
Strictness policy for pending insertion enforces nonce-gap and replace-by-fee-during-gap rules.
TrustPolicy
Trust policy for whether a message is from a trusted or untrusted source. Untrusted sources are subject to stricter limits.

Constantsยง

BLS_SIG_CACHE_SIZE ๐Ÿ”’
KEY_CACHE_SIZE ๐Ÿ”’
MAX_ACTOR_PENDING_MESSAGES
MAX_MESSAGE_SIZE ๐Ÿ”’
Maximum size of a serialized message in bytes. This is an anti-DOS measure to prevent large messages from being added to the message pool.
MAX_NONCE_GAP ๐Ÿ”’
MAX_UNTRUSTED_ACTOR_PENDING_MESSAGES
SIG_VAL_CACHE_SIZE ๐Ÿ”’
STATE_NONCE_CACHE_SIZE ๐Ÿ”’

Functionsยง

add_helper ๐Ÿ”’
Finish verifying signed message before adding it to the pending mset hash-map. If an entry in the hash-map does not yet exist, create a new mset that will correspond to the from message and push it to the pending hash-map.
get_state_sequence ๐Ÿ”’
Get the state nonce for an address, accounting for messages already included in cur_ts.
remove
Remove a message from pending given the from address and sequence. The from address should already be resolved to its key form.
resolve_to_key ๐Ÿ”’
Resolve an address to its key form, checking the cache first. Non-ID addresses are returned unchanged.
verify_msg_before_add ๐Ÿ”’