diff --git a/docs/sdk-and-tools/notifier.md b/docs/sdk-and-tools/notifier.md index 11855e26e..a61094747 100644 --- a/docs/sdk-and-tools/notifier.md +++ b/docs/sdk-and-tools/notifier.md @@ -390,6 +390,10 @@ There are multiple event types: - `Push Block event`: when the block is committed, it contains logs and events - `Revert Block event`: when the block is reverted - `Finalized Block event`: when the block is finalized +- `Block Txs event`: when the block is committed, it contains the transactions of the block +- `Block Scrs event`: when the block is committed, it contains the smart contract results of the block +- `Block Events`: when the block is committed, it contains the transactions, smart contract results, and events with their execution order +- `Block State Accesses event`: when the block is committed, it contains the state accesses for the block In RabbitMQ there is a separate exchange for each event type. In Websocket setup, there is a event type field in each message. @@ -398,7 +402,7 @@ The WS event is defined as follows: | Field | Description | |------------|--------------------------------------------------------------------------------| -| Type | The type field defines the event type, it can be one of the following: `all_events`, `revert_events`, `finalized_events`. `all_events` refers to all logs and events. | +| Type | The type field defines the event type, it can be one of the following: `all_events`, `revert_events`, `finalized_events`, `block_txs`, `block_scrs`, `block_events`, `block_state_accesses`. `all_events` refers to all logs and events. | | Data | Serialized data corresponding to the event type. | [comment]: # (mx-context-auto) @@ -449,3 +453,55 @@ be triggered containing the hash of the block. | Field | Description | |------------|--------------------------------------------------------------------------------| | hash | The hash field represents the hash of the committed block. | + +[comment]: # (mx-context-auto) + +### Block Txs Event + +When a block is committed on the chain, an event will be triggered containing the transactions of the block. + +| Field | Description | +|------------|--------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| txs | The txs field holds a map of transactions, where the key is the transaction hash. | + +[comment]: # (mx-context-auto) + +### Block Scrs Event + +When a block is committed on the chain, an event will be triggered containing the smart contract results of the block. + +| Field | Description | +|------------|--------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| scrs | The scrs field holds a map of smart contract results, where the key is the smart contract result hash. | + +[comment]: # (mx-context-auto) + +### Block Events + +When a block is committed on the chain, an event will be triggered containing the block transactions, smart contract results, and events with their execution order. + +| Field | Description | +|-------------|----------------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| shardID | The shardID field represents the shard ID of the committed block. | +| timestamp | The timestamp field represents the creation time of the block (in seconds). | +| timestampMs | The timestampMs field represents the creation time of the block (in milliseconds). | +| txs | The txs field holds a map of transactions, where the key is the transaction hash. | +| scrs | The scrs field holds a map of smart contract results, where the key is the smart contract results hash. | +| events | The events field holds a list of events. | + +[comment]: # (mx-context-auto) + +### Block State Accesses Event + +When a block is committed on the chain, an event will be triggered containing the state accesses. + +| Field | Description | +|--------------------------|----------------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| shardID | The shardID field represents the shard ID of the committed block. | +| timestampMs | The timestampMs field represents the creation time of the block (in milliseconds). | +| nonce | The nonce field represents the sequence number of the block. | +| stateAccessesPerAccounts | The stateAccessesPerAccounts field holds a map of state accesses, grouped by account. | diff --git a/docs/validators/rating.md b/docs/validators/rating.md index 0a02bb6fe..3f88203d8 100644 --- a/docs/validators/rating.md +++ b/docs/validators/rating.md @@ -115,7 +115,7 @@ The node chosen to propose the block for a specific round will: Observe that the loss is 4 times larger than the gain, which means that a proposer must succeed 4 times to gain the points lost for a single missed block. -Rating for proposers is even stricter: there is a compounding penalty rule, which makes the rating of a node drop even faster when it proposes unsuccessfuly. +Rating for proposers is even stricter: there is a compounding penalty rule, which makes the rating of a node drop even faster when it proposes unsuccessfully. The amount of `0.92592` points is deducted from the rating of the proposer on the first unsuccessful proposal, but the second unsuccessful proposal will be penalized by `0.92592 × 1.1`. The third, by `0.92592 × 1.1 × 1.1`. The general formula is: diff --git a/static/llms-full.txt b/static/llms-full.txt index 537252bb6..7adaab0ac 100644 --- a/static/llms-full.txt +++ b/static/llms-full.txt @@ -16890,6 +16890,10 @@ There are multiple event types: - `Push Block event`: when the block is committed, it contains logs and events - `Revert Block event`: when the block is reverted - `Finalized Block event`: when the block is finalized +- `Block Txs event`: when the block is committed, it contains the transactions of the block +- `Block Scrs event`: when the block is committed, it contains the smart contract results of the block +- `Block Events`: when the block is committed, it contains the transactions, smart contract results, and events with their execution order +- `Block State Accesses event`: when the block is committed, it contains the state accesses for the block In RabbitMQ there is a separate exchange for each event type. In Websocket setup, there is a event type field in each message. @@ -16898,7 +16902,7 @@ The WS event is defined as follows: | Field | Description | |------------|--------------------------------------------------------------------------------| -| Type | The type field defines the event type, it can be one of the following: `all_events`, `revert_events`, `finalized_events`. `all_events` refers to all logs and events. | +| Type | The type field defines the event type, it can be one of the following: `all_events`, `revert_events`, `finalized_events`, `block_txs`, `block_scrs`, `block_events`, `block_state_accesses`. `all_events` refers to all logs and events. | | Data | Serialized data corresponding to the event type. | @@ -16947,6 +16951,54 @@ be triggered containing the hash of the block. |------------|--------------------------------------------------------------------------------| | hash | The hash field represents the hash of the committed block. | + +### Block Txs Event + +When a block is committed on the chain, an event will be triggered containing the transactions of the block. + +| Field | Description | +|------------|--------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| txs | The txs field holds a map of transactions, where the key is the transaction hash. | + + +### Block Scrs Event + +When a block is committed on the chain, an event will be triggered containing the smart contract results of the block. + +| Field | Description | +|------------|--------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| scrs | The scrs field holds a map of smart contract results, where the key is the smart contract result hash. | + + +### Block Events + +When a block is committed on the chain, an event will be triggered containing the block transactions, smart contract results, and events with their execution order. + +| Field | Description | +|-------------|----------------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| shardID | The shardID field represents the shard ID of the committed block. | +| timestamp | The timestamp field represents the creation time of the block (in seconds). | +| timestampMs | The timestampMs field represents the creation time of the block (in milliseconds). | +| txs | The txs field holds a map of transactions, where the key is the transaction hash. | +| scrs | The scrs field holds a map of smart contract results, where the key is the smart contract results hash. | +| events | The events field holds a list of events. | + + +### Block State Accesses Event + +When a block is committed on the chain, an event will be triggered containing the state accesses. + +| Field | Description | +|--------------------------|----------------------------------------------------------------------------------------| +| hash | The hash field represents the hash of the committed block. | +| shardID | The shardID field represents the shard ID of the committed block. | +| timestampMs | The timestampMs field represents the creation time of the block (in milliseconds). | +| nonce | The nonce field represents the sequence number of the block. | +| stateAccessesPerAccounts | The stateAccessesPerAccounts field holds a map of state accesses, grouped by account. | + --- ### Execution Events @@ -51162,7 +51214,7 @@ The node chosen to propose the block for a specific round will: Observe that the loss is 4 times larger than the gain, which means that a proposer must succeed 4 times to gain the points lost for a single missed block. -Rating for proposers is even stricter: there is a compounding penalty rule, which makes the rating of a node drop even faster when it proposes unsuccessfuly. +Rating for proposers is even stricter: there is a compounding penalty rule, which makes the rating of a node drop even faster when it proposes unsuccessfully. The amount of `0.92592` points is deducted from the rating of the proposer on the first unsuccessful proposal, but the second unsuccessful proposal will be penalized by `0.92592 × 1.1`. The third, by `0.92592 × 1.1 × 1.1`. The general formula is: