Bible Pay

Read 353674 times

  • jaapgvk
  • Hero Member

    • 558


    • 31
    • September 01, 2017, 08:02:57 PM
    • Netherlands
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #60 on: October 15, 2017, 04:10:25 AM »
@togoshigekata: I'm having the same problem with watchman. Dit you solve this issue?

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.

rpcallowip=127.0.0.1 is set in the biblepay.conf file, and this is my watchman.conf:

Code: [Select]
# specify path to biblepay.conf or leave blank
# default is the same as BiblepayCore
#biblepay_conf=/home/rob/.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

venv/bin/python bin/watchman.py

I do work from the GUI. Might this be the problem?


  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • 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 15, 2017, 08:40:59 AM »
On a side note, on my guinea pig test last night where I took a funded-paid gobject, and tried to revote it into a new superblock, it was rejected.  So thats great to know, because that means one cannot pull a fast one on the community and try to slip their proposal into two budgets and have the sanctuaries accidentally pay it twice (especially thinking they didnt vote it in properly in the last budget-superblock).

However there is one circumstance I can think of that will happen in prod that we have to make a distinction on.  If a proposal is submitted, and everyone likes it and approves it, but everyone goes away after proposal is approved, and forgets to vote on the budget, then it fails to to be created in the next superblock, then it is not funded, then we will auto-create a new budget, and that allows us to continue to vote for it in the *next* superblock.  In prod that would be rare, as we only have one per month, so dont worry too much about this.  It should happen in testnet however quite a bit with these hourly superblocks.



  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • 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 15, 2017, 08:44:51 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:

 What I got was:

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

Then later on the guide says:

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...

That is great dude, glad to hear it.

Yeah, in masternode outputs, it prints the TXID of the collateral, colon then the vout (locationid) of the collateral.  So Ill modify the FAQ to make it clearer that what value is which one.

Once your masternode is started you dont have to keep the controller wallet online.  When in prod, we will have to ocasionally look at the masternode list and if it says "Restart Required"thats when you have to bring the controller back up and do a restart on the cold sanctuary.  Ill take a look at the code to ensure this is not going to be a nuisance where its down if it misses one ping.  Maybe we relax it a little so its easier to manage these for the first year (IE requires a hard down for one hour instead of 5 minutes) as I noticed out of my 3 sanctuaries I left them running and one of them already requires restart.

Ill add this to the faq also.

Btw guys I added the watchman to the create_masternode wiki.


  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • June 05, 2017, 08:09:04 PM
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #63 on: October 15, 2017, 08:50:42 AM »
@togoshigekata: I'm having the same problem with watchman. Dit you solve this issue?

rpcallowip=127.0.0.1 is set in the biblepay.conf file, and this is my watchman.conf:

Code: [Select]
# specify path to biblepay.conf or leave blank
# default is the same as BiblepayCore
#biblepay_conf=/home/rob/.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

venv/bin/python bin/watchman.py

I do work from the GUI. Might this be the problem?

Sorry, I dont understand what is broken, but, if you ran the
venv/bin/python bin/watchman.py and did not receive an error I believe you are actually OK with watchman.   
What you can do is vote on our new proposal that is coming out in one hour and then go into this

sqlite3 Watchman
select * from vote;

And just see if your vote went in from your masternode then you will know for sure your watchman is working.

Also if you receive WatchdogExpired from the GUI list of Sanctuaries in a few hours, watchman is down.



  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • 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 15, 2017, 09:31:58 AM »
Alright so I just deployed a couple new governance features to the pool.

Now you can go to proposals, and when you click View Proposal, it opens the Discussion in a new Tab on the browser.  The idea is we create proposals with Forum URLs, let everyone discuss it, and the URL for the discussion stays on the proposal forever.

I updated the Orphan proposal that still needs voted on today with the new Forum URL, so lets pretend its real and vote on it now.

I added some more features to make voting more intuitive.  The proposal has to go through the initial voting stage (that is it either gets voted for funding or gets voted away and dies).  During this phase internally it has a gobject id.  To make this easier, when you right click on a proposal that is not fully voted to a budget, you can now either copy the proposal ID to the clipboard or copy the Vote command to the clipboard.  It appears only IE lets me write to your clipboard, so if you are on Chrome, you will have to copy the command from the dialog into your clipboard.  I think this will work on firefox, let me know.

So another words to vote on the orphan proposal, right click on it and copy the proposal vote command to the clipboard then vote on it from your masternode. Let me know that it works.

