Bible Pay

Read 33636 times

Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #60 on: October 11, 2017, 11:47:21 pm »
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?

Just got in from work, in my wallet it still says status:enabled in both the My Sanctuaries and All Sanctuaries views.

Got txID f864a54729cff1c481ba3e1a275b5d4c9402560022739bffb9d7cc2bfbf35ad8-000 for block 9461 at 10/12/17 04:43:22 (a few minutes ago local 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 #61 on: October 12, 2017, 02:47:51 pm »
Just got in from work, in my wallet it still says status:enabled in both the My Sanctuaries and All Sanctuaries views.

Got txID f864a54729cff1c481ba3e1a275b5d4c9402560022739bffb9d7cc2bfbf35ad8-000 for block 9461 at 10/12/17 04:43:22 (a few minutes ago local time)

Ok cool, well Im learning more about the details of watchdog now.  It looks like after 7200 seconds, if watchman runs while your node is dead, it fails to create a signable gobject for POSE.  So, somewhere in the picture, it looks like your node would eventually fall behind in the payment queue if you werent the miner.  I think right now we can all get paid because our actual biblepayd instances are miners themselves, so they can always find the receiving address to append to the block plus we have more than enough blocks to go around.


Anyway, this is a very deep rabbit hole, the budgets and superblocks.  It looks like we actually need more code to be executed between proposal, budget and superblock creation (called a trigger).  Im merging in the trigger code now and Ill let everyone know what happens after I figure this out. 

Since we are on testnet, we only need 2 signing masternodes to approve the budget.  Since I have 2 I might be able to approve the budget, will update asap.



  • 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 #62 on: October 12, 2017, 04:09:40 pm »



*** YIPPI ****

We had our first testnet superblock!  I feel like Evan Duffield.    The Hex encoding finally broke through, oh but the convoluted feeling.

Alright now I need to regroup and figure out how we can add this to the testnet side of the pool.

Will be back tomorrow for more testing.

PS: If anyone wants to see the very first testnet superblock, do a showblock 10125.
I see that the miner gets the block subsidy (no sanctuary is paid the 50% on the superblock, lucky miner gets entire subsidy), and the 15% budget we allocate to IT/PR and Charity is paid in vout 2+ to the recipients of the passing voted budget.  So if we had a superblock every 100 blocks in prod for example (this is only an example), 15% would be held back from all 99 blocks (10% for charity, 5% for IT-PR) and on block 1000, that superblock would have the sum of the 15% allocated over the last 99 blocks included in the voted and approved budget, paying recipients 2+ (IE for the distinct count of approved campaigns) for those 100 blocks.....  Sweet....   

The website will allow us to create proposals in an easier manner, and enter receiving addresses.

Right now it will be a little convoluted to vote on things from the masternodes.  I forgot to mention an added benefit of the cold wallet.  If you plan on hosting say 5 masternodes, you can create one controller wallet and vote on an issue with all masternode keys at once with the command 'gobject vote-many objectid action vote'.  That will alleviate a lot of the pain once we work this template out.



« Last Edit: October 12, 2017, 04:18:29 pm by admin »


Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #63 on: October 12, 2017, 10:38:10 pm »
I really like the Superblock.  It keeps people from wasting time or having to tinker with difficulty too much.  Glad to see it's coming together.  Still mining, still getting MN shares.


  • 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 #64 on: October 13, 2017, 09:43:36 am »
Maybe this is the problem? Was this exactly 500000 BBP or not? I'm confused with the fee. I used the command from the wiki instructions:

Code: [Select]
sendtoaddress <ESCROW_ADDRESS> 500000
But maybe I need to send it through the GUI and uncheck any fees?

Also, this is how the transaction appears in the wallet:



And balance:




Yeah, you sent it right.  There are a couple ways to double check it.  But first of all when you do it from the command line like that, you cant screw it up.

First, if you do a getrawtransaction b0cfdfa2194556e211099bc620a7e27487958aa5774db0c78ded0f839e3105d2 1, and look at the vout1 you will see its exactly 500 grand.

Next if you type masternode outputs from the node that received the BBP, you will get the proper txid and vout to use for the masternode.conf.

Regarding the 'not a masternode' issue,from masternode status, you have to run that command from the masternode (not the controller wallet).  The masternode has to have the masternode=1 in the config file, along with its masternodeprivkey=XXX in the config.  Was all that set up?

Hopefully you got it all worked out.




  • 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 #65 on: October 13, 2017, 09:48:34 am »
So a little update for everyone- I spent last night adding the ability to the pool to add a governance object, added a proposal object, and the ability to list proposals.  Since the proposals have to go through phases (IE created, submitted, voted, budgeted, approved, queued for superblock, paid) I have to still add more code to the pool on the testnet side in order to get everyone on board and vote from testnet for the first proposal!  Then we can watch it go through the phases, and add some more code to be able to see the masternodes voting on it!  Kind of like dash-central does, when they see the progress of their proposals, and the entry into the budget superblock cycle.
I also have to ensure we move these proposals to history so we dont clutter up the screen.  We will probably have an active proposals list (those that you can vote on) respecting testnet and prod of course, and then the Historical proposals (those are the ones that have been Paid in a superblock already).

Just as a side note, I am going to create a wiki page for a Fundraiser for testnet, to pay our orphan recurring expenses as a Proposal - IE to simulate a real world use case for January 2018!  Then we can all vote on it here in testnet and see if it pays the keypair properly!

Exciting stuff!  You will be able to click on the row in the proposal to bring up the wiki page to see what you are voting as a masternode....




  • 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 #66 on: October 13, 2017, 04:54:23 pm »
This is it. This was somehow missing from the wiki instructions, I added it now: http://wiki.biblepay.org/Create_Masternode
(I have no idea how all of you set it up and knew about that :) )

