Bible Pay

Read 1090 times

  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #90 on: February 04, 2018, 08:32:34 am »
Hi Alex,  interesting topic, good investigations.

I dont see e00 in 15718 though .  Are you sure your client was not on a fork at that time?
See the BX: https://testnet.biblepay-explorer.org/block/15718

And showblock 15718 does not pull up e00dda either.  I do see it in 15725.

So looking at that blog, nice info.  We do have that code in place to prevent the multiple tx (from being in two places at a time).  We have the chainheight in the coinbase implementing that protocol.

Could you see if you have another example in testnet or on main where one txid is in two blocks and both blocks are part of the main chain?

Hey Rob,

I designed the BX with unique txids in mind (which causes some issues) so it won't show if you directly go to the tx details, however you can see it the txs included in blocks here (disregards the second link where it says the tx is in 15718, it is because only the first tx has been saved in the tx db by the block explorer.):

https://testnet.biblepay-explorer.org/txs/block/15718
https://testnet.biblepay-explorer.org/txs/block/15725

This is what I get for example:

biblepay-cli getblock 4cef7e3327237142b064995a28c0039826e8d0a969a10838c4682e40eda028ed
biblepay-cli getblock 345335a74a39345efbbfc602f4c29f6a7be7ea8851e64694f340375550a74636

"tx": [
    "9da7482b4c9b1ac74b149a009bde8a545aac14b26750a85bb25dde71811c4409",
    "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d"
  ],

 "tx": [
    "0d189a1d7048227e8552a999e7128bf61a139903265f12419f728e70e63d3e1a",
    "157bb08b58af9f62f55bedd2ec1f4c633fb5d7f53e981ae86498b64cabcc1194",
    "a1ccc4a840a1c33c1710d938648115f177a902cb8e585bdcef9c68c7c4c05a33",
    "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d"
  ],

You can see "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d" in both.
« Last Edit: February 04, 2018, 08:47:27 am by Alex »


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #91 on: February 04, 2018, 08:42:02 am »
Other examples:

86715440507d550c0307f38bee6456664e4d904de8180e2b0fe39fb4cea64de6 in both 15796 and 15798

and

b046a65421acca1d491270b0903c87be5ad88539a9b4b6a06636942fb1f30cc4 in both 15798 and 15803

Checked on 1 linux wallet and 1 win wallet and they both have the same duplicate txids.
« Last Edit: February 04, 2018, 08:45:22 am by Alex »


  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #92 on: February 04, 2018, 08:53:22 am »
Hey Rob,

I designed the BX with unique txids in mind (which causes some issues) so it won't show if you directly go to the tx details, however you can see it the txs included in blocks here (disregards the second link where it says the tx is in 15718, it is because only the first tx has been saved in the tx db by the block explorer.):

https://testnet.biblepay-explorer.org/txs/block/15718
https://testnet.biblepay-explorer.org/txs/block/15725

This is what I get for example:

biblepay-cli getblock 4cef7e3327237142b064995a28c0039826e8d0a969a10838c4682e40eda028ed
biblepay-cli getblock 345335a74a39345efbbfc602f4c29f6a7be7ea8851e64694f340375550a74636

"tx": [
    "9da7482b4c9b1ac74b149a009bde8a545aac14b26750a85bb25dde71811c4409",
    "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d"
  ],

 "tx": [
    "0d189a1d7048227e8552a999e7128bf61a139903265f12419f728e70e63d3e1a",
    "157bb08b58af9f62f55bedd2ec1f4c633fb5d7f53e981ae86498b64cabcc1194",
    "a1ccc4a840a1c33c1710d938648115f177a902cb8e585bdcef9c68c7c4c05a33",
    "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d"
  ],

You can see "e00dda7694df2f71beb9e5fd25d0f7fd281ac4f58cf804153e1c346f9cfff24d" in both.

4cef is not the blockhash for block 15718 on the mainchain:
biblepay-cli getblock 4cef7e3327237142b064995a28c0039826e8d0a969a10838c4682e40eda028ed
^ That block is on a sidechain.  When you pull it up it has "confirms=-1" meaning its not on the main chain its on a fork.

I believe that is the case for every example, as the tx-index in the coin is very similar (enforces unique hashes by merkle root).

The mainchain block : showblock 15718  - contains different blockhash.

And the reason this is happening more in test:  With POL it appears we have a massive amount of forks.
getchaintips shows 100 forks.
So it appears I need to either Fix POL to be fork-proof, or let us go back to POW-Biblehashes only and remove POL, and migrate to Proof-of-distributed-computing.

Ive been thinking about it a lot, and I believe with Rosettas cancer research, giving them the ability to research on a Jamaican cell phone is equivalent to our final goal anyway (moving heat miners over to proof-of-dc).  If POL is going to cause us problems, I want to remove it from the equation.

EDIT:
This brings up the issue that you might have to add a process to prune or invalidate blocks that go on a fork (IE that tx does not belong to 15718 anymore - if a block is not on the mainchain it should be removed from the BX so they dont rely on it as "official" data)

« Last Edit: February 04, 2018, 08:56:46 am by Rob A. »


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #93 on: February 04, 2018, 09:02:28 am »
When you say main chain, you mean the main chain for testnet right?

I see it in all my testnet nodes. I will resync one now to see if it's still there. Have you checked the other txs?

Edit:

Also, even if that block was not on the main chain, it would mean that the BX is on the fork and so that this fork has still duplicate txids.
The issue wouldn't be to remove orphan blocks from the BX as that block is not considered orphan by the wallet itself but instead, it is seen as a valid block by the wallet.
« Last Edit: February 04, 2018, 09:08:28 am by Alex »


  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #94 on: February 04, 2018, 09:11:00 am »
