Bitcoin Forum
April 03, 2020, 03:36:09 AM *
News: Latest Bitcoin Core release: 0.19.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: SegWit, NOMP, and Empty Blocks...  (Read 209 times)
PCW
Newbie
*
Offline Offline

Activity: 22
Merit: 4


View Profile
November 19, 2019, 03:47:57 PM
Last edit: November 19, 2019, 09:19:46 PM by PCW
 #1

Eight months ago or so, I wanted to solo mine some "lesser known" coins and the only way to do so was to use my own pool.

I found NOMP, which mostly didn't work and had long since been abandoned. Piecing together modules from 2 different NOMP forks, along with some coding, I was able to get it to work and successfully ASIC mine dozens of Scrypt and sha256 coins. (Every single one has lost significant value but that's another discussion.)

I now want to use my NOMP pool to solo mine Bitcoin.  (I know that I have a better chance of throwing a stone and hitting the moon than finding a block, but that's also another discussion.)

SegWit doesn't appear to be implemented in NOMP.

I read that SegWit doesn't apply the the coinbase transaction so:

QUESTION: If I change my NOMP code to create Empty Blocks (with only the coinbase transaction) will I get around the problem of other (SegWit-compliant) nodes considering my block as invalid?

To be clear, I'm using Bitcoin Core 0.18 and non-SegWit compliant pool software.

(And when I read that my block will be considered invalid, I assume that means that if I happen solve a block, that all mining effort will have been wasted, no exception.)
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
1585884969
Hero Member
*
Offline Offline

Posts: 1585884969

View Profile Personal Message (Offline)

Ignore
1585884969
Reply with quote  #2

1585884969
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1694
Merit: 1617


https://bit.ly/387FXHi ← lightning theory


View Profile
November 19, 2019, 03:55:06 PM
 #2

Segwit compliant blocks still have coinbase transactions. You might have to adapt more of the protocol for the block to be mined and check what info it needs including in a block (most coins will tell you this in their code or on a wiki).

PCW
Newbie
*
Offline Offline

Activity: 22
Merit: 4


View Profile
November 19, 2019, 04:50:40 PM
Last edit: November 19, 2019, 05:29:57 PM by PCW
 #3

This is a true statement:

Segwit compliant blocks still have coinbase transactions.

but my understanding is that SegWit compliance doesn't apply/relate to the coinbase transaction because there are no inputs:

from a bitcoin.stackexchange.com post:

Quote
[The] coinbase transaction has no inputs and therefore cannot be a segwit transaction. However, BIP141 specifies that the Witness Commitment is optional if there is no segwit transaction included. Therefore, there is no reliable way to determine whether or not an empty block is segwit or non-segwit.

so given this, I was hoping that an Empty Block (block with only the coinbase transaction) would NOT be considered invalid to a SegWit compliant node.

Is this true?  Comments?
Carlton Banks
Legendary
*
Offline Offline

Activity: 2688
Merit: 2216



View Profile
November 19, 2019, 05:57:51 PM
 #4

QUESTION: If I change my NOMP code to create Empty Blocks (with only the coinbase transaction) will I get around the problem of other (SegWit-compliant) nodes considering my block as invalid?

Huh

there's nothing to get around, segwit being activated won't invalidate your block. pools were mining non-segwit blocks long after activation, they probably still are

after all, segwit was a softfork, that means everything that was valid before is still valid afterwards

Vires in numeris
domob
Legendary
*
Offline Offline

Activity: 1109
Merit: 1107


View Profile WWW
November 19, 2019, 06:35:51 PM
Last edit: November 20, 2019, 07:47:52 PM by domob
 #5

after all, segwit was a softfork, that means everything that was valid before is still valid afterwards

This is not true, and in fact just reversed.  A soft fork means that old code will accept blocks/transactions following the new rules, i.e. valid blocks afterwards were valid before.  Or put differently, you only add new restrictions.

EDIT:  Added the part in italics to make the meaning clear.

Use your Namecoin identity as OpenID: https://nameid.org/
Donations: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS | GPG 0xA7330737
Carlton Banks
Legendary
*
Offline Offline

Activity: 2688
Merit: 2216



View Profile
November 19, 2019, 07:09:52 PM
 #6

A soft fork means that old code will accept the new rules

nope, that's wrong

Vires in numeris
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1694
Merit: 1617


https://bit.ly/387FXHi ← lightning theory


View Profile
November 19, 2019, 08:03:43 PM
 #7

A soft fork means that old code will accept the new rules

nope, that's wrong

Yeah I agree with Carlton here. The segwit soft fork meant that legacy blocks are still accepted after the fork but this doesn't work the other way... From what I can tell the signed part of segwit transactions just get ignored by full nodes before v13 and they just take the 150 byte transactions (as an example from the standard size) because the longest chain is running with them (and there isn't a reasonable rival).



@op why do you not want to mine segwit txs, anyway yes they won't be segwit compliment if the coinbase pays to legacy but you're also not doing much to help the network by confirming transactions if you just pass in your own.

PCW
Newbie
*
Offline Offline

Activity: 22
Merit: 4


View Profile
November 19, 2019, 08:26:34 PM
Last edit: November 19, 2019, 09:19:24 PM by PCW
 #8

@op why do you not want to mine segwit txs, anyway yes they won't be segwit compliment if the coinbase pays to legacy but you're also not doing much to help the network by confirming transactions if you just pass in your own.

(And when I read that my block will be considered invalid, I assume that means that if I happen solve a block, that all mining effort will have been wasted, no exception.)

In the last line of my original post (above) I assumed that if my non-SegWit compliant NOMP pool software found and submitted a non-compliant block, that the block would be determined to be invalid by SegWit-compliant nodes, thereby wasting all of my mining efforts.

Is that true?

I then assumed that I could either only include non-SegWit compliant transactions in the block or, since I wasn't too sure how many of those still existed, I would make Empty Blocks (blocks with only the coinbase transaction) since, as I read, the coinbase transaction doesn't use SegWit since there are no inputs...

...but if as Carlton (and I assume you) say, it doesn't matter (e.g., what I asked above is not true), then I can just keep doing what I'm doing.

Comment?
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 1694
Merit: 1617


https://bit.ly/387FXHi ← lightning theory


View Profile
November 19, 2019, 08:30:15 PM
 #9

No old legacy blocks are still compatible now.

Version numbers aren't used anymore since asicboosy use them to get a faster block hash so you should be able to mine legacy or empty blocks (with just a coinbase) without them being rejected.

PCW
Newbie
*
Offline Offline

Activity: 22
Merit: 4


View Profile
November 19, 2019, 08:33:59 PM
Last edit: November 19, 2019, 09:00:03 PM by PCW
 #10

@jackg

I just added an additional fact above (an edit) that I should have mentioned before and want to know if it makes a difference...

To be clear, I'm using Bitcoin Core 0.18 and non-SegWit compliant pool software.

Thanks
Carlton Banks
Legendary
*
Offline Offline

Activity: 2688
Merit: 2216



View Profile
November 19, 2019, 09:58:15 PM
 #11

You're doing the right thing, mining directly on the network is no joke of an undertaking, you need to be super certain that nothing is preventing you from finding valid blocks and getting a block in the chain


That's why you should test your setup on the Bitcoin testnet first. In many ways, it's become a testing ground for miners these days anyway

Vires in numeris
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!