Now when I type masternode status, I get this:

Code: [Select]
{
  "vin": "CTxIn(COutPoint(0000000000000000000000000000000000000000000000000000000000000000, 4294967295), coinbase )",
  "service": "35.196.88.202:40001",
  "status": "Not capable masternode: Masternode not in masternode list"
}

Which I reckon is normal and you just need to add this IP to some list, right? So there it is above. Thanks
Thanks, glad you added that.  I think we had that line in the config at one time and deleted it by accident.

I believe this error is coming from the wallets broadcast identifier, it stores the masternodes public ip, port, and vin (which is the txid and vout of the escrow) in order to validate the masternode when you come on line.

So, check to see if you have ''externalip=your_public_ip" in your base biblepay.conf file on the masternode itself (ie under masternode=1).  Try leaving off the colon and port # as I monkeyed with that and mine is working without the port number crrently at least for that setting.

Then restart the masternode, and wait until 'mnsync status' shows 999, then check the 'masternode status'  again and lets see if it works?


EDIT:  Also ensure your masternode.conf file in the /testnet3 directory of your controller wallet has the public IP And the colon and 40001 in it, and it matches, the public ip, and that you can reach the public ip from the controller wallet with:
telnet public_IP 40001




  • 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 #67 on: October 14, 2017, 02:22:33 am »
Good news, I think I got a master node working!
(One gotchya was that with AWS (Amazon Web Services) I needed to add inbound rule for port 40001 in the security group of the EC2)

Love your updates to the Masternode guide Rob!
http://wiki.biblepay.org/Create_Masternode

===

Bad news, Im having trouble with Watchman:
https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt
https://github.com/biblepay/watchman

Im using Ubuntu 16.04

My watchman.conf:
Quote
# specify path to biblepay.conf or leave blank
# default is the same as BiblepayCore
#biblepay_conf=/home/ubuntu/.biblepaycore/biblepay.conf

# valid options are mainnet, testnet (default=mainnet)
#network=mainnet
network=testnet

# database connection details
db_name=database/watchman.db
db_driver=sqlite

