Creating blocks without work

Hi All,

I'd like to make a block (block_create) without any work attached to it. I have my node's "receive_minimum" set to "1000000000000000000000000000000000000", but work still gets generated whenever I "block_create' or "send" for amounts far below that minimum....

I first edited the config-node.toml file through vim, saved, then restarted my node to be sure the changed config files were updated properly.

How can I create blocks without having my machine do work?

Edit: What I am trying to do is create blocks for something like offline-signing where I can later attach work to the block and publish at that point.

I believe you can set the optional work field to any nonzero value and attach a real work value later. Alternatively, try to set work_threads in the config to 0 on the offline machine where you create blocks.

2 Likes

Ha, that was absurdly simple and worked, thanks!

Yes, I had tried setting work_threads to 1 earlier to see what would happen and since it made everything take much longer, I was nervous that I would stall my node or something by setting to 0. If anyone can confirm whether that's a viable option, that would be nice to know too.

1 Like

We did some work towards ensuring the node won't stall when work generation is disabled so feel free to set work_threads to 0. This was the PR and it describes the situations covered: https://github.com/nanocurrency/nano-node/pull/2312

For this case however, if you give work 0 or no work, and work generation is disabled, it will error. You really have to force another value, e.g. "1"

1 Like

Ok, that's good to know. Thanks for letting me know about that edge case too, I would have tripped up on that otherwise.

Thank you for the question, I've added a ticket to RPC 2.0 to distinguish values given as "0" and not giving any value, since they're clearly different intentions.

2 Likes