Pages:
Author

Topic: [*] 8BIT [Dark Masternodes][Anon][Roadmap Stage 4] - page 26. (Read 379550 times)

full member
Activity: 147
Merit: 100
I am trying to write a script for my mns which will automatically select all reward inputs within each wallet (everything except for the initial 112 8bit mn deposit) and send them to my staking wallet. It is tedious and time-consuming to open each wallet in qt.

I'm assuming people have done this? If so, might anyone be willing to post a sample of their code?

Something to get you started. It's not exactly automated, but shouldn't take too much extra work to get it that step further.

coincontrol.php will give you an overview of all blocks in a wallet, and let you select which blocks to include in a transaction, as well as define an output address.
This will be passed on to createraw.php which will create the "createrawtransaction" string. NB This script will only display the transaction string. You will have to manually run the "createrawtransaction" string on the daemon (followed, of course, by "signrawtransaction" and "sendrawtransaction").

Code is provided as-is. Hope it helps.

coincontrol.php
Code:
$name="8Bit";
$user="rpcuser";
$pass="rpcpass";
$ip="127.0.0.1";
$port="18889";

class 
Coin {
  private 
$username;
  private 
$password;
  private 
$proto;
  private 
$host;
  private 
$port;
  private 
$url;
  public 
$status;
  public 
$error;
  public 
$raw_response;
  public 
$response;
  private 
$id 0;
  public function 
__construct($username$password$host 'localhost'$port 8332) {
    
$this->username    $username;
    
$this->password    $password;
    
$this->host      $host;
    
$this->port      $port;
  }
  public function 
__call($method$params) {
    
$this->status     null;
    
$this->error    null;
    
$this->raw_response null;
    
$this->response   null;
    
$params array_values($params);
    
$this->id++;
    
$request json_encode(array(
      
'method' => $method,
      
'params' => $params,
      
'id'   => $this->id));
    
$curl  curl_init("http://{$this->host}:{$this->port}/");
    
$options = array(
      
CURLOPT_HTTPAUTH     => CURLAUTH_BASIC,
      
CURLOPT_USERPWD    => $this->username ':' $this->password,
      
CURLOPT_RETURNTRANSFER => true,
      
CURLOPT_FOLLOWLOCATION => true,
      
CURLOPT_MAXREDIRS    => 10,
      
CURLOPT_HTTPHEADER   => array('Content-type: application/json'),
      
CURLOPT_POST       => true,
      
CURLOPT_POSTFIELDS   => $request);
    
curl_setopt_array($curl$options);
    
$this->raw_response curl_exec($curl);
    
$this->response   json_decode($this->raw_responsetrue);
    
$this->status curl_getinfo($curlCURLINFO_HTTP_CODE);
    
$curl_error curl_error($curl);
    
curl_close($curl);
    if (!empty(
$curl_error)) {
      
$this->error $curl_error;
    }
    if (
$this->response['error']) {
      
$this->error $this->response['error']['message'];
    } elseif (
$this->status != 200) {
      switch (
$this->status) {
        case 
400:
          
$this->error 'HTTP_BAD_REQUEST';
          break;
        case 
401:
          
$this->error 'HTTP_UNAUTHORIZED';
          break;
        case 
403:
          
$this->error 'HTTP_FORBIDDEN';
          break;
        case 
404:
          
$this->error 'HTTP_NOT_FOUND';
          break;
      }
    }
    if (
$this->error) {
      return 
false;
    }
    return 
$this->response['result'];
  }
}

echo 
"\n";
echo 
"\n";
echo 
"\n\n";
echo 
"\n";
echo 
"[Coin Control]\n\n\n";

echo 
$name."
\n";
echo 
"\n";
echo 
"\n";
echo 
"\n";
echo 
"\n";
echo 
"\n";
echo 
"\n";
echo 
"\n";


$coin = new Coin($user,$pass,$ip,$port);
$listunsentlist=$coin->listunspent();
foreach (
$listunsentlist as $listunspent) {
  
$txid=$listunspent["txid"];
  
$vout=$listunspent["vout"];
  
$account=$listunspent["account"];
  
$amount=$listunspent["amount"];
  
$confirm=$listunspent["confirmations"];
  echo 
"\n";
  echo 
"\n";
  echo 
"\n";
  echo 
"\n";
  echo 
"\n";
  echo 
"\n";
  echo 
"";
}

echo 
"
 AccountAmountTXIDvoutConfirmations
.$txid.":".$vout.":".$amount."'>".$account."".number_format($amount,8)."".$txid."".$vout."".$confirm."
\n"
;
echo 
"
Recipient: 
"
;
echo 
"\n";
echo 
"\n";
echo 
"

\n"
;
echo 
"\n";
mysqli_close($con);
?>

createraw.php
Code:
$tx=$_POST['tx'];
$addr=$_POST['addr'];
$in=0;
$am=0;
$rawstr="";
echo 
"\n";
echo 
"\n";
echo 
"\n\n";
echo 
"\n";
echo 
"[Raw Transaction]\n\n\n";

foreach (
$tx as $txs) {
  echo 
$txs."
"
;
  
$txdata=explode(":",$txs);
  
$txid=$txdata[0];
  
$vout=$txdata[1];
  
$amnt=$txdata[2];
  
$in=$in+1;
  
$am=$am+$amnt;
  if (
strlen($rawstr)==0) {
    
$rawstr="createrawtransaction '[{\"txid\":\"".$txid."\",\"vout\":".$vout."}";
  } else {
    
$rawstr=$rawstr.",{\"txid\":\"".$txid."\",\"vout\":".$vout."}";
  }
}
$rawstr=$rawstr."]'";
$txsize=$in*149 44;
$txfee=ceil($txsize/1000)*0.0001;
$txout=$am-$txfee;
$rawstr=$rawstr." '{\"".$addr."\":".$txout."}'";
echo 
"
Input count: "
.$in."
"
;
echo 
"Input amount: ".$am."
"
;
echo 
"TX Size: ".$txsize."
"
;
echo 
"TX Fee: ".$txfee."
"
;
echo 
"To be sent: ".$txout."
"
;
echo 
"".$rawstr."";

echo 
"

\n"
;
echo 
"\n";
?>
full member
Activity: 179
Merit: 100
How can I create a masternode?


Here:





Can someone drop a link to get a 8bit masternode running on Ubuntu? Thanks a lot!

Best instructions ever.
Just copy & paste.
From my experience if its a vm with not a lot ram or an old machine you should add a swap file (at least 4GB)

Once I wrote for myself the installation instructions, maybe it will come in handy.

1. Setting dependencies:
Code:
sudo apt-get install -y libminiupnpc-dev autoconf automake build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev

2. Installation secp256k1
Code:
cd ~&&git clone http://www.github.com/bitcoin/secp256k1&&cd  secp256k1&&git checkout a1d5ae1&&./autogen.sh&&./configure&&make&&sudo make install&&cd ..

3. Installing 8bit
Code:
cd ~&&git clone https://github.com/8bit-dev/8bit&&cd 8bit/src&&cp crypto obj/crypto -rR

Most likely, there will be an error in the assembly.
Therefore, you will need to fix ~/8bit/src/rpcrawtransaction.cpp

search for this line
                     const CScriptID& hash = boost::get(address);
It should work after changed to
                       const CScriptID& hash = boost::get(address);

Code:
make -f makefile.unix&&strip 8bitd&&sudo cp 8bitd /usr/bin

If everything went well and without errors, then you will have a console version of the wallet.
If you need the GUI:
1. Setting dependencies:
Code:
sudo apt-get install -y qt5-default qt5-qmake qtbase5-dev-tools qttools5-dev-tools build-essential libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-thread-dev libssl-dev libdb++-dev libminiupnpc-dev

2. Installing 8bit-qt
Code:
cd ~&&git clone https://github.com/8bit-dev/8bit&&cd 8bit/src&&cp crypto obj/crypto -rR&&cd ..&&qmake&&make

Masternode Creation on Linux
can anyone please post a tutorial on how to setup masternode on ubuntu ?

I will. This guide will assume you have already built and installed 8bitd for a user on Ubuntu 16.04, and that your blockchain is already synced. If you have not achieved these yet, refer to the guide on pg 263 of this thread.

Start 8bitd:
Code:
8bitd

