Skip to main content

LEZ sequencer RPC reference

Look up every JSON-RPC method a LEZ sequencer serves.​

Mirrored page

This page mirrors lez/sequencer/service/rpc/src/lib.rs from logos-execution-zone v0.3.2, and is regenerated automatically after each release. To change it, edit the source in logos-blockchain/logos-execution-zone, not this page.

The server speaks JSON-RPC 2.0. Parameter and return types are the Rust types the server is written against; most come from the sequencer_service_protocol crate, and their JSON shape is their serde serialisation. A failed call returns a JSON-RPC error object.

Methods​

NameParametersReturns
sendTransactiontxHashType
getFeeStateNoneFeeStateQuote
checkHealthNoneNone
getBlockblock_idOption<Block>
getBlockRangestart_block_id, end_block_idVec<Block>
getLastBlockIdNoneBlockId
getAccountBalanceaccount_idu128
getTransactiontx_hashOption<(LeeTransaction, BlockId)>
getAccountsNoncesaccount_idsVec<Nonce>
getAccountViewshard_selectorAccount
getProofsAndRootcommitments(Vec<Option<MembershipProof>>, CommitmentSetDigest)
getAccountaccount_idAccount
getProgramIdsNoneBTreeMap<String, ProgramId>
getChannelIdNoneChannelId
getCrossZoneDeadLettersNoneCrossZoneDeadLetterReport
requeueCrossZoneDeadLettermessage_keyCrossZoneDeadLetterRequeue

sendTransaction​

Parameters, in order:

NameType
txLeeTransaction

Returns HashType.

getFeeState​

The head fee market: current base fees and the band the next block's can move within, for sizing max_fee at submission time.

Takes no parameters.

Returns FeeStateQuote.

checkHealth​

Takes no parameters.

Returns no value: the result is null.

getBlock​

Parameters, in order:

NameType
block_idBlockId

Returns Option<Block>.

getBlockRange​

Parameters, in order:

NameType
start_block_idBlockId
end_block_idBlockId

Returns Vec<Block>.

getLastBlockId​

Takes no parameters.

Returns BlockId.

getAccountBalance​

Parameters, in order:

NameType
account_idAccountId

Returns u128.

getTransaction​

Parameters, in order:

NameType
tx_hashHashType

Returns Option<(LeeTransaction, BlockId)>.

getAccountsNonces​

Parameters, in order:

NameType
account_idsVec<AccountId>

Returns Vec<Nonce>.

getAccountView​

Returns the account's nonce and the selected shard; its balance is the shard at the native token program.

Parameters, in order:

NameType
shard_selectorProgramShardSelector

Returns Account.

getProofsAndRoot​

Parameters, in order:

NameType
commitmentsVec<Commitment>

Returns (Vec<Option<MembershipProof>>, CommitmentSetDigest).

getAccount​

Parameters, in order:

NameType
account_idAccountId

Returns Account.

getProgramIds​

Takes no parameters.

Returns BTreeMap<String, ProgramId>.

getChannelId​

Takes no parameters.

Returns ChannelId.

getCrossZoneDeadLetters​

The cross-zone deliveries this sequencer has given up on.

Its own method rather than folded into checkHealth: one undeliverable peer message must not read as an unhealthy node.

Takes no parameters.

Returns CrossZoneDeadLetterReport.

requeueCrossZoneDeadLetter​

Restores a dead-lettered cross-zone delivery to the pending list, with a clean attempt count.

The operator move once the cause of the failures has cleared: a raised mint cap, a fixed target program. A delivery that fails again is dead-lettered again.

Like the rest of this surface it carries no authentication, so anyone who can reach the RPC can requeue; the blast radius is bounded to re-attempting deliveries this node already accepted from a peer.

Parameters, in order:

NameType
message_keyHashType

Returns CrossZoneDeadLetterRequeue.