diff --git a/.gitignore b/.gitignore index f7ff5cd2..d023ea82 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ docker_data/ browser/bcoin* package-lock.json npm-debug.log +.DS_Store diff --git a/README.md b/README.md index 4f1ccc12..a1e1c88a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Bcoin +# Lcoin (Bcoin ported to Litecoin) __NOTE__: The latest release of bcoin contains a non-backward compatible change to the rest API. Please read the [changelog]'s "migrating" section for more @@ -6,13 +6,9 @@ details. --- -**Bcoin** is an alternative implementation of the bitcoin protocol, written in +**Lcoin** is an alternative implementation of the bitcoin protocol, written in node.js. -Although still in a beta state, bcoin is well tested and aware of all known -consensus rules. It is currently used in production as the consensus backend -and wallet system for [purse.io][purse]. - ## Uses - Full Node @@ -27,10 +23,10 @@ Try it in the browser: http://bcoin.io/browser.html ## Install ``` -$ git clone git://github.com/bcoin-org/bcoin.git -$ cd bcoin +$ git clone git://github.com/bcoin-org/lcoin.git +$ cd lcoin $ npm install -$ ./bin/bcoin +$ ./bin/lcoin ``` See the [Beginner's Guide][guide] for more in-depth installation instructions. @@ -47,7 +43,7 @@ Join us on [freenode][freenode] in the [#bcoin][irc] channel. ## Disclaimer -Bcoin does not guarantee you against theft or lost funds due to bugs, mishaps, +Lcoin does not guarantee you against theft or lost funds due to bugs, mishaps, or your own incompetence. You and you alone are responsible for securing your money. diff --git a/bin/cli b/bin/cli index ef04e66f..eb51cb87 100755 --- a/bin/cli +++ b/bin/cli @@ -12,14 +12,14 @@ const ANTIREPLAY = '' + '220456c656374726f6e696320436173682053797374656d'; function CLI() { - this.config = new Config('bcoin'); + this.config = new Config('lcoin'); this.config.load({ argv: true, env: true }); - this.config.open('bcoin.conf'); + this.config.open('lcoin.conf'); this.argv = this.config.argv; this.client = null; diff --git a/bin/bcoin b/bin/lcoin similarity index 100% rename from bin/bcoin rename to bin/lcoin diff --git a/bin/node b/bin/node index 3ed9a5ee..c70e7b26 100755 --- a/bin/node +++ b/bin/node @@ -2,7 +2,7 @@ 'use strict'; -process.title = 'bcoin'; +process.title = 'lcoin'; if (process.argv.indexOf('--help') !== -1 || process.argv.indexOf('-h') !== -1) { diff --git a/bin/spvnode b/bin/spvnode index 71fae73e..fb149343 100755 --- a/bin/spvnode +++ b/bin/spvnode @@ -2,7 +2,7 @@ 'use strict'; -process.title = 'bcoin'; +process.title = 'lcoin'; const assert = require('assert'); const SPVNode = require('../lib/node/spvnode'); diff --git a/browser/server.js b/browser/server.js index 9d914fbf..94478551 100644 --- a/browser/server.js +++ b/browser/server.js @@ -12,7 +12,7 @@ const worker = fs.readFileSync(`${__dirname}/bcoin-worker.js`); const proxy = new WSProxy({ pow: process.argv.indexOf('--pow') !== -1, - ports: [8333, 18333, 18444, 28333, 28901] + ports: [9333, 19335, 19444, 28333, 28901] }); const server = new HTTPBase({ diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index f83555c1..4a31dfcf 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -2302,7 +2302,12 @@ Chain.prototype.getTarget = async function getTarget(time, prev) { } // Back 2 weeks - const height = prev.height - (pow.retargetInterval - 1); + var back = pow.retargetInterval - 1; + + if (prev.height + 1 !== pow.retargetInterval) + back = pow.retargetInterval; + + const height = prev.height - back; assert(height >= 0); const first = await this.getAncestor(prev, height); diff --git a/lib/btc/uri.js b/lib/btc/uri.js index fa44142d..c60270df 100644 --- a/lib/btc/uri.js +++ b/lib/btc/uri.js @@ -98,7 +98,7 @@ URI.prototype.fromString = function fromString(str, network) { const prefix = str.substring(0, 8); - assert(prefix === 'bitcoin:', 'Not a bitcoin URI.'); + assert(prefix === 'litecoin:', 'Not a bitcoin URI.'); str = str.substring(8); @@ -154,7 +154,7 @@ URI.fromString = function fromString(str, network) { */ URI.prototype.toString = function toString() { - let str = 'bitcoin:'; + let str = 'litecoin:'; str += this.address.toString(); diff --git a/lib/mining/mine.js b/lib/mining/mine.js index 464c1c3a..fe6b73be 100644 --- a/lib/mining/mine.js +++ b/lib/mining/mine.js @@ -7,7 +7,7 @@ 'use strict'; const assert = require('assert'); -const digest = require('../crypto/digest'); +const scrypt = require('../crypto/scrypt').derive; /** * Hash until the nonce overflows. @@ -27,7 +27,7 @@ function mine(data, target, min, max) { // The heart and soul of the miner: match the target. while (nonce <= max) { // Hash and test against the next target. - if (rcmp(digest.hash256(data), target) <= 0) + if (rcmp(powHash(data), target) <= 0) return nonce; // Increment the nonce to get a different hash. @@ -40,6 +40,16 @@ function mine(data, target, min, max) { return -1; } +/** + * Proof of work function. + * @param {Buffer} data + * @returns {Buffer} + */ + +function powHash(data) { + return scrypt(data, data, 1024, 1, 1, 32); +} + /** * "Reverse" comparison so we don't have * to waste time reversing the block hash. diff --git a/lib/mining/template.js b/lib/mining/template.js index a1a3477b..d03dd85e 100644 --- a/lib/mining/template.js +++ b/lib/mining/template.js @@ -23,6 +23,7 @@ const encoding = require('../utils/encoding'); const CoinView = require('../coins/coinview'); const Script = require('../script/script'); const common = require('./common'); +const scrypt = require('../crypto/scrypt').derive; const DUMMY = Buffer.alloc(0); /** @@ -418,7 +419,7 @@ BlockTemplate.prototype.getHeader = function getHeader(root, time, nonce) { BlockTemplate.prototype.getProof = function getProof(nonce1, nonce2, time, nonce) { const root = this.getRoot(nonce1, nonce2); const data = this.getHeader(root, time, nonce); - const hash = digest.hash256(data); + const hash = scrypt(data, data, 1024, 1, 1, 32); return new BlockProof(hash, root, nonce1, nonce2, time, nonce); }; diff --git a/lib/net/seeds/main.js b/lib/net/seeds/main.js index 9cdf0cd1..ce5f5105 100644 --- a/lib/net/seeds/main.js +++ b/lib/net/seeds/main.js @@ -1,1172 +1,224 @@ 'use strict'; module.exports = [ - '2.7.8.12:8333', - '2.228.70.198:8333', - '5.39.64.7:8333', - '5.45.80.34:38333', - '5.51.160.38:8333', - '5.61.33.33:8333', - '5.61.37.12:8333', - '5.95.80.47:8333', - '5.102.164.173:8333', - '5.175.71.130:8333', - '5.189.165.22:8333', - '5.199.130.228:8333', - '5.228.100.222:8333', - '5.255.64.231:8333', - '13.93.6.133:8333', - '18.85.34.10:8333', - '18.241.0.63:8333', - '23.28.128.65:8333', - '23.248.113.52:8333', - '23.253.151.73:8333', - '24.4.96.121:8333', - '24.69.65.191:8333', - '24.87.8.43:8333', - '24.150.224.110:8333', - '24.227.69.146:8333', - '27.0.235.33:8333', - '31.170.106.203:8333', - '31.184.197.96:8333', - '31.214.240.56:8333', - '37.1.202.134:8333', - '37.18.74.232:8333', - '37.34.48.17:8333', - '37.48.64.140:8333', - '37.97.141.116:8333', - '37.120.164.16:8333', - '37.120.169.123:8333', - '37.143.9.128:8333', - '37.153.172.227:8333', - '37.193.227.16:8333', - '37.205.8.78:8333', - '37.220.0.114:8333', - '37.232.218.199:8333', - '38.140.161.53:8333', - '40.87.70.120:8333', - '41.162.163.93:8333', - '42.2.198.48:8333', - '45.20.67.1:8333', - '45.55.197.77:8333', - '45.56.97.63:8333', - '45.58.38.162:8333', - '45.63.1.33:8333', - '45.79.2.70:8333', - '46.16.240.98:8333', - '46.19.137.74:8333', - '46.28.206.146:8333', - '46.32.252.197:8333', - '46.59.13.59:8333', - '46.59.39.195:8333', - '46.148.16.210:8333', - '46.160.195.121:8333', - '46.166.142.21:8333', - '46.166.160.29:8330', - '46.188.44.20:8333', - '46.229.238.187:8333', - '46.231.16.149:8333', - '47.88.100.130:8333', - '47.89.192.134:8333', - '47.185.194.160:8333', - '47.189.129.218:8333', - '49.65.2.140:8333', - '50.3.72.129:8333', - '50.31.99.225:8333', - '51.175.33.95:8333', - '52.1.165.219:8333', - '52.10.170.186:8333', - '52.51.128.216:8333', - '54.197.130.244:8333', - '58.59.2.22:8333', - '58.84.6.81:8333', - '59.125.8.143:8333', - '59.167.130.139:8333', - '61.47.2.20:8333', - '62.43.130.178:8333', - '62.76.96.6:8333', - '62.107.200.30:8333', - '62.133.15.58:8333', - '62.133.194.2:8333', - '62.133.194.156:8333', - '62.138.1.95:8333', - '62.216.238.3:8333', - '62.238.34.125:8333', - '63.137.40.207:8333', - '63.231.96.109:8333', - '64.78.240.150:8333', - '64.83.225.146:8333', - '64.137.236.68:8833', - '64.156.193.120:8333', - '66.79.160.82:8333', - '66.91.230.231:8333', - '66.135.128.121:8333', - '66.172.10.4:8333', - '66.194.38.250:8333', - '66.194.38.253:8333', - '66.215.34.26:8333', - '66.240.237.155:8333', - '67.205.96.108:8333', - '67.205.128.5:8333', - '67.219.233.140:8333', - '67.221.193.55:8333', - '68.100.196.118:8333', - '68.132.193.222:8333', - '68.168.118.234:8333', - '69.11.97.43:8333', - '69.30.229.10:8333', - '69.50.171.205:8333', - '69.125.193.145:8333', - '69.162.139.125:8333', - '70.35.98.39:8333', - '70.112.32.29:8333', - '71.126.181.146:8333', - '72.180.32.105:8333', - '73.226.64.145:8333', - '74.83.140.242:8333', - '74.84.128.158:9333', - '74.122.237.124:8333', - '74.215.133.145:8333', - '75.76.101.169:8333', - '75.85.13.8:8333', - '75.86.168.13:8333', - '75.170.97.25:8333', - '75.177.137.134:8333', - '76.76.227.136:8333', - '77.53.136.6:8333', - '77.110.11.52:8333', - '78.25.32.206:8333', - '78.34.8.120:8333', - '78.46.32.99:8333', - '78.56.9.214:8333', - '78.56.229.177:8333', - '78.129.237.245:8333', - '78.196.172.45:8333', - '79.132.230.144:8333', - '79.169.35.235:8333', - '79.172.194.219:8333', - '80.64.65.87:8333', - '80.89.137.115:8333', - '80.93.36.173:8333', - '80.101.167.100:8333', - '80.114.34.158:8333', - '80.127.136.50:8333', - '80.188.139.82:8333', - '80.222.39.77:8333', - '80.223.105.69:8333', - '80.229.151.187:8333', - '80.240.129.221:8333', - '81.7.10.238:8333', - '81.7.13.84:8333', - '81.27.96.92:8333', - '81.35.143.98:8333', - '81.82.201.5:8333', - '81.83.96.5:8333', - '81.169.227.36:8333', - '81.171.2.119:8333', - '81.171.38.130:8333', - '81.175.255.118:8333', - '81.207.8.49:8333', - '81.228.194.187:8333', - '82.9.1.77:8333', - '82.11.33.229:8333', - '82.102.13.117:8333', - '82.116.203.240:8333', - '82.130.103.16:8333', - '82.136.65.227:8333', - '82.158.227.238:8333', - '82.197.212.25:8333', - '82.199.102.10:8333', - '82.200.204.41:8333', - '82.200.204.119:8333', - '82.221.105.223:8333', - '82.221.108.27:8333', - '82.221.111.136:8333', - '82.221.139.97:8333', - '83.137.41.10:8333', - '83.143.130.19:8333', - '83.150.9.196:8333', - '83.169.2.43:8333', - '83.217.203.130:8333', - '83.249.88.52:8333', - '84.26.162.92:8333', - '84.42.193.6:8333', - '84.134.194.115:8333', - '84.201.32.115:8333', - '84.212.232.71:8333', - '84.238.140.176:8333', - '85.10.104.34:8333', - '85.21.144.226:8333', - '85.25.194.12:8333', - '85.144.79.190:8333', - '85.145.228.192:8333', - '85.194.238.130:8333', - '85.228.201.80:8333', - '85.229.228.174:8333', - '85.236.233.87:8333', - '86.80.204.185:8333', - '86.105.227.190:8333', - '86.135.39.40:8333', - '87.106.139.127:8333', - '87.120.8.5:8333', - '87.120.37.230:8333', - '87.239.101.102:8333', - '87.243.197.82:8333', - '88.112.112.173:8333', - '88.150.192.17:8333', - '88.185.155.134:8333', - '88.202.202.221:8333', - '88.202.230.87:8333', - '88.208.39.182:8333', - '89.34.99.41:8333', - '89.163.224.187:8333', - '89.169.233.150:8333', - '89.184.65.85:8333', - '89.212.91.219:8333', - '89.249.178.36:8333', - '90.149.38.172:8333', - '91.65.97.157:8333', - '91.107.64.143:8333', - '91.114.35.107:8333', - '91.135.0.187:8333', - '91.145.110.95:8333', - '91.157.38.151:8333', - '91.197.44.133:8333', - '91.205.176.54:8333', - '91.206.203.10:8333', - '91.206.203.18:8333', - '91.215.35.130:8333', - '91.219.239.159:8333', - '91.223.133.2:8333', - '91.223.133.40:8333', - '91.226.10.90:8333', - '91.240.141.169:8333', - '92.27.7.209:8333', - '92.89.67.207:8333', - '92.221.201.138:8333', - '93.95.187.122:8333', - '93.103.73.187:8333', - '93.123.80.47:8333', - '93.188.224.253:8333', - '93.190.69.242:8333', - '94.19.12.244:8333', - '94.156.128.116:8333', - '94.177.171.73:8333', - '94.181.44.104:8333', - '94.237.26.173:8333', - '94.242.229.158:8333', - '94.255.128.98:8333', - '95.79.35.50:8333', - '95.91.41.39:8333', - '95.110.234.93:8333', - '95.128.48.209:8333', - '95.183.48.71:8333', - '96.23.67.85:8333', - '97.64.177.10:8333', - '97.104.201.95:8333', - '98.29.197.149:8333', - '98.169.2.107:8333', - '99.232.48.72:8333', - '101.100.141.55:8333', - '103.7.32.40:8333', - '103.53.225.69:8333', - '103.249.106.74:8333', - '104.128.224.13:8333', - '104.128.228.252:8333', - '104.155.1.158:8333', - '104.168.128.50:8333', - '104.199.160.228:8333', - '104.204.109.11:8333', - '104.219.251.118:8333', - '104.223.3.129:8333', - '104.223.3.219:8333', - '104.238.130.182:8333', - '104.245.99.227:8333', - '106.38.234.89:8333', - '106.104.134.218:8333', - '107.136.6.71:8333', - '107.150.45.210:8333', - '107.151.144.103:8333', - '107.170.44.99:8333', - '107.181.137.133:8333', - '107.191.102.13:8333', - '108.58.252.82:8333', - '108.59.9.167:8333', - '108.59.12.163:8333', - '108.162.106.215:8333', - '108.168.133.164:8333', - '108.173.202.101:8333', - '108.180.110.190:8333', - '109.29.75.40:8333', - '109.120.194.136:8333', - '109.230.230.88:8333', - '109.235.67.115:8333', - '109.235.69.120:8333', - '109.236.90.199:8333', - '109.255.0.107:8333', - '110.10.130.12:8333', - '110.10.176.94:8333', - '110.132.172.251:8333', - '111.90.158.17:8333', - '115.66.205.171:8333', - '116.31.123.139:8333', - '118.192.48.46:8333', - '118.193.164.98:8333', - '119.29.156.231:8333', - '119.63.44.133:19980', - '119.81.99.27:8333', - '119.106.12.169:8333', - '119.147.137.155:19980', - '119.185.1.182:8333', - '120.55.193.136:8333', - '121.254.173.23:8333', - '121.254.173.40:8333', - '123.56.129.45:8333', - '123.203.163.128:8333', - '123.206.32.198:8333', - '124.189.160.221:8333', - '124.189.192.232:8333', - '128.140.224.162:8333', - '128.199.68.205:8333', - '130.234.207.115:8333', - '131.113.41.123:8333', - '131.114.72.104:8333', - '132.204.108.155:8333', - '134.119.13.230:8333', - '134.213.133.206:8333', - '134.213.133.207:8333', - '135.23.5.3:8333', - '137.74.0.66:8333', - '138.68.1.45:8333', - '138.68.2.194:8333', - '138.68.64.19:8333', - '138.68.64.28:8333', - '139.59.42.248:8333', - '139.220.240.153:8333', - '140.112.107.118:8333', - '140.186.224.112:8333', - '141.52.64.141:8333', - '142.68.237.107:8333', - '142.217.12.106:8333', - '146.60.204.92:8333', - '146.185.161.209:8333', - '148.103.7.119:8333', - '149.210.133.244:8333', - '150.229.0.143:8333', - '151.231.238.25:8333', - '151.248.160.227:8333', - '153.230.228.15:8333', - '155.133.43.249:8333', - '158.58.238.145:8333', - '158.109.79.13:34821', - '159.203.70.208:8333', - '160.16.206.31:8333', - '162.209.1.233:8333', - '162.209.4.125:8333', - '162.216.192.231:8333', - '162.243.100.111:8333', - '162.246.11.194:8333', - '162.248.102.117:8333', - '162.252.46.83:8333', - '163.172.33.78:8333', - '163.172.194.30:8333', - '169.229.198.106:8333', - '170.75.195.168:8333', - '172.103.205.197:8333', - '172.245.225.126:8333', - '173.179.37.8:8333', - '173.208.203.74:8333', - '173.252.46.16:8333', - '174.117.141.124:8333', - '175.126.38.158:8333', - '175.126.38.177:8333', - '175.139.106.119:8333', - '175.140.232.66:8333', - '176.9.117.100:8333', - '176.36.33.121:8333', - '176.36.99.222:8333', - '176.56.227.36:8333', - '176.100.100.206:8333', - '176.106.144.183:8333', - '176.123.7.148:8333', - '176.126.167.10:8333', - '176.223.201.198:8333', - '178.62.68.62:8333', - '178.62.102.56:8333', - '178.62.203.185:8333', - '178.124.197.101:8333', - '178.170.138.202:8333', - '178.175.129.18:8333', - '178.188.47.62:8333', - '178.199.240.22:8333', - '178.218.209.162:8333', - '178.237.35.34:8333', - '178.238.224.242:8333', - '178.254.34.144:8333', - '178.254.34.161:8333', - '179.43.183.2:8333', - '180.200.128.58:8333', - '182.93.34.130:8333', - '185.8.238.197:8333', - '185.11.139.172:8333', - '185.24.97.11:8333', - '185.24.233.100:8333', - '185.25.48.71:8333', - '185.25.48.114:8333', - '185.28.76.179:8333', - '185.70.105.152:8339', - '185.77.128.69:8333', - '185.77.128.241:8333', - '185.86.79.87:8333', - '185.89.102.2:3333', - '185.89.102.53:3333', - '185.109.144.155:8333', - '185.117.75.50:8333', - '185.121.173.223:8333', - '185.128.41.157:8333', - '185.130.226.106:8333', - '185.145.130.76:8333', - '188.63.192.104:8333', - '188.113.164.231:8333', - '188.166.229.112:8333', - '188.214.128.77:8333', - '190.10.8.211:8333', - '190.81.160.184:8333', - '190.111.231.19:8333', - '192.131.44.93:8333', - '192.206.202.6:8333', - '192.227.245.133:8333', - '192.241.74.123:8333', - '192.241.74.126:8333', - '192.254.71.222:8333', - '193.10.64.85:8333', - '193.46.80.101:8333', - '193.49.43.219:8333', - '193.93.79.215:8333', - '193.183.99.46:8333', - '193.234.224.195:8333', - '193.239.80.155:8333', - '194.63.140.208:8333', - '194.87.1.232:8333', - '194.187.227.18:8333', - '194.247.12.136:8333', - '195.91.176.86:8333', - '196.28.98.20:8333', - '198.44.249.35:8333', - '198.84.172.252:8333', - '198.204.224.106:8333', - '198.211.97.46:8333', - '199.66.64.198:8333', - '199.101.100.58:8333', - '199.101.100.59:8333', - '199.127.224.50:8333', - '200.46.241.71:8333', - '200.116.98.185:8333', - '203.9.225.13:8333', - '203.177.142.37:8333', - '205.200.247.149:8333', - '205.209.131.150:13838', - '206.53.64.74:8333', - '206.72.192.69:8333', - '206.123.112.180:8333', - '208.66.208.153:8333', - '208.68.174.76:8333', - '208.107.97.242:8333', - '208.111.48.132:8333', - '208.118.235.190:8333', - '209.6.205.126:8333', - '209.40.96.121:8333', - '209.58.130.137:8333', - '209.73.142.226:8333', - '209.90.224.4:8333', - '209.126.69.243:8333', - '209.126.108.91:8333', - '209.195.4.18:8333', - '209.250.6.190:8333', - '210.54.37.225:8333', - '210.223.3.44:8333', - '211.149.234.109:8333', - '212.51.140.183:8333', - '212.90.179.206:8333', - '212.93.226.90:8333', - '212.110.171.118:8333', - '212.202.132.17:8333', - '213.91.205.134:8333', - '213.165.68.218:8333', - '213.196.200.213:8333', - '216.59.4.212:8333', - '216.74.32.109:8333', - '216.158.225.70:8333', - '216.164.138.13:8333', - '216.167.236.247:8333', - '216.197.79.74:8333', - '217.11.225.189:8333', - '217.12.199.207:8333', - '217.20.130.72:8333', - '217.23.6.148:8333', - '217.23.140.103:8333', - '217.28.96.180:8333', - '217.35.130.42:8333', - '217.111.66.79:8333', - '217.158.9.102:8333', - '217.168.143.169:8333', - '217.209.32.219:8333', - '218.161.33.165:8333', - '221.121.144.138:8333', - '[2001:0:4137:9e76:2048:3a84:bb91:e846]:8333', - '[2001:0:4137:9e76:2066:e9e:b489:f8b8]:8333', - '[2001:0:4137:9e76:3854:1211:b5ac:a96b]:8333', - '[2001:0:4137:9e76:4e3:1f66:cd4c:829f]:8333', - '[2001:0:4137:9e76:ad:1f4:9ea9:fa2e]:8333', - '[2001:0:4137:9e76:e5:baa:b66f:f418]:8333', - '[2001:0:53aa:64c:20a2:59c4:ad22:93ea]:8333', - '[2001:0:53aa:64c:59:617f:a10d:e0]:8333', - '[2001:0:5ef5:79fb:200f:3ae5:3cbc:74c9]:8333', - '[2001:0:5ef5:79fb:38f2:13b4:b208:5604]:8333', - '[2001:0:5ef5:79fd:200b:22a7:cc50:f52d]:8333', - '[2001:0:5ef5:79fd:24ef:1aef:a994:303d]:8333', - '[2001:0:5ef5:79fd:24fc:b5d:ad4f:4db2]:8333', - '[2001:0:5ef5:79fd:28bf:2d23:e02e:c3ef]:8333', - '[2001:0:5ef5:79fd:3cd0:3c2e:da44:a759]:8333', - '[2001:0:5ef5:79fd:87e:fd7:b1c2:1b4]:8333', - '[2001:0:9d38:6ab8:18db:3bda:ab90:e81e]:8333', - '[2001:0:9d38:6ab8:4e7:1660:862f:a6d7]:8333', - '[2001:0:9d38:6ab8:6:2b:5074:9588]:8333', - '[2001:0:9d38:6abd:10f8:a7d7:bb90:f524]:8333', - '[2001:13d8:1c01:1000::11]:8333', - '[2001:15c0:65ff:610::2]:8333', - '[2001:1608:10:156:ae::4adb]:8333', - '[2001:1620:b1b:8888:20d:b9ff:fe41:6710]:8333', - '[2001:1620:b1b:face:20d:b9ff:fe41:6710]:8333', - '[2001:1620:f00:282::2]:8333', - '[2001:1620:f00:8282::1]:8333', - '[2001:1680:101:1ae::1]:8333', - '[2001:16d8:ff00:85de:20c:29ff:fe52:9594]:8333', - '[2001:19f0:4400:434d:5400:ff:fe42:2678]:8333', - '[2001:19f0:5000:8c8b:5400:ff:fe1f:c023]:8333', - '[2001:19f0:5000:8ce6:5400:ff:fe1b:24a9]:8333', - '[2001:19f0:5:314:5400:ff:fe2c:42e8]:8333', - '[2001:19f0:5:51b:5400:ff:fe49:fe5b]:8333', - '[2001:19f0:5:bc:5400:ff:fe3b:9339]:8333', - '[2001:1af8:4020:a020:5::]:8333', - '[2001:1bc8:1a0:590e:2e0:f4ff:fe16:3a39]:8333', - '[2001:1c04:1401:8f00:f4fe:4fff:fe0c:df40]:8333', - '[2001:4128:6135:10:20c:29ff:fe69:9e81]:8333', - '[2001:4128:6135:2010:21e:bff:fee8:a3c0]:8333', - '[2001:4128:6135:e001:5054:ff:fe37:e9eb]:8333', - '[2001:41d0:1000:1024::]:8333', - '[2001:41d0:1000:1433::]:8333', - '[2001:41d0:1004:22ae::]:8333', - '[2001:41d0:1004:2996::]:8333', - '[2001:41d0:1008:11e0::1a5c:6d9d]:8333', - '[2001:41d0:1008:11e0::b74:baf7]:8333', - '[2001:41d0:1008:237a::]:8333', - '[2001:41d0:1008:2752::]:8333', - '[2001:41d0:1008:494::]:8333', - '[2001:41d0:1:45d8::1]:8333', - '[2001:41d0:1:5630::1]:8333', - '[2001:41d0:1:6f57::1]:8333', - '[2001:41d0:1:801e::1]:8333', - '[2001:41d0:1:8852::1]:8333', - '[2001:41d0:1:8b26::1]:8333', - '[2001:41d0:1:a5b8::1]:8333', - '[2001:41d0:1:b26b::1]:8333', - '[2001:41d0:1:c139::1]:8333', - '[2001:41d0:1:c8d7::1]:8333', - '[2001:41d0:1:d227::]:8333', - '[2001:41d0:1:dbc4::1]:8333', - '[2001:41d0:1:dc5d::1]:8333', - '[2001:41d0:1:e13b::1]:8333', - '[2001:41d0:1:ef5b::1]:8333', - '[2001:41d0:2:16be::1]:8333', - '[2001:41d0:2:203c::1]:8333', - '[2001:41d0:2:38c5::1]:8333', - '[2001:41d0:2:519::]:8333', - '[2001:41d0:2:9c94::1]:8333', - '[2001:41d0:2:b792::]:8333', - '[2001:41d0:2:bf2a::]:8333', - '[2001:41d0:2:c793::]:8333', - '[2001:41d0:2:c9bf::]:8333', - '[2001:41d0:303:4f0::]:8333', - '[2001:41d0:8:1a8a::1]:8333', - '[2001:41d0:8:3fa9::1]:8333', - '[2001:41d0:8:4670::1]:8333', - '[2001:41d0:8:4f48::1]:8333', - '[2001:41d0:8:6728::]:8333', - '[2001:41d0:8:72c2:d:242:ac11:2]:8333', - '[2001:41d0:8:8007::]:8333', - '[2001:41d0:8:a71c::]:8333', - '[2001:41d0:8:bccc::1]:8333', - '[2001:41d0:8:bd45::1]:8333', - '[2001:41d0:8:c67c::]:8333', - '[2001:41d0:8:de3d::1]:8333', - '[2001:41d0:8:e257::1]:8333', - '[2001:41d0:8:e3e4::1]:8333', - '[2001:41d0:a:14cc::1]:8333', - '[2001:41d0:a:15b2::1]:8333', - '[2001:41d0:a:1ac9::1]:8333', - '[2001:41d0:a:2496::1]:8333', - '[2001:41d0:a:308c::]:8333', - '[2001:41d0:a:5879::]:8333', - '[2001:41d0:a:6810::1]:8333', - '[2001:41d0:a:682d::1]:8333', - '[2001:41d0:a:6c29::1]:8333', - '[2001:41d0:a:f52a::1]:8333', - '[2001:41d0:d:111c::]:8333', - '[2001:41d0:e:1388::1]:8333', - '[2001:41d0:e:26b::1]:8333', - '[2001:41d0:e:f73::1]:8333', - '[2001:41d0:fc8c:a200:7a24:afff:fe9d:c69b]:8333', - '[2001:41f0:61:0:72f3:95ff:fe09:7521]:8333', - '[2001:41f0:61::7]:8333', - '[2001:4428:200:8171:db6:2ff4:9c0e:a2da]:8333', - '[2001:470:1f07:151c:baac:6fff:feb7:3ba9]:8333', - '[2001:470:1f0b:ad6:a60:6eff:fec6:2323]:8333', - '[2001:470:1f11:617::10f]:8333', - '[2001:470:1f14:73e::2]:8333', - '[2001:470:1f14:7d::2]:8333', - '[2001:470:1f15:11f8::10]:8333', - '[2001:470:1f15:1b95:2c3e:8a9a:24e1:7084]:8333', - '[2001:470:1f15:e9b::3ef]:8333', - '[2001:470:1f1d:3a9::10]:8333', - '[2001:470:25:482::2]:8333', - '[2001:470:27:19f::2]:8333', - '[2001:470:27:665::2]:8333', - '[2001:470:28:365::4]:8333', - '[2001:470:41:6::2]:8333', - '[2001:470:727b::11:14]:8333', - '[2001:470:7:2f0::2]:8333', - '[2001:470:7:65::2]:8333', - '[2001:470:7f85::2]:8333', - '[2001:470:8:2e1:5825:39df:3e4c:54a8]:8333', - '[2001:470:8:2e1::43]:8333', - '[2001:470:8:2e1:ae2a:e257:4470:6350]:8333', - '[2001:470:a:c13::2]:8333', - '[2001:4801:7819:74:b745:b9d5:ff10:a61a]:8333', - '[2001:4801:7819:74:b745:b9d5:ff10:aaec]:8333', - '[2001:4801:7828:104:be76:4eff:fe10:1325]:8333', - '[2001:4802:7800:2:30d7:1775:ff20:1858]:8333', - '[2001:4ba0:babe:832::]:8333', - '[2001:4ba0:cafe:379::1]:8333', - '[2001:4ba0:ffee:33::10]:8333', - '[2001:4dd0:ff00:9a67::9]:8333', - '[2001:610:1b19::3]:8333', - '[2001:610:600:a41::2]:8333', - '[2001:678:174:4021::2:8333]:8333', - '[2001:67c:16dc:1201:5054:ff:fe17:4dac]:8333', - '[2001:67c:2128:ffff:6062:36ff:fe30:6532]:8333', - '[2001:67c:2564:331:3547:6e28:85a4:fb27]:8333', - '[2001:6a0:200:368::2]:8333', - '[2001:718:801:311:5054:ff:fe19:c483]:8333', - '[2001:7b8:2ff:8f::2]:8333', - '[2001:8d8:8a6:4400::3f:86c]:8333', - '[2001:8d8:923:8400::87:ebd]:8333', - '[2001:960:66d::2]:8333', - '[2001:981:46:1:ba27:ebff:fe5b:edee]:8333', - '[2001:ba8:1f1:f069::2]:8333', - '[2001:bc8:225f:10e:505:6573:7573:d0a]:8333', - '[2001:bc8:2706::1]:8333', - '[2001:bc8:323c:100::53]:8333', - '[2001:bc8:323c:100::80:4]:8333', - '[2001:bc8:323c:100::cafe]:8333', - '[2001:bc8:3680:4242::1]:8333', - '[2001:bc8:399f:f000::1]:8333', - '[2001:bc8:3cbf::5]:8333', - '[2001:bc8:4700:2300::19:807]:8333', - '[2001:e42:102:1805:160:16:206:31]:8333', - '[2002:12f1:3f::12f1:3f]:8333', - '[2002:1e2:5349::1e2:5349]:8333', - '[2002:1e2:5588::1e2:5588]:8333', - '[2002:2501:cf62::2501:cf62]:8333', - '[2002:268c:a135::268c:a135]:8333', - '[2002:2a33:99db::2a33:99db]:8332', - '[2002:2ebc:2c14::7]:8333', - '[2002:2f59:2c9c::2f59:2c9c]:11885', - '[2002:2f5a:3619::2f5a:3619]:8333', - '[2002:2f5a:36a4::2f5a:36a4]:8333', - '[2002:2f5a:429::2f5a:429]:8333', - '[2002:2f5a:562a::2f5a:562a]:8333', - '[2002:3a3b:216::3a3b:216]:8333', - '[2002:3dfa:5d23::3dfa:5d23]:8333', - '[2002:424f:a052::424f:a052]:8333', - '[2002:451e:e922::451e:e922]:8333', - '[2002:4540:4b30::4540:4b30]:8333', - '[2002:51ab:7cc::51ab:7cc]:8333', - '[2002:527:de11::527:de11]:8333', - '[2002:5395:7d01::5395:7d01]:8333', - '[2002:5395:7d2a::5395:7d2a]:8333', - '[2002:5669:e3be::5669:e3be]:8333', - '[2002:566a:5d6d::566a:5d6d]:8333', - '[2002:59b9:f820::59b9:f820]:8333', - '[2002:59f8:ac69::59f8:ac69]:8333', - '[2002:5bd4:b65a::5bd4:b65a]:8333', - '[2002:5c3f:39db::5c3f:39db]:8333', - '[2002:5d33:8d03::5d33:8d03]:8333', - '[2002:5d67:49bb::5d67:49bb]:8333', - '[2002:5dae:5d5f::5dae:5d5f]:8333', - '[2002:5dbe:8cc6::5dbe:8cc6]:8333', - '[2002:5dbe:9503::5dbe:9503]:8333', - '[2002:5fd3:8944::5fd3:8944]:8333', - '[2002:5fd3:9467::5fd3:9467]:8333', - '[2002:67f9:6a48::67f9:6a48]:8333', - '[2002:67f9:6a4a::67f9:6a4a]:8333', - '[2002:67f9:6a95::67f9:6a95]:8333', - '[2002:6a0e:3ea8::6a0e:3ea8]:10011', - '[2002:6b96:375a::6b96:375a]:8333', - '[2002:6ca8:cffb::6ca8:cffb]:8333', - '[2002:6caf:234::6caf:234]:8333', - '[2002:6dec:58f5::6dec:58f5]:8333', - '[2002:6dec:5ac7::6dec:5ac7]:8333', - '[2002:7237:4a02::7237:4a02]:20033', - '[2002:7237:94fd::7237:94fd]:10011', - '[2002:7237:e428::7237:e428]:8333', - '[2002:7237:fcf6::7237:fcf6]:20188', - '[2002:76c0:96e6::76c0:96e6]:8333', - '[2002:7819:7e80::7819:7e80]:7743', - '[2002:781a:ea86::781a:ea86]:8333', - '[2002:781a:f3c2::781a:f3c2]:14475', - '[2002:784c:c2c0::784c:c2c0]:8333', - '[2002:784c:ec97::784c:ec97]:8333', - '[2002:792b:261a::792b:261a]:8333', - '[2002:88f3:8cca::88f3:8cca]:8333', - '[2002:88f3:a83c::88f3:a83c]:8333', - '[2002:8ac9:516f::8ac9:516f]:8333', - '[2002:8b81:6d78::8b81:6d78]:50344', - '[2002:8b81:6e5c::8b81:6e5c]:38176', - '[2002:8bc4:90a6::8bc4:90a6]:8333', - '[2002:ac52:b854::ac52:b854]:8333', - '[2002:add0:c14a::add0:c14a]:8333', - '[2002:b07e:a70a::b07e:a70a]:8333', - '[2002:b27c:c565:1::250]:8333', - '[2002:b27c:c565::1]:8333', - '[2002:b94d:80f1::b94d:80f1]:8333', - '[2002:b982:e26a::b982:e26a]:8333', - '[2002:bcd5:3145::bcd5:3145]:8333', - '[2002:c08a:d22b::c08a:d22b]:8333', - '[2002:c0c7:f8e3::c0c7:f8e3]:32771', - '[2002:c1a9:fc5a::c1a9:fc5a]:8333', - '[2002:c23f:8fc5::c23f:8fc5]:8333', - '[2002:d395:ea6d::d395:ea6d]:8333', - '[2002:d917:ca5::d917:ca5]:8333', - '[2002:d917:e91::d917:e91]:8333', - '[2002:db71:f434::db71:f434]:8333', - '[2400:2651:161:1000:6847:d40f:aaa3:4848]:8333', - '[2400:8901::f03c:91ff:fec8:4280]:8333', - '[2401:1800:7800:102:be76:4eff:fe1c:a7d]:8333', - '[2401:2500:203:10:153:120:156:83]:8333', - '[2401:a400:3200:5600:14ee:f361:4bdc:1f7c]:8333', - '[2403:4200:403:2::ff]:8333', - '[2405:aa00:2::40]:8333', - '[240b:10:ca20:f0:224:e8ff:fe1f:60d9]:8333', - '[240b:250:1e0:2400:b9ef:8fe3:a69a:7378]:8333', - '[240d:1a:302:8600:8876:a36d:12ee:f285]:8333', - '[2600:3c00::f03c:91ff:fe91:3e49]:8333', - '[2600:3c00::f03c:91ff:febb:981e]:8333', - '[2600:3c01::f03c:91ff:fe18:6adf]:8333', - '[2600:3c01::f03c:91ff:fe69:89e9]:8333', - '[2600:3c01::f03c:91ff:fe91:6a29]:8333', - '[2600:3c01::f03c:91ff:fef1:1eaa]:8333', - '[2600:3c03::f03c:91ff:fe18:da80]:8333', - '[2600:3c03::f03c:91ff:fe28:1445]:8333', - '[2600:3c03::f03c:91ff:fe67:d2e]:8333', - '[2600:3c03::f03c:91ff:fe89:116f]:8333', - '[2600:3c03::f03c:91ff:feb0:5fc4]:8333', - '[2600:3c03::f03c:91ff:fee0:233e]:8333', - '[2600:3c03::f03c:91ff:fee0:51]:8333', - '[2600:8805:2400:14e:226:4aff:fe02:2ba4]:8333', - '[2600:8807:5080:3301:1487:83b7:33d7:eb97]:8333', - '[2601:186:c100:6bcd:16bd:cea1:235d:1c19]:8333', - '[2601:18c:4200:28d0:e4d:e9ff:fec5:76d0]:8333', - '[2601:247:8201:6251:30e6:7b95:69bf:9248]:8333', - '[2601:602:9980:f78:211:11ff:fec5:1ae]:8333', - '[2602:ae:1993:de00:2c50:9a44:8f11:77a5]:8333', - '[2602:ff68:0:1:21e:bff:feca:db72]:8333', - '[2602:ff68:0:1:2bd:27ff:feb0:adf8]:8333', - '[2602:ff68:0:1::5]:8333', - '[2602:ff68:0:5:2bd:27ff:feb0:adf8]:8333', - '[2602:ffc5:1f::1f:2d61]:8333', - '[2602:ffc5:1f::1f:9211]:8333', - '[2602:ffc5::9e63:27a2]:8333', - '[2602:ffc5::c30:1c75]:8333', - '[2602:ffc5::ffc5:b844]:8333', - '[2602:ffe8:100:2::457:936b]:8333', - '[2604:180:2:eee::ca46]:8333', - '[2604:880:d:85::be37]:8333', - '[2604:9a00:2100:a009:2::]:8333', - '[2604:a880:2:d0::301:8001]:8333', - '[2604:a880:2:d0::4a9:1001]:8333', - '[2604:a880:2:d0::53a:c001]:8333', - '[2604:a880:400:d0::ad7:e001]:8333', - '[2604:a880:400:d0::dcf:f001]:8333', - '[2605:4d00::50]:8333', - '[2605:6000:edc8:300::ddfe]:8333', - '[2605:6000:ffc0:70:74d5:225c:f553:5bb8]:8333', - '[2606:6000:c148:7003:5054:ff:fe78:66ff]:8333', - '[2606:6000:e6d6:d701:d428:5e44:a2c9:3ff6]:8333', - '[2606:c680:1:4a:2016:d1ff:fe93:52a7]:8333', - '[2607:5300:203:118:3733::1414]:8333', - '[2607:5300:60:13bb::1]:8333', - '[2607:5300:60:1966::1]:8333', - '[2607:5300:60:2218::]:8333', - '[2607:5300:60:3775::]:8333', - '[2607:5300:60:3ddf::]:8333', - '[2607:5300:60:a654::]:8333', - '[2607:5300:60:a7a3::]:8333', - '[2607:5300:60:ac0::1]:8333', - '[2607:5300:60:cf97::]:8333', - '[2607:f0d0:1901:19::6]:8333', - '[2607:f128:40:1202:69:162:139:125]:8333', - '[2607:f128:40:1703::2]:8333', - '[2607:f178:0:8::106]:8333', - '[2607:f1c0:84d:8900::7e:cad]:8333', - '[2607:f948:0:1::1:40]:8333', - '[2607:fcd0:100:2302::6094:635a]:8333', - '[2607:fcd0:100:6a00::3a96:1]:8333', - '[2607:fcd0:100:6a02::7ff0:1]:8333', - '[2607:fcd0:100:8203::8c58:dbc]:8333', - '[2607:fea8:1360:9c2:221a:6ff:fe47:776d]:8333', - '[2607:fea8:4da0:9ce:5114:a8ec:20f5:a50b]:8333', - '[2607:fea8:5df:fda0:feaa:14ff:feda:c79a]:8333', - '[2607:fea8:84c0:163:f42c:baff:fecc:6bbf]:8333', - '[2607:ff10:c5:502:225:90ff:fe32:d446]:8333', - '[2607:ff48:aa81:800::96cf:1]:8333', - '[2620:11c:5001:1118:d267:e5ff:fee9:e673]:8333', - '[2620:b8:4000:1000::93:1]:8333', - '[2800:1a0::9]:8333', - '[2a00:1178:2:43:19fd:d43e:b77:edeb]:8333', - '[2a00:1178:2:43:b4e3:e562:f811:d761]:8333', - '[2a00:14f0:e000:80d2:cd1a::1]:8333', - '[2a00:1630:14::101]:8333', - '[2a00:1630:2:1802:188:122:91:11]:8333', - '[2a00:1630:2:500::4]:8333', - '[2a00:1768:2001:24::148:218]:8333', - '[2a00:1768:2001:27::142:21]:8333', - '[2a00:1a48:7810:101:be76:4eff:fe08:c774]:8333', - '[2a00:1ca8:37::a5fc:40d1]:8333', - '[2a00:1ca8:37::ab6d:ce2c]:8333', - '[2a00:1dc0:2255:10::2]:8333', - '[2a00:7c80:0:71::8]:8333', - '[2a00:7c80:0:97::7]:8333', - '[2a00:bbe0:0:42:222:64ff:fe9a:e206]:8333', - '[2a00:c98:2050:a020:3::110]:8333', - '[2a00:dcc0:eda:98:183:193:1d24:b53a]:8333', - '[2a00:dcc0:eda:98:183:193:c382:6bdb]:8333', - '[2a00:dcc0:eda:98:183:193:f72e:d943]:8333', - '[2a00:f90:ff0:c100:53c4:97a7:8b59:796a]:8333', - '[2a01:238:435c:de00:b110:38cf:192d:b2c]:28333', - '[2a01:348:6:7cf::2]:8333', - '[2a01:368:e012:8888:216:3eff:fe24:1162]:8333', - '[2a01:488:66:1000:53a9:22b:0:1]:8333', - '[2a01:488:67:1000:523:ffa7:0:1]:8333', - '[2a01:488:67:1000:b01c:3379:0:1]:8333', - '[2a01:4f8:100:34ce::2]:8333', - '[2a01:4f8:100:44e7::2]:8333', - '[2a01:4f8:10a:2e4::2]:8333', - '[2a01:4f8:10a:34e::2]:8333', - '[2a01:4f8:10a:51d::2]:8333', - '[2a01:4f8:10a:622::2]:8333', - '[2a01:4f8:10a:85f::2]:8333', - '[2a01:4f8:10a:864::2]:8333', - '[2a01:4f8:10a:d04::2]:8333', - '[2a01:4f8:110:334c::2]:8333', - '[2a01:4f8:110:536e::2]:8333', - '[2a01:4f8:120:43e4::2]:8333', - '[2a01:4f8:120:702e::2]:8333', - '[2a01:4f8:121:4346::2]:8333', - '[2a01:4f8:130:3332::2]:8333', - '[2a01:4f8:131:33ad::2]:8333', - '[2a01:4f8:131:33ad:fea1::666]:8333', - '[2a01:4f8:140:31b0::2]:8333', - '[2a01:4f8:140:4088::2]:8333', - '[2a01:4f8:140:931a::2]:8333', - '[2a01:4f8:140:93b0::2]:8333', - '[2a01:4f8:141:13ad::c451]:8333', - '[2a01:4f8:141:186::2]:8333', - '[2a01:4f8:141:22ae::2]:8333', - '[2a01:4f8:141:322c::2]:8333', - '[2a01:4f8:150:11d4::2]:8333', - '[2a01:4f8:150:440f::2]:8333', - '[2a01:4f8:150:61ee::2]:8333', - '[2a01:4f8:150:726b::2]:8333', - '[2a01:4f8:151:30c9::2]:15000', - '[2a01:4f8:151:41a2::2]:8333', - '[2a01:4f8:151:41cc::2]:8333', - '[2a01:4f8:151:52c6::154]:8333', - '[2a01:4f8:151:600b::1:1]:8333', - '[2a01:4f8:151:7175::2]:8333', - '[2a01:4f8:160:41f0::1:33]:8333', - '[2a01:4f8:160:5328::27f0:187a]:8333', - '[2a01:4f8:160:814f::2]:8333', - '[2a01:4f8:161:21ad::333:30]:8333', - '[2a01:4f8:161:7026::2]:8333', - '[2a01:4f8:162:4110::2]:8333', - '[2a01:4f8:162:4348::2]:8333', - '[2a01:4f8:171:1c1b::2]:8333', - '[2a01:4f8:171:1c3::2]:8333', - '[2a01:4f8:171:2258::2]:8333', - '[2a01:4f8:171:2a70::2]:8333', - '[2a01:4f8:171:2e1b::2]:8333', - '[2a01:4f8:171:2f28::2]:8333', - '[2a01:4f8:171:3248::2]:8333', - '[2a01:4f8:171:380c::2]:8333', - '[2a01:4f8:171:b93::2]:8333', - '[2a01:4f8:171:d0a::2]:8333', - '[2a01:4f8:172:116c::2]:8333', - '[2a01:4f8:172:1287::2]:8333', - '[2a01:4f8:172:17a9::2]:8333', - '[2a01:4f8:172:1ca7::2]:8333', - '[2a01:4f8:172:2159::2]:8333', - '[2a01:4f8:172:3a41::2]:8333', - '[2a01:4f8:172:3b42::2]:8333', - '[2a01:4f8:172:3ec1::2]:8333', - '[2a01:4f8:172:3ec2::2]:8333', - '[2a01:4f8:172:aeb::2]:8333', - '[2a01:4f8:172:aec::2]:8333', - '[2a01:4f8:173:10ab::2]:8333', - '[2a01:4f8:173:1551::2]:8333', - '[2a01:4f8:173:1bca::2]:8333', - '[2a01:4f8:173:1e2e::2]:8333', - '[2a01:4f8:173:2162::2]:8333', - '[2a01:4f8:173:21e6::2]:8333', - '[2a01:4f8:173:42::2]:8333', - '[2a01:4f8:173:cc1::2]:8333', - '[2a01:4f8:190:1253::2]:8333', - '[2a01:4f8:190:24eb::2]:8333', - '[2a01:4f8:190:34f0::2]:8333', - '[2a01:4f8:190:528d::2]:8333', - '[2a01:4f8:190:91ce::2]:8333', - '[2a01:4f8:191:2194::83]:8333', - '[2a01:4f8:191:40e8::2]:8333', - '[2a01:4f8:191:8165::2]:22556', - '[2a01:4f8:191:81b7::2]:8333', - '[2a01:4f8:191:8328::3]:8333', - '[2a01:4f8:192:11b2::2]:8343', - '[2a01:4f8:192:216c::2]:8333', - '[2a01:4f8:192:22af::2]:8333', - '[2a01:4f8:192:2422::2]:8333', - '[2a01:4f8:192:34d0::2]:8333', - '[2a01:4f8:192:440b::2]:8333', - '[2a01:4f8:192:5230::2]:8333', - '[2a01:4f8:192:db::2]:8333', - '[2a01:4f8:200:1012::2]:8333', - '[2a01:4f8:200:414e::2]:8333', - '[2a01:4f8:200:416a::2]:8333', - '[2a01:4f8:201:21a7::2]:8333', - '[2a01:4f8:201:4017::11]:8333', - '[2a01:4f8:201:6011::4]:8333', - '[2a01:4f8:201:60d5::2]:8333', - '[2a01:4f8:202:12d6::2]:8333', - '[2a01:4f8:202:31e3::2]:8333', - '[2a01:4f8:202:32c6::2]:8333', - '[2a01:4f8:202:53c3::2]:8333', - '[2a01:4f8:211:14cf::2]:8333', - '[2a01:4f8:211:1ec5::2]:8333', - '[2a01:4f8:211:483::2]:8333', - '[2a01:4f8:211:d99::8]:8333', - '[2a01:4f8:212:1826::2]:8333', - '[2a01:4f8:212:27a8::2]:8333', - '[2a01:4f8:221:801::2]:8333', - '[2a01:4f8:a0:12cc::2]:8333', - '[2a01:4f8:a0:746a:101:1:1:2]:8333', - '[2a01:4f8:a0:828a::2]:8333', - '[2a01:4f8:c17:2eef::2]:8333', - '[2a01:4f8:c17:2f3c::2]:3333', - '[2a01:4f8:c17:3b02::2]:8333', - '[2a01:4f8:c17:4245::2]:8333', - '[2a01:4f8:c17:464f::2]:8333', - '[2a01:4f8:c17:4a1c::2]:8333', - '[2a01:4f8:c17:4c5d::2]:8333', - '[2a01:4f8:c17:67f8::2]:8333', - '[2a01:4f8:c17:6dd0::2]:8333', - '[2a01:4f8:c17:710b::2]:8333', - '[2a01:4f8:c17:714::2]:8333', - '[2a01:4f8:c17:72c6::2]:8333', - '[2a01:608:ffff:a009:8bf5:879d:e51a:f837]:8333', - '[2a01:680:10:10::1]:8333', - '[2a01:6f0:ffff:120::8dcb]:8333', - '[2a01:79c:cebc:857c:98c1:88ff:fef5:90de]:8333', - '[2a01:79d:7377:2629:7e57:7e57:1:1]:8333', - '[2a01:7c8:aaac:43d:5054:ff:fe4e:3dd4]:8333', - '[2a01:7c8:aab5:3e6:5054:ff:fed7:4e54]:8333', - '[2a01:7c8:aabd:3d5:5054:ff:fe95:f586]:8333', - '[2a01:7c8:aac1:453:d0d2:af96:fa88:5d0e]:8333', - '[2a01:7c8:aac3:663:5054:ff:fe25:8c69]:8333', - '[2a01:7c8:aac3:97:5054:ff:fea7:3780]:8333', - '[2a01:7c8:aac4:567:5054:ff:fedc:518a]:8333', - '[2a01:7e00::f03c:91ff:fe26:8c87]:8333', - '[2a01:7e00::f03c:91ff:fe50:94b8]:8333', - '[2a01:7e00::f03c:91ff:fe55:2c]:8333', - '[2a01:7e00::f03c:91ff:fe89:1143]:8333', - '[2a01:7e00::f03c:91ff:fe89:53fd]:8333', - '[2a01:7e00::f03c:91ff:fedf:b70f]:8333', - '[2a01:b000::4166:515b:ef9e:b3]:8333', - '[2a01:b2e0:2::40]:8333', - '[2a01:e34:ec29:24c0:f3:ddaf:9f59:586f]:8333', - '[2a01:e34:eed7:6670:ec1b:bf7c:b012:6069]:8333', - '[2a01:e35:2ee5:610:21f:d0ff:fe4e:7460]:8333', - '[2a01:e35:8a3f:47c0:c617:feff:fe3c:9fbd]:8333', - '[2a01:e35:8bff:70b0:1e1b:dff:fe0b:236d]:8333', - '[2a02:1205:34c3:a4e0:d63d:7eff:fe98:10c8]:8333', - '[2a02:1205:34da:aa00:5882:249d:ddbf:bc43]:8333', - '[2a02:1205:5051:a640:d6ae:52ff:fea3:ac]:8333', - '[2a02:1205:c689:d980:baae:edff:feea:9445]:8333', - '[2a02:120b:2c2a:5ec0:10dd:31ff:fe42:5079]:8333', - '[2a02:120b:2c35:69d0:219:99ff:fe6b:4ec3]:8333', - '[2a02:120b:c3c2:ff60:21f:5bff:fec3:a7ad]:24312', - '[2a02:13b8:4000:1000:216:e6ff:fe92:8619]:8333', - '[2a02:13b8:4000:1000::27]:8333', - '[2a02:17d0:2a:4400:40f:3dd4:b053:47ad]:8333', - '[2a02:180:1:1::517:afb]:8333', - '[2a02:180:6:1::18]:8333', - '[2a02:1810:1d11:f900:6872:f28e:8126:f635]:8333', - '[2a02:27a8:0:1:52e5:49ff:fee3:3b49]:8333', - '[2a02:348:86:3011::1]:8333', - '[2a02:390:9000:0:218:7dff:fe10:be33]:8333', - '[2a02:582:78c1:7600:2d49:6212:29d3:abb]:8333', - '[2a02:6080::1:190b:69e3]:8333', - '[2a02:750:7:3305::575]:8333', - '[2a02:752:100:3::53]:8333', - '[2a02:7aa0:1201::7501:d950]:8333', - '[2a02:7aa0:1201::deb3:81a2]:8333', - '[2a02:7aa0:1619::a037:69a6]:8333', - '[2a02:810d:14c0:8694:d250:99ff:fe81:23d9]:8333', - '[2a02:a50::dacb:8aff:fe36:8d2d]:8333', - '[2a02:c200:0:10:3:0:2591:1]:8333', - '[2a02:c200:1:10:2:5:9982:1]:8333', - '[2a02:c200:1:10:3:0:9290:1]:8333', - '[2a02:c205:3000:7158::1]:8333', - '[2a02:c205:3001:4522::1]:8333', - '[2a02:c205:3001:6549::1]:8333', - '[2a02:c207:2008:3772::1]:8333', - '[2a02:c207:2008:6519::1]:8333', - '[2a02:c207:2009:213::1]:8333', - '[2a02:c207:2009:7858::1]:8333', - '[2a02:c207:2010:302::1]:8333', - '[2a02:c207:3001:5824::1]:8333', - '[2a02:ce80:0:20::1]:8333', - '[2a03:4000:2:496::8]:8333', - '[2a03:4000:6:416c::53]:8333', - '[2a03:4000:6:8009::1]:8333', - '[2a03:4000:9:8e::1]:8333', - '[2a03:7380:2140:17:51fe:3519:b571:4a13]:8333', - '[2a03:b0c0:0:1010::7a3:1001]:8333', - '[2a03:b0c0:0:1010::7aa:4001]:8333', - '[2a03:b0c0:3:d0::1b99:c001]:8333', - '[2a03:b0c0:3:d0::1b99:e001]:8333', - '[2a03:b0c0:3:d0::1b9a:3001]:8333', - '[2a03:b0c0:3:d0::2208:6001]:8333', - '[2a03:b0c0:3:d0::23f7:1001]:8333', - '[2a03:b0c0:3:d0::23f7:9001]:8333', - '[2a03:b0c0:3:d0::23fb:2001]:8333', - '[2a03:b0c0:3:d0::23fb:3001]:8333', - '[2a03:b0c0:3:d0::23fb:5001]:8333', - '[2a03:b0c0:3:d0::23fb:7001]:8333', - '[2a03:b0c0:3:d0::2400:1]:8333', - '[2a03:b0c0:3:d0::2400:3001]:8333', - '[2a03:b0c0:3:d0::2400:e001]:8333', - '[2a03:b0c0:3:d0::2401:e001]:8333', - '[2a03:b0c0:3:d0::2402:2001]:8333', - '[2a03:b0c0:3:d0::2402:8001]:8333', - '[2a03:b0c0:3:d0::2402:9001]:8333', - '[2a03:b0c0:3:d0::2402:b001]:8333', - '[2a03:b0c0:3:d0::2402:d001]:8333', - '[2a03:b0c0:3:d0::2403:1001]:8333', - '[2a03:b0c0:3:d0::2403:2001]:8333', - '[2a03:b0c0:3:d0::2403:4001]:8333', - '[2a03:b0c0:3:d0::2403:6001]:8333', - '[2a03:b0c0:3:d0::2403:a001]:8333', - '[2a03:b0c0:3:d0::2403:b001]:8333', - '[2a03:b0c0:3:d0::2403:f001]:8333', - '[2a03:b0c0:3:d0::2404:6001]:8333', - '[2a03:b0c0:3:d0::2404:b001]:8333', - '[2a03:f80:ed15:149:154:155:235:1]:8333', - '[2a04:1980:3100:1aac:e61d:2dff:fe29:f241]:8333', - '[2a04:1980:3100:1aac:e61d:2dff:fe29:f251]:8333', - '[2a04:2180:0:1::5a49:3c06]:8333', - '[2a04:2180:1:7::3]:8333', - '[2a04:2e00:5:2e:9a4b:e1ff:fe62:6dc0]:8333', - '[2a04:3542:1000:910:8492:b8ff:fe91:711d]:8333', - '[2a04:dbc3:fffe:0:e61f:13ff:fe95:8401]:8333', - '[2a06:9fc0:2a06:9fc0:2a06:9fc1:67c:e706]:8333', - '[2c0f:f738:2004:82::]:8333', - '2hryb3uh3tzwgnya.onion:8333', - '3nmbbakinewlgdln.onion:8333', - '3qeri3tmhzmpegyv.onion:8333', - '4wdknmecghcmclq5.onion:8333', - '53tsjt6zq3iasv5q.onion:8333', - '5cg7qeywvwo6vxpt.onion:8333', - '5gbcrgqxcbxj253s.onion:8333', - '6cn4ilbwkrkh7gwo.onion:8333', - '6e4jrnn7igeqxmlf.onion:8333', - '6ymgbvnn6d5nfmv4.onion:8333', - '6zsh3bfduhpo7ldl.onion:8333', - '72fq6phv4fg4rhvh.onion:8333', - '7gdqp6npusk4lfwk.onion:8333', - 'a7emxol55e623lqc.onion:8333', - 'assbiydziq77zaki.onion:8333', - 'bafk5ioatlgt7dgl.onion:8333', - 'bk7yp6epnmcllq72.onion:8333', - 'brwqezn6le54w2bb.onion:8333', - 'bs4bq6s6qkvt5hpi.onion:8333', - 'bup5n5e3kurvjzf3.onion:8333', - 'c2tpqkaz4ihjzwgb.onion:8333', - 'cernrmrk5zomzozn.onion:8333', - 'cfyegj64ht3jpodr.onion:8333', - 'cg5vg54cazzpvoug.onion:8333', - 'cgk4u2lxrvml4jvb.onion:8333', - 'cjygd7pu5lqkky5j.onion:8333', - 'd6wubsdtr46dd5ki.onion:8333', - 'dfq6yjc3aelplwr4.onion:8333', - 'dqpxwlpnv3z3hznl.onion:8333', - 'eamfospuveabaimd.onion:8333', - 'ep2mjzox3kvb6ax4.onion:8333', - 'fpbxb4wjudiw2w5a.onion:8333', - 'fu5hfsbbf5jwsvhv.onion:8333', - 'g4freoibsczujle3.onion:8333', - 'gb5ypqt63du3wfhn.onion:8333', - 'ggdy2pb2avlbtjwq.onion:8333', - 'gh2aiddzxmvyrnue.onion:8333', - 'gnxgylbgzvaazkq7.onion:8333', - 'hnizdxnejel64ubk.onion:8333', - 'htvdcmlc3abji2ab.onion:8443', - 'hwuboois4gslupgx.onion:8333', - 'hxz6gowludlj6d5a.onion:8333', - 'j6umo4bnsztpsonc.onion:8333', - 'jdunmaocwbbnw565.onion:8333', - 'ktv3qlxl7xvmdlf4.onion:8333', - 'kvd44sw7skb5folw.onion:8333', - 'kwimnzm6vd4zakvl.onion:8333', - 'la5xhk3lprxzxmz2.onion:8333', - 'lc7cx67end26uutp.onion:8352', - 'mwu5og2agcspmgkx.onion:8333', - 'mzxkipiyekaoh7my.onion:8333', - 'n6rwlrtwpqc7qwo7.onion:8333', - 'nj36424yccqph62z.onion:8333', - 'o256w7t3vcgktmxk.onion:8333', - 'o4sl5na6jeqgi3l6.onion:8333', - 'okdzjarwekbshnof.onion:8333', - 'oyebydl2pacx6v26.onion:8333', - 'p5mx2imj75dpmime.onion:8333', - 'psco6bxjewljrczx.onion:8333', - 'pxtgswet6tlgrbwj.onion:8333', - 'rb4v3fhgx2zr4rre.onion:8333', - 'rjlnp3hwvrsmap6e.onion:8333', - 'rlafimkctvz63llg.onion:8333', - 'rxjvy5eyttep5tts.onion:8333', - 'seoskudzk6vn6mqz.onion:8333', - 'tpgdufxxsw3jkrdf.onion:8333', - 'tuiyvqgi3o675pjb.onion:8333', - 'tx4zd7d5exonnblh.onion:8333', - 'uokg6avfgbhofls3.onion:8333', - 'v3gjphgqy5hygcml.onion:8333', - 'vhdoxqq63xr53ol7.onion:8333', - 'visevrizz3quyagj.onion:8333', - 'vqpye2k5rcqvj5mq.onion:8333', - 'wfsx2gi7djhy22hk.onion:8333', - 'wg6vwmbrzyyzapun.onion:8333', - 'xub4w3w4wwk56xiq.onion:8333', - 'ycivnom44dmxx4ob.onion:8333', - 'ywskufc62bf2fum4.onion:8333', - 'z4fax2vxg23t2ddf.onion:8333', - 'zo5dklwelmdrpo5n.onion:8333' + '5.39.64.7:9333', + '5.45.69.13:9333', + '5.100.249.197:9333', + '5.228.7.146:9333', + '5.255.90.234:9333', + '23.28.128.65:9333', + '23.94.28.182:9335', + '23.236.100.11:9333', + '24.214.54.179:10333', + '24.220.158.151:9333', + '27.96.51.15:9333', + '31.131.20.85:9333', + '31.165.50.156:9333', + '34.193.68.10:9333', + '37.24.124.177:9333', + '37.61.209.144:9333', + '37.143.8.102:28333', + '37.157.183.16:9333', + '37.221.198.57:9333', + '42.51.12.220:9333', + '42.51.153.80:8332', + '45.55.176.26:9333', + '45.63.93.75:9333', + '45.76.172.211:9333', + '46.23.85.25:9333', + '46.32.50.98:9333', + '46.166.129.186:9333', + '47.54.207.91:9333', + '47.55.95.227:9333', + '47.88.152.141:9333', + '47.90.120.157:9333', + '47.93.132.3:9333', + '47.187.16.175:9333', + '51.7.77.185:9333', + '51.15.64.166:9333', + '52.7.135.69:9333', + '52.63.12.109:9333', + '54.149.206.22:18891', + '62.106.16.111:9333', + '62.106.27.219:9333', + '62.112.11.188:9333', + '62.152.54.44:9333', + '62.232.136.243:9333', + '63.224.55.74:9333', + '63.231.239.212:9333', + '65.70.19.49:9333', + '66.172.104.80:9333', + '66.196.5.33:9333', + '68.63.8.36:9333', + '69.175.49.226:9333', + '71.120.188.82:9333', + '72.135.235.246:9333', + '72.180.107.193:9333', + '74.77.80.44:9333', + '76.12.247.45:9333', + '76.92.136.75:9333', + '76.169.57.92:9333', + '77.77.46.250:9333', + '78.31.66.170:9333', + '78.58.154.22:9333', + '78.158.132.14:9333', + '80.237.235.101:9333', + '80.237.240.102:9333', + '81.4.103.48:9333', + '81.27.96.37:9333', + '82.192.64.136:9333', + '82.208.99.13:9333', + '83.78.230.30:9333', + '83.83.0.100:9333', + '83.162.196.192:9333', + '83.212.97.34:9333', + '84.50.242.136:9333', + '84.215.80.43:9333', + '84.234.52.190:37700', + '85.21.144.163:9333', + '85.21.144.226:9333', + '85.25.74.148:9333', + '85.25.138.71:9333', + '85.105.196.209:9333', + '85.143.137.206:9333', + '85.194.238.130:9333', + '85.234.150.199:9333', + '86.14.143.176:9333', + '87.79.94.221:9333', + '87.236.27.155:9333', + '88.84.24.206:10333', + '88.87.78.126:9333', + '88.196.136.31:9333', + '88.202.202.221:9333', + '88.208.3.82:9333', + '89.22.104.48:9333', + '89.22.151.211:9333', + '89.98.140.88:9333', + '89.212.75.6:9333', + '89.252.28.26:9333', + '90.177.48.104:9333', + '91.109.112.90:9333', + '91.109.112.94:9333', + '91.152.121.68:9333', + '91.205.217.142:9333', + '91.226.10.90:9333', + '91.228.155.63:9333', + '91.240.141.175:9333', + '93.100.51.48:9333', + '93.190.140.198:9333', + '94.31.170.49:9333', + '95.174.101.14:9333', + '95.211.138.88:9333', + '95.213.143.13:9333', + '95.213.210.141:9333', + '96.42.248.149:9333', + '96.127.175.194:9333', + '97.81.152.130:9333', + '97.107.188.177:9333', + '101.100.174.138:9333', + '103.3.188.189:9333', + '103.7.32.40:9333', + '103.80.168.57:9333', + '103.82.56.25:9333', + '103.250.4.74:41888', + '104.35.96.255:9333', + '107.150.45.210:9333', + '107.155.133.230:9333', + '107.182.235.53:9333', + '107.197.216.228:9333', + '108.59.7.214:9333', + '108.59.9.14:9333', + '109.61.102.5:9333', + '109.111.178.187:10333', + '109.169.71.17:9333', + '109.201.183.125:9333', + '119.9.116.68:9333', + '119.28.61.201:9333', + '119.28.70.144:9333', + '121.14.154.49:9333', + '121.42.184.8:9333', + '123.1.170.46:9333', + '124.190.12.86:9333', + '130.240.22.202:9333', + '134.119.179.234:9333', + '139.59.180.15:9333', + '139.162.57.21:9333', + '140.186.42.44:9333', + '142.4.208.32:9333', + '143.89.111.111:9333', + '144.76.40.144:9333', + '144.172.71.138:9333', + '148.251.44.134:9333', + '155.4.15.52:9333', + '155.207.60.48:9333', + '158.129.212.251:9333', + '162.213.252.46:9333', + '162.221.12.116:10333', + '166.70.94.106:9333', + '169.44.34.88:9333', + '171.25.221.40:9333', + '173.51.177.2:9333', + '173.79.196.160:9333', + '173.80.190.86:9333', + '173.209.44.34:9333', + '173.255.204.124:9333', + '174.49.248.188:9333', + '178.15.158.237:9333', + '178.20.55.234:9333', + '178.155.51.54:9333', + '178.238.225.168:9333', + '183.111.10.67:9333', + '184.164.147.82:21333', + '185.8.165.150:10333', + '185.21.223.231:9333', + '185.50.213.124:9333', + '185.103.243.133:9333', + '185.106.122.192:9333', + '185.141.24.127:9333', + '185.163.125.67:9333', + '185.194.140.155:9333', + '188.182.109.216:9333', + '188.214.30.138:9333', + '190.112.242.178:9333', + '191.101.236.222:9333', + '192.3.165.30:9333', + '192.187.116.242:9333', + '193.33.170.127:9333', + '193.46.80.101:9333', + '193.58.196.212:9333', + '193.146.41.46:9333', + '194.24.182.27:9333', + '194.63.143.197:9333', + '194.79.8.36:10333', + '194.79.8.37:10333', + '194.135.88.142:9333', + '195.3.254.48:9333', + '195.132.61.82:9333', + '195.166.157.97:9333', + '195.169.138.2:9333', + '195.225.230.28:10333', + '198.48.216.49:9933', + '198.98.48.192:9333', + '199.204.185.218:9333', + '204.111.241.195:9333', + '209.41.186.78:9333', + '209.73.142.226:9333', + '209.126.107.166:9333', + '210.56.60.26:9333', + '211.22.29.34:19262', + '211.149.161.104:9333', + '211.149.224.234:9333', + '212.1.101.68:10333', + '212.47.252.13:9333', + '212.93.226.90:9333', + '212.160.237.44:9333', + '213.136.71.143:9333', + '216.164.138.13:9333', + '217.20.130.72:9333', + '217.112.251.21:9333', + '218.161.47.61:9333', + '219.113.244.52:9333', + '219.117.248.55:9333', + '221.141.3.12:9333', + '221.141.3.26:9333', ]; diff --git a/lib/net/seeds/testnet.js b/lib/net/seeds/testnet.js index 0af8ee69..d3101d3a 100644 --- a/lib/net/seeds/testnet.js +++ b/lib/net/seeds/testnet.js @@ -1,11 +1,17 @@ 'use strict'; module.exports = [ - 'thfsmmn2jbitcoin.onion', - 'it2pj4f7657g3rhi.onion', - 'nkf5e6b7pl4jfd4a.onion', - '4zhkir2ofl7orfom.onion', - 't6xj6wilh4ytvcs7.onion', - 'i6y6ivorwakd7nw3.onion', - 'ubqj4rsu3nqtxmtp.onion' + '45.33.107.92', + '45.76.92.84', + '47.93.81.84', + '66.178.182.35', + '78.47.34.228', + '94.176.237.167', + '98.234.65.112', + '104.131.161.171', + '104.236.211.206', + '104.243.38.34', + '108.61.195.151', + '138.197.220.217', + '173.209.44.34', ]; diff --git a/lib/node/node.js b/lib/node/node.js index 4615be3e..32b422da 100644 --- a/lib/node/node.js +++ b/lib/node/node.js @@ -32,12 +32,12 @@ function Node(options) { AsyncObject.call(this); - this.config = new Config('bcoin'); + this.config = new Config('lcoin'); this.config.inject(options); this.config.load(options); if (options.config) - this.config.open('bcoin.conf'); + this.config.open('lcoin.conf'); this.network = Network.get(this.config.network); this.startTime = -1; diff --git a/lib/primitives/abstractblock.js b/lib/primitives/abstractblock.js index 298c90be..51cbb911 100644 --- a/lib/primitives/abstractblock.js +++ b/lib/primitives/abstractblock.js @@ -15,6 +15,7 @@ const StaticWriter = require('../utils/staticwriter'); const InvItem = require('./invitem'); const encoding = require('../utils/encoding'); const consensus = require('../protocol/consensus'); +const scrypt = require('../crypto/scrypt').derive; /** * The class which all block-like objects inherit from. @@ -156,6 +157,17 @@ AbstractBlock.prototype.hash = function hash(enc) { return h; }; +/** + * Hash the block headers with scrypt. + * @param {String?} enc - Can be `'hex'` or `null`. + * @returns {Hash|Buffer} hash + */ + +AbstractBlock.prototype.powHash = function powHash() { + var data = this.toHead(); + return scrypt(data, data, 1024, 1, 1, 32); +}; + /** * Serialize the block headers. * @returns {Buffer} @@ -226,7 +238,7 @@ AbstractBlock.prototype.verify = function verify() { */ AbstractBlock.prototype.verifyPOW = function verifyPOW() { - return consensus.verifyPOW(this.hash(), this.bits); + return consensus.verifyPOW(this.powHash(), this.bits); }; /** diff --git a/lib/primitives/address.js b/lib/primitives/address.js index 8d0ea10c..335772a4 100644 --- a/lib/primitives/address.js +++ b/lib/primitives/address.js @@ -49,7 +49,8 @@ function Address(options) { Address.types = { PUBKEYHASH: 2, SCRIPTHASH: 3, - WITNESS: 4 + SCRIPTHASH2: 4, + WITNESS: 5 }; /** @@ -162,6 +163,8 @@ Address.prototype.getPrefix = function getPrefix(network) { return prefixes.pubkeyhash; case Address.types.SCRIPTHASH: return prefixes.scripthash; + case Address.types.SCRIPTHASH2: + return prefixes.scripthash2; case Address.types.WITNESS: if (this.hash.length === 20) return prefixes.witnesspubkeyhash; @@ -784,7 +787,7 @@ Address.prototype.isPubkeyhash = function isPubkeyhash() { */ Address.prototype.isScripthash = function isScripthash() { - return this.type === Address.types.SCRIPTHASH; + return this.type === Address.types.SCRIPTHASH || this.type === Address.types.SCRIPTHASH2; }; /** @@ -891,6 +894,8 @@ Address.getType = function getType(prefix, network) { return Address.types.PUBKEYHASH; case prefixes.scripthash: return Address.types.SCRIPTHASH; + case prefixes.scripthash2: + return Address.types.SCRIPTHASH2; case prefixes.witnesspubkeyhash: case prefixes.witnessscripthash: return Address.types.WITNESS; diff --git a/lib/primitives/tx.js b/lib/primitives/tx.js index 46c2acae..7e466ec0 100644 --- a/lib/primitives/tx.js +++ b/lib/primitives/tx.js @@ -1440,6 +1440,10 @@ TX.prototype.checkSanity = function checkSanity() { if (output.value > consensus.MAX_MONEY) return [false, 'bad-txns-vout-toolarge', 100]; + if (!util.isSafeAddition(total, output.value)) { + return [false, 'bad-txns-txouttotal-toolarge', 100]; + } + total += output.value; if (total < 0 || total > consensus.MAX_MONEY) @@ -1745,6 +1749,10 @@ TX.prototype.checkInputs = function checkInputs(view, height) { if (coin.value < 0 || coin.value > consensus.MAX_MONEY) return [-1, 'bad-txns-inputvalues-outofrange', 100]; + if (!util.isSafeAddition(total, coin.value)) { + return [-1, 'bad-txns-inputvalues-outofrange', 100]; + } + total += coin.value; if (total < 0 || total > consensus.MAX_MONEY) diff --git a/lib/protocol/consensus.js b/lib/protocol/consensus.js index 74e5132a..579660ac 100644 --- a/lib/protocol/consensus.js +++ b/lib/protocol/consensus.js @@ -29,7 +29,7 @@ exports.COIN = 100000000; * @default */ -exports.MAX_MONEY = 21000000 * exports.COIN; +exports.MAX_MONEY = 84000000 * exports.COIN; /** * Base block subsidy (consensus). @@ -216,7 +216,7 @@ exports.MAX_MULTISIG_PUBKEYS = 20; * @default */ -exports.BIP16_TIME = 1333238400; +exports.BIP16_TIME = 1349049600; /** * Convert a compact number to a big number. diff --git a/lib/protocol/network.js b/lib/protocol/network.js index 33c97e5a..439641c3 100644 --- a/lib/protocol/network.js +++ b/lib/protocol/network.js @@ -79,7 +79,6 @@ Network.type = null; Network.main = null; Network.testnet = null; Network.regtest = null; -Network.segnet4 = null; Network.simnet = null; /** @@ -418,6 +417,7 @@ function cmpAddress(network, prefix) { switch (prefix) { case prefixes.pubkeyhash: case prefixes.scripthash: + case prefixes.scripthash2: case prefixes.witnesspubkeyhash: case prefixes.witnessscripthash: return true; diff --git a/lib/protocol/networks.js b/lib/protocol/networks.js index e035baf2..024d1f6c 100644 --- a/lib/protocol/networks.js +++ b/lib/protocol/networks.js @@ -48,12 +48,11 @@ main.type = 'main'; */ main.seeds = [ - 'seed.bitcoin.sipa.be', // Pieter Wuille - 'dnsseed.bluematt.me', // Matt Corallo - 'dnsseed.bitcoin.dashjr.org', // Luke Dashjr - 'seed.bitcoinstats.com', // Christian Decker - 'seed.bitcoin.jonasschnelli.ch', // Jonas Schnelli - 'seed.btc.petertodd.org' // Peter Todd + 'seed-a.litecoin.loshan.co.uk', + 'dnsseed.thrasher.io', + 'dnsseed.litecointools.com', + 'dnsseed.litecoinpool.org', + 'dnsseed.koin-project.com' ]; /** @@ -62,7 +61,7 @@ main.seeds = [ * @default */ -main.magic = 0xd9b4bef9; +main.magic = 0xdbb6c0fb; /** * Default network port. @@ -70,7 +69,7 @@ main.magic = 0xd9b4bef9; * @default */ -main.port = 8333; +main.port = 9333; /** * Checkpoint block list. @@ -78,30 +77,22 @@ main.port = 8333; */ main.checkpointMap = { - 11111: '1d7c6eb2fd42f55925e92efad68b61edd22fba29fde8783df744e26900000000', - 33333: 'a6d0b5df7d0df069ceb1e736a216ad187a50b07aaa4e78748a58d52d00000000', - 74000: '201a66b853f9e7814a820e2af5f5dc79c07144e31ce4c9a39339570000000000', - 105000: '97dc6b1d15fbeef373a744fee0b254b0d2c820a3ae7f0228ce91020000000000', - 134444: 'feb0d2420d4a18914c81ac30f494a5d4ff34cd15d34cfd2fb105000000000000', - 168000: '63b703835cb735cb9a89d733cbe66f212f63795e0172ea619e09000000000000', - 193000: '17138bca83bdc3e6f60f01177c3877a98266de40735f2a459f05000000000000', - 210000: '2e3471a19b8e22b7f939c63663076603cf692f19837e34958b04000000000000', - 216116: '4edf231bf170234e6a811460f95c94af9464e41ee833b4f4b401000000000000', - 225430: '32595730b165f097e7b806a679cf7f3e439040f750433808c101000000000000', - 250000: '14d2f24d29bed75354f3f88a5fb50022fc064b02291fdf873800000000000000', - 279000: '407ebde958e44190fa9e810ea1fc3a7ef601c3b0a0728cae0100000000000000', - 295000: '83a93246c67003105af33ae0b29dd66f689d0f0ff54e9b4d0000000000000000', - 300255: 'b2f3a0f0de4120c1089d5f5280a263059f9b6e7c520428160000000000000000', - 319400: '3bf115fd057391587ca39a531c5d4989e1adec9b2e05c6210000000000000000', - 343185: '548536d48e7678fcfa034202dd45d4a76b1ad061f38b2b070000000000000000', - 352940: 'ffc9520143e41c94b6e03c2fa3e62bb76b55ba2df45d75100000000000000000', - 382320: 'b28afdde92b0899715e40362f56afdb20e3d135bedc68d0a0000000000000000', - 401465: 'eed16cb3e893ed9366f27c39a9ecd95465d02e3ef40e45010000000000000000', - 420000: 'a1ff746b2d42b834cb7d6b8981b09c265c2cabc016e8cc020000000000000000', - 440000: '9bf296b8de5f834f7635d5e258a434ad51b4dbbcf7c08c030000000000000000', - 450000: '0ba2070c62cd9da1f8cef88a0648c661a411d33e728340010000000000000000', - 460000: '8c25fc7e414d3e868d6ce0ec473c30ad44e7e8bc1b75ef000000000000000000', - 470000: '89756d1ed75901437300af10d5ab69070a282e729c536c000000000000000000' + 1500: '67299ab5a20244afc95e8376d48b5fe4545ad055a707a7cf88d25d9565291a84', + 4032: '4608cfd9e3d75f9687a935fd6ae2805b720335ce05595ef00efc9871420ee99c', + 8064: '700d4394a67d98b3fc29b7f0efeeb9baa4b8400c151f6510f29051fc534398eb', + 16128: '3d15cd1c2ae103ec4b7acd9d4d1ddc6fb66c0e9b1d9f80afa6f9b75918df2e60', + 23420: '07b501510bce8f974e87ec30258fa57d54fea9c30aa9b2d20bfd1aa89cdf0fd8', + 50000: 'a6207ad0713e2b2b88323a4fdb2a6727c11904cc2d01a575f0689b02eb37dc69', + 80000: '0ae9b2cd2e186748cbbe8c6ab420f9a85599a864c7493f5000a376f6027ccb4f', + 120000: '3161ac52357a6a021b12e7e9ce298e9ec88e82325f15f0a7daf6054f92269dbd', + 161500: '43ff718479f7bb8d41b8283b12914902dc1cba777c225cf7b44b4f478098e8db', + 179620: '09f7b9782b0ba55883b2dca7e969fa2fbed70f6e448ed12604c00a995cc6d92a', + 240000: 'aa885055a13e2eab6e4e0c59c439db739c4cf23676ee17a27c15c2b4c4d14071', + 383640: '64f3c626f1c396a090057d4be94ba32751a310f1b35ec6af5b21a994f009682b', + 409004: 'a3085935f1b439cfe9770edcfb67b682d974ad95931d6108faf1d963d6187548', + 456000: '0420375624e31b407dac0105a4a64ce397f822be060d9387d46c36c61cf734bf', + 638902: '384fc7ae3bc5ec5cc49ccd3d95fc9a81a5f3fc758c9ae28dd263ece856862315', + 721000: 'e540989a758adc4116743ee6a235b2ea14b7759dd93b46e27894dfe14d7b8a19' }; /** @@ -110,14 +101,14 @@ main.checkpointMap = { * @default */ -main.lastCheckpoint = 470000; +main.lastCheckpoint = 721000; /** * @const {Number} * @default */ -main.halvingInterval = 210000; +main.halvingInterval = 840000; /** * Genesis block header. @@ -126,13 +117,12 @@ main.halvingInterval = 210000; main.genesis = { version: 1, - hash: '6fe28c0ab6f1b372c1a6a246ae63f74f931e8365e15a089c68d6190000000000', + hash: 'e2bf047e7e5a191aa4ef34d314979dc9986e0f19251edaba5940fd1fe365a712', prevBlock: '0000000000000000000000000000000000000000000000000000000000000000', - merkleRoot: - '3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a', - time: 1231006505, - bits: 486604799, - nonce: 2083236893, + merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97', + time: 1317972665, + bits: 504365040, // 0x1e0ffff0 + nonce: 2084524493, height: 0 }; @@ -143,14 +133,13 @@ main.genesis = { main.genesisBlock = '0100000000000000000000000000000000000000000000000000000000000000000000' - + '003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab' - + '5f49ffff001d1dac2b7c01010000000100000000000000000000000000000000000000' - + '00000000000000000000000000ffffffff4d04ffff001d0104455468652054696d6573' - + '2030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66' - + '207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01' - + '000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f' - + '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f' - + 'ac00000000'; + + '00d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97b9aa' + + '8e4ef0ff0f1ecd513f7c01010000000100000000000000000000000000000000000000' + + '00000000000000000000000000ffffffff4804ffff001d0104404e592054696d657320' + + '30352f4f63742f32303131205374657665204a6f62732c204170706c65e28099732056' + + '6973696f6e6172792c2044696573206174203536ffffffff0100f2052a010000004341' + + '040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4' + + 'd4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac00000000'; /** * POW-related constants. @@ -165,7 +154,7 @@ main.pow = { */ limit: new BN( - '00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + '00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 'hex' ), @@ -175,7 +164,7 @@ main.pow = { * @default */ - bits: 486604799, + bits: 504365055, /** * Minimum chainwork for best chain. @@ -183,7 +172,7 @@ main.pow = { */ chainwork: new BN( - '00000000000000000000000000000000000000000074093f7ecede98cadd3a32', + '00000000000000000000000000000000000000000000000ba50a60f8b56c7fe0', 'hex' ), @@ -193,7 +182,7 @@ main.pow = { * @default */ - targetTimespan: 14 * 24 * 60 * 60, + targetTimespan: 3.5 * 24 * 60 * 60, /** * Average block time. @@ -201,7 +190,7 @@ main.pow = { * @default */ - targetSpacing: 10 * 60, + targetSpacing: 2.5 * 60, /** * Retarget interval in blocks. @@ -241,37 +230,37 @@ main.block = { * Used for avoiding bip30 checks. */ - bip34height: 227931, + bip34height: 710000, /** * Hash of the block that activated bip34. */ - bip34hash: 'b808089c756add1591b1d17bab44bba3fed9e02f942ab4894b02000000000000', + bip34hash: 'cf519deb9a32b4c72612ff0c42bf3a04f262fa41d4c8a7d58e763aa804d209fa', /** * Height at which bip65 was activated. */ - bip65height: 388381, + bip65height: 918684, /** * Hash of the block that activated bip65. */ - bip65hash: 'f035476cfaeb9f677c2cdad00fd908c556775ded24b6c2040000000000000000', + bip65hash: '1a31cc64827cc248b2afefd849d41dde2bb907e73ff6ef3edce077891e04b3ba', /** * Height at which bip66 was activated. */ - bip66height: 363725, + bip66height: 811879, /** * Hash of the block that activated bip66. */ - bip66hash: '3109b588941188a9f1c2576aae462d729b8cce9da1ea79030000000000000000', + bip66hash: '941849dc7bbdd271a727db8fb06acd33e23a1b8b5d83f85289fa332801eece7a', /** * Safe height to start pruning. @@ -298,7 +287,7 @@ main.block = { * logs without spamming. */ - slowHeight: 325000 + slowHeight: 900000 }; /** @@ -308,10 +297,7 @@ main.block = { * @default */ -main.bip30 = { - 91842: 'eccae000e3c8e4e093936360431f3b7603c563c1ff6181390a4d0a0000000000', - 91880: '21d77ccb4c08386a04ac0196ae10f6a1d2c2a377558ca190f143070000000000' -}; +main.bip30 = {}; /** * For versionbits. @@ -319,7 +305,7 @@ main.bip30 = { * @default */ -main.activationThreshold = 1916; // 95% of 2016 +main.activationThreshold = 6048; // 75% of 8064 /** * Confirmation window for versionbits. @@ -327,7 +313,7 @@ main.activationThreshold = 1916; // 95% of 2016 * @default */ -main.minerWindow = 2016; // nPowTargetTimespan / nPowTargetSpacing +main.minerWindow = 8064; // nPowTargetTimespan / nPowTargetSpacing * 4 /** * Deployments for versionbits. @@ -339,8 +325,8 @@ main.deployments = { csv: { name: 'csv', bit: 0, - startTime: 1462060800, // May 1st, 2016 - timeout: 1493596800, // May 1st, 2017 + startTime: 1485561600, // January 28, 2017 + timeout: 1517356801, // January 31st, 2018 threshold: -1, window: -1, required: false, @@ -349,23 +335,13 @@ main.deployments = { segwit: { name: 'segwit', bit: 1, - startTime: 1479168000, // November 15th, 2016. - timeout: 1510704000, // November 15th, 2017. + startTime: 1485561600, // January 28, 2017 + timeout: 1517356801, // January 31st, 2018 threshold: -1, window: -1, required: true, force: false }, - segsignal: { - name: 'segsignal', - bit: 4, - startTime: 1496275200, // June 1st, 2017. - timeout: 1510704000, // November 15th, 2017. - threshold: 269, // 80% - window: 336, // ~2.33 days - required: false, - force: false - }, testdummy: { name: 'testdummy', bit: 28, @@ -387,7 +363,6 @@ main.deployments = { main.deploys = [ main.deployments.csv, main.deployments.segwit, - main.deployments.segsignal, main.deployments.testdummy ]; @@ -398,7 +373,7 @@ main.deploys = [ */ main.keyPrefix = { - privkey: 0x80, + privkey: 0xb0, xpubkey: 0x0488b21e, xprivkey: 0x0488ade4, xpubkey58: 'xpub', @@ -412,11 +387,12 @@ main.keyPrefix = { */ main.addressPrefix = { - pubkeyhash: 0x00, + pubkeyhash: 0x30, scripthash: 0x05, + scripthash2: 0x32, witnesspubkeyhash: 0x06, witnessscripthash: 0x0a, - bech32: 'bc' + bech32: 'ltc' }; /** @@ -434,7 +410,7 @@ main.requireStandard = true; * @default */ -main.rpcPort = 8332; +main.rpcPort = 9332; /** * Default min relay rate. @@ -442,7 +418,7 @@ main.rpcPort = 8332; * @default */ -main.minRelay = 1000; +main.minRelay = 10000; /** * Default normal relay rate. @@ -450,7 +426,7 @@ main.minRelay = 1000; * @default */ -main.feeRate = 100000; +main.feeRate = 1000000; /** * Maximum normal relay rate. @@ -458,7 +434,7 @@ main.feeRate = 100000; * @default */ -main.maxFeeRate = 400000; +main.maxFeeRate = 4000000; /** * Whether to allow self-connection. @@ -484,85 +460,69 @@ const testnet = {}; testnet.type = 'testnet'; testnet.seeds = [ - 'testnet-seed.bitcoin.jonasschnelli.ch', // Jonas Schnelli - 'seed.tbtc.petertodd.org', // Peter Todd - 'testnet-seed.bluematt.me', // Matt Corallo - 'testnet-seed.bitcoin.schildbach.de' // Andreas Schildbach + 'testnet-seed.litecointools.com', + 'seed-b.litecoin.loshan.co.uk', + 'dnsseed-testnet.thrasher.io' ]; -testnet.magic = 0x0709110b; +testnet.magic = 0xf1c8d2fd; -testnet.port = 18333; +testnet.port = 19335; testnet.checkpointMap = { - 546: '70cb6af7ebbcb1315d3414029c556c55f3e2fc353c4c9063a76c932a00000000', - 10000: '02a1b43f52591e53b660069173ac83b675798e12599dbb0442b7580000000000', - 100000: '1e0a16bbadccde1d80c66597b1939e45f91b570d29f95fc158299e0000000000', - 170000: '508125560d202b89757889bb0e49c712477be20440058f05db4f0e0000000000', - 210000: '32365454b5f29a826bff8ad9b0448cad0072fc73d50e482d91a3dece00000000', - 300000: 'a141bf3972424853f04367b47995e220e0b5a2706e5618766f22000000000000', - 390000: 'f217e183484fb6d695609cc71fa2ae24c3020943407e0150b298030000000000', - 420000: 'de9e73a3b91fbb014e036e8583a17d6b638a699aeb2de8573d12580800000000', - 500000: '06f60922a2aab2757317820fc6ffaf6a470e2cbb0f63a2aac0a7010000000000', - 630000: 'bbbe117035432a6a4effcb297207a02b031735b43e0d19a9217c000000000000', - 700000: 'c14d3f6a1e7c7d66fd940951e44f3c3be1273bea4d2ab1786140000000000000', - 780000: '0381582e34c3755964dc2813e2b33e521e5596367144e1670851050000000000', - 840000: 'dac1648107bd4394e57e4083c86d42b548b1cfb119665f179ea80a0000000000', - 900000: '9bd8ac418beeb1a2cf5d68c8b5c6ebaa947a5b766e5524898d6f350000000000', - 1050000: 'd8190cf0af7f08e179cab51d67db0b44b87951a78f7fdc31b4a01a0000000000' + 2056: '8932a8789c96c516d8a1080a29c7e7e387d2397a83864f9adcaf97ba318a7417', }; -testnet.lastCheckpoint = 1050000; +testnet.lastCheckpoint = 2056; -testnet.halvingInterval = 210000; +testnet.halvingInterval = 840000; testnet.genesis = { version: 1, - hash: '43497fd7f826957108f4a30fd9cec3aeba79972084e90ead01ea330900000000', + hash: 'a0293e4eeb3da6e6f56f81ed595f57880d1a21569e13eefdd951284b5a626649', prevBlock: '0000000000000000000000000000000000000000000000000000000000000000', - merkleRoot: - '3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a', - time: 1296688602, - bits: 486604799, - nonce: 414098458, + merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97', + time: 1486949366, + bits: 504365040, + nonce: 293345, height: 0 }; testnet.genesisBlock = - '0100000000000000000000000000000000000000000000000000000000000000000000' - + '003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4adae5' - + '494dffff001d1aa4ae1801010000000100000000000000000000000000000000000000' - + '00000000000000000000000000ffffffff4d04ffff001d0104455468652054696d6573' - + '2030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66' - + '207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01' - + '000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f' - + '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f' - + 'ac00000000'; + '010000000000000000000000000000000000000000000000000000000000000000000' + + '000d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97f6' + + '0ba158f0ff0f1ee179040001010000000100000000000000000000000000000000000' + + '00000000000000000000000000000ffffffff4804ffff001d0104404e592054696d65' + + '732030352f4f63742f32303131205374657665204a6f62732c204170706c65e280997' + + '320566973696f6e6172792c2044696573206174203536ffffffff0100f2052a010000' + + '004341040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3e' + + 'b4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac' + + '00000000'; testnet.pow = { limit: new BN( - '00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff', + '00000fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', 'hex' ), - bits: 486604799, + bits: 504365055, chainwork: new BN( - '0000000000000000000000000000000000000000000000286d17360c5492b2c4', + '0000000000000000000000000000000000000000000000000000364b0cbc3568', 'hex' ), - targetTimespan: 14 * 24 * 60 * 60, - targetSpacing: 10 * 60, + targetTimespan: 3.5 * 24 * 60 * 60, + targetSpacing: 2.5 * 60, retargetInterval: 2016, targetReset: true, noRetargeting: false }; testnet.block = { - bip34height: 21111, - bip34hash: 'f88ecd9912d00d3f5c2a8e0f50417d3e415c75b3abe584346da9b32300000000', - bip65height: 581885, - bip65hash: 'b61e864fbec41dfaf09da05d1d76dc068b0dd82ee7982ff255667f0000000000', - bip66height: 330776, - bip66hash: '82a14b9e5ea81d4832b8e2cd3c2a6092b5a3853285a8995ec4c8042100000000', + bip34height: 76, + bip34hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580', + bip65height: 76, + bip65hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580', + bip66height: 76, + bip66hash: '73058ccc33da8b5479e3548c3cce4fb32a705fa9803994fd5f498bed71c77580', pruneAfterHeight: 1000, keepBlocks: 10000, maxTipAge: 24 * 60 * 60, @@ -579,8 +539,8 @@ testnet.deployments = { csv: { name: 'csv', bit: 0, - startTime: 1456790400, // March 1st, 2016 - timeout: 1493596800, // May 1st, 2017 + startTime: 1483228800, // March 1st, 2016 + timeout: 1517356801, // May 1st, 2017 threshold: -1, window: -1, required: false, @@ -589,23 +549,13 @@ testnet.deployments = { segwit: { name: 'segwit', bit: 1, - startTime: 1462060800, // May 1st 2016 - timeout: 1493596800, // May 1st 2017 + startTime: 1483228800, // May 1st 2016 + timeout: 1517356801, // May 1st 2017 threshold: -1, window: -1, required: true, force: false }, - segsignal: { - name: 'segsignal', - bit: 4, - startTime: 0xffffffff, - timeout: 0xffffffff, - threshold: 269, - window: 336, - required: false, - force: false - }, testdummy: { name: 'testdummy', bit: 28, @@ -621,7 +571,6 @@ testnet.deployments = { testnet.deploys = [ testnet.deployments.csv, testnet.deployments.segwit, - testnet.deployments.segsignal, testnet.deployments.testdummy ]; @@ -629,22 +578,23 @@ testnet.keyPrefix = { privkey: 0xef, xpubkey: 0x043587cf, xprivkey: 0x04358394, - xpubkey58: 'tpub', - xprivkey58: 'tprv', + xpubkey58: 'xpub', + xprivkey58: 'xprv', coinType: 1 }; testnet.addressPrefix = { pubkeyhash: 0x6f, scripthash: 0xc4, + scripthash2: 0x3a, witnesspubkeyhash: 0x03, witnessscripthash: 0x28, - bech32: 'tb' + bech32: 'tltc' }; testnet.requireStandard = false; -testnet.rpcPort = 18332; +testnet.rpcPort = 19332; testnet.minRelay = 1000; @@ -670,7 +620,7 @@ regtest.seeds = [ regtest.magic = 0xdab5bffa; -regtest.port = 48444; +regtest.port = 19444; regtest.checkpointMap = {}; regtest.lastCheckpoint = 0; @@ -679,26 +629,25 @@ regtest.halvingInterval = 150; regtest.genesis = { version: 1, - hash: '06226e46111a0b59caaf126043eb5bbf28c34f3a5e332a1fc7b2b73cf188910f', + hash: 'f916c456fc51df627885d7d674ed02dc88a225adb3f02ad13eb4938ff3270853', prevBlock: '0000000000000000000000000000000000000000000000000000000000000000', - merkleRoot: - '3ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a', + merkleRoot: 'd9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97', time: 1296688602, bits: 545259519, - nonce: 2, + nonce: 0, height: 0 }; regtest.genesisBlock = - '0100000000000000000000000000000000000000000000000000000000000000000000' - + '003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4adae5' - + '494dffff7f200200000001010000000100000000000000000000000000000000000000' - + '00000000000000000000000000ffffffff4d04ffff001d0104455468652054696d6573' - + '2030332f4a616e2f32303039204368616e63656c6c6f72206f6e206272696e6b206f66' - + '207365636f6e64206261696c6f757420666f722062616e6b73ffffffff0100f2052a01' - + '000000434104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f' - + '61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f' - + 'ac00000000'; + '010000000000000000000000000000000000000000000000000000000000000000000' + + '000d9ced4ed1130f7b7faad9be25323ffafa33232a17c3edf6cfd97bee6bafbdd97da' + + 'e5494dffff7f200000000001010000000100000000000000000000000000000000000' + + '00000000000000000000000000000ffffffff4804ffff001d0104404e592054696d65' + + '732030352f4f63742f32303131205374657665204a6f62732c204170706c65e280997' + + '320566973696f6e6172792c2044696573206174203536ffffffff0100f2052a010000' + + '004341040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3e' + + 'b4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9ac' + + '00000000'; regtest.pow = { limit: new BN( @@ -707,18 +656,18 @@ regtest.pow = { ), bits: 545259519, chainwork: new BN( - '0000000000000000000000000000000000000000000000000000000000000002', + '0000000000000000000000000000000000000000000000000000000000000000', 'hex' ), - targetTimespan: 14 * 24 * 60 * 60, - targetSpacing: 10 * 60, + targetTimespan: 3.5 * 24 * 60 * 60, + targetSpacing: 2.5 * 60, retargetInterval: 2016, targetReset: true, noRetargeting: true }; regtest.block = { - bip34height: 100000000, + bip34height: 0xffffffff, bip34hash: null, bip65height: 1351, bip65hash: null, @@ -757,16 +706,6 @@ regtest.deployments = { required: true, force: false }, - segsignal: { - name: 'segsignal', - bit: 4, - startTime: 0xffffffff, - timeout: 0xffffffff, - threshold: 269, - window: 336, - required: false, - force: false - }, testdummy: { name: 'testdummy', bit: 28, @@ -782,30 +721,30 @@ regtest.deployments = { regtest.deploys = [ regtest.deployments.csv, regtest.deployments.segwit, - regtest.deployments.segsignal, regtest.deployments.testdummy ]; regtest.keyPrefix = { - privkey: 0x5a, - xpubkey: 0xeab4fa05, - xprivkey: 0xeab404c7, - xpubkey58: 'rpub', - xprivkey58: 'rprv', + privkey: 0xef, + xpubkey: 0x043587cf, + xprivkey: 0x04358394, + xpubkey58: 'xpub', + xprivkey58: 'xprv', coinType: 1 }; regtest.addressPrefix = { - pubkeyhash: 0x3c, - scripthash: 0x26, - witnesspubkeyhash: 0x7a, - witnessscripthash: 0x14, - bech32: 'rb' + pubkeyhash: 0x6f, + scripthash: 0xc4, + scripthash2: 0x3a, + witnesspubkeyhash: 0x03, + witnessscripthash: 0x28, + bech32: 'rltc' }; regtest.requireStandard = false; -regtest.rpcPort = 48332; +regtest.rpcPort = 19445; regtest.minRelay = 1000; @@ -873,8 +812,8 @@ simnet.pow = { '0000000000000000000000000000000000000000000000000000000000000002', 'hex' ), - targetTimespan: 14 * 24 * 60 * 60, - targetSpacing: 10 * 60, + targetTimespan: 3.5 * 24 * 60 * 60, + targetSpacing: 2.5 * 60, retargetInterval: 2016, targetReset: true, noRetargeting: false diff --git a/lib/wallet/masterkey.js b/lib/wallet/masterkey.js index 96083e11..d7525f63 100644 --- a/lib/wallet/masterkey.js +++ b/lib/wallet/masterkey.js @@ -13,7 +13,7 @@ const random = require('../crypto/random'); const cleanse = require('../crypto/cleanse'); const aes = require('../crypto/aes'); const pbkdf2 = require('../crypto/pbkdf2'); -const scrypt = require('../crypto/scrypt'); +const scrypt = require('../crypto/scrypt').derive; const BufferReader = require('../utils/reader'); const StaticWriter = require('../utils/staticwriter'); const encoding = require('../utils/encoding'); diff --git a/lib/wallet/server.js b/lib/wallet/server.js index e1610db1..c9d807fc 100644 --- a/lib/wallet/server.js +++ b/lib/wallet/server.js @@ -25,7 +25,7 @@ const server = exports; */ server.create = function create(options) { - const config = new Config('bcoin'); + const config = new Config('lcoin'); let logger = new Logger('debug'); config.inject(options); diff --git a/package.json b/package.json index 0272202c..52053ccf 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "bcoin", + "name": "lcoin", "version": "1.0.0-beta.15", - "description": "Bitcoin bike-shed", + "description": "Litecoin bike-shed", "license": "MIT", - "repository": "git://github.com/bcoin-org/bcoin.git", - "homepage": "https://github.com/bcoin-org/bcoin", + "repository": "git://github.com/bcoin-org/lcoin.git", + "homepage": "https://github.com/bcoin-org/lcoin", "bugs": { - "url": "https://github.com/bcoin-org/bcoin/issues" + "url": "https://github.com/bcoin-org/lcoin/issues" }, "author": "Fedor Indutny ", "contributors": [ @@ -53,10 +53,10 @@ }, "main": "./lib/bcoin.js", "bin": { - "bcoin": "./bin/bcoin", - "bcoin-cli": "./bin/cli", - "bcoin-node": "./bin/node", - "bcoin-spvnode": "./bin/spvnode" + "lcoin": "./bin/lcoin", + "lcoin-cli": "./bin/cli", + "lcoin-node": "./bin/node", + "lcoin-spvnode": "./bin/spvnode" }, "scripts": { "clean": "rm -f {browser/,}{bcoin.js,bcoin-worker.js}", diff --git a/scripts/gen.js b/scripts/gen.js index e3fe3d3d..72dd860f 100644 --- a/scripts/gen.js +++ b/scripts/gen.js @@ -66,44 +66,35 @@ function createGenesisBlock(options) { const main = createGenesisBlock({ version: 1, - time: 1231006505, - bits: 486604799, - nonce: 2083236893 + time: 1317972665, + bits: 504365040, + nonce: 2084524493, + flags: Buffer.from( + 'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56', + 'ascii'), + key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex') }); const testnet = createGenesisBlock({ version: 1, - time: 1296688602, - bits: 486604799, - nonce: 414098458 + time: 1486949366, + bits: 0x1e0ffff0, + nonce: 293345, + flags: Buffer.from( + 'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56', + 'ascii'), + key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex') }); const regtest = createGenesisBlock({ version: 1, time: 1296688602, - bits: 545259519, - nonce: 2 -}); - -const segnet3 = createGenesisBlock({ - version: 1, - time: 1452831101, - bits: 486604799, - nonce: 0 -}); - -const segnet4 = createGenesisBlock({ - version: 1, - time: 1452831101, - bits: 503447551, - nonce: 0 -}); - -const btcd = createGenesisBlock({ - version: 1, - time: 1401292357, - bits: 545259519, - nonce: 2 + bits: 0x207fffff, + nonce: 0, + flags: Buffer.from( + 'NY Times 05/Oct/2011 Steve Jobs, Apple’s Visionary, Dies at 56', + 'ascii'), + key: Buffer.from('040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9', 'hex') }); util.log(main); @@ -112,11 +103,6 @@ util.log(testnet); util.log(''); util.log(regtest); util.log(''); -util.log(segnet3); -util.log(''); -util.log(segnet4); -util.log(''); -util.log(''); util.log('main hash: %s', main.rhash()); util.log('main raw: %s', main.toRaw().toString('hex')); util.log(''); @@ -126,11 +112,3 @@ util.log(''); util.log('regtest hash: %s', regtest.rhash()); util.log('regtest raw: %s', regtest.toRaw().toString('hex')); util.log(''); -util.log('segnet3 hash: %s', segnet3.rhash()); -util.log('segnet3 raw: %s', segnet3.toRaw().toString('hex')); -util.log(''); -util.log('segnet4 hash: %s', segnet4.rhash()); -util.log('segnet4 raw: %s', segnet4.toRaw().toString('hex')); -util.log(''); -util.log('btcd simnet hash: %s', btcd.rhash()); -util.log('btcd simnet raw: %s', btcd.toRaw().toString('hex')); diff --git a/scripts/seeds.sh b/scripts/seeds.sh index c7044246..75840cd6 100755 --- a/scripts/seeds.sh +++ b/scripts/seeds.sh @@ -1,8 +1,8 @@ #!/bin/bash dir=$(dirname "$(which "$0")") -url_main='https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/seeds/nodes_main.txt' -url_testnet='https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/seeds/nodes_test.txt' +url_main='https://raw.githubusercontent.com/litecoin-project/litecoin/master/contrib/seeds/nodes_main.txt' +url_testnet='https://raw.githubusercontent.com/litecoin-project/litecoin/master/contrib/seeds/nodes_test.txt' getseeds() { echo "$(curl -s "$1")" diff --git a/test/address-test.js b/test/address-test.js index 8f6ee7b1..69ee6621 100644 --- a/test/address-test.js +++ b/test/address-test.js @@ -12,7 +12,7 @@ describe('Address', function() { const raw = 'e34cce70c86373273efcc54ce7d2a491bb4a0e84'; const p2pkh = Buffer.from(raw, 'hex'); const addr = Address.fromPubkeyhash(p2pkh); - const expectedAddr = '1MirQ9bwyQcGVJPwKUgapu5ouK2E2Ey4gX'; + const expectedAddr = 'LfwofMun44rKk766Vcft6v9a7XPWBSppiq'; assert.strictEqual(addr.toString(), expectedAddr); }); @@ -20,7 +20,7 @@ describe('Address', function() { const raw = '0ef030107fd26e0b6bf40512bca2ceb1dd80adaa'; const p2pkh = Buffer.from(raw, 'hex'); const addr = Address.fromPubkeyhash(p2pkh); - const expectedAddr = '12MzCDwodF9G1e7jfwLXfR164RNtx4BRVG'; + const expectedAddr = 'LLawTSFdhuPKGSotr5KpwS4rGdkB7J9vLq'; assert.strictEqual(addr.toString(), expectedAddr); }); @@ -90,7 +90,7 @@ describe('Address', function() { const raw = '751e76e8199196d454941c45d1b3a323f1433bd6'; const p2wpkh = Buffer.from(raw, 'hex'); const addr = Address.fromWitnessPubkeyhash(p2wpkh); - const expectedAddr = 'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4'; + const expectedAddr = 'ltc1qw508d6qejxtdg4y5r3zarvary0c5xw7kgmn4n9'; assert.strictEqual(addr.toString(), expectedAddr); }); @@ -102,14 +102,14 @@ describe('Address', function() { + 'b8c6329604903262', 'hex'); const addr = Address.fromWitnessScripthash(p2wpkh); assert.strictEqual(addr.toString(), - 'bc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qccfmv3'); + 'ltc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qmu8tk5'); }); it('should match testnet segwit p2wpkh v0 address', () => { const raw = '751e76e8199196d454941c45d1b3a323f1433bd6'; const p2wpkh = Buffer.from(raw, 'hex'); const addr = Address.fromWitnessPubkeyhash(p2wpkh, 'testnet'); - const expectedAddr = 'tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx'; + const expectedAddr = 'tltc1qw508d6qejxtdg4y5r3zarvary0c5xw7klfsuq0'; assert.strictEqual(addr.toString(), expectedAddr); }); @@ -121,7 +121,7 @@ describe('Address', function() { + 'b8c6329604903262', 'hex'); const addr = Address.fromWitnessScripthash(p2wpkh, 'testnet'); assert.strictEqual(addr.toString(), - 'tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7'); + 'tltc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qsnr4fp'); }); it('should match testnet segwit p2pwsh v0 address 2', () => { @@ -132,7 +132,7 @@ describe('Address', function() { + '4d165dab93e86433', 'hex'); const addr = Address.fromWitnessScripthash(p2wpkh, 'testnet'); assert.strictEqual(addr.toString(), - 'tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy'); + 'tltc1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesu9tmgm'); }); it('should handle invalid segwit hrp', () => { diff --git a/test/bech32-test.js b/test/bech32-test.js index e78f78fc..6b00dfca 100644 --- a/test/bech32-test.js +++ b/test/bech32-test.js @@ -42,14 +42,14 @@ const validChecksums = [ const validAddresses = [ [ - 'BC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KV8F3T4', + 'LTC1QW508D6QEJXTDG4Y5R3ZARVARY0C5XW7KGMN4N9', Buffer.from([ 0x00, 0x14, 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6 ]) ], [ - 'tb1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3q0sl5k7', + 'tltc1qrp33g0q5c5txsp9arysrx4k6zdkfs4nce4xj0gdcccefvpysxf3qsnr4fp', Buffer.from([ 0x00, 0x20, 0x18, 0x63, 0x14, 0x3c, 0x14, 0xc5, 0x16, 0x68, 0x04, 0xbd, 0x19, 0x20, 0x33, 0x56, 0xda, 0x13, 0x6c, 0x98, 0x56, 0x78, @@ -58,8 +58,7 @@ const validAddresses = [ ]) ], [ - 'bc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw50' - + '8d6qejxtdg4y5r3zarvary0c5xw7k7grplx', + 'ltc1pw508d6qejxtdg4y5r3zarvary0c5xw7kw508d6qejxtdg4y5r3zarvary0c5xw7k0tul4w', Buffer.from([ 0x81, 0x28, 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23, 0xf1, 0x43, 0x3b, 0xd6, @@ -68,20 +67,20 @@ const validAddresses = [ ]) ], [ - 'BC1SW50QA3JX3S', + 'LTC1SW50QZGYDF5', Buffer.from([ 0x90, 0x02, 0x75, 0x1e ]) ], [ - 'bc1zw508d6qejxtdg4y5r3zarvaryvg6kdaj', + 'ltc1zw508d6qejxtdg4y5r3zarvaryvdzur3w', Buffer.from([ 0x82, 0x10, 0x75, 0x1e, 0x76, 0xe8, 0x19, 0x91, 0x96, 0xd4, 0x54, 0x94, 0x1c, 0x45, 0xd1, 0xb3, 0xa3, 0x23 ]) ], [ - 'tb1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesrxh6hy', + 'tltc1qqqqqp399et2xygdj5xreqhjjvcmzhxw4aywxecjdzew6hylgvsesu9tmgm', Buffer.from([ 0x00, 0x20, 0x00, 0x00, 0x00, 0xc4, 0xa5, 0xca, 0xd4, 0x62, 0x21, 0xb2, 0xa1, 0x87, 0x90, 0x5e, 0x52, 0x66, 0x36, 0x2b, 0x99, 0xd5, @@ -144,7 +143,7 @@ describe('Bech32', function() { for (const [addr, script] of validAddresses) { it(`should have valid address for ${addr}`, () => { - let hrp = 'bc'; + let hrp = 'ltc'; let ret = null; try { @@ -154,7 +153,7 @@ describe('Bech32', function() { } if (ret === null) { - hrp = 'tb'; + hrp = 'tltc'; try { ret = fromAddress(hrp, addr); } catch (e) { @@ -174,8 +173,8 @@ describe('Bech32', function() { for (const addr of invalidAddresses) { it(`should have invalid address for ${addr}`, () => { - assert.throws(() => fromAddress('bc', addr)); - assert.throws(() => fromAddress('tb', addr)); + assert.throws(() => fromAddress('ltc', addr)); + assert.throws(() => fromAddress('tltc', addr)); }); } diff --git a/test/gcs-test.js b/test/gcs-test.js index 761c7f93..a4a94762 100644 --- a/test/gcs-test.js +++ b/test/gcs-test.js @@ -72,8 +72,8 @@ const op4 = new Outpoint( 'b7c3c4bce1a23baef2da05f9b7e4bff813449ec7e80f980ec7e4cacfadcd3314', 300); -const addr1 = new Address('bc1qmyrddmxglk49ye2wd29wefaavw7es8k5d555lx'); -const addr2 = new Address('bc1q4645ycu0l9pnvxaxnhemushv0w4cd9flkqh95j'); +const addr1 = new Address('ltc1qmyrddmxglk49ye2wd29wefaavw7es8k5fgws8k'); +const addr2 = new Address('ltc1q4645ycu0l9pnvxaxnhemushv0w4cd9fljudpvz'); let filter1 = null; let filter2 = null; diff --git a/test/http-test.js b/test/http-test.js index 748f2042..bc187d7b 100644 --- a/test/http-test.js +++ b/test/http-test.js @@ -198,7 +198,7 @@ describe('HTTP', function() { vbrequired: 0, height: 1, previousblockhash: - '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206', + '530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9', target: '7fffff0000000000000000000000000000000000000000000000000000000000', bits: '207fffff', @@ -210,7 +210,7 @@ describe('HTTP', function() { sigoplimit: 20000, sizelimit: 1000000, longpollid: - '0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206' + '530827f38f93b43ed12af0b3ad25a288dc02ed74d6d7857862df51fc56c416f9' + '0000000000', submitold: false, coinbaseaux: { flags: '6d696e65642062792062636f696e' }, diff --git a/test/input-test.js b/test/input-test.js index 98101e37..d707ada2 100644 --- a/test/input-test.js +++ b/test/input-test.js @@ -55,7 +55,7 @@ describe('Input', function() { const prevout = input.prevout.toRaw(); assert.strictEqual(type, 'pubkeyhash'); - assert.strictEqual(addr, '1PM9ZgAV8Z4df1md2zRTF98tPjzTAfk2a6'); + assert.strictEqual(addr, 'Lha6ptUKDDJgupTnD8QkXACebxMjFtmfTg'); assert.strictEqual(input.isCoinbase(), false); assert.strictEqual(input.isFinal(), true); diff --git a/test/keyring-test.js b/test/keyring-test.js index 87cc0c2f..05fed287 100644 --- a/test/keyring-test.js +++ b/test/keyring-test.js @@ -7,10 +7,10 @@ const assert = require('./util/assert'); const KeyRing = require('../lib/primitives/keyring'); const uncompressed = KeyRing.fromSecret( - '5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss'); + '6vrJ6bnKwaSuimkkRLpNNziSjqwZCG59kfFC9P2kjbUUs5Y6Cw9'); const compressed = KeyRing.fromSecret( - 'L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1'); + 'TAgaTiX4btdMhNY6eSU5N5jvc71o6hXKdhoeBzEk31AHykGDou8i'); describe('KeyRing', function() { it('should get uncompressed public key', () => { @@ -22,13 +22,13 @@ describe('KeyRing', function() { it('should get uncompressed public key address', () => { assert.strictEqual( - '1HZwkjkeaoZfTSaJxDw6aKkxp45agDiEzN', + 'Lbnu1x4UfToiiFGU8MvPrLpj2GSrtUrxFH', uncompressed.getKeyAddress('base58')); }); it('should get uncompressed WIF', () => { assert.strictEqual( - '5KYZdUEo39z3FPrtuX2QbbwGnNP5zTd7yyr2SC1j299sBCnWjss', + '6vrJ6bnKwaSuimkkRLpNNziSjqwZCG59kfFC9P2kjbUUs5Y6Cw9', uncompressed.toSecret()); }); @@ -40,13 +40,13 @@ describe('KeyRing', function() { it('should get compressed public key address', () => { assert.strictEqual( - '1F3sAm6ZtwLAUnj7d38pGFxtP3RVEvtsbV', + 'LZGpRyQPybaDjbRGoB87YH2ebFnmKYmRui', compressed.getKeyAddress('base58')); }); it('should get compressed WIF', () => { assert.strictEqual( - 'L4rK1yDtCWekvXuE6oXD9jCYfFNV2cWRpVuPLBcCU2z8TrisoyY1', + 'TAgaTiX4btdMhNY6eSU5N5jvc71o6hXKdhoeBzEk31AHykGDou8i', compressed.toSecret()); }); }); diff --git a/test/mempool-test.js b/test/mempool-test.js index 63567337..1af9a72f 100644 --- a/test/mempool-test.js +++ b/test/mempool-test.js @@ -49,7 +49,7 @@ function dummyInput(script, hash) { const fund = new MTX(); fund.addCoin(coin); - fund.addOutput(script, 70000); + fund.addOutput(script, 700000); const [tx, view] = fund.commit(); @@ -72,55 +72,55 @@ describe('Mempool', function() { const key = KeyRing.generate(); const t1 = new MTX(); - t1.addOutput(wallet.getAddress(), 50000); - t1.addOutput(wallet.getAddress(), 10000); + t1.addOutput(wallet.getAddress(), 500000); + t1.addOutput(wallet.getAddress(), 100000); const script = Script.fromPubkey(key.publicKey); t1.addCoin(dummyInput(script, encoding.ONE_HASH.toString('hex'))); - const sig = t1.signature(0, script, 70000, key.privateKey, ALL, 0); + const sig = t1.signature(0, script, 700000, key.privateKey, ALL, 0); t1.inputs[0].script = Script.fromItems([sig]); - // balance: 51000 + // balance: 510000 wallet.sign(t1); const t2 = new MTX(); - t2.addTX(t1, 0); // 50000 - t2.addOutput(wallet.getAddress(), 20000); - t2.addOutput(wallet.getAddress(), 20000); + t2.addTX(t1, 0); // 500000 + t2.addOutput(wallet.getAddress(), 200000); + t2.addOutput(wallet.getAddress(), 200000); - // balance: 49000 + // balance: 4900000 wallet.sign(t2); const t3 = new MTX(); - t3.addTX(t1, 1); // 10000 - t3.addTX(t2, 0); // 20000 - t3.addOutput(wallet.getAddress(), 23000); + t3.addTX(t1, 1); // 100000 + t3.addTX(t2, 0); // 200000 + t3.addOutput(wallet.getAddress(), 230000); - // balance: 47000 + // balance: 470000 wallet.sign(t3); const t4 = new MTX(); - t4.addTX(t2, 1); // 24000 - t4.addTX(t3, 0); // 23000 - t4.addOutput(wallet.getAddress(), 11000); - t4.addOutput(wallet.getAddress(), 11000); + t4.addTX(t2, 1); // 240000 + t4.addTX(t3, 0); // 230000 + t4.addOutput(wallet.getAddress(), 110000); + t4.addOutput(wallet.getAddress(), 110000); - // balance: 22000 + // balance: 220000 wallet.sign(t4); const f1 = new MTX(); - f1.addTX(t4, 1); // 11000 - f1.addOutput(new Address(), 9000); + f1.addTX(t4, 1); // 110000 + f1.addOutput(new Address(), 90000); - // balance: 11000 + // balance: 110000 wallet.sign(f1); const fake = new MTX(); - fake.addTX(t1, 1); // 1000 (already redeemed) - fake.addOutput(wallet.getAddress(), 6000); // 6000 instead of 500 + fake.addTX(t1, 1); // 10000 (already redeemed) + fake.addOutput(wallet.getAddress(), 60000); // 60000 instead of 5000 // Script inputs but do not sign wallet.template(fake); @@ -129,42 +129,42 @@ describe('Mempool', function() { const input = fake.inputs[0]; input.script.setData(0, encoding.ZERO_SIG); input.script.compile(); - // balance: 11000 + // balance: 110000 { await mempool.addTX(fake.toTX()); await mempool.addTX(t4.toTX()); const balance = mempool.getBalance(); - assert.strictEqual(balance, 70000); + assert.strictEqual(balance, 700000); } { await mempool.addTX(t1.toTX()); const balance = mempool.getBalance(); - assert.strictEqual(balance, 60000); + assert.strictEqual(balance, 600000); } { await mempool.addTX(t2.toTX()); const balance = mempool.getBalance(); - assert.strictEqual(balance, 50000); + assert.strictEqual(balance, 500000); } { await mempool.addTX(t3.toTX()); const balance = mempool.getBalance(); - assert.strictEqual(balance, 22000); + assert.strictEqual(balance, 220000); } { await mempool.addTX(f1.toTX()); const balance = mempool.getBalance(); - assert.strictEqual(balance, 20000); + assert.strictEqual(balance, 200000); } const txs = mempool.getHistory(); @@ -177,8 +177,8 @@ describe('Mempool', function() { const key = KeyRing.generate(); const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromPubkey(key.publicKey); const prevHash = random.randomBytes(32).toString('hex'); @@ -188,7 +188,7 @@ describe('Mempool', function() { chain.tip.height = 200; - const sig = tx.signature(0, prev, 70000, key.privateKey, ALL, 0); + const sig = tx.signature(0, prev, 700000, key.privateKey, ALL, 0); tx.inputs[0].script = Script.fromItems([sig]); await mempool.addTX(tx.toTX()); @@ -199,8 +199,8 @@ describe('Mempool', function() { const key = KeyRing.generate(); const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromPubkey(key.publicKey); const prevHash = random.randomBytes(32).toString('hex'); @@ -209,7 +209,7 @@ describe('Mempool', function() { tx.setLocktime(200); chain.tip.height = 200 - 1; - const sig = tx.signature(0, prev, 70000, key.privateKey, ALL, 0); + const sig = tx.signature(0, prev, 700000, key.privateKey, ALL, 0); tx.inputs[0].script = Script.fromItems([sig]); let err; @@ -230,8 +230,8 @@ describe('Mempool', function() { key.witness = true; const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromProgram(0, key.getKeyHash()); const prevHash = random.randomBytes(32).toString('hex'); @@ -240,7 +240,7 @@ describe('Mempool', function() { const prevs = Script.fromPubkeyhash(key.getKeyHash()); - const sig = tx.signature(0, prevs, 70000, key.privateKey, ALL, 1); + const sig = tx.signature(0, prevs, 700000, key.privateKey, ALL, 1); sig[sig.length - 1] = 0; tx.inputs[0].witness = new Witness([sig, key.publicKey]); @@ -260,15 +260,15 @@ describe('Mempool', function() { const key = KeyRing.generate(); const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromPubkey(key.publicKey); const prevHash = random.randomBytes(32).toString('hex'); tx.addCoin(dummyInput(prev, prevHash)); - const sig = tx.signature(0, prev, 70000, key.privateKey, ALL, 0); + const sig = tx.signature(0, prev, 700000, key.privateKey, ALL, 0); tx.inputs[0].script = Script.fromItems([sig]); tx.inputs[0].witness.push(Buffer.alloc(0)); @@ -289,8 +289,8 @@ describe('Mempool', function() { key.witness = true; const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromProgram(0, key.getKeyHash()); const prevHash = random.randomBytes(32).toString('hex'); @@ -313,8 +313,8 @@ describe('Mempool', function() { const key = KeyRing.generate(); const tx = new MTX(); - tx.addOutput(wallet.getAddress(), 50000); - tx.addOutput(wallet.getAddress(), 10000); + tx.addOutput(wallet.getAddress(), 500000); + tx.addOutput(wallet.getAddress(), 100000); const prev = Script.fromPubkey(key.publicKey); const prevHash = random.randomBytes(32).toString('hex'); @@ -338,7 +338,7 @@ describe('Mempool', function() { it('should clear reject cache', async () => { const tx = new MTX(); tx.addOutpoint(new Outpoint()); - tx.addOutput(wallet.getAddress(), 50000); + tx.addOutput(wallet.getAddress(), 500000); assert(mempool.hasReject(cachedTX.hash())); diff --git a/test/wallet-test.js b/test/wallet-test.js index 7f78e817..a59d56d4 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -251,12 +251,12 @@ describe('Wallet', function() { }); it('should validate existing address', () => { - assert(Address.fromString('1KQ1wMNwXHUYj1nV2xzsRcKUH8gVFpTFUc')); + assert(Address.fromString('LdcyCZgmbwibypUeD6zAhdPEVM3mPj4zxH')); }); it('should fail to validate invalid address', () => { assert.throws(() => { - Address.fromString('1KQ1wMNwXHUYj1nv2xzsRcKUH8gVFpTFUc'); + Address.fromString('LdcyCZgmbwibypueD6zAhdPEVM3mPj4zxH'); }); });