~/.biblepaycore/watchman$ venv/bin/python bin/watchman.py
Code: [Select]
[error]: unable to open database file
Cannot connect to database. Please ensure database service is running and user access is properly configured in 'watchman.conf'.

Source Code:
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/init.py#L46

https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L82

https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L37

===

~/.biblepaycore/watchman$ venv/bin/pip list

inflection (0.3.1)
peewee (2.8.3)
pip (9.0.1)
pkg-resources (0.0.0)
py (1.4.31)
pycodestyle (2.3.1)
pytest (3.0.1)
python-bitcoinrpc (1.0)
setuptools (36.6.0)
simplejson (3.8.2)
wheel (0.30.0)

===

So it seems like database file isnt getting created? Im not sure
Looks like peewee library handles the database stuff?

if driver == peewee.SqliteDatabase:
        db_conn = {}

db = driver(db_name, **db_conn)
« Last Edit: October 14, 2017, 03:18:07 am by togoshigekata »


  • 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 #68 on: October 14, 2017, 09:35:44 am »
Good news, I think I got a master node working!
(One gotchya was that with AWS (Amazon Web Services) I needed to add inbound rule for port 40001 in the security group of the EC2)

Love your updates to the Masternode guide Rob!
http://wiki.biblepay.org/Create_Masternode

===

Bad news, Im having trouble with Watchman:
https://github.com/biblepay/biblepay/blob/master/BuildBiblePay.txt
https://github.com/biblepay/watchman

Im using Ubuntu 16.04

My watchman.conf:
~/.biblepaycore/watchman$ venv/bin/python bin/watchman.py
Code: [Select]
[error]: unable to open database file
Cannot connect to database. Please ensure database service is running and user access is properly configured in 'watchman.conf'.

Source Code:
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/init.py#L46

https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L82

https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/config.py#L37

===

~/.biblepaycore/watchman$ venv/bin/pip list

inflection (0.3.1)
peewee (2.8.3)
pip (9.0.1)
pkg-resources (0.0.0)
py (1.4.31)
wheel (0.30.0)

===

So it seems like database file isnt getting created? Im not sure
Looks like peewee library handles the database stuff?

if driver == peewee.SqliteDatabase:
        db_conn = {}

db = driver(db_name, **db_conn)

Oh man thats great!  You almost have it working.  Yeah, on the watchman, I will add those instructions to the create_masternode guide in a few minutes for everyone else.

So lets start with a couple basic things to see if the problem reveals itself.

Im no python guy, but during the time that I was debugging the first superblock I had to figure out how to turn peewee logging on and I was successfully able to see the watchman debug output and figure out where the system was breaking.  So step 1 that might help a little is turning on the logging, and then try to run the venv/bin/python watchman.py again, here is how I turned on logging:

First cd into the watchman directory
Then execute the python interpreter like this:

venv/bin/python

Then you will see the python interpreter command line:
Python interpreter>>

Type:

import os;
os.env["WATCHMAN_DEBUG"]="1";
quit()


Then rerun venv/bin/python watchman.py first to see if it reveals anything.
Btw, I think you already modified your config file properly as it looks good.
The database file itself should have been downloaded to the watchman directory - its called "Watchman".  If you ls -l, and cat the file it should have some tables in it.  Note the case is "Watchman" in this case.

To check to see what is in the database, if you have not gotten further try this:

sudo apt-get install sqlite3
sqlite3 Watchman
sqlite>
select * from votes;
.table <enter>

See if the .table command lists out all the governance object tables?  Or if possibly the "Watchman" file does not even exist in the directory?

Im not sure if you have access to any other machines, but it would also be good to know if the behavior is different on another machine (IE Watchman gets created on ubuntu, but not at AWS).

We will have to see which step it fails to create the database file in.



  • 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 #69 on: October 14, 2017, 12:48:56 pm »
Alright everyone, I believe we are now at the point where we need to perform end-to-end sanctuary testing!

Lets try to go through this process from start-finish to see what needs improvements  :'(

