In a closed, working test network, how would I generate a signed block that a Bitcoin miner would otherwise create?

0

I have a POC where the essential, critical, priority goal is to use C# and the .NET Core Framework (Bouncy Castle for crypto, or Microsoft primitives for BigInteger ) where I do the following

  • Accept a number of transactions that include zero or some fee attached to the transactions (P2P pending Tx queue)

  • Calculate the relevant block reward and send it to an address as defined in the block specification format

  • Calculate the block's Proof of Work value as specified in the Target or other similar value (difficulty)

  • Finally submit the following, as calculated by NBitcoin, into the REST API in the full Bitcoin RPC client (isolated test network)

Any assistance in linking NBitcoin to a "software-CPU miner" just as if Bitcoin was invented originally in 2009 would be greatly useful for the prosocial endeavors I'm currently engaged for.

halfbit

Posted 2021-01-02T17:45:30.100

Reputation: 12 166

I will add a bounty of SO points and relevant other gratitude if this works. – halfbit – 2021-01-02T17:46:33.733

It's hard to help without knowing where you're stuck. You could first look at the mining pseudocode and implement it without any regard to performance, and once it's working, copy-paste SIMD mining code. – MCCCS – 2021-01-03T11:57:42.870

No answers