slotsUpdatesSubscribe RPC 메소드

모든 slot에서 다양한 업데이트에 대한 validator로부터 알림을 받기 위해 구독합니다

이 구독은 불안정합니다. 이 구독의 형식은 향후 변경될 수 있으며, 항상 지원되지 않을 수 있습니다.

{
"jsonrpc": "2.0",
"id": 1,
"method": "slotsUpdatesSubscribe"
}

params

None

result

Response
{
"jsonrpc": "2.0",
"result": 0,
"id": 1
}
integer

구독 ID (구독 취소에 필요)

알림 형식

알림은 다음 필드를 포함하는 객체입니다:

  • err: <string|undefined> - 오류 메시지. 업데이트 유형이 "dead"인 경우에만 존재합니다.
  • parent: <u64|undefined> - 부모 slot. 업데이트 유형이 "createdBank"인 경우에만 존재합니다.
  • slot: <u64> - 새로 업데이트된 slot
  • stats: <object|undefined> - 오류 메시지. 업데이트 유형이 "frozen"인 경우에만 존재합니다. 다음 필드를 포함하는 객체:
    • maxTransactionsPerEntry: <u64>,
    • numFailedTransactions: <u64>,
    • numSuccessfulTransactions: <u64>,
    • numTransactionEntries: <u64>,
  • timestamp: <i64> - 업데이트의 밀리초 단위 유닉스 타임스탬프
  • type: <string> - 업데이트 유형, 다음 중 하나:
    • "firstShredReceived"
    • "completed"
    • "createdBank"
    • "frozen"
    • "dead"
    • "optimisticConfirmation"
    • "root"
{
"jsonrpc": "2.0",
"method": "slotsUpdatesNotification",
"params": {
"result": {
"parent": 75,
"slot": 76,
"timestamp": 1625081266243,
"type": "optimisticConfirmation"
},
"subscription": 0
}
}

Is this page helpful?