You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/api/transactionWatch_unstable_submitAndWatch.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,17 @@
1
-
# transactionWatch_v1_submitAndWatch
1
+
# transactionWatch_unstable_submitAndWatch
2
2
3
3
**Parameters**:
4
4
5
5
-`transaction`: String containing the hexadecimal-encoded SCALE-encoded transaction to try to include in a block.
6
6
7
7
**Return value**: String representing the subscription.
8
8
9
-
The string returned by this function is opaque and its meaning can't be interpreted by the JSON-RPC client. It is only meant to be matched with the `subscription` field of events and potentially passed to `transactionWatch_v1_unwatch`.
9
+
The string returned by this function is opaque and its meaning can't be interpreted by the JSON-RPC client. It is only meant to be matched with the `subscription` field of events and potentially passed to `transactionWatch_unstable_unwatch`.
10
10
11
-
Once this function has been called, the server will try to propagate this transaction over the peer-to-peer network and/or include it onto the chain even if `transactionWatch_v1_unwatch` is called or that the JSON-RPC client disconnects. In other words, it is not possible to cancel submitting a transaction.
11
+
Once this function has been called, the server will try to propagate this transaction over the peer-to-peer network and/or include it onto the chain even if `transactionWatch_unstable_unwatch` is called or that the JSON-RPC client disconnects. In other words, it is not possible to cancel submitting a transaction.
12
12
13
-
The JSON-RPC server must accept at least 4 `transactionWatch_v1_submitAndWatch` subscriptions per JSON-RPC client.
14
-
Trying to open more might lead to a JSON-RPC error when calling `transactionWatch_v1_submitAndWatch`.
13
+
The JSON-RPC server must accept at least 4 `transactionWatch_unstable_submitAndWatch` subscriptions per JSON-RPC client.
14
+
Trying to open more might lead to a JSON-RPC error when calling `transactionWatch_unstable_submitAndWatch`.
15
15
16
16
## Notifications format
17
17
@@ -20,7 +20,7 @@ This function will later generate one or more notifications in the following for
20
20
```json
21
21
{
22
22
"jsonrpc": "2.0",
23
-
"method": "transactionWatch_v1_watchEvent",
23
+
"method": "transactionWatch_unstable_watchEvent",
24
24
"params": {
25
25
"subscription": "...",
26
26
"result": ...
@@ -168,5 +168,5 @@ JSON-RPC servers are allowed to skip sending events as long as it properly keeps
168
168
169
169
## Possible errors
170
170
171
-
- A JSON-RPC error with error code `-32800` can be generated if the JSON-RPC client has already opened 4 or more `transactionWatch_v1_submitAndWatch` subscriptions.
171
+
- A JSON-RPC error with error code `-32800` can be generated if the JSON-RPC client has already opened 4 or more `transactionWatch_unstable_submitAndWatch` subscriptions.
172
172
- A JSON-RPC error with error code `-32602` is generated if the `transaction` parameter is not a valid hex string. Note that no error is produced if the bytes of the `transaction`, once decoded, are invalid. Instead, an `invalid` notification will be generated.
Copy file name to clipboardExpand all lines: src/dos-attacks-resilience.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ The events coming from the blockchain node can be seen as a stream. This stream
34
34
35
35
However, sending a message to a JSON-RPC client might take a long time, in case the client has (intentionally or not) little bandwidth. The threads that are receiving the stream of events should never wait for a client to be ready to accept more data before sending a notification to it. If the client isn't ready, then the notification must either be added to a send queue or simply discarded. Because queues must be bounded, it is unavoidable to sometimes have to discard some notifications.
36
36
37
-
Consequently, all functions that consist in sending notifications must be designed having in mind that the queue of notifications to send out must be bounded to a certain value. For example, the queue of notifications for `transactionWatch_v1_submitAndWatch` must have a size of 3. When the queue is full, new notifications must overwrite the notifications already in the queue. The design of all JSON-RPC functions should take into account the fact that this shouldn't result in a loss of important information for the JSON-RPC client.
37
+
Consequently, all functions that consist in sending notifications must be designed having in mind that the queue of notifications to send out must be bounded to a certain value. For example, the queue of notifications for `transactionWatch_unstable_submitAndWatch` must have a size of 3. When the queue is full, new notifications must overwrite the notifications already in the queue. The design of all JSON-RPC functions should take into account the fact that this shouldn't result in a loss of important information for the JSON-RPC client.
0 commit comments