Bible Pay

Read 22338 times

  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #285 on: April 28, 2019, 08:59:50 am »
Ok, this is new knowledge to me :)
I don't know that it is needed to have unlocked wallet. I'll try to unlock wallet everytime I start it :)
exec setautounlockpassword your_password didn't worked for me.

Well it looks like I made the 'exec setautounlockpassword' work with GSC transmissions only (but not with ABN) so for this current version you must unlock the wallet fully to ABN mine.  (with walletpassphrase blah time).

Looking at staking (and mixing) I can see why we ended up here.  We really must ask the user to either enter the pop up password, or run a command to have the securestring key handy for ABN mining (or for gsc) to work (IE its a must).  So in light of that, that means we need to take baby step 1 and get this 'setautounlockpassword' to be respected in both places, so I will do that first.  We dont necessarily need to make the pop-up work (its a decision we can think of later) as remember about 15 pages back I explained that might be frowned upon - so for now Ill fix the consistency with this autounlock password.

Let me know if you do Not have a syncing problem also, as I really want to ensure no one has a syncing problem in Evo. 




  • orbis
  • Full Member

    • 189


    • 6
    • February 08, 2018, 04:37:14 pm
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #286 on: April 28, 2019, 09:12:37 am »
We can look at the bootstrap for prod later once we know everything is fine, but we should be able to sync in less than 15 mins in testnet, otherwise we have bigger issues.
Please try putting the 'gen=0' in your biblepay.conf first also.
If you try Togos post above, can you see if it syncs to the top without a problem? 
I am thinking this AntiGPU error in your log has to do with you solving a block before the tip then being unable to mine because its the only last block on your chain (which makes the next one from you illegal).
So, I'm stucked on block 50561 again.  It looks, that resync is waiting for me again. Rob, in few last days I've made more than 10 full resync (deleted everything from biblepaycore folder - like in Togos post) but it never took less than 2 hours for me.
Maybe it is problem of my PC, but we've talked about this before latest mandatory testnet.
May it be caused with mine huge activity in constant download of data from my peers? May I be blocked somehow?
Sometimes it starts withou problem, but after some time download fall to 10kB/s.
I can guarant that it is not caused with my internet connection.
I have now tho internet providers (300 Mbps and 500Mbps) and it is the same on both. So, it can be caused with my PC, but on my second PC it was the same. Slow connection with peers.

I have tried to set gen=0, but there is still problem with sync.
Here is part from my debug.log:
Code: [Select]
2019-04-28 13:55:37 ERROR: AcceptBlockHeader: block f5cbf4edfd4df18b3204ac8c72b44ba04296e0334d50a9d40e9b208f4f835913 is marked invalid
2019-04-28 13:55:37 ERROR: invalid header received

So, I'll start resync again with gen=0 and I'll see if the sync will be faster.
BTW: Rob, can you delete debug.log from WIN wallet install file?
It is in ...BiblepayEvolution\doc\ folder after install and it has more then 67MB :D I think that it is not neccessary for us ;)
There are some old logs from end of March.


  • togoshigekata
  • Sr. Member

    • 443


    • 25
    • September 01, 2017, 10:21:10 am
    • USA
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #287 on: April 28, 2019, 10:12:36 am »
Thanks for looking into things Rob!

=

On a side note, the only change back to the CPK should be coming from those ABN/GSC transactions, when we create an ABN/GSC stake, we send the change back to the CPK. 

1. So this coin splitting behavior is intended and happens automatically every so often? when mining? (and every wallet is now set to mine by default?)
1.a. Is an amount of 4500001 ignored for coin splitting? when user is setting up a masternode?
1.b. Does this mean new miners have to own some amount of BBP coins in their wallet to participate in mining? (but they can jump in to mine when block hasnt been solved for 60 minutes if they dont have coins?)

2. Also for the CPK, I noticed that I never ran a command (exec cpk my_nickname) to create one, is default behavior that one is created automatically? And the command is to just add a nickname to it?

=

