Octez Mempool RPC (Octez 23.0~rc2 (4e3e2258))

Download OpenAPI specification:

The RPC API for the mempool served by the Octez node.

/ban_operation

Remove an operation from the mempool if present. Also add it to the set of banned operations to prevent it from being fetched/processed/injected in the future. Note: If the baker has already received the operation, then it's necessary to restart it to flush the operation from it.

Request Body schema: application/json
One of
One of
string (Universal string representation)

Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
null

/filter

Get the configuration of the mempool's filter and bounds. Values of the form [ "21", "20" ] are rational numbers given as a numerator and a denominator, e.g. 21/20 = 1.05. The minimal_fees (in mutez), minimal_nanotez_per_gas_unit, and minimal_nanotez_per_byte are requirements that a manager operation must meet to be considered by the mempool. replace_by_fee_factor is how much better a manager operation must be to replace a previous valid operation from the same manager (both its fee and its fee/gas ratio must exceed the old operation's by at least this factor). max_operations and max_total_bytes are the bounds on respectively the number of valid operations in the mempool and the sum of their sizes in bytes.

query Parameters
include_default
required
string

Show fields equal to their default value (set by default)

Responses

Response samples

Content type
application/json
null

/filter

Set the configuration of the mempool's filter and bounds. If any of the fields is absent from the input JSON, then it is set to the default value for this field (i.e. its value in the default configuration), even if it previously had a different value. If the input JSON does not describe a valid configuration, then the configuration is left unchanged. This RPC also returns the new configuration of the mempool (which may differ from the input if the latter omits fields or is invalid). You may call [octez-client rpc get '/chains/main/mempool/filter?include_default=true'] to see an example of JSON describing a valid configuration. See the description of that RPC for details on each configurable value.

Request Body schema: application/json
any

Responses

Request samples

Content type
application/json
null

Response samples

Content type
application/json
null

/monitor_operations

Monitor the mempool operations.

query Parameters
version
required
string

Supported RPC versions are version "1" (default)

validated
required
string

Include validated operations (set by default)

refused
required
string

Include refused operations

outdated
required
string

Include outdated operations

branch_refused
required
string

Include branch refused operations

branch_delayed
required
string

Include branch delayed operations (set by default)

validation_pass
string

Include operations filtered by validation pass (all by default)

sources
string

Include operations filtered by sources (all by default)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

/pending_operations

List the prevalidated operations.

query Parameters
version
required
string

Supported RPC versions are version "2" (default)

validated
required
string

Include validated operations (true by default)

refused
required
string

Include refused operations (true by default)

outdated
required
string

Include outdated operations (true by default)

branch_refused
required
string

Include branch refused operations (true by default)

branch_delayed
required
string

Include branch delayed operations (true by default)

validation_pass
string

Include operations filtered by validation pass (all by default)

source
string

Include operations filtered by source (all by default)

operation_hash
string

Include operations filtered by hash (all by default)

Responses

Response samples

Content type
application/json
{
  • "validated": [
    ],
  • "refused": [
    ],
  • "outdated": [
    ],
  • "branch_refused": [
    ],
  • "branch_delayed": [
    ],
  • "unprocessed": [
    ]
}

/request_operations

Request the operations of our peers or a specific peer if specified via a query parameter.

query Parameters
peer_id
string

A cryptographic node identity (Base58Check-encoded)

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

/unban_all_operations

Clear the set of banned operations.

Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
null

/unban_operation

Remove an operation from the set of banned operations (nothing happens if it was not banned).

Request Body schema: application/json
One of
One of
string (Universal string representation)

Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.

Responses

Request samples

Content type
application/json
"string"

Response samples

Content type
application/json
null