Skip to content

Commit df687bf

Browse files
authored
txWatch: Stabilize to version 1 (#154)
Signed-off-by: Alexandru Vasile <[email protected]>
1 parent 641cfe8 commit df687bf

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@
4444
- [transaction_v1_broadcast](api/transaction_v1_broadcast.md)
4545
- [transaction_v1_stop](api/transaction_v1_stop.md)
4646
- [transactionWatch](api/transactionWatch.md)
47-
- [transactionWatch_unstable_submitAndWatch](api/transactionWatch_unstable_submitAndWatch.md)
48-
- [transactionWatch_unstable_unwatch](api/transactionWatch_unstable_unwatch.md)
47+
- [transactionWatch_v1_submitAndWatch](api/transactionWatch_v1_submitAndWatch.md)
48+
- [transactionWatch_v1_unwatch](api/transactionWatch_v1_unwatch.md)

src/api/transactionWatch_unstable_submitAndWatch.md renamed to src/api/transactionWatch_v1_submitAndWatch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# transactionWatch_unstable_submitAndWatch
1+
# transactionWatch_v1_submitAndWatch
22

33
**Parameters**:
44

55
- `transaction`: String containing the hexadecimal-encoded SCALE-encoded transaction to try to include in a block.
66

77
**Return value**: String representing the subscription.
88

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`.
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`.
1010

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.
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.
1212

1313

1414
## Notifications format
@@ -18,7 +18,7 @@ This function will later generate one or more notifications in the following for
1818
```json
1919
{
2020
"jsonrpc": "2.0",
21-
"method": "transactionWatch_unstable_watchEvent",
21+
"method": "transactionWatch_v1_watchEvent",
2222
"params": {
2323
"subscription": "...",
2424
"result": ...

src/api/transactionWatch_unstable_unwatch.md renamed to src/api/transactionWatch_v1_unwatch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# transactionWatch_unstable_unwatch
1+
# transactionWatch_v1_unwatch
22

33
**Parameters**:
44

5-
- `subscription`: Opaque string equal to the value returned by `transactionWatch_unstable_submitAndWatch`
5+
- `subscription`: Opaque string equal to the value returned by `transactionWatch_v1_submitAndWatch`
66

77
**Return value**: *null*
88

src/dos-attacks-resilience.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The events coming from the blockchain node can be seen as a stream. This stream
3434

3535
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.
3636

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.
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.
3838

3939
## Distinguishing between light and heavy calls
4040

0 commit comments

Comments
 (0)