Allow it some time to once again fully sync. Meanwhile, generate a new bitcoin address under account name "mn"
Code:
8bitd -cli getnewaddress mn

Send EXACTLY 112 8bit to this address. If you are sending from Cryptopia, you will need to send 113 8bit, as they have a 1 8bit/tx fee.

Now for the masternode setup.
1. Set a static ip for our computer. There are more than enough Ubuntu guides on this out there, so do a search. Remember the local ip chosen for the computer because it will be needed in a moment. You will need to restart networking or simply reboot after changing the  /etc/network/interfaces file for static ip.

2. Make sure the ports you want 8bit to work through are open between the internet and your computer. If you have a router between your machine and the internet you will need to forward the port through your router. You may do this by logging into your router configuration page, by typing your router's local ip address into any web browser connected to the network. For example, I typed "192.168.0.1", some may be "10.0.0.1", etc. (you can run "ifconfig" in terminal to find the "Default Gateway" ip address, same thing). Log in. If you've never logged in before do a search engine search to find the default login credentials specific to your router, mine were username "admin" password "admin", for example. Now that you are in the router config, look for the "Forwarding" or "Port Forwarding" tab/section, and add a new rule to pass the port you choose on to your wallet computer. For the sake of this guide I will choose port 9991. You want to enter your port number into both service port and external port (unless you know what you are doing, I am just simplifying here), and then you want to provide the local ip address of the computer that will be running the masternode. Now you can also optionally open a second port to enable rpc, here I will use port 2222. So you may have forwarded 2 ports of your computer. Make sure to enable these settings in the configuration before exiting. Phewph, that's that.

3. you want to open the actual ports on your Ubuntu machine now, using ufw:
Code:
sudo ufw allow 9991
Code:
sudo ufw allow 2222
(if you want rpc)

4. Go to whatsmyip.com and get your public ip address if you do not already know it. Write it down.

5. Go back to the terminal and type:
Code:
8bitd -cli masternode genkey
Copy the masternode private key, we'll need it shortly.

6. Now we need to edit the 8bit config file to enable the masternode service:
Code:
cd ~
nano .8bit/8bit.conf

You want all the following either added or uncommented in your config file:
Code:
rpcallowip=127.0.0.1 # if you want remote mgmt  
rpcuser=YourUserName  #can be anything
rpcpassword=YourRPCPassword  #can be anything
rpcport=2222  #whatever you set it to in router config
server=1
daemon=1
listen=1
staking=0
port=9991  #whatever you set it to in router config
masternodeaddr=YOUR_PUBLIC_IP:9991
masternode=1
masternodeprivkey=KEY GENERATED BY COMMAND masternode genkey

Change the information specific to your needs (public ip, ports, mnprivkey, etc). Save and exit the editor.

7. Now we're going to stop 8bitd:
Code:
8bitd stop
Give it a few moments to stop and then start it up again:
Code:
8bitd

If you get an error, you probably just did not give it enough time to close fully before restarting.

Let the wallet sync, check if the 112 8bit has arrived yet, and to see if you are fully synced:
Code:
8bitd -cli getinfo

The 112 8bit need 16 confirmations in order to successfully start the masternode, you can check on the block explorer or by using the command:
Code:
8bitd -cli gettransaction entertransactionhashhere

8. Once the 112 8bit have arrived and are confirmed by at least 16 nodes, only one command remains:

Code:
8bitd -cli masternode start

There you go.

You ought to see the following output:
Code:
Masternode started successfully
or, oddly, sometimes:
Code:
Masternode started remotely

Pat yourself on the back.

Tips: 8Sq5sDR5mHUEAtsJoJurrjUSu7E3QsCuop




full member
Activity: 179
Merit: 100
I am trying to write a script for my mns which will automatically select all reward inputs within each wallet (everything except for the initial 112 8bit mn deposit) and send them to my staking wallet. It is tedious and time-consuming to open each wallet in qt.

I'm assuming people have done this? If so, might anyone be willing to post a sample of their code?
member
Activity: 350
Merit: 11
 Grin Good wallet, the potential of this coin is huge, the old coins for several years, the roadmap to phase 4, it seems that the development of good, investors excited?
