forked from SavvyBlockProject/MUE
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes for genesis block and mainnet test run
- Loading branch information
Showing
46 changed files
with
165 additions
and
119 deletions.
There are no files selected for viewing
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"address": "y1WbajfHb9oSntK7m1zfbA8SktM6AhRBmi", "balance": 56679820331603}, {"address": "xwkgZohhqnG9mnwHtvTGWjJXfYE4hASnwo", "balance": 310000000}, {"address": "yK9GaxT3JHwniSoZCfJrLDYgG9io49qbm2", "balance": 2500000}, {"address": "xwEvhW412ohbf6TWFEB8poVmhKy8GjnaF3", "balance": 320100000}, {"address": "y84jE1N1qzFpoag8b3m1p2akoyTWQBWHSt", "balance": 385000000}, {"address": "y7F98n6HAHETZUwQtNVrfy76vu4hY2mduU", "balance": 242500000}, {"address": "yE7xh5ECmY2diqJV8mfYieELS3vrgHQYzg", "balance": 327000000}, {"address": "yBmp3hJWVJd2LePeAMyrzZKrsRMJQA1iZa", "balance": 12500000}, {"address": "y41Vwexk3TpXd7su3EkKWGr4QbT6CdvkpM", "balance": 330100000}, {"address": "y8aWDSjhrXRqG8UKFVbPBJJxSVnRdEAeCf", "balance": 273000000}, {"address": "y7DcH1DAzqAtBBn1n9E7FE4Dnb5jU9A2ie", "balance": 2500000}, {"address": "yC9D8hQg6AHvQjXdoWMxuSHgYe5ygt2uzg", "balance": 3602823390}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException | ||
from itertools import islice | ||
import time | ||
import json | ||
|
||
# Breaks up dictionary into chunks | ||
def chunks(data, SIZE=1000): | ||
it = iter(data) | ||
for i in range(0, len(data), SIZE): | ||
yield {k:data[k] for k in islice(it, SIZE)} | ||
|
||
# Number of addresses per transaction in sendmany | ||
batch_size = 5 | ||
|
||
balances = json.load(open("balances.json","r")) | ||
|
||
# Make dictionary of addresses and decimal balances | ||
disbursals = {} | ||
total_amount = 0 | ||
for entry in balances: | ||
# Convert from satoshis to decimal value | ||
disbursals[entry['address']] = entry['balance'] / 100000000 | ||
total_amount += entry['balance'] / 100000000 | ||
|
||
print("Total amount to send: " + str(total_amount)) | ||
exit() | ||
|
||
# replace rpcuser and rpcpassword values for your local node to match helium.conf | ||
rpc_connection = AuthServiceProxy("http://%s:%s@%s:%s" % ('user', 'password', '127.0.0.1', '19688')) | ||
print(rpc_connection.getbalance()) | ||
|
||
# Chunking was not necessary since there were less than 800 transactions, | ||
# but would be for very large disbursals that may exceed maximum transaction size. | ||
# Premine funds were sent in advance manually to an address with Premine as the label. | ||
# If this had not been done, the default account of "" would have worked. | ||
for chunk in chunks(disbursals, batch_size): | ||
print(chunk) | ||
sendcoins = rpc_connection.sendmany("", chunk) | ||
time.sleep(10) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
### Qos ### | ||
|
||
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 19683, but not if the destination IP is within a LAN (defined as 192.168.x.x). | ||
This is a Linux bash script that will set up tc to limit the outgoing bandwidth for connections to the Bitcoin network. It limits outbound TCP traffic with a source or destination port of 19687, but not if the destination IP is within a LAN (defined as 192.168.x.x). | ||
|
||
This means one can have an always-on monetaryunitd instance running, and another local monetaryunitd/monetaryunit-qt instance which connects to this node and receives blocks from it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
192.99.217.102:19683 | ||
164.132.151.109:19683 | ||
192.99.217.102:19687 | ||
164.132.151.109:19687 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.