Then once the system finds a supermajority voted on it, it will create a budget item for it. You will also have to vote on the budget once per month.
When you right click the proposal and click Vote on Budget, it will copy the Budget Tx ID and voting command to the clipboard.  Later today we can use that to vote on the budget.

We still need someone to create another real proposal (a good one) and some one to create a tacky one.

Got to head to church have fun.




  • jaapgvk
  • Hero Member

    • 558


    • 31
    • September 01, 2017, 08:02:57 PM
    • Netherlands
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #65 on: October 15, 2017, 12:32:09 PM »
gobject vote-many e33c9a0e6a010a9515bf20868ac6ede5efc1747f7e771a4e82e12536d356a9a4 funding yes

Code: [Select]
{
  "overall": "Voted successfully 0 time(s) and failed 0 time(s).",
  "detail": {
  }
}

What am I doing wrong here?

I get the same...


  • jaapgvk
  • Hero Member

    • 558


    • 31
    • September 01, 2017, 08:02:57 PM
    • Netherlands
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #66 on: October 15, 2017, 12:42:58 PM »
Sorry, I dont understand what is broken, but, if you ran the
venv/bin/python bin/watchman.py and did not receive an error I believe you are actually OK with watchman.   
What you can do is vote on our new proposal that is coming out in one hour and then go into this

sqlite3 Watchman
select * from vote;

And just see if your vote went in from your masternode then you will know for sure your watchman is working.

Also if you receive WatchdogExpired from the GUI list of Sanctuaries in a few hours, watchman is down.

Thanks! Sadly I get the 'Cannot connect to biblepayd' error at the point where I type the command 'venv/bin/python bin/watchman.py'.
So it seems to think the wallet is not running while it actually is. I got no errors typing the other commands.

This might also explain why I'm not able to vote... (see my previous post).


  • togoshigekata
  • Hero Member

    • 527


    • 31
    • September 01, 2017, 10:21:10 AM
    • USA
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #67 on: October 15, 2017, 02:46:29 PM »
I think I found a solution to watchman

On Sanctuary Wallet (remote linux machine), I added a line to ~/.biblepaycore/biblepay.conf
rpcport=9998

I got this port number from here:
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/biblepay_config.py#L37

And I re-ran the Wallet
~/.biblepaycore/watchman$ venv/bin/python bin/watchman.py
biblepayd not synced with network! Awaiting full sync before running watchman.

Never received this message before!, Waited for sync, ran again and got no error, I was always getting errors!, but I also got no output, SUCCESS!?

QUESTION: How do I check to make sure watchman is working?

Another slight change I made, not sure if it was important, I manually created the /database folder inside the /watchman folder

===

I got 1 error when running the watchman tests though

~/.biblepaycore/watchman$ ./venv/bin/py.test ./test
====================================== test session starts ======================================
platform linux2 -- Python 2.7.12, pytest-3.0.1, py-1.4.31, pluggy-0.3.1
rootdir: /home/ubuntu/.biblepaycore/watchman, inifile:
collected 20 items

test/integration/test_jsonrpc.py F
test/unit/test_biblepay_config.py .
test/unit/test_biblepay_things.py .....
test/unit/test_biblepayd_data_shims.py ..
test/unit/test_models.py ..
test/unit/test_submit_command.py .
test/unit/models/test_proposals.py ...
test/unit/models/test_superblocks.py .....

=========================================== FAILURES ============================================
________________________________________ test_biblepayd _________________________________________

    def test_biblepayd():
        config_text = BiblepayConfig.slurp_config_file(config.biblepay_conf)
        network = 'mainnet'
        is_testnet = False
        genesis_hash = u'00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6'
        for line in config_text.split("\n"):
            if line.startswith('testnet=1'):
                network = 'testnet'
                is_testnet = True
                genesis_hash = u'00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c                        '

        creds = BiblepayConfig.get_rpc_creds(config_text, network)
        biblepayd = BiblepayDaemon(**creds)
        assert biblepayd.rpc_command is not None

        assert hasattr(biblepayd, 'rpc_connection')

        # Biblepay testnet block 0 hash == 00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91                        623bf8bc2c
        # test commands without arguments
        info = biblepayd.rpc_command('getinfo')
        info_keys = [
            'blocks',
            'connections',
            'difficulty',
            'errors',
            'protocolversion',
            'proxy',
            'testnet',
            'timeoffset',
            'version',
        ]
        for key in info_keys:
            assert key in info
        assert info['testnet'] is is_testnet

        # test commands with args
>       assert biblepayd.rpc_command('getblockhash', 0) == genesis_hash
E       assert '122f423f0912...ae2b957d1ac10' == '00000bafbc94a...d91623bf8bc2c'
E         - 122f423f0912850a871c58f1533dd80be62154bb0c56dfb8cb9ae2b957d1ac10
E         + 00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c

test/integration/test_jsonrpc.py:51: AssertionError
============================== 1 failed, 19 passed in 0.50 seconds ==============================

Only 1 test failed out of 20
and it looks like its just a difference in hash numbers for block 0?
for my testnet machines getblockhash 0 returns:
122f423f0912850a871c58f1533dd80be62154bb0c56dfb8cb9ae2b957d1ac10

« Last Edit: October 15, 2017, 03:02:50 PM by togoshigekata »


  • klondike
  • Full Member

    • 157


    • -10
    • October 10, 2017, 09:00:24 AM
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #68 on: October 15, 2017, 03:18:58 PM »
can i run masternode on windows? any help with this? no all using linux VPS


  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • 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 15, 2017, 03:58:01 PM »
can i run masternode on windows? any help with this? no all using linux VPS
No. PoSE does not run on windows.

You can hack Watchman to run on windows, but you would need to know python and you would be spearheading the project with absolutely no support.  At the very least, you should get your masternode running on linux first, then you could become  a windows hacker (otherwise I doubt you would have a chance at succeeding).

However,  if you did succeed I would be interested in running a windows sanctuary on one of my extra servers.


  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • June 05, 2017, 08:09:04 PM
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #70 on: October 15, 2017, 04:06:22 PM »
I think I found a solution to watchman

On Sanctuary Wallet (remote linux machine), I added a line to ~/.biblepaycore/biblepay.conf
rpcport=9998

I got this port number from here:
https://github.com/biblepay/watchman/blob/c6f4cdc831b45019b1f7b3b6ce99100b5fa7086f/lib/biblepay_config.py#L37

And I re-ran the Wallet
~/.biblepaycore/watchman$ venv/bin/python bin/watchman.py
biblepayd not synced with network! Awaiting full sync before running watchman.

Never received this message before!, Waited for sync, ran again and got no error, I was always getting errors!, but I also got no output, SUCCESS!?

QUESTION: How do I check to make sure watchman is working?

Another slight change I made, not sure if it was important, I manually created the /database folder inside the /watchman folder

===

I got 1 error when running the watchman tests though

~/.biblepaycore/watchman$ ./venv/bin/py.test ./test
====================================== test session starts ======================================
platform linux2 -- Python 2.7.12, pytest-3.0.1, py-1.4.31, pluggy-0.3.1
rootdir: /home/ubuntu/.biblepaycore/watchman, inifile:
collected 20 items

test/integration/test_jsonrpc.py F
test/unit/test_biblepay_config.py .
test/unit/test_biblepay_things.py .....
test/unit/test_biblepayd_data_shims.py ..
test/unit/test_models.py ..
test/unit/test_submit_command.py .
test/unit/models/test_proposals.py ...
test/unit/models/test_superblocks.py .....

=========================================== FAILURES ============================================
________________________________________ test_biblepayd _________________________________________

    def test_biblepayd():
        config_text = BiblepayConfig.slurp_config_file(config.biblepay_conf)
        network = 'mainnet'
        is_testnet = False
        genesis_hash = u'00000ffd590b1485b3caadc19b22e6379c733355108f107a430458cdf3407ab6'
        for line in config_text.split("\n"):
            if line.startswith('testnet=1'):
                network = 'testnet'
                is_testnet = True
                genesis_hash = u'00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c                        '

        creds = BiblepayConfig.get_rpc_creds(config_text, network)
        biblepayd = BiblepayDaemon(**creds)
        assert biblepayd.rpc_command is not None

        assert hasattr(biblepayd, 'rpc_connection')

        # Biblepay testnet block 0 hash == 00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91                        623bf8bc2c
        # test commands without arguments
        info = biblepayd.rpc_command('getinfo')
        info_keys = [
            'blocks',
            'connections',
            'difficulty',
            'errors',
            'protocolversion',
            'proxy',
            'testnet',
            'timeoffset',
            'version',
        ]
        for key in info_keys:
            assert key in info
        assert info['testnet'] is is_testnet

        # test commands with args
>       assert biblepayd.rpc_command('getblockhash', 0) == genesis_hash
E       assert '122f423f0912...ae2b957d1ac10' == '00000bafbc94a...d91623bf8bc2c'
E         - 122f423f0912850a871c58f1533dd80be62154bb0c56dfb8cb9ae2b957d1ac10
E         + 00000bafbc94add76cb75e2ec92894837288a481e5c005f6563d91623bf8bc2c

test/integration/test_jsonrpc.py:51: AssertionError
============================== 1 failed, 19 passed in 0.50 seconds ==============================

Only 1 test failed out of 20
and it looks like its just a difference in hash numbers for block 0?
for my testnet machines getblockhash 0 returns:
122f423f0912850a871c58f1533dd80be62154bb0c56dfb8cb9ae2b957d1ac10


Good hacking man, so I think all it was in your case was the rpcport was not set.  RPCPort is not really hardcoded to be 9998, it is picked by you and just cant be the p2p port.  For example, rpcport cannot be 40001 or 40000.  What this is for, is to let your sanctuary be an RPC server.  Thats so Watchman can connect to it.  I see the guide does not include the Port!   I see mine is set in the high 4000s on testnet and my watchman.conf has no port number in it and watchman finds it.  Oh well you got it working.

But moving on to the genesis, Yeah, I think I have the gensis hash in the test, good find.  I need to update that to our genesis hash and all tests should succeed :).

So anyway after you vote on the first governance vote, you can go in and select * from votes, and you should see table data.  Actually, if you see anything in select * from proposals then you know its working.

Out of curiousity if you get a chance why dont you leave rpcuser and rpcpassword in your cold sanctuary set, and see if it works with the "rpcport=" commented out?  You can put a # in front of it.  This way we know if the guide needs modified.



  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • 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 15, 2017, 04:20:59 PM »
I get the same...

For JaapGVK & InBlue:

Checking the gobject:
gobject vote-many e33c9a0e6a010a9515bf20868ac6ede5efc1747f7e771a4e82e12536d356a9a4 funding yes
The gobject is valid and I am able to vote from my masternodes on this item.

To troubleshoot check the following:

- masternode status (ensure it says Started) from the sanctuary wallet
- Vote from the Controller wallet if you run cold sanctuaries, vote from a hot wallet if you run a hot sanctuary
- mnsync status from the sanctuary wallet (ensure it is 999)

Next you can type 'gobject get gobjectid' if you did vote successfully to see the vote take effect.


The web site should now automatically pick up vote changes in the proposal list.



  • klondike
  • Full Member

    • 157


    • -10
    • October 10, 2017, 09:00:24 AM
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #72 on: October 15, 2017, 05:03:21 PM »
No. PoSE does not run on windows.

You can hack Watchman to run on windows, but you would need to know python and you would be spearheading the project with absolutely no support.  At the very least, you should get your masternode running on linux first, then you could become  a windows hacker (otherwise I doubt you would have a chance at succeeding).

However,  if you did succeed I would be interested in running a windows sanctuary on one of my extra servers.
you want to run masternode without windows support?  :o it wont be good idea ... price for MNode will be how much?
« Last Edit: October 15, 2017, 05:04:52 PM by klondike »


  • jaapgvk
  • Hero Member

    • 558


    • 31
    • September 01, 2017, 08:02:57 PM
    • Netherlands
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #73 on: October 15, 2017, 05:07:25 PM »

- Vote from the Controller wallet if you run cold sanctuaries, vote from a hot wallet if you run a hot sanctuary

Okay. I found my problem ;D I was voting from the sanctuary walled instead of the controller wallet. Good to know.

All seems well now:
Code: [Select]
{
  "overall": "Voted successfully 1 time(s) and failed 0 time(s).",
  "detail": {
    "MN1": {
      "result": "success"
    }
  }
}

Quote
Next you can type 'gobject get gobjectid' if you did vote successfully to see the vote take effect.

The web site should now automatically pick up vote changes in the proposal list.

I did a gobject get and my vote shows up:

Code: [Select]
"FundingResult": {
    "AbsoluteYesCount": 3,
    "YesCount": 3,
    "NoCount": 0,
    "AbstainCount": 0

The pool hasn't updated my vote as of yet, but I'm guessing that won't take long.


  • Rob Andrews
  • Administrator

    • 4154


    • 97
    • June 05, 2017, 08:09:04 PM
    • Patmos, Island Of
    more
Re: BIBLEPAY - TESTNET THREAD - TESTING SANCTUARIES FOR GO LIVE AT CHRISTMAS
« Reply #74 on: October 15, 2017, 06:00:18 PM »
Lol, I did the same mistake as jaapgvk. :) All good, now my vote is in too:

Yeah, I see the 5 votes in my cold sanctuary now.
Why is the pool not showing 5... Hmm, let me debug the pool.