Author

Topic: SegWit, NOMP (2nd try) (Read 234 times)

staff
Activity: 4284
Merit: 8808
November 24, 2019, 01:37:23 PM
#14
https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki#Block_Proposal

You send the proposal mode and the block encoded in hex, just like it gets sent to submitblock when you have a solution.
PCW
newbie
Activity: 23
Merit: 6
November 24, 2019, 08:23:43 AM
#13
The link says nothing about proposal. Smiley
That is a true statement.  That was my (hopefully incorrect) assumption.


You can submit your candidate block back as a proposal, and see if it would accept it.

I was hoping that this was the case but I couldn't find any examples on the use of "proposal".   I couldn't even get "proposal" to get accepted syntactically.  I figured that getblocktemplate wouldn't go through the pool software but what I think I'm understanding you to say is that I can take the output of the pool software and feed it back through getblocktemplate.

If that is correct, conceptually how do I get my block out of the pool software?  I guess I could write something that would send the output to a file but do you have an easier way in mind?

Then, and again these are assumptions, how does that file become input to getblocktemplate (or I guess if "proposal" takes a string as input, I'd cut and paste the gigantic block, but again I can't find anything beyond the documentation for "proposal", no examples (and even the examples at the bottom of the documentation (link below) for bitcoin-cli seem syntactically incorrect)):

https://bitcoincore.org/en/doc/0.18.0/rpc/mining/getblocktemplate/

So I guess the biggest help would be if you could help with the conceptual and point me toward uses of "proposal" e.g., examples.

Thanks.
staff
Activity: 4284
Merit: 8808
November 24, 2019, 04:41:30 AM
#12
The link says nothing about proposal. Smiley