Just poking around the documentation:

https://wiki.biblepay.org/Getting_Started_with_Evolution
https://wiki.biblepay.org/Generic_Smart_Contracts

GSC (Generic Smart Contract)
"The GSC is split into a client server architecture. The client side user joins campaigns with a CPK (Christian Public Keypair) and competes in these campaigns for points. The server side (our Sanctuaries) assess user points and tracks user progress. Once per day, the points are converted and paid in a Generic Smart Contract. The GSC is voted on by the Sanctuaries automatically at a certain chain height. The GSC is paid once per day as a superblock from BiblePay core, and is split among campaigns by points rewarded per campaign per user. "

ABN (Anti-BotNet)
"which requires a certain amount of coin*age to be present in each mined block in order to mine BiblePay"
"Our network requires an average calculated and pre-assessed static amount (posted in getmininginfo) of required coin*age and stores this in the chain. Each miner checks this number, and will search the wallet (this is all automatic) for coins totaling the requirement and place these coins in an ABN Stake transaction - and then begin mining"

=

3. Is the ABN Stake transaction just coins going to the CPK address?
3.a. I havent noticed any of the CPK address transactions in my Transactions list, filter set to All, but I do notice coins moving around in Send >> Inputs (Settings >> Options >> Wallet >> Enable coin control features)


  • togoshigekata
  • Sr. Member

    • 443


    • 25
    • September 01, 2017, 10:21:10 am
    • USA
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #288 on: April 28, 2019, 10:30:20 am »
Ive tried to make masternode again now with 4500001 tBBP,
I was able to add it to masternode.conf and start it!

Now I just need to setup Watchman?

=

Also I got a popup message about masternodeblsprivkey
"BiblePay Core - Warning - You should specify a masternodeblsprivkey in the configuration. Please see documentation for help."

https://docs.dash.org/en/stable/masternodes/setup.html#generate-a-bls-key-pair

https://docs.dash.org/en/stable/masternodes/dip3-upgrade.html#enter-the-bls-key-on-the-masternode
https://docs.dash.org/en/stable/masternodes/maintenance.html#updating-masternode-information
https://blog.dash.org/secret-sharing-and-threshold-signatures-with-bls-954d1587b5f

Im kind of confused how the bls keypair works

"The ProRegTx contains 2 Dash addresses (also called public keys) and one BLS public key, which represent 3 different roles in the masternode and define update and voting rights. The keys are:

ownerKeyAddr: This is a Dash address (public key) controlled by the masternode owner. It is different from the address used for the collateral. Because the owner uses the private key associated with this address to issue :ref:`ProUpRegTx <update-dip3-config>` transactions, it must be unique for each masternode.

operatorPubKey: This is the BLS public key of the masternode operator. Only the operator is allowed to issue :ref:`ProUpServTx <update-dip3-config>` transactions. Because the operator key is used during live masternode operation to sign masternode-related P2P messages, quorum-related messages and governance trigger votes, the BLS key must be unique for each masternode.

votingKeyAddr: This is a Dash address (public key) used for proposal voting. Votes signed with the corresponding private key are valid while the masternode is in the registered set."
https://github.com/dashpay/docs/blob/master/masternodes/understanding.rst

=

Masternode Setup:

https://github.com/biblepay/biblepay-evolution/blob/master/BuildBiblePay.txt

These are my old Masternode setup notes:
https://forum.biblepay.org/index.php?topic=190.msg3701#msg3701
https://forum.biblepay.org/index.php?topic=108.msg1444#msg1444

Attempt to use VNC:
https://forum.biblepay.org/index.php?topic=244.msg4525#msg4525
https://forum.biblepay.org/index.php?topic=244.msg4523#msg4523

Masternode guide:
http://wiki.biblepay.org/Create_Sanctuary_2


  • togoshigekata
  • Sr. Member

    • 443


    • 25
    • September 01, 2017, 10:21:10 am
    • USA
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #289 on: April 28, 2019, 10:43:00 am »
Sorry for providing too little information about the Watchman environment; let me try to explain.

