Anoma.Node.Intents.IntentPool (Anoma v0.29.0)

I am the intent pool for the Anoma node. m1dnight still has to write these docs.

Summary

Types

t()

I am the state of the intent pool.

Functions

Returns a specification to start this module under a supervisor.

I return the list of current intents.

I add a new intent to the intent pool.

I remove an intent from the intent pool. If the intent does not exist nothing happens.

I am the name of the unsolved table. Given a Node ID, I create an appropriately named table for storing unsolved intents.

Types

@type t() :: %Anoma.Node.Intents.IntentPool{
  cms_set: MapSet.t(binary()),
  intents: MapSet.t(Anoma.RM.Intent.t()),
  nlfs_set: MapSet.t(binary()),
  node_id: String.t() | nil,
  table: atom() | nil
}

I am the state of the intent pool.

Fields

  • :intents - The intents in the pool.
  • :node_id - The ID of the Node.
  • :nlfs_set - The set of known nullifiers.
  • :cms_set - The set of known commitments.
  • :table - The table name for storing intents.

Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

intents(node_id)

@spec intents(String.t()) :: MapSet.t()

I return the list of current intents.

Link to this function

new_intent(node_id, intent)

@spec new_intent(String.t(), any()) :: :ok

I add a new intent to the intent pool.

Link to this function

reject_intents(intents, set)

Link to this function

remove_intent(node_id, intent)

@spec remove_intent(String.t(), any()) :: :ok

I remove an intent from the intent pool. If the intent does not exist nothing happens.

Link to this function

start_link(args)

@spec start_link(any()) :: :ignore | {:error, any()} | {:ok, pid()}
Link to this function

table_name(node_id)

@spec table_name(String.t()) :: atom()

I am the name of the unsolved table. Given a Node ID, I create an appropriately named table for storing unsolved intents.