Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getblocktemplate RPC call always fails #67

Closed
Fuzzbawls opened this issue Jul 12, 2016 · 4 comments
Closed

getblocktemplate RPC call always fails #67

Fuzzbawls opened this issue Jul 12, 2016 · 4 comments
Assignees
Milestone

Comments

@Fuzzbawls
Copy link

The getblocktemplate RPC call is in a broken state post-fork as it doesn't know about the new requirements for coinbase transactions needing to be locked in a term deposit.

The block validity check always fails as a result.

@Fuzzbawls Fuzzbawls self-assigned this Jul 12, 2016
Fuzzbawls added a commit that referenced this issue Jul 12, 2016
getblocktemplate RPC now uses the same conditionals that the in-wallet
miner uses for block creation.

If a runtime/conf variable 'miningaddress' has been supplied, that
is checked and used if the address is valid. Otherwise a random
keypool address is used instead.

Fixes #67
@Fuzzbawls
Copy link
Author

I've informed @ocminer about this and am waiting to hear back from him.

Fuzzbawls added a commit that referenced this issue Jul 15, 2016
Post-fork logic dictates that the coinbase transaction must be
a term-deposit for a 1-year period. This changes the output of
the error message to include the expected mature block, as well
as the (already existing) mature block that is written in the
coinbase transaction.

Hopefully this will make it easier to debug any issues when this
logic check fails. References issue #67.
@Qwertylex
Copy link

Is that why I keep getting
ERROR: ConnectBlock(): coinbase transaction does not HOdl for one year, hodlblocks=-1 on debug.log
and HTTP request failed: The requested URL returned error: 500 Internal Server Error on the miner
when I try solomining with https://github.com/Optiminer/hodlminer-wolf/ ?

@Fuzzbawls
Copy link
Author

None of the stand alone miners support HODL's block template to begin with, so solo mining with them doesn't work (and has never worked) irregardless of this particular issue/patch.

This issue/patch is intended only to provide a valid HODL block template via RPC. It is up to the service/software requesting the template to adhere to the template.

@Fuzzbawls
Copy link
Author

Got conformation from @Optiminer that he is using the patch from #68 with his pool. So, I'm going to merge that in and consider the issue closed.

Some footnotes, however:

  • the generated template uses an address from the daemon (or the runtime-supplied user address)
  • the coinbase transaction is still mutable, and ANY mutations must adhere to network requirements

What this means:

  • stand alone mining programs, in addition to needing compatibility with GBT, will also need to support OP_CHECKLOCKTIMEVERIFY in the coinbase transaction.
  • pool software that has been updated to support HODL's GBT will also need to support OP_CHECKLOCKTIMEVERIFY in the coinbase transaction.

@Fuzzbawls Fuzzbawls added this to the 2.0.1 milestone Aug 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants