Closed mibuono closed 4 days ago
Node needs to be able to propagate singleton transactions to miners. SendRawTransaction needs to be exposed
1) Create a SendWorkedTransactions, GetWork API method under a new namespace a) SendWorkedTransactions takes in a workobject, verifies that the work done on the workobject header is within the range of work threshold from past 5 mins, if this check passes sends the transaction in the workobject into the tx pool, and if this workobject is also a workshare broadcasts the workshare into the libp2p (similar to SendWorkShare logic) b) GetWork api will return the current workobjectheader that is to be mined and also a threshold number with it 2) Create a flag to take trustedMinerEndpoint and it should be reachable from the quai_api 3) In send raw transaction if trustedMinerEndpoint exists, spawn an async process that gets the Work from the endpoint and start mining until you hit the threshold defined by the GetWork
Testing plan:
One more missing step is to set the endpoint in the RPC
Could allow this by an external config. Technically done in devops. Write instructions on how to config trusted endpoints.