Post
Topic
Board Announcements (Altcoins)
Re: [NEW XBY ANN] XTRABYTES - INTEGRATIVE MODULAR BLOCKCHAIN INNOVATIONS
by
fishfishfish313
on 25/08/2017, 22:09:11 UTC


The new TESTNET wallet (with bugs fixed) has been compiled and another hard reset has just occurred. This means that we must wait for block 122 before transactions can start again and this is about 4 hours away... So, we will be picking things up again after some sleeps.

Thank you all for your patience as we work though this very interesting phase of XTRABYTES development!!

Dave, Borz and the TESTNET Crew!!







This week just keeps getting better and better.  I admit, I don't know much about how to test a network, but there are many in the Slack just chomping at the bit to run scripts on this thing.  It's exciting to just to be there and see people coming together to start thins thing.

I am one of those chomping at the bit. I want to punish this baby. Cheesy

From what I've seen we have a script that is capable of pushing the network, but I invite anyone with scripting/networking experience to look over what has been written so far and we can work to really put the TestNet through it's paces.

Here are the script(s), feel free to suggest any alterations:

xby-bot.py - written by smokim87
Code:
import requests
import json
 
def main():
    # default RPC port for XBY
    rpc_port = 35001
 
    # RPC credentials, as specified in xtrabytes.conf
    rpc_user = "testuser"
    rpc_password = "testpassword"
 
    # Generating the url from the specified credentials
    url = "http://" + rpc_user + ":" + rpc_password + "@localhost:" + str(rpc_port)
 
    # Setting the header
    headers = {'content-type': 'application/json'}
 
    # Specifying the recipients wallets. Although it might be easier to read from file/DB
    recipients = ['address1', 'address2', 'address3']
  
    # Set amount
    amount_to_send = 1000
 
    # Loop over the receiving addresses
    for recipient in recipients:
        # Example of sending the money transfer command
        payload = {
            "method": "sendtoaddress",
            "params": [recipient, amount_to_send],
            "jsonrpc": "2.0",
            "id": 0,
        }
 
        # Send the RPC request
        response = requests.post(
            url, data=json.dumps(payload), headers=headers).json()
  
        # Print the Response
        print(response.json()['result'])
 
if __name__ == "__main__":
    main()

There is also another:

testnet.php - written by gatuso
Code:
Ok guys you need to get this file:

https://raw.githubusercontent.com/aceat64/EasyBitcoin-PHP/master/easybitcoin.php

Save it to a folder. In the same folder save the code in a file testnet.php:

require_once('easybitcoin.php');

$rpcuser 'x';
$rpcpass 'y';
$port '35001';
$rpcip '127.0.0.1';

//$argv[0] name of file
//$argv[1]  address to send
//$argv[2]  amount to send
//$argv[3]  loop times

echo 'Begin';
echo 
'

'
;
echo 
'

'
;
$bitcoin = new Bitcoin($rpcuser,$rpcpass,$rpcip,$port);
$bitcoin->getaddressesbyaccount();
$address=null;

if(isset(
$bitcoin->response["result"][0]))
$address=$bitcoin->response["result"][0];

if(isset(
$argv[1]))
$address $argv[1];
else if(isset(
$address))
$address $bitcoin;
else{
echo "No address, no send"; die;
}


if(isset(
$argv[2]))
$amount $argv[2];
else
$amount 2;

if(isset(
$argv[3]))
$loop_times $argv[3];
else
$loop_times 1;

echo 
'Sending';
echo 
'

'
;
$tx = array();

for(
$i=0;$i<$loop_times;$i++)
{
$bitcoin->sendtoaddress($address,$amount);
array_push$tx,$bitcoin->response["result"] );
}

echo 
'Sent';
echo 
'

'
;
echo 
'TX:';
echo 
'

'
;
var_dump($tx);
echo 
'

'
;
echo 
'

'
;
echo 
'End';
?>


Then you can open shell and run: php testnet.php

You need PHP installed and configured in your OS.
I did this just now, not sure gonna work.

Again, if you have a script you think will test/punish the network, come forward in Slack and we will look at running it. Otherwise if you can think of any additions alterations to the code above then please don't be shy! This is an exciting time to be involved guys and it is very much a community effort at the moment.

Deserving of a BUMP.  I don't know how to write scripts, but I'm sure there are many here who do know how
The excitement is quite palpable.  You can feel it.
Happy and grateful to be here with everyone.

Nice!

Just want to give Credit to jasperrr91  from XBY slack for creating the python bot for me. I take no credit for it, all credit goes to him Smiley

Thanks for your contributions guys!!