full member
Activity: 322
Merit: 100
I am Joe Blow, the lover man! You should pay me.
ok, maybe someone can tell me the max amount for this coin. i know it's around 1.1mil circulating but what will be the max amount?
full member
Activity: 179
Merit: 100
Could someone explain best strategy for staking wallet piles?

Supposing I had 1000 8bit to stake, is it best to have one pile, two, 3, 4, etc? Does it make any difference.

Thanks.

Coin-weight is fixed, ie as long as the coins have matured (4 hours), they have an equal chance of staking no matter how old they are....

Got it, thank you.
full member
Activity: 225
Merit: 100
What roadmap ? Where can I read about the roadmap ? 
how many stage we have ? how long it takes to finish the fork and implement the new masternodes ?


newbie
Activity: 40
Merit: 0
New roadmap for the fourth stage of the project. Well done, dev. Thank you very much for your time that you spent for the project.
full member
Activity: 147
Merit: 100
Could someone explain best strategy for staking wallet piles?

Supposing I had 1000 8bit to stake, is it best to have one pile of 1000, two piles of 500, 4 of 250, or 8 of 125, etc? Does it make any difference.

Thanks.

Coin-weight is fixed, ie as long as the coins have matured (4 hours), they have an equal chance of staking no matter how old they are (also means that the more time online your wallet is, the more block you will stake).

With that in mind, splitting or not shouldn't make much of a difference, except a little initially.

If you have 1,000 coins in one block, when they stake you will have 0 coin weight for 4 hrs, and afterwards have 2 coin blocks of 500 (500.16 to be exact).

If you split your 1,000 coins into 8 blocks of 125, your stake chance will of course be the same (coin weight = 1,000), but when you stake only 125 coin weight will be destroyed untill the 2 new 62.5 coin blocks have  been matured. Ie for the 4 hrs you will still have a coin weight of 875, which of course improves your chances of a new block a little.

But whichever strategy  you use, soon your coins will be split into smaller and smaller blocks, and the whole thing will be moot, as you will have many smaller blocks.
full member
Activity: 179
Merit: 100
Could someone explain best strategy for staking wallet piles?

Supposing I had 1000 8bit to stake, is it best to have one pile of 1000, two piles of 500, 4 of 250, or 8 of 125, etc? Does it make any difference.

Thanks.
full member
Activity: 219
Merit: 100
I've rethunked my initial statement about the new mns requiring more 8bit to run than 112 (which is current amount). I have to say I kind of dig having a lot of mns running at once it makes things interesting... how many will each mn require in new release? If it goes up to 1000 or something I only can run 1 :-S    also, Will new 8bitd require 500 mb RAM still :-) ? That would be cool because I'm overflowing with it at this point.

This is still open question (current proposal of collateral is 1024 coins). There are two concurrent objectives:
- security: cheap masternode means people will not stake what introduces a security issue for the network
- fair distribution: expensive masternodes means only small group of people will collect great rewards

However, it can be also balanced using block reward and MN/stake reward ratio (block reward - current proposal 1 coin [current value: 1.2], MN reward - 0.80 [current value: 0.88]). As we can see, inflation will be slightly reduced, though MN will be still much more profitable than staking. This effect is currently mitigated because of no MN payment enforcement, however, with a new code base those payments will be enforced and MN profitability will be stunning. What is not cool from network security perspective. Therefore - I keep this topic open and and I am looking forward for your (not only r8st) feedback.



I do like the idea of 1024 coins for a masternode... puts us on par with some of the bigger coins. I am a bit confused though... right now, mn requires 112 coins and I get mn rewards of .88 coins. If the mn increases to 1024 coins, are you saying that i'd just receive .8 coins? Wouldn't this go up with the increase in mn required coins? Now, i'd be able to run about 9 mn's, which means .88 * 9 = 7.92 coins. Am I missing something (probably am)?

8BIT supply is fixed, every block X coins is minted (though we will introduce a halving and a cap to make the coin deflationary). With the MN worth 112 coins there are 300+ MNs, when we will bump the collateral to 1000, then number of all masternodes will be 9x smaller, therefore your income will stay unchanged. This is simplification though, since not all MN owners run 9+ MNs, therefore either they will spend more 8BITs to run one MN or they will be forced to switch into staking (what is good from the network security point of view and bad from new coin allocation & MN services distribution perspectives).

TL;DR: if you own 9+ masternodes now, you will have one masternode after the fork while your income will stay the same.

Note that this explanation covers MN collateral only, it does not take MN reward change into account. Neither it takes extra income from those who had "cheap" <9 masternodes and will give up collection of more coins to run a single "expensive" masternode.




Ok, that makes sense. Thanks for the explanation.
legendary
Activity: 1036
Merit: 1000
8b 16b DEMOSCENE FTW
I've rethunked my initial statement about the new mns requiring more 8bit to run than 112 (which is current amount). I have to say I kind of dig having a lot of mns running at once it makes things interesting... how many will each mn require in new release? If it goes up to 1000 or something I only can run 1 :-S    also, Will new 8bitd require 500 mb RAM still :-) ? That would be cool because I'm overflowing with it at this point.

This is still open question (current proposal of collateral is 1024 coins). There are two concurrent objectives:
- security: cheap masternode means people will not stake what introduces a security issue for the network
- fair distribution: expensive masternodes means only small group of people will collect great rewards

However, it can be also balanced using block reward and MN/stake reward ratio (block reward - current proposal 1 coin [current value: 1.2], MN reward - 0.80 [current value: 0.88]). As we can see, inflation will be slightly reduced, though MN will be still much more profitable than staking. This effect is currently mitigated because of no MN payment enforcement, however, with a new code base those payments will be enforced and MN profitability will be stunning. What is not cool from network security perspective. Therefore - I keep this topic open and and I am looking forward for your (not only r8st) feedback.



I do like the idea of 1024 coins for a masternode... puts us on par with some of the bigger coins. I am a bit confused though... right now, mn requires 112 coins and I get mn rewards of .88 coins. If the mn increases to 1024 coins, are you saying that i'd just receive .8 coins? Wouldn't this go up with the increase in mn required coins? Now, i'd be able to run about 9 mn's, which means .88 * 9 = 7.92 coins. Am I missing something (probably am)?

8BIT supply is fixed, every block X coins is minted (though we will introduce a halving and a cap to make the coin deflationary). With the MN worth 112 coins there are 300+ MNs, when we will bump the collateral to 1000, then number of all masternodes will be 9x smaller, therefore your income will stay unchanged. This is simplification though, since not all MN owners run 9+ MNs, therefore either they will spend more 8BITs to run one MN or they will be forced to switch into staking (what is good from the network security point of view and bad from new coin allocation & MN services distribution perspectives).

TL;DR: if you own 9+ masternodes now, you will have one masternode after the fork while your income will stay the same.

Note that this explanation covers MN collateral only, it does not take MN reward change into account. Neither it takes extra income from those who had "cheap" <9 masternodes and will give up collection of more coins to run a single "expensive" masternode.


full member
Activity: 219
Merit: 100
I've rethunked my initial statement about the new mns requiring more 8bit to run than 112 (which is current amount). I have to say I kind of dig having a lot of mns running at once it makes things interesting... how many will each mn require in new release? If it goes up to 1000 or something I only can run 1 :-S    also, Will new 8bitd require 500 mb RAM still :-) ? That would be cool because I'm overflowing with it at this point.

This is still open question (current proposal of collateral is 1024 coins). There are two concurrent objectives:
- security: cheap masternode means people will not stake what introduces a security issue for the network
- fair distribution: expensive masternodes means only small group of people will collect great rewards

However, it can be also balanced using block reward and MN/stake reward ratio (block reward - current proposal 1 coin [current value: 1.2], MN reward - 0.80 [current value: 0.88]). As we can see, inflation will be slightly reduced, though MN will be still much more profitable than staking. This effect is currently mitigated because of no MN payment enforcement, however, with a new code base those payments will be enforced and MN profitability will be stunning. What is not cool from network security perspective. Therefore - I keep this topic open and and I am looking forward for your (not only r8st) feedback.



I do like the idea of 1024 coins for a masternode... puts us on par with some of the bigger coins. I am a bit confused though... right now, mn requires 112 coins and I get mn rewards of .88 coins. If the mn increases to 1024 coins, are you saying that i'd just receive .8 coins? Wouldn't this go up with the increase in mn required coins? Now, i'd be able to run about 9 mn's, which means .88 * 9 = 7.92 coins. Am I missing something (probably am)?
legendary
Activity: 1036
Merit: 1000
8b 16b DEMOSCENE FTW
I've rethunked my initial statement about the new mns requiring more 8bit to run than 112 (which is current amount). I have to say I kind of dig having a lot of mns running at once it makes things interesting... how many will each mn require in new release? If it goes up to 1000 or something I only can run 1 :-S    also, Will new 8bitd require 500 mb RAM still :-) ? That would be cool because I'm overflowing with it at this point.

This is still open question (current proposal of collateral is 1024 coins). There are two concurrent objectives:
- security: cheap masternode means people will not stake what introduces a security issue for the network
- fair distribution: expensive masternodes means only small group of people will collect great rewards

However, it can be also balanced using block reward and MN/stake reward ratio (block reward - current proposal 1 coin [current value: 1.2], MN reward - 0.80 [current value: 0.88]). As we can see, inflation will be slightly reduced, though MN will be still much more profitable than staking. This effect is currently mitigated because of no MN payment enforcement, however, with a new code base those payments will be enforced and MN profitability will be stunning. What is not cool from network security perspective. Therefore - I keep this topic open and and I am looking forward for your (not only r8st) feedback.

full member
Activity: 179
Merit: 100
There is almost no update on the Github. What's wrong with the development team, stop working?. Investors holding a pile of tokens waiting to see the performance, this coin is worth your expectation? Who studies the currency project more deeply, please give some suggestions, thank you!

Suggestions appreciated here too. I've been slowly accumulating mns over time but I've been in since price was .0001, I am unable to profit with decline. What was .1btc is now .03 Sad

I thought maybe rebound up from .000025 but there seems to be nearly endless 8bit people are trying to dish out.

I got in at the wrong time.

Here's to wishing I could get in now
full member
Activity: 179
Merit: 100
I'm a coder and can help out with this coin if you need it.
Let's take up a quick challenge - please build your own pivx win64 executable using cross-compilation on ubuntu 16/17. The incoming release is forked from it, so if you are able to do it then, for sure, it's obvious we need you on board.


I've rethunked my initial statement about the new mns requiring more 8bit to run than 112 (which is current amount). I have to say I kind of dig having a lot of mns running at once it makes things interesting... how many will each mn require in new release? If it goes up to 1000 or something I only can run 1 :-S    also, Will new 8bitd require 500 mb RAM still :-) ? That would be cool because I'm overflowing with it at this point.
newbie
Activity: 18
Merit: 0
I'm a coder and can help out with this coin if you need it.
Let's take up a quick challenge - please build your own pivx win64 executable using cross-compilation on ubuntu 16/17. The incoming release is forked from it, so if you are able to do it then, for sure, it's obvious we need you on board.


Ok, sure. Which version of PIVX are you looking for?

v3.0 and higher they have been experiencing a lot of problems. After the implementation of zerocoin protocol.

v2.3.1 and earlier were a lot more stable
legendary
Activity: 1036
Merit: 1000
8b 16b DEMOSCENE FTW
I'm a coder and can help out with this coin if you need it.
Let's take up a quick challenge - please build your own pivx win64 executable using cross-compilation on ubuntu 16/17. The incoming release is forked from it, so if you are able to do it then, for sure, it's obvious we need you on board.
full member
Activity: 490
Merit: 100


8-bit-party, can you get a github repo and slack or discord channel going?

I'm a coder and can help out with this coin if you need it.

There is already a slack: go8bit.slack.com
But with slack you have to invite people with email now, probably because of all the spam in last months

thanks for the link

yes it is saying invite required, do you know who is admin of the group? can they send out an invite?

can someone invite me too ??

where is the invite link ,i want to join community too,8BIT  is a great project ,don't miss the train.
full member
Activity: 670
Merit: 130


8-bit-party, can you get a github repo and slack or discord channel going?

I'm a coder and can help out with this coin if you need it.

There is already a slack: go8bit.slack.com
But with slack you have to invite people with email now, probably because of all the spam in last months

thanks for the link

yes it is saying invite required, do you know who is admin of the group? can they send out an invite?

can someone invite me too ??
Pages:
Jump to: