Anoma.Node.Logging (Anoma v0.25.0)

Replay manager with logger functionality

Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

The first step in the replay process.

Copies the contents of the storage tables into mock Replay tables

I am the function to be played on restarts of the Anoma node with known ID.

Types

@type flag() :: :info | :debug | :error
@type t() :: %Anoma.Node.Logging{node_id: String.t() | nil, table: atom()}

Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec init(any()) :: {:ok, t()}

Callback implementation for GenServer.init/1.

Link to this function

init_table(table, rocks)

@spec init_table(atom(), bool()) :: {:atomic, :ok}
Link to this function

log_event(node_id, flag, msg)

Link to this function

logging_filter()

Link to this function

replay_args(list)

@spec replay_args(height: integer(), mempool: list()) :: [
  mempool: list(),
  ordering: list(),
  storage: list()
]
Link to this function

replay_setup(event_table, block_table)

@spec replay_setup(atom(), atom()) :: [height: integer(), mempool: list()]

The first step in the replay process.

All tables here are the original ones from which we get info.

This gives us the height, the round, as well as the replay Mempool struct

Link to this function

replay_table_clone(values_table, updates_table, node_id)

Copies the contents of the storage tables into mock Replay tables

Link to this function

restart_with_replay(node_id)

@spec restart_with_replay(String.t()) :: DynamicSupervisor.on_start_child()

I am the function to be played on restarts of the Anoma node with known ID.

I sync the event table with the blocks submitted and then launch a mock node with a new ID with replay arguments.

If the replay succeeds, I reproduce it on the node with the ID provided. Otherwise, the only initialization information I reproduce are heights and rounds for the Transaction subsystem.

Link to this function

start_link(args)

Link to this function

table_name(node_id)

Link to this function

try_launch(mock_id, replay_args)

@spec try_launch(String.t(), any()) :: :ok | :error