From 7ba05c856d04c8353d62e20117de9bd2f5774c89 Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Fri, 8 May 2020 23:19:16 +0300 Subject: [PATCH 1/4] Optional "block" given to RPC "work_generate" to infer difficulty --- docs/commands/rpc-protocol.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/commands/rpc-protocol.md b/docs/commands/rpc-protocol.md index 3e374af53..0a45ec8e4 100644 --- a/docs/commands/rpc-protocol.md +++ b/docs/commands/rpc-protocol.md @@ -2787,9 +2787,14 @@ A valid Nano account. If provided and `use_peers` is set to `true`, this informa **Optional "version"** -_version 21.0+_ +_version 21.0+_ Work version string. Currently "work_1" is the default and only valid option. +**Optional "block"** + +_version 21.0+_ +A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and no `difficulty` or `multiplier` are set, is used to calculate work generation difficulty for given block from node ledger. + --- ### work_peer_add From b442be6d9f14b0db9f4703af2370dee63d6d3f7e Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Wed, 27 May 2020 22:04:31 +0300 Subject: [PATCH 2/4] Commit guilhermelawless proposal Co-authored-by: Guilherme Lawless --- docs/commands/rpc-protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/rpc-protocol.md b/docs/commands/rpc-protocol.md index 0a45ec8e4..4b88f67f6 100644 --- a/docs/commands/rpc-protocol.md +++ b/docs/commands/rpc-protocol.md @@ -2793,7 +2793,7 @@ Work version string. Currently "work_1" is the default and only valid option. **Optional "block"** _version 21.0+_ -A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and no `difficulty` or `multiplier` are set, is used to calculate work generation difficulty for given block from node ledger. +A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and `difficulty` or `multiplier` are both not given, RPC processor tries to calculate the approprriate difficulty threshold based on ledger data. --- From c300b32e81a8641edf936ad191ce623924528a19 Mon Sep 17 00:00:00 2001 From: Zach Hyatt Date: Mon, 8 Jun 2020 09:53:47 -0500 Subject: [PATCH 3/4] Update rpc-protocol.md --- docs/commands/rpc-protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/rpc-protocol.md b/docs/commands/rpc-protocol.md index 4b88f67f6..544fa7934 100644 --- a/docs/commands/rpc-protocol.md +++ b/docs/commands/rpc-protocol.md @@ -2793,7 +2793,7 @@ Work version string. Currently "work_1" is the default and only valid option. **Optional "block"** _version 21.0+_ -A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and `difficulty` or `multiplier` are both not given, RPC processor tries to calculate the approprriate difficulty threshold based on ledger data. +A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and `difficulty` or `multiplier` are both not given, RPC processor tries to calculate the appropriate difficulty threshold based on ledger data. --- From 6a7f5f02653143c485ceb8115ac2499e9186451a Mon Sep 17 00:00:00 2001 From: Sergey Kroshnin Date: Tue, 9 Jun 2020 01:33:07 +0300 Subject: [PATCH 4/4] Optional "json_block" --- docs/commands/rpc-protocol.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/commands/rpc-protocol.md b/docs/commands/rpc-protocol.md index 544fa7934..b6fd23bed 100644 --- a/docs/commands/rpc-protocol.md +++ b/docs/commands/rpc-protocol.md @@ -2795,6 +2795,11 @@ Work version string. Currently "work_1" is the default and only valid option. _version 21.0+_ A valid Nano block (string or JSON). Using the optional `json_block` is recommended. If provided and `difficulty` or `multiplier` are both not given, RPC processor tries to calculate the appropriate difficulty threshold based on ledger data. +**Optional "json_block"** + +_version 21.0+_ +Default "false". If "true", `block` in the request should contain a JSON subtree instead of a JSON string. + --- ### work_peer_add