So first, log in to pool.biblepay.org and click Network: Testnet.  If you are not in testnet mode, the proposals lists will be empty.

Next click Governance | Proposal List.  You will see the list of Active proposals at the top (those not funded yet that need voted on) and then in the Funded List you will see those proposals that are already inside superblocks and paid.
NOTE: I will be adding a chart soon so we can see a graphical view of the proximity to funding per row one proposal is generating in popularity.

We need to simulate: Keeping compassion as a charity, Paying a single invoice, Paying multiple invoices in a superblock, Shooting down a proposal, and watching a proposal get paid (included in a superblock), verifying the budget, test inability to exceed the budget, and review a historical expense.

First lets test a dry run of the theoretical monthly recurring expense for compassion.  I added a new proposal and it is ready to be voted on, for Octobers recurring orphan sponsorships (39,900 BBP).  Click on Proposal List.  Note the gobjectID in the second row of each item row (that is the Detail row).  Copy the gobjectID to the clipboard (note - Clicking on the first line of each row allows you to View the proposal), so you need to double click the gobject id (62a9c8afaf2af86f3820d6d30a93b4f84b29927b66c88badf8ad9699a48e20a6) from the second row, (the row that says the Proposal Name hyphen the gobjectid).  To vote on this for funding from your sanctuary issue this command:

Code: [Select]
gobject vote-many 62a9c8afaf2af86f3820d6d30a93b4f84b29927b66c88badf8ad9699a48e20a6 funding yes


The pool will actually update the row eventually with voting information also.

After the supermajority votes on it, the pool will create a budget item automatically that "fits" as many proposals as possible into a superblock (IE it will try to create a superblock for us), the pool has no power to vote, all it can do is suggest to the sanctuary network that "4 approved proposals can fit in superblock Y" and Y must be an upcoming superblock with at least enough lead time to be voted on (this is called the budget maturity period).  We need to test that also.

So please go ahead and vote on this proposal, and we will watch to see if it moves through the phases.

Also, I wanted to mention, for the very first Discussion URL, I used the wiki page just to get started.  But, technically, we need to use a Forum topic for this purpose so that other Biblepayers and Sanctuaries can discuss the validity in an open forum of the actual item.  For example, if someone submits a proposal to place a BiblePay ATM with a "medicianal weed" dispenser in it, the community should stand up and say: Wait I thought we were a Christian community isnt this going to tarnish our image, and coax the sanctuaries to vote it down.

Initiative II:

Id also like to ask someone here, who has a running sanctuary, to go ahead and create a Mock up proposal with a real testnet discussion URL, one that we can vote on, so we can test the "multiple proposals in one budget and in one superblock" issue.  Who is up for it?  Click on Proposals| Add.
Create a discussion URL on Forum.biblepay.org in the Testnet Forum, as a new Topic.  Ensure you can post to it (test it).  Use that as the discussion URL.
Enter an amount below 10000 BBP as the "amount" because the superblock budget is only 72000 on testnet and the orphan budget is already at 39,900.
Add the Proposal and verify it exists and notify us so that we can discuss and vote on it. 

And finally, please, someone who wants to make a really negative and tacky proposal, go ahead and make one, and let us know, one that we deliberately want to shoot down so that it misses the budget.




Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #70 on: October 14, 2017, 05:58:57 pm »
Is there a way to see more detail on what the proposal is?  Because (and yes, I understand we're testing), right now, I see a proposal entitled "Oct 2017 recurring orphan expense due" and a id, but there is no way to really tell what we're voting on.  Or is that coming and I'm jumping the gun?


  • 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 #71 on: October 14, 2017, 06:03:23 pm »
Is there a way to see more detail on what the proposal is?  Because (and yes, I understand we're testing), right now, I see a proposal entitled "Oct 2017 recurring orphan expense due" and a id, but there is no way to really tell what we're voting on.  Or is that coming and I'm jumping the gun?

Well on a side note, I am working on an advanced feature now that will let you pull up commands to let you vote on a budget or a proposal, but Im kind of getting ahead of myself here, the current version in Pool-testnet right now please check this out:

If you single left click on the First row of each Proposal, you can view the Forum detail.  To vote on it, copy the Second rows gobject ID to clipboard and vote.  Let me know if you vote, because Ive done something very convoluted to the first proposal.  I voted on it, voted on the budget, became the supermajority (because I had 3 cool sanctuaries running) got it in the superblock and paid and then pulled it back out and re-instantiated it - I am trying to see what happens if us guys vote on something again that was already paid.

Anyway, since you are mod, if you want to create that other one we need, you should then be able to left click it and see your forum URL discussion also.

You should see an entire web page for the recurring orphan expense with the invoice in it.


Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #72 on: October 14, 2017, 06:17:58 pm »
No problem, family first.  I gotta do some other things. But I did vote and the proposal did show when I left clicked it.


  • 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 #73 on: October 14, 2017, 06:19:42 pm »
No problem, family first.  I gotta do some other things. But I did vote and the proposal did show when I left clicked it.
Wait, I think its fixed.  Gotta step out, but go ahead and left click from the weblist from the one that is not funded and you should see a Wiki page pop up.

When you create your forum link and a new proposal, once you navigate to the list, it should also pop up- we will probably need to make that open in a new window, otherwise forum javascript will probably be broken (IE it may need a whole dedicated discussion page).



  • jaapgvk
  • Sr. Member

    • 494


    • 20
    • September 01, 2017, 08:02:57 pm
    • Netherlands
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #74 on: October 15, 2017, 03:44:31 am »
I've had a busy week, but I think I've finally got a masternode working  :D

I didn't set it up on a vultr server, but run it within my own network. So now I have two computers running from my home, one having the controller wallet and the other having the sanctuary wallet.

I do still have a few questions/remarks.
In the guide it says:

Quote
Type 'masternode outputs' (Record the output of this command in notepad as ESCROW TXID and ESCROW VOUT).

 What I got was:

Code: [Select]
{
  "d7701a68ef4a7af4f066499477b935bfccf5efaacf28149cdf8b5316c1daa626": "1",
  "fd5cb3ef632fb25a40665d1b4da0c1cd992c4f3d99ef38ce1ddf725ecfe53836": "0"
}

Then later on the guide says:

Quote
Find masternode.conf and add the following line to it: (*** NOTE: For TestNet, you must modify testnet3\masternode.conf ***): [SANCTUARY_ALIAS] SPACE [SANCTUARY_PUBLIC_IP:40001] SPACE [SANCTUARY_PRIVATE_KEY] SPACE [SANCTUARY_TXID] SPACE [SANCTUARY_VOUT]

But I didn't know where to find the 'SANCTUARY_TXID' and 'SANCTUARY_VOUT'. Am I right in saying that these two are the last two I got when typing 'masternode outputs' on my controller wallet (thus in my case 'SANCTUARY_TXID'='fd5cb3ef632fb25a40665d1b4da0c1cd992c4f3d99ef38ce1ddf725ecfe53836' and 'SANCTUARY_VOUT'='0'?
That's the way I configured it a least, and it seems to be working.

When I type 'masternode status' on my sanctuary wallet, I get:

Code: [Select]
{
  "vin": "CTxIn(COutPoint(fd5cb3ef632fb25a40665d1b4da0c1cd992c4f3d99ef38ce1ddf725ecfe53836, 0), scriptSig=)",
  "service": "84.29.208.33:40001",
  "payee": "yahMsXVAioaFT9EXfna78sqoYZh5y4NMfP",
  "status": "Masternode successfully started"
}

While typing this, I got my first masternode-payment, so I guess it's working  8)
Next step is getting wachtman up and running.

One last question: do I also need to keep the controller wallet online? I don't think so, based on the information I've read, but I'm wondering how it works...
« Last Edit: October 15, 2017, 03:49:46 am by jaapgvk »