In Prod, we are running a 1.5 year old codebase with Dashs Sentinel in Python (we renamed it Watchman-on-the-wall) - and we still use it in prod as-is from Dash (and its still required today since it helps create the budgets etc, creates watchdogs, etc).

In Evo, I have not ported Sentinel to Watchman yet (so its unavailable still), so we do not have to Test it yet.

What I'm considering however, is porting Watchman to c++, so we don't have to run both watchman and Evo as separate programs in each sanc (in the future).  (Thats what this release info was about, but - its really just in step 1).  I'm still going to do some internal testing on my end, then provide more info as how we can test the integrated version of watchman, so please don't worry about testing that yet.


  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #290 on: April 28, 2019, 01:40:09 pm »
I was able to add it to masternode.conf and start it!

Now I just need to setup Watchman?

I believe we are the first masternode coin to have The Sentinel compiled into biblepaycore, so that means:
You do not have to install watchman-on-the-wall.  Its built in now, and its one of the things we started testing (so far successfully) but it needs a little more testing before prod.

It runs automatically also, so there are no settings to configure.





  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #291 on: April 28, 2019, 01:46:09 pm »
Ive tried to make masternode again now with 4500001 tBBP,
I was able to add it to masternode.conf and start it!

Now I just need to setup Watchman?

=

Also I got a popup message about masternodeblsprivkey
"BiblePay Core - Warning - You should specify a masternodeblsprivkey in the configuration. Please see documentation for help."

https://docs.dash.org/en/stable/masternodes/setup.html#generate-a-bls-key-pair

https://docs.dash.org/en/stable/masternodes/dip3-upgrade.html#enter-the-bls-key-on-the-masternode
https://docs.dash.org/en/stable/masternodes/maintenance.html#updating-masternode-information
https://blog.dash.org/secret-sharing-and-threshold-signatures-with-bls-954d1587b5f

Im kind of confused how the bls keypair works

"The ProRegTx contains 2 Dash addresses (also called public keys) and one BLS public key, which represent 3 different roles in the masternode and define update and voting rights. The keys are:

ownerKeyAddr: This is a Dash address (public key) controlled by the masternode owner. It is different from the address used for the collateral. Because the owner uses the private key associated with this address to issue :ref:`ProUpRegTx <update-dip3-config>` transactions, it must be unique for each masternode.

operatorPubKey: This is the BLS public key of the masternode operator. Only the operator is allowed to issue :ref:`ProUpServTx <update-dip3-config>` transactions. Because the operator key is used during live masternode operation to sign masternode-related P2P messages, quorum-related messages and governance trigger votes, the BLS key must be unique for each masternode.

votingKeyAddr: This is a Dash address (public key) used for proposal voting. Votes signed with the corresponding private key are valid while the masternode is in the registered set."
https://github.com/dashpay/docs/blob/master/masternodes/understanding.rst

=

Masternode Setup:

https://github.com/biblepay/biblepay-evolution/blob/master/BuildBiblePay.txt
Great on setting up a sanc!

So on the BLS key pair, the pro-reg, dip3, and deterministic sancs:

So we have a two step process for testnet:
Setting up a legacy cold non-deterministic sanctuary, using a masternodeprivkey only.  This is the way we have been doing it up til now (IE the old dash codebase from 2017 that is in biblepay-classic).

Step 2 (future - IE in about 1 more day):
We upgrade a legacy sanc to a deterministic sanc (also called a dip3 sanc).  These dip3 sancs do use 2 keypairs:  BLS and regular privkey, have reward addresses and voting addresses and all that other stuff. 

So what I would like to ask all of us to do is set up a *legacy* sanc first, and ensure it is running.  Then in a day or so, we will enable dip3 (after we ensure our anti-gpu and abn and all this is stable).  I will post instructions on how to upgrade , and this step will automatically create the BLS privkey and the second address.

For now you can ignore the BLS warning on boot, that is normal.





  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #292 on: April 28, 2019, 01:52:02 pm »
So, I'm stucked on block 50561 again.  It looks, that resync is waiting for me again. Rob, in few last days I've made more than 10 full resync (deleted everything from biblepaycore folder - like in Togos post) but it never took less than 2 hours for me.
Maybe it is problem of my PC, but we've talked about this before latest mandatory testnet.
May it be caused with mine huge activity in constant download of data from my peers? May I be blocked somehow?
Sometimes it starts withou problem, but after some time download fall to 10kB/s.
I can guarant that it is not caused with my internet connection.
I have now tho internet providers (300 Mbps and 500Mbps) and it is the same on both. So, it can be caused with my PC, but on my second PC it was the same. Slow connection with peers.

I have tried to set gen=0, but there is still problem with sync.
Here is part from my debug.log:
Code: [Select]
2019-04-28 13:55:37 ERROR: AcceptBlockHeader: block f5cbf4edfd4df18b3204ac8c72b44ba04296e0334d50a9d40e9b208f4f835913 is marked invalid
2019-04-28 13:55:37 ERROR: invalid header received

So, I'll start resync again with gen=0 and I'll see if the sync will be faster.
BTW: Rob, can you delete debug.log from WIN wallet install file?
It is in ...BiblepayEvolution\doc\ folder after install and it has more then 67MB :D I think that it is not neccessary for us ;)
There are some old logs from end of March.

Let me try to reproduce first and  Ill comment.  Maybe we can make a snapshot of the first 50,000 blocks.
The main thing is that we ensure blocks 50k+ don't have any checkblock errors in them so I dont want you to sync past any bad blocks and cover up a problem.





  • togoshigekata
  • Sr. Member

    • 443


    • 25
    • September 01, 2017, 10:21:10 am
    • USA
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #293 on: April 28, 2019, 01:57:13 pm »
Awesome, Thanks Rob!
Thank you for all of your hard work!
This is exciting!


  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #294 on: April 28, 2019, 02:32:50 pm »
So, I'm stucked on block 50561 again.  It looks, that resync is waiting for me again. Rob, in few last days I've made more than 10 full resync (deleted everything from biblepaycore folder - like in Togos post) but it never took less than 2 hours for me.
Maybe it is problem of my PC, but we've talked about this before latest mandatory testnet.
May it be caused with mine huge activity in constant download of data from my peers? May I be blocked somehow?
Sometimes it starts withou problem, but after some time download fall to 10kB/s.
I can guarant that it is not caused with my internet connection.
I have now tho internet providers (300 Mbps and 500Mbps) and it is the same on both. So, it can be caused with my PC, but on my second PC it was the same. Slow connection with peers.

I have tried to set gen=0, but there is still problem with sync.
Here is part from my debug.log:
Code: [Select]
2019-04-28 13:55:37 ERROR: AcceptBlockHeader: block f5cbf4edfd4df18b3204ac8c72b44ba04296e0334d50a9d40e9b208f4f835913 is marked invalid
2019-04-28 13:55:37 ERROR: invalid header received

So, I'll start resync again with gen=0 and I'll see if the sync will be faster.
BTW: Rob, can you delete debug.log from WIN wallet install file?
It is in ...BiblepayEvolution\doc\ folder after install and it has more then 67MB :D I think that it is not neccessary for us ;)
There are some old logs from end of March.

So, I think I have reproduced the same problem that you have (Im syncing from zero to 50558).  I'm running a deep analysis now with more logging to confirm the exact root cause at 50558.


In the mean time while I'm doing this, I think the speed problem has more to do with the latency from SK to the US servers (not the machine or the bandwidth).  Its a chatty process to download each block with all the back and forth confirms.

I recommend doing this for now (as most likely in prod, people will not be regularly syncing from 0 - although Im not against making a snapshot file in the future but we still have a pretty small block file).  Could you try this, delete all the normal files from earlier, and sync to block 50,000.  When it hits 50,000 click on File | Exit (do not pkill it, otherwise the flush may be bad on the blocks).  Then copy the "blocks","Chainstate" and "evodb" out to a subfolder (like /snapshot for instance).

Then when I post the resolution, just go back to 50K and start again for each testnet session.  (You can start back at 50K by removing the blocks, chainstate, evodb- and then copying the contents of your subfolder back to the appdata directory).

What I believe happened yesterday is when I set the evodb chainheight abnheight param we were at around block 50558 and I set it for 50560, meaning it didnt have enough blocks to propogate past the minimum for a newly syncing user from 0.  Meaning that I believe your node had memorized the prior height while checking the block (this is what Ive got running now in the background to double verify this before I release a fix).  If this is the case, we will have to bump a couple params and make a new release and all ensure we synced up past this height.


Btw, once you encounter a bad block you can forget trying to test the abn feature and the antigpu, because the wallet cant find proper coin age when its out of sync (or should I say its trying to build on faulty blocks on the wrong height etc).

« Last Edit: April 28, 2019, 02:36:55 pm by Rob Andrews »


  • orbis
  • Full Member

    • 189


    • 6
    • February 08, 2018, 04:37:14 pm
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #295 on: April 28, 2019, 02:40:47 pm »
Ok. So, now I'm stucked on 50655 :D
I was away of my PC, so I'll try to sync it again to 50k and make a backup :)
I hope, I'll stop it in right time :D


  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #296 on: April 28, 2019, 02:41:11 pm »
Awesome, Thanks Rob!
Thank you for all of your hard work!
This is exciting!
Thanks, Ill answer that CPK stuff soon, in the mean time
do you have blockhash 06af* for 52240? 
Also whats your IP for your sanc, Id like to see if it shows in my enabled list.
(You see 4 enabled in your sanc list correct)?
Are you in the leaderboard yet Togo, as I only have 5 participants there?





  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #297 on: April 28, 2019, 02:44:01 pm »
Ok. So, now I'm stucked on 50655 :D
I was away of my PC, so I'll try to sync it again to 50k and make a backup :)
I hope, I'll stop it in right time :D

Thats because the wallet pulls more blocks after the problem until it cant (you can check the log for ERROR to see the real root problem really occurs "ABN ERROR!  Block 50558.000000 does not meet anti-bot-net-minimum required guidelines: BlockWeight 0.000000" at 50558. 
^ Thats got to be the real root problem in every log right now.

If you want you can exit even earlier at 49000 to give you more time - I would recommend that.



  • Rob Andrews
  • Administrator

    • 2055


    • 28
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #298 on: April 28, 2019, 03:12:34 pm »
Thats because the wallet pulls more blocks after the problem until it cant (you can check the log for ERROR to see the real root problem really occurs "ABN ERROR!  Block 50558.000000 does not meet anti-bot-net-minimum required guidelines: BlockWeight 0.000000" at 50558. 
^ Thats got to be the real root problem in every log right now.

If you want you can exit even earlier at 49000 to give you more time - I would recommend that.

Also, I have successfully recovered a node with getchaintips just now, but lets go through that later, since we know we need another mandatory I dont want to confuse everyone right now.



  • togoshigekata
  • Sr. Member

    • 443


    • 25
    • September 01, 2017, 10:21:10 am
    • USA
    more
Re: TestNet - BiblePay-Evolution & GSCs (Generic Smart Contracts)
« Reply #299 on: April 28, 2019, 03:13:13 pm »
do you have blockhash 06af* for 52240? 
Also whats your IP for your sanc, Id like to see if it shows in my enabled list.
(You see 4 enabled in your sanc list correct)?
Are you in the leaderboard yet Togo, as I only have 5 participants there?

Im in agreement on blockhash for 52240
My masternode IP is:  108.61.194.83
I see 4 ENABLED masternodes

I never registered my cpk, so I just ran "exec cpk togo"

How do you view the leaderboard?
"exec prominence" is not working for me "Command not found"

Also do I need to run "exec join pog"?
Are POG and ABN different things?