Skip to content

Miner ‐ Node interaction

Paul edited this page May 1, 2025 · 5 revisions

Key assumptions

  1. The first key assumption on the Proof of Scan PoW component protocol is 3D object shape unique geometric characteristics are used for nonce – the output of Grid2d recognition algorithm implemented in the pass3d tool as well as its WASM version p3d.
  2. The second assumption is the miner can generate the objects way much faster than the Node can handle. The Node is the bottleneck.
  3. The third assumption is the block production and picking up nonce (mining) cannot be separated form each other, due to the proof of context rule that requires the access to the actual full blockchain data base while engaged with mining.
  4. The forth key assumption is that only the straightforward direction (3D object -> pre_hash) of picking nonce will have a chance to succeed. The reverse method of recovery 3D model out of the pre_hash is as m^n more difficult.

Miner

The miner is a stand alone random 3D model generator.

The miner generates random 3D models (rock.obj) with the miner-libs and then uses the RPC pushMiningObject method to submit them to the Node at certain frequency referred to as the interval.

Node

The node is the main block constructor that receives 3D models coming from Miner and adds them to a thread-safe queue for processing. The only feedback it provides to the Miner is whether the queue is currently busy - 1 or not - 0.

  • Node must be synced and running "on idle" for the mining process to get started.
node_on_idle
  • The number of threads allocated for mining can be set up with the --threads 32 parameter. However, the CPU performance is normally capped by the RAM + SSD bottleneck resulting in partial usage of CPU.

The interval auto adjustment

Once the Miner starts receiving the signal 1 indicating that the Node is currently busy and won't be able to handle new objects for a while, it adjusts the interval increasing it by 10%. If the Node comes back into operation signaling 0, the Miner will react decreasing the interval by 10%. It will continue to regulate the frequency within the range of 100 - 10000 ms set up by default.

Depending on the Node performance, default parameters could be adjusted to satisfy desired efficiency.

Default settings:

let interval = 3000;
const MIN_INTERVAL = 100;
const MAX_INTERVAL = 10000;
const ADJUSTMENT_PERCENT = 10;
  • let interval - initial interval in ms the Miner starts from
  • MIN_INTERVAL - the bottom of the range
  • MAX_INTERVAL - the ceiling of the range
  • ADJUSTMENT_PERCENT - the pace (acceleration speed in %)

Output:

miner_adjustments
Clone this wiki locally