Bible Pay

Read 33674 times

Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #45 on: October 10, 2017, 01:32:47 am »
So I redid the masternode genkey on the MN box, changed the edits on masternode.conf on the local wallet and biblepay.conf on the MN wallet to reflect the new genkey and it works.  The only other thing I changed was in masternode.conf I used :40001 which seems to be what the other enabled nodes are using successfully.


Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #46 on: October 10, 2017, 01:55:08 am »
And it took about 15 minutes for it to go from Pre-Enabled, to Enabled.  Which reading about DASH seems pretty typical.  Not started with watchman yet, but glad it's working as intended.

I'll fire up another cold node (cold since the coins are not stored on the MN, vs hot when they are...which is less secure) in the next couple days, take my notes and draft a guide to doing it on Vultr from start to finish (including Linux install and config of Biblepay).  Then togo, you can take that and merge it with your guide (or maybe I'll take your guide and merge it with my notes) and it'll be a pretty good primer for anyone that wants to play with MN at this time.


  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #47 on: October 10, 2017, 09:24:12 am »
Togo,

Thanks for the guide buddy, you are the man!  I think what we can do is, once we get this process down, Ill edit the create_masternode to be the 'highly technical' version, just to refer to as a sanctuary owner.  We can take your version, which includes more details and make a linked page for newbies who need more help (or something to that effect).

Anyway let me just try to answer the questions from your post first, instead of reposting the entire big post, Ill be back.


  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #48 on: October 10, 2017, 09:45:08 am »
I just wanted to mention that I have been a little busy lately (other than being interrupted to upload the pool, which is a huge necessity), with a brand new cryptocurrency feature for biblepay.  I think it might be "the killer" feature for us.

I'm thinking about adding colored coins into biblepay with an integrated 401k or retirement account fund inside the wallet.  And in-wallet trading.

I'm thinking maybe we can be the first coin with the ability to trade BiblePay for our second asset inside the wallet (other than Ripple, but technically, Ripple is a network of market makers making existing markets).  This is a little different.

I'm thinking we emit a new deflationary colored currency (called either retirement coins or 401k coins) inside the wallet on a schedule decreasing by 1% per day.  Then, the wallet will keep track of both normal balance and "colored coin" balances.  So you would have your BBP balance and your rBBP balance. 

   Starting on the day we have retirement coins, the retirement system would emit 1 million retirement coins per day equally divided over 202 daily blocks to the miners who mine the blocks.  However each day, the emission rate would decrease by 1% .  So on day 2 we would emit 10,000 coins less (or 990,000 retirement coins over 202 blocks).  Each block solver would receive normal BBP, plus a separate share of colored retirement coins.  If you mined 4,000 retirement coins on day #1, your balance would now be:  1,000,000 BBP and 4,000 rBBP (retirement bbp). 

You cannot send colored coins to an exchange to sell them and cannot buy colored coins on an exchange.
All colored coins must be sent in a transaction that includes a reference to the root of the colored coins (another words, the colored indicator on the tx, the previous output is colored, and the new vout for the receiver is colored).

Available coins for spending will never select colored coins for spending (IE They cannot be spent). But they can be Traded for BBP with other holders through Trade transactions.

A new RPC command will allow you to send colored coins back and forth among others, if you want to give them to others.

Now here is where it gets interesting.  If we view the colored coins as a deflationary retirement account (assuming that IF they are becoming scarcer, storing FIAT in rBBP would theoretically result in a gain in value).

We implement in-wallet trading to allow trading from BBP to rBBP.  So we would have RPC commands to "execute order SELL 9000 rBBP for 1100 BBP" for example.  Other in-wallet users would "execute order BUY rBBP 5000 for 700 BBP".  When the matching engine matches an order over the nodes, one masternode  who is the chosen winner of the round (chosen winner meaning which masternode has the closest hash to the center of the blockhash for the current BBP block, can be active market maker for this tx).

At this point, the masternode jumps in, Locks the trade, grabs the collateral from the seller and the buyer, crosses the trade, then unlocks it and it is completed.  We will have a Trading log in biblepay, so you can go into your separate debug file and monitor STEPS that occur during trading.  (In case something goes wrong partially through).

Lastly, partially executed orders would be changed via a MODIFY - so if only 1000 got filled your order would readvertise with the partial amount left.

In this way, we would have in-wallet trading, colored coins, and a second deflationary asset inside biblepay.

My projection shows that the retirement coins would deflate for 4000 days before reaching a floor where they would be emitted at approximately 1 per day (if we start with a million per day).  I think at that point, I would like the system to reverse split the coins and start over, so that we perpetually have a deflationary retirement asset inside BBP.

One benefit of having this particular feature is we would attract outside investors that would need to buy BBP in order to have the ability to buy rBBP and they also potentially download the wallet and be users and might have a tendency to be long term holders.






  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #49 on: October 10, 2017, 10:39:41 am »

QUESTION: Are we sending coins to ourself?
It is OK to send the balance to yourself or from another node (I tested both).  The important thing is to make the amount exactly 500000 and dont click instant send or any other options.

If you are creating a Hot wallet (IE funds live on the masternode) you would send the 500k to the masternode wallet.  Now that we know cold wallets work, the recommended way is to send the funds To the cold wallet (IE the home controller wallet).


QUESTION: Which node is the Masternode?
  -> The masternode is the sanctuary running at the hosting company with the static IP.

QUESTION: Does the Masternode actually hold coins?
-> In a Hot masternode scenario, the masternode holds the coins, otherwise the masternode wallet is empty.
Biblepay puts a lock on the escrow when the masternode starts.

QUESTION: Is there a certain label that should be used for getaccountaddress?
One pitfall I noticed is if you use the same label more than once sometimes I get a new address.  I would recommend something short such as "MN1".  To ensure its only in the book once, click Receiving addresses and if it is already there as MN1, copy it to clipboard.

QUESTION: How to deal with fees when sending? Does amount have to be 500,000 exactly?
Fees are OK as long as you dont click the checkbox to Subtract fees.  Fees are stored in a different vector, so the vout is still 500,000.


QUESTION: Why port 51472? And does it need to be changed in any firewalls?
-> Oh no, this is a mistake, I will modify the guide.  This should be 40001.  Also in the UFW command list, it should be 40001.
Port 40001 is BBP testnets P2P port, 40000 is Prod BBP p2p port.



QUESTION: What IP address goes in this part of the config? "externalip=your_public_ip"
-> So when you rent your VM, and click into its hosted properties, you should see a public IP.  You should copy that and make it like this:
externalip=your_masternode_public_ip
NOTE: This is only required on the sanctuary side, not on the controller wallet side.


QUESTION: What are these config settings doing? Can the Home Wallet now control the Linux Wallet? or reverse of that?
-> These config settings only allow the home controller wallet to start and stop the masternode.  This is not only to safeguard your eventual 1 million BBP escrow if it goes up in value (to prevent vultr host from stealing it), but also because of Proof-Of-Service.  Dash has created POSE, which monitors how much uptime your masternode has stayed up and eventually becomes important if we have more than about 800 masternodes, these nodes start falling to the back of the payment queue and do not get paid if they need restarts.  When they fail and need restarted, it is easy for home computer controller wallet to start the masternode again.


QUESTION: Im stuck, help! :)
I opened /testnet3 debug.log with baretail and I see action happening, is their a syncing Period?
-> Yes, unfortunately this is a very frustrating, thats one reason I had to go to 1 minute blocks in testnet.  The wallet requires blocks to be moving for the 'mnsync status' command to iterate to the next step.  Do a setgenerate true 5, to keep blocks moving.  After 'mnsync status' shows 999, then you can start and stop the masternode and see the masternode list 'masternodelist'.


QUESTION: Where does Watchman fit in the process? What is Watchman? what is it doing?
-> Yes, I know.  Why we have to have yet another piece of software called Watchman-on-the-wall?  Watchman implements proof of service and one major superblock budget feature.  Let us say without it, Dashs POSE system would be in tatters.  Basically, if BBP ever reaches say $50 million market cap and then we have 1000 masternodes, situation A is without watchman, all the nodes who do a start on windows and then start playing video games a few hours later and kill the node by accident those nodes would not be doing anything for us, and would still get paid fully.  With watchman, every node has to send a watchdog alert every couple hundred blocks and prove their static IP and how long they been online.  This means as competition heats up you really have to have provided good service to stay in the payment queue. The other thing watchman does is collects a database of gobjects.  Governance objects are stored in tables.  Votes are kept.  It allows deleting governance objects by masternode.  The most important thing it does is when we create a very complicated budget that got approved from a proposal, it creates a text file of budget items for the superblock.  Without it the superblocks dont work very well.  Dash probably could have added code to masternode governance for all of it, but they chose this modular design in case they want to have masternodes upgrade the superblock code side and NOT the entire network to upgrade the wallet.  We inherited it so we have to embrace it now - what I am hoping is the version we ported is already stable and I can code a lot more on the web side and sort of freeze what we have for a year and grow as we are until we have our extra few IT devs helping me out to ensure we have the bitcoin commits committed constantly.