Getblocktemplate which is the only interface for mining provides transactions but no coinbase transaction (because it doesn't know where you want to pay the coins).   Where does the coinbase transaction come from? Your pool/mining software has to create it.

How do you know you created it correctly?   You can submit your candidate block back as a proposal, and see if it would accept it.
PCW
newbie
Activity: 23
Merit: 6
November 23, 2019, 10:06:13 PM
#11
what did you read that made you think it wouldn't test the coinbase transaction?

I ran

Code:
bitcoin-cli getblocktemplate '{"rules": ["segwit"]}'

(after some tries, this was the only syntax that worked)

A bunch of transactions showed but I noticed that there was no coinbase transaction (there were fields at the end of the output that may be used to create the coinbase, but no formatted coinbase transaction)

I searched and found this

https://stackoverflow.com/questions/42334832/has-the-bitcoin-getblocktemplate-response-json-changed-where-is-the-coinbasetxn

where it said

Quote
bitcoin core doesn't provide a coinbasetxn in the block template; it's the pool software that does that. if you're coding mining software to connect directly to bitcoind without using a pool, you'll need to generate the coinbase transaction yourself.

So given that the "proposal" option doesn't interact with the pool software and that I want to test everything including the pool software's ability to properly create a  codebase transaction, the proposal option didn't appear to do what I wanted.

I'm working toward setting up Testnet.
staff
Activity: 4284
Merit: 8808
November 23, 2019, 05:31:38 PM
#10
If I'm reading the the "proposal" option to getblocktemplate correctly, it appears that I won't be testing the coinbase transaction.  Is that correct?
No, not correct. It just skips POW and tests everything else-- what did you read that made you think it wouldn't test the coinbase transaction?
PCW
newbie
Activity: 23
Merit: 6
November 23, 2019, 02:19:17 PM
#9
@DaveF  
Thanks.


You can also hand a block back to bitcoind and ask if-- ignoring the POW-- it would accept it as valid. See the "proposal" option to getblocktemplate.

@gmaxwell
If I'm reading the the "proposal" option to getblocktemplate correctly, it appears that I won't be testing the coinbase transaction.  Is that correct?
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
November 23, 2019, 12:56:14 PM
#8

you could also patch NoMP to support segwit-- there are guides online to doing so
...
Jackg's advice to test with testnet is good advice too.

Thanks.  I found a NOMP fork that had implemented SegWit and added the code to my local NOMP version.  I'll run on Testnet to see how it works.

You can also hand a block back to bitcoind and ask if-- ignoring the POW-- it would accept it as valid. See the "proposal" option to getblocktemplate.

This sounds interesting.  Can you tell me more about this option?

YIIMP is a popular option.
There are even some auto installers out there.
This one has a small thead here and a really active discord channel

https://github.com/cryptopool-builders/Multi-Pool-Installer#-support

CKPOOL Not as simple as above in terms of setup but it does work well.:
https://bitcointalksearch.org/topic/ckpool-open-source-poolproxypassthroughredirectorlibrary-in-c-for-linux-790323

-Dave



PCW
newbie
Activity: 23
Merit: 6
November 23, 2019, 12:08:23 PM
#7

you could also patch NoMP to support segwit-- there are guides online to doing so
...
Jackg's advice to test with testnet is good advice too.

Thanks.  I found a NOMP fork that had implemented SegWit and added the code to my local NOMP version.  I'll run on Testnet to see how it works.

You can also hand a block back to bitcoind and ask if-- ignoring the POW-- it would accept it as valid. See the "proposal" option to getblocktemplate.

This sounds interesting.  Can you tell me more about this option?
PCW
newbie
Activity: 23
Merit: 6
November 23, 2019, 10:15:31 AM
#6
PCW,

Is there any reason you are using NOMP?


@DaveF

I've used it for dozens of coins over the past years.
Became very comfortable with it and its logic.
It was reliable.
Was able to make changes when required.

But I'm open to other suggestions.  Do you have any?
legendary
Activity: 3500
Merit: 6320
Crypto Swap Exchange
November 23, 2019, 09:04:57 AM
#5
PCW,

Is there any reason you are using NOMP?
I use it now and then to do some things on other crapcoins to play around but for something that has real money value, there are better ways to mine. Some of which even if they are no longer supported NOW, were at least supported in the last year or so.

Yeah, NOMP is a quick and simple setup, it just seems you are going to have more issues then it is worth.

-Dave
PCW
newbie
Activity: 23
Merit: 6
November 22, 2019, 09:05:57 PM
#4
Thank you @jackg and @gmaxwell.

@jackg it was reading the 21 comments below the initial post that suggested to me that my block would be invalid

@gmaxwell

(which, incidentally, I answered in the original thread)

I don't see your comments in my original thread but I see them in the above post.  Thanks again.
staff
Activity: 4284
Merit: 8808
November 22, 2019, 08:21:36 PM
#3
Mining with this setup, will my block be considered invalid and I lose my reward?
Current Bitcoind doesn't support handing out block templates without segwit txn. If you tell getblocktemplate that you don't support segwit, it just throws an error.

You could patch it to not do this and instead just give you empty blocks, and it would work fine (which, incidentally, I answered in the original thread) and your blocks would be accepted.  But you could also patch NoMP to support segwit-- there are guides online to doing so-- and it would probably take similar amounts of effort (and would be less work to maintain because presumably nomp either doesn't change or will accept the patch).

Also, right now 1.5% of mining income is fees-- soon to become 3% plus. During high congestion periods it can be much more, we've seen as much as 50% income from fees. You'll lose this income if you're not mining transactions.

Jackg's advice to test with testnet is good advice too. You can also hand a block back to bitcoind and ask if-- ignoring the POW-- it would accept it as valid. See the "proposal" option to getblocktemplate.
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 22, 2019, 07:35:06 PM
#2
As Carlton recommended, you could try mining on testnet to check your setup and wait for a block and see if it gets acceptance (e.g you get testnet balance).

On the link you posted the top comment and only reply says the following:

Quote

No, in the past year, there were only 15 non-empty-non-segwit blocks mined which account for less than 0.03% of all blocks.
Non-empty blocks without segwit transactions

So non segwit blocks and non coinbase blocks are still accepted by the network. I don't think signalling against the network does ajythingn (since afaik viabtc signal for bitcoin unlimited).
PCW
newbie
Activity: 23
Merit: 6
November 22, 2019, 07:25:49 PM
#1
I don't think I provided all relevant information in my previous post with a similar title.

The conclusion in that previous topic was that I can keep doing what I'm doing and don't have to fear losing the reward if I find a block.

I want to provide more information and see if that's indeed the case, since elsewhere (e.g., link below) it is suggested that I will lose the reward if I find the block given my setup.

https://bitcoin.stackexchange.com/questions/86208/are-there-still-miners-or-mining-pool-which-refuse-to-implement-segwit

I think the assumption in my previous post was that I was using a non-SegWit compliant full node e.g., before  Bitcoin Core 0.13.  I am not.

I'm mining using a SegWit-compatible full node, Bitcoin Core 0.18 and wallet, and I'm using non-SegWit compliant pool software, NOMP.

Mining with this setup, will my block be considered invalid and I lose my reward?

Jump to: