· 7 years ago · Sep 04, 2018, 10:32 AM
1diff --git a/README.md b/README.md
2index a91191e..f02fea5 100644
3--- a/README.md
4+++ b/README.md
5@@ -1,15 +1,15 @@
6-# Byteball core
7+# Kizunacoin core
8
9-This is a library used in [Byteball](https://byteball.org) clients. Never used directly. Some of the clients that require the library:
10+This is a library used in [Kizunacoin](https://kizunacoin.jp) clients. Never used directly. Some of the clients that require the library:
11
12-* [Byteball](../../../byteball) - GUI wallet for Mac, Windows, Linux, iOS, and Android.
13-* [Headless Byteball](../../../headless-byteball) - headless wallet, primarily for server side use.
14-* [Byteball Relay](../../../byteball-relay) - relay node for Byteball network. It doesn't hold any private keys.
15-* [Byteball Hub](../../../byteball-hub) - hub for Byteball network. Includes the relay, plus can store and forward end-to-end encrypted messages among devices on the Byteball network.
16+* [Kizunacoin](../../../kizunacoin) - GUI wallet for Mac, Windows, Linux, iOS, and Android.
17+* [Headless Kizunacoin](../../../headless-kizunacoin) - headless wallet, primarily for server side use.
18+* [Kizunacoin Relay](../../../kizunacoin-relay) - relay node for Kizunacoin network. It doesn't hold any private keys.
19+* [Kizunacoin Hub](../../../kizunacoin-hub) - hub for Kizunacoin network. Includes the relay, plus can store and forward end-to-end encrypted messages among devices on the Kizunacoin network.
20
21 ## Developer guides
22
23-See the [wiki](https://github.com/byteball/byteballcore/wiki/Byteball-Developer-Guides). Many of the features are not documented yet, see other [byteball repositories](https://github.com/byteball) as samples, for APIs see the `exports` of node.js modules.
24+See the [wiki](https://github.com/kizunacoin/core/wiki/Byteball-Developer-Guides). Many of the features are not documented yet, see other [kizunacoin repositories](https://github.com/kizunacoin) as samples, for APIs see the `exports` of node.js modules.
25
26 ## Configuring
27
28@@ -27,7 +27,7 @@ This is the list of some of the settings that the library understands (your app
29
30 #### conf.port
31
32-The port to listen on. If you don't want to accept incoming connections at all, set port to `null`, which is the default. If you do want to listen, you will usually have a proxy, such as nginx, accept websocket connections on standard port 443 and forward them to your byteball daemon that listens on port 6611 on the local interface.
33+The port to listen on. If you don't want to accept incoming connections at all, set port to `null`, which is the default. If you do want to listen, you will usually have a proxy, such as nginx, accept websocket connections on standard port 443 and forward them to your kizunacoin daemon that listens on port 6611 on the local interface.
34
35 #### conf.storage
36
37@@ -40,9 +40,9 @@ Storage backend -- mysql or sqlite, the default is sqlite. If sqlite, the datab
38 "database": {
39 "max_connections": 30,
40 "host" : "localhost",
41- "user" : "byteball",
42+ "user" : "kizunacoin",
43 "password" : "yourmysqlpassword",
44- "name" : "byteball"
45+ "name" : "kizunacoin"
46 }
47 }
48 ```
49@@ -52,7 +52,7 @@ Work as light client (`true`) or full node (`false`). The default is full clien
50
51 #### conf.bServeAsHub
52
53-Whether to serve as hub on the Byteball network (store and forward e2e-encrypted messages for devices that connect to your hub). The default is `false`.
54+Whether to serve as hub on the Kizunacoin network (store and forward e2e-encrypted messages for devices that connect to your hub). The default is `false`.
55
56 #### conf.myUrl
57
58@@ -72,26 +72,17 @@ To lower disk load and increase sync speed, you can optionally disable flushing
59
60 ## Accepting incoming connections
61
62-Byteball network works over secure WebSocket protocol wss://. To accept incoming connections, you'll need a valid TLS certificate (you can get a free one from [letsencrypt.org](https://letsencrypt.org)) and a domain name (you can get a free domain from [Freenom](http://www.freenom.com/)). Then you accept connections on standard port 443 and proxy them to your locally running byteball daemon.
63+Kizunacoin network works over secure WebSocket protocol wss://. To accept incoming connections, you'll need a valid TLS certificate (you can get a free one from [letsencrypt.org](https://letsencrypt.org)) and a domain name (you can get a free domain from [Freenom](http://www.freenom.com/)). Then you accept connections on standard port 443 and proxy them to your locally running kizunacoin daemon.
64
65-This is an example configuration for nginx to accept websocket connections at wss://byteball.one/bb and forward them to locally running daemon that listens on port 6611:
66+This is an example configuration for nginx to accept websocket connections at wss://kizunacoin.one/bb and forward them to locally running daemon that listens on port 6611:
67
68 ```nginx
69 server {
70- listen 80 default_server;
71- listen [::]:80 default_server;
72- listen 443 ssl;
73- listen [::]:443 ssl;
74- ssl_certificate "/etc/letsencrypt/live/byteball.one/fullchain.pem";
75- ssl_certificate_key "/etc/letsencrypt/live/byteball.one/privkey.pem";
76-
77- if ($host != "byteball.one") {
78- rewrite ^(.*)$ https://byteball.one$1 permanent;
79+ listen 80;
80+ listen [::]:80;
81+ if ($http_x_forwarded_proto = 'http') {
82+ return 301 https://$server_name$request_uri;
83 }
84- if ($https != "on") {
85- rewrite ^(.*)$ https://byteball.one$1 permanent;
86- }
87-
88 location = /bb {
89 proxy_pass http://localhost:6611;
90 proxy_http_version 1.1;
91diff --git a/byteball-sqlite-light.sql b/byteball-sqlite-light.sql
92index a19935c..7ad07a6 100644
93--- a/byteball-sqlite-light.sql
94+++ b/byteball-sqlite-light.sql
95@@ -644,7 +644,6 @@ DROP TABLE IF EXISTS paid_witness_events;
96 CREATE TABLE IF NOT EXISTS push_registrations (
97 registrationId TEXT,
98 device_address TEXT NOT NULL,
99- platform TEXT NOT NULL,
100 PRIMARY KEY (device_address)
101 );
102
103@@ -749,4 +748,4 @@ CREATE TABLE original_addresses (
104 );
105
106
107-PRAGMA user_version=21;
108+PRAGMA user_version=20;
109diff --git a/byteball-sqlite.sql b/byteball-sqlite.sql
110index 1acdfd9..5a2e0fe 100644
111--- a/byteball-sqlite.sql
112+++ b/byteball-sqlite.sql
113@@ -662,7 +662,6 @@ DROP TABLE IF EXISTS paid_witness_events;
114 CREATE TABLE IF NOT EXISTS push_registrations (
115 registrationId TEXT,
116 device_address TEXT NOT NULL,
117- platform TEXT NOT NULL,
118 PRIMARY KEY (device_address)
119 );
120
121@@ -768,4 +767,4 @@ CREATE TABLE original_addresses (
122 );
123
124
125-PRAGMA user_version=21;
126+PRAGMA user_version=20;
127diff --git a/byteball.sql b/byteball.sql
128index d994d72..30ce4c1 100644
129--- a/byteball.sql
130+++ b/byteball.sql
131@@ -642,7 +642,6 @@ DROP TABLE IF EXISTS paid_witness_events;
132 CREATE TABLE IF NOT EXISTS push_registrations (
133 registrationId VARCHAR(200),
134 device_address CHAR(33) NOT NULL,
135- platform VARCHAR(20) NOT NULL,
136 PRIMARY KEY (device_address)
137 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
138
139diff --git a/constants.js b/constants.js
140index bb8e52f..55a53ee 100644
141--- a/constants.js
142+++ b/constants.js
143@@ -3,7 +3,7 @@
144
145 exports.COUNT_WITNESSES = 12;
146 exports.MAX_WITNESS_LIST_MUTATIONS = 1;
147-exports.TOTAL_WHITEBYTES = 1e15;
148+exports.TOTAL_WHITEBYTES = 2e16;
149 exports.MAJORITY_OF_WITNESSES = (exports.COUNT_WITNESSES%2===0) ? (exports.COUNT_WITNESSES/2+1) : Math.ceil(exports.COUNT_WITNESSES/2);
150 exports.COUNT_MC_BALLS_FOR_PAID_WITNESSING = 100;
151
152@@ -12,8 +12,8 @@ exports.alt = '1';
153
154 exports.bTestnet = (exports.alt === '2' && exports.version === '1.0t');
155
156-exports.GENESIS_UNIT = exports.bTestnet ? 'TvqutGPz3T4Cs6oiChxFlclY92M2MvCvfXR5/FETato=' : 'oj8yEksX9Ubq7lLc+p6F2uyHUuynugeVq4+ikT67X6E=';
157-exports.BLACKBYTES_ASSET = exports.bTestnet ? 'LUQu5ik4WLfCrr8OwXezqBa+i3IlZLqxj2itQZQm8WY=' : 'qO2JsiuDMh/j+pqJYZw3u82O71WjCDf0vTNvsnntr8o=';
158+exports.GENESIS_UNIT = exports.bTestnet ? 'TvqutGPz3T4Cs6oiChxFlclY92M2MvCvfXR5/FETato=' : '4KGzqUTgB0U17Su9ZguwCrHNGv2mXfTpAve+TtwjmIk=';
159+exports.BLACKBYTES_ASSET = exports.bTestnet ? 'LUQu5ik4WLfCrr8OwXezqBa+i3IlZLqxj2itQZQm8WY=' : 'zAMauDVtf+1Ua4HIaJ6TI798/5KvniJAluvntqDUAw8=';
160
161 exports.HASH_LENGTH = 44;
162 exports.PUBKEY_LENGTH = 44;
163@@ -47,8 +47,8 @@ exports.TEXTCOIN_PRIVATE_ASSET_CLAIM_MESSAGE_FEE = 99;
164
165 exports.minCoreVersion = exports.bTestnet ? '0.2.89' : '0.2.92';
166
167-exports.spendUnconfirmedUpgradeMci = exports.bTestnet ? 589000 : 2909000;
168-exports.branchedMinMcWlUpgradeMci = exports.bTestnet ? 593000 : 2909000;
169-exports.otherAddressInDefinitionUpgradeMci = exports.bTestnet ? 602000 : 2909000;
170-exports.attestedInDefinitionUpgradeMci = exports.bTestnet ? 616000 : 2909000;
171-exports.altBranchByBestParentUpgradeMci = exports.bTestnet ? 642000 : 3009824;
172+exports.spendUnconfirmedUpgradeMci = exports.bTestnet ? 589000 : 6000;
173+exports.branchedMinMcWlUpgradeMci = exports.bTestnet ? 593000 : 6000;
174+exports.otherAddressInDefinitionUpgradeMci = exports.bTestnet ? 602000 : 6000;
175+exports.attestedInDefinitionUpgradeMci = exports.bTestnet ? 616000 : 6000;
176+exports.altBranchByBestParentUpgradeMci = exports.bTestnet ? 642000 : 6000;
177diff --git a/network.js b/network.js
178index c1d22c1..61f23d6 100644
179--- a/network.js
180+++ b/network.js
181@@ -2164,7 +2164,10 @@ function handleJustsaying(ws, subject, body){
182 finishLogin();
183 }
184 });
185- sendJustsaying(ws, 'hub/push_project_number', {projectNumber: (conf.pushApiProjectNumber && conf.pushApiKey ? conf.pushApiProjectNumber : 0), hasKeyId: !!conf.keyId});
186+ if (conf.pushApiProjectNumber && conf.pushApiKey)
187+ sendJustsaying(ws, 'hub/push_project_number', {projectNumber: conf.pushApiProjectNumber});
188+ else
189+ sendJustsaying(ws, 'hub/push_project_number', {projectNumber: 0});
190 eventBus.emit('client_logged_in', ws);
191 break;
192
193diff --git a/package.json b/package.json
194index ee6464e..6dfb9a0 100644
195--- a/package.json
196+++ b/package.json
197@@ -1,20 +1,20 @@
198 {
199- "name": "byteballcore",
200- "description": "Byteball Core",
201- "author": "Byteball",
202+ "name": "core",
203+ "description": "Kizunacoin Core",
204+ "author": "Kizunacoin",
205 "version": "0.2.92",
206 "keywords": [
207- "byteball",
208+ "kizunacoin",
209 "multisignature"
210 ],
211- "homepage": "https://github.com/byteball/byteballcore",
212+ "homepage": "https://github.com/KIZUNACOIN/core",
213 "license": "MIT",
214 "repository": {
215- "url": "git://github.com/byteball/byteballcore.git",
216+ "url": "git://github.com/KIZUNACOIN/core.git",
217 "type": "git"
218 },
219 "bugs": {
220- "url": "https://github.com/byteball/byteballcore/issues"
221+ "url": "https://github.com/KIZUNACOIN/core/issues"
222 },
223 "browser": {
224 "request": "browser-request",