Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 57 additions & 1 deletion docs/sdk-and-tools/notifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
Expand Down Expand Up @@ -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. |
2 changes: 1 addition & 1 deletion docs/validators/rating.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
56 changes: 54 additions & 2 deletions static/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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. |


Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down