When you say main chain, you mean the main chain for testnet right?

I see it in all my testnet nodes. I will resync one now to see if it's still there. Have you checked the other txs?

Edit:

Also, even if that block was not on the main chain, it would mean that the BX is on the fork and so that this fork has still duplicate txids.

Yeah, Im referring to testnet only for all these.  I mean, the main chain in testnet - the official chain with the most work.
For example, if I type showblock 15990 in testnet I get this hash: 6cb5f0c9b09c91f282ea29e39e375bd798683c2e39228c019e6290a03b9ffe0f
If your BX is on that chain, then its block 15718 must only have transactions in it that belong to that merkle root (yours differ).  You can type showblock 15718 if your 15990 hash matches mine to see the official txes contained in 15718.

No it does not mean your bx was on a fork actually, your bx should be able to access all forks as each best block is processed.  Another words the BX should be able to invalidate blocks by height - reloading the official block by merkle root if those older blocks reorganize to another chain.

As far as checking more, if you have more examples I would need the getblockhash command for those, as I dont have a way to search for them.  But I think you will find they are on a fork also.  As the core only allows one unique Txid on the main chain per merkle root.


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #95 on: February 04, 2018, 09:13:52 am »
Okay I found the issue, My confusion stemmed from my windows wallet being on the fork. The block showed as valid (instead of confirm -1)


  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #96 on: February 04, 2018, 09:15:25 am »
I forgot to say one more important thing:
It is going to be very common to find duplicate txids across forked chains in different blocks, as the core copies those txids to every chain (another words miners actually try to mine those duplicates into different heights as its their job), that is why if you want to send Alice 50,000 bbp right before we fork, that same TXID could go out on all chains.

When we reorganize lets say due to power failure, we go off on fork A, B, then C then back to A, you will find that 50,000 txid in every chain.  This is so Alice will persistenly recieve her BBP no matter how bad a fork is.  Its pretty rare for the TXID to become orphaned.  That usually only happens when a double spend occurs, or a txid is so nonstandard that it becomes an orphan.


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #97 on: February 04, 2018, 09:15:33 am »
Yeah, Im referring to testnet only for all these.  I mean, the main chain in testnet - the official chain with the most work.
For example, if I type showblock 15990 in testnet I get this hash: 6cb5f0c9b09c91f282ea29e39e375bd798683c2e39228c019e6290a03b9ffe0f
If your BX is on that chain, then its block 15718 must only have transactions in it that belong to that merkle root (yours differ).  You can type showblock 15718 if your 15990 hash matches mine to see the official txes contained in 15718.

No it does not mean your bx was on a fork actually, your bx should be able to access all forks as each best block is processed.  Another words the BX should be able to invalidate blocks by height - reloading the official block by merkle root if those older blocks reorganize to another chain.

As far as checking more, if you have more examples I would need the getblockhash command for those, as I dont have a way to search for them.  But I think you will find they are on a fork also.  As the core only allows one unique Txid on the main chain per merkle root.

Yes, I had included something in the BX to reconsider blocks but I guess I will look at it again. I got confused with another wallet being on another chain showing that block as valid (instead of orphan).


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #98 on: February 04, 2018, 09:21:28 am »
Alright, I checked and it seems the mainnet BX didn't encounter that issue yet.

Edit:

BTW My strategy is just to remove orphan blocks and replace them by the actual blocks. Still looking at why/how this happened. I think it might be too tricky and potentially confusing to be able to browse through orphan blocks in the BX.
« Last Edit: February 04, 2018, 09:33:29 am by Alex »


  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #99 on: February 04, 2018, 09:46:33 am »
Alright, almost done fixing the pruning. I guess testnet is perfect right now to test that. Something positive in the negative!


  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #100 on: February 06, 2018, 03:52:23 pm »
Alright, almost done fixing the pruning. I guess testnet is perfect right now to test that. Something positive in the negative!

Thats awesome!  Thats great your BX cant handle forks now.



  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #101 on: February 06, 2018, 03:54:47 pm »
All,

Lets all stop testing Proof-of-loyalty for now, as Proof-of-distributed-computing is ready for testing.

Let's focus on testing Proof-of-DC, evaluating if it can handle heat diversion and one-to-many research machines to wallets, and stave off the botnet.  If so we will not need to enable POL. 



  • Alex
  • Full Member

    • 139


    • 6
    • November 15, 2017, 07:39:59 pm
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #102 on: February 06, 2018, 03:56:27 pm »
The new version is working and I'm testing it on my private dev server right now. I will deploy it at the end of the week if I don't find other bugs. It seems to be working pretty great!


  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #103 on: February 06, 2018, 04:01:31 pm »
The new version is working and I'm testing it on my private dev server right now. I will deploy it at the end of the week if I don't find other bugs. It seems to be working pretty great!

Sweet!



  • Rob A.
  • Administrator

    • 584


    • 7
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET TESTING THREAD - TESTING Proof-Of-Loyalty
« Reply #104 on: February 06, 2018, 04:01:57 pm »
All,

Lets all stop testing Proof-of-loyalty for now, as Proof-of-distributed-computing is ready for testing.

Let's focus on testing Proof-of-DC, evaluating if it can handle heat diversion and one-to-many research machines to wallets, and stave off the botnet.  If so we will not need to enable POL.

All, please go here to start testing Distributed-Computing:

http://forum.biblepay.org/index.php?topic=108.new#new