Cannot connect to biblepayd. Please ensure biblepayd is running and the JSONRPC port is open to watchman.

STUCK: What am I doing wrong here?
-> In this case I would go to the masternode and edit the biblepay.conf, and ensure rpcallowip=127.0.0.1 is set.
Also check to make sure watchman.conf has testnet uncommented and prod commented.


  • togoshigekata
  • Sr. Member

    • 275


    • 17
    • September 01, 2017, 10:21:10 am
    • Texas, USA
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #50 on: October 10, 2017, 01:01:28 pm »
Thank you so much for answering my questions!!!  :D


  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #51 on: October 10, 2017, 01:08:19 pm »
Thank you so much for answering my questions!!!  :D

No problem.  I am going to edit the create_masternode wiki page now (with that port number) etc.  I tested a cold masternode yesterday and it worked.

What I would like to do is get a few of us together here in a synced quorum, so we have at least 4 running masternodes on our synced list.
Then I can go ahead and create a governance object and see if everyone sees it.

Please, post here if you have your running static IP masternode in the masternode list.


Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #52 on: October 10, 2017, 11:26:53 pm »
My node is a cold node.  The only thing I've yet to get working is the watchman. 

Mine is 104.207.140.159 (cold node, no watchman, Vultr).


  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #53 on: October 11, 2017, 08:25:12 am »
My node is a cold node.  The only thing I've yet to get working is the watchman. 

Mine is 104.207.140.159 (cold node, no watchman, Vultr).

Could you please tell us something about a non-watchman node?  I am under the impression from interpreting the watchdog code that after a certain number of blocks passes, your non-watchman node status should go from "ENABLED" to NEW_START_REQUIRED.   

It will be interesting to know if you get paid your masternode fees with watchman off.  Are you receiving subsidies of 8300~ or so?  Note in your receiving list, the subsidy to the masternode comes in BY NAME, not by address.  For example I named my masternode DEBIAN in the cold sanctuary, so the payments come in the receiving list to DEBIAN.

Either way you will probably get tripped up when we get to the voting but it is interesting to know if you are getting paid, and when you get tripped up without watchman.



  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #54 on: October 11, 2017, 10:02:02 am »
Good morning all-

I modified http://wiki.biblepay.org/Create_Masternode enough to at least allow you to create a cold sanctuary.   Ill put Togos FAQs in at the end in a half hour.

Next, now is the time to get our wheels rolling.  I added our first proposal in testnet.  (Ill explain more later on how to create a decentralized proposal, but for now, behind the scenes, I have to collect the 8 input fields- things like discussion URL, start date time, end date time, the times fit between the superblock trigger time, the payment address and the funding amount- convert this to hex- which I did create a tool for inside the wallet - I will enable the tool that does all this automatically for you).  For now, I created an proposal for 5777 biblepay, sending the reward to my testnet address for payment on one of my sanctuaries, with a start time 1 second in the future and ending tomorrow at 10 pm (for voting).  What I am hoping is today we can vote yes on this for funding, and then we can check to see if everyone sees the votes and if it goes into the superblock for payment and then obviously if I receive the money.

So first, do a 'gobject list' and see if you see the proposal for 5777bbp.

Next to vote on it for funding, grab your masternode alias name - this is done on the controller wallet wherever the escrow is and type this:
gobject vote-alias 86e1a81115085f055d585db97a42e5189e613baddc1c244dd4bce0b756e5db08 funding yes your_node_alias

Next do a gobject list. and see if the YesCount as incremented above 1 (I voted Yes 20 minutes ago).



Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #55 on: October 11, 2017, 10:47:38 am »
Could you please tell us something about a non-watchman node?  I am under the impression from interpreting the watchdog code that after a certain number of blocks passes, your non-watchman node status should go from "ENABLED" to NEW_START_REQUIRED.   

It will be interesting to know if you get paid your masternode fees with watchman off.  Are you receiving subsidies of 8300~ or so?  Note in your receiving list, the subsidy to the masternode comes in BY NAME, not by address.  For example I named my masternode DEBIAN in the cold sanctuary, so the payments come in the receiving list to DEBIAN.

Either way you will probably get tripped up when we get to the voting but it is interesting to know if you are getting paid, and when you get tripped up without watchman.

So far I've received several hundred transactions the last one was about 10 minutes ago, and the node shows enabled in the sanctuary list as well.

Running 'gobject list' from Debug shows two proposals, one with a hash of 86e1a81115085f055d585db97a42e5189e613baddc1c244dd4bce0b756e5db08 for 444 BBP, and the second with a hash of e4470e53f65843b8f5c82172b41c10a5e31a74bdbe4aaba32a83ca1fd1e2f656 for 5777 BBP.  I voted for the later and the vote count increased by one.



  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #56 on: October 11, 2017, 12:03:48 pm »
So far I've received several hundred transactions the last one was about 10 minutes ago, and the node shows enabled in the sanctuary list as well.

Running 'gobject list' from Debug shows two proposals, one with a hash of 86e1a81115085f055d585db97a42e5189e613baddc1c244dd4bce0b756e5db08 for 444 BBP, and the second with a hash of e4470e53f65843b8f5c82172b41c10a5e31a74bdbe4aaba32a83ca1fd1e2f656 for 5777 BBP.  I voted for the later and the vote count increased by one.
Good on the vote, so far.

Could you please double click one of the transactions from the tx list row, and grab the txid and paste here?  Id like to verify it is a masternode payment and not a mining payment.

Btw, if anyone wants to learn how to audit a payment you can do this:

getrawtransaction txid 1
When you use a 1, you will see everything about it.  In the vout list, the coinbase payment to the miner is in location 0.  A masternode payment is in location 1.  A superblock payment is in location 2->count of superblockpayment list for approved budget.  The destination address is also shown in the vout so you can see if its your masternode alias address also, by comparing it to your receiving address book list (Receiving Addresses -> List).  Your mn alias should be labeled on that list since you did the getaccountaddress alias command when you set up the cold wallet (this is all done inside the controller wallet btw).

Its also a very helpful command when someone asks you where the missing coins are.  Getrawtransaction txid 1 means the tx reached the entire network.


Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #57 on: October 11, 2017, 12:19:14 pm »
910ac78557d3fbefe063e0a070333de4043010db95016002f0661aaa31344de9-001 is one of the MN payments. It was for block 8980.  I also mined block 8980 with TXID 910ac78557d3fbefe063e0a070333de4043010db95016002f0661aaa31344de9-000.


  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #58 on: October 11, 2017, 06:08:34 pm »
910ac78557d3fbefe063e0a070333de4043010db95016002f0661aaa31344de9-001 is one of the MN payments. It was for block 8980.  I also mined block 8980 with TXID 910ac78557d3fbefe063e0a070333de4043010db95016002f0661aaa31344de9-000.
I see it, looks like a masternode payment.

I did see your watchdog expire while I was casually looking.  I wonder if your payments stopped after that?



  • Rob A.
  • Administrator

    • 1101


    • 18
    • June 05, 2017, 08:09:04 pm
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #59 on: October 11, 2017, 06:14:24 pm »
So now I am doing a little Biblepay hacking to try to find out if our approved proposal made it into the budget, and therefore becomes a lone superblock.

On a side note, we have superblocks every 25 blocks in testnet. 

If you want to see what is inside watchman, you can do the following:

apt-get install sqlite3

cd into the watchman directory

sqlite3 watchman

sqlite> .tables (ENTER)

select * from proposals;

To dump the schema:

.fullschema

So now, on the bright side, I see our proposal has become a proposal in SQLite.  And I see our watchdog is communicating back and forth for POSE into biblepayd.  I see the votes going into the gobject in SQL. 
     However what Im trying to find next is if the superblock height has to be between the start and end unix time of the approved proposal.  I believe all we had to do was have more than 2 absolute votes for validity and funding for this proposal to become part of the superblock, but cant say for certain yet.  Checking...