Skip to content

Commit

Permalink
Merge pull request #2049 from skalenetwork/develop
Browse files Browse the repository at this point in the history
New beta
  • Loading branch information
DmytroNazarenko authored Nov 27, 2024
2 parents 44b9113 + e178411 commit c992b03
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 34 deletions.
35 changes: 4 additions & 31 deletions docs/json-rpc-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,8 +502,6 @@ Get details about block
2. Include transactions: boolean literal - true/false
#### Return format
Same as `eth_getBlockByHash`
#### Exceptions
Raises "block not found" error if block is "rotated out"

### `eth_getTransactionByHash`
| Compatibility | |
Expand Down Expand Up @@ -746,6 +744,8 @@ Get all events matching a filter
Same as `eth_getFilterChanges`
#### Exceptions
Throws `INVALID_PARAMS` if filter cannot be found or if response size is exceeded
#### Notes
Response size is limited by number of consecutive blocks that can be requested. It is set in `getLogsBlocksLimit` config parameter, which currenly is 2000 blocks.

### `eth_getLogs`
| Compatibility | |
Expand All @@ -771,6 +771,8 @@ Same as `eth_getFilterLogs`, but doesn't require filter creation
Same as `eth_getFilterChanges`
#### Exceptions
Throws `INVALID_PARAMS` if block does not exist, if response size is exceeded, or `fromBlock` or `toBlock` are present together with `blockHash`
#### Notes
Response size limit is determined by `getLogsBlocksLimit` config parameter, and currenly is 2000 logs per request.

### `eth_compile*` and `eth_getCompilers`
Not supported
Expand Down Expand Up @@ -869,35 +871,6 @@ Object:
- "accessList" - empty list;
- "gasUsed" - "0x" prefixed hex `String` - result of `eth_estimateGas`.

### `eth_getBlockTransactionCountByHash`
| Compatibility | |
|-----|-----------|
| Core vs ETH | Unknown |
| Historic vs ETH | Unknown |

#### Description
Get number of transactions in a block
#### Parameters
1. Block hash: "0x"-prefixed hex `String`, 32 bytes
#### Return format
"0x"-prefixed hex `String`

### `eth_getBlockTransactionCountByNumber`
| Compatibility | |
|-----|-----------|
| Core vs ETH | Unknown |
| Historic vs ETH | Unknown |

#### Description
Get number of transactions in a block
#### Parameters
1. Block number:
- "latest" or "pending" - latest block is used;
- "earliest" - block 0;
- `String` representation of an integer block number, either decimal or "0x"-prefixed hexadecimal;
#### Return format
"0x"-prefixed hex `String`

### `eth_getFilterChangesEx`
| Compatibility | |
|-----|-----------|
Expand Down
14 changes: 11 additions & 3 deletions libskale/broadcaster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,17 @@ void* ZmqBroadcaster::server_socket() const {
if ( !m_zmq_server_socket ) {
m_zmq_server_socket = zmq_socket( m_zmq_context, ZMQ_PUB );

int val = 16;
int val = 15000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_IVL, &val, sizeof( val ) );
val = 3000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TIMEOUT, &val, sizeof( val ) );
val = 60000;
zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TTL, &val, sizeof( val ) );

val = 16;
zmq_setsockopt( m_zmq_server_socket, ZMQ_SNDHWM, &val, sizeof( val ) );


const dev::eth::ChainParams& ch = m_client.chainParams();

// connect server to clients
Expand All @@ -116,11 +124,11 @@ void* ZmqBroadcaster::client_socket() const {
int value = 1;

zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE, &value, sizeof( value ) );
value = 15;
value = 300;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_IDLE, &value, sizeof( value ) );
value = 10;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_CNT, &value, sizeof( value ) );
value = 15;
value = 300;
zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_INTVL, &value, sizeof( value ) );

value = 16;
Expand Down

0 comments on commit c992b03

Please sign in to comment.