OSDN Git Service

update (#333)
authorHAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
Fri, 19 Jul 2019 14:16:31 +0000 (22:16 +0800)
committerPaladz <yzhu101@uottawa.ca>
Fri, 19 Jul 2019 14:16:31 +0000 (22:16 +0800)
docs/federation/README-en.md
docs/federation/sql_dump/federation_shema.sql [moved from docs/federation/federation.sql with 66% similarity]
docs/federation/sql_dump/init_federation_mainnet.sql [new file with mode: 0644]
docs/federation/sql_dump/init_federation_testnet.sql [new file with mode: 0644]

index e5b19fc..86d21ef 100644 (file)
@@ -34,9 +34,9 @@ A `fed_cfg.json` would look like this:
     },
     "sidechain" : {
         "name" : "vapor",
-        "confirmations" : 100,
+        "confirmations" : 300,
         "upstream" : "http://127.0.0.1:9889",
-        "sync_seconds" : 5
+        "sync_seconds" : 150
     }
 }
 ```
similarity index 66%
rename from docs/federation/federation.sql
rename to docs/federation/sql_dump/federation_shema.sql
index 1959a77..542e8c1 100644 (file)
@@ -29,37 +29,6 @@ CREATE TABLE `chains` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 LOCK TABLES `chains` WRITE;
-/*!40000 ALTER TABLE `chains` DISABLE KEYS */;
-
------------------------------------- bytom consensus --------------------------------------
--- chain name should be the same as BytomChainName in toolbar/federation/common/const.go --
--------------------------------------------------------------------------------------------
--- bytom mainnet consensus start--
-INSERT INTO `chains`
-(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
-VALUES
-(1,'btm',0,'a75483474799ea1aa6bb910a1a5025b4372bf20bef20f246a2c2dc5e12e8a053','2018-09-13 05:10:43','2018-11-27 09:42:06');
--- bytom mainnet consensus end--
-
--- bytom testnet&solonet consensus start--
--- INSERT INTO `chains`
--- (`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
--- VALUES
--- (1,'btm',0,'ce4fe9431cd0225b3a811f8f8ec922f2b07a921bb12a8dddae9a85540072c770','2018-09-13 05:10:43','2018-11-27 09:42:06');
--- bytom testnet&solonet consensus end--
------------------------------------- bytom consensus --------------------------------------
------------------------------------- vapor consensus --------------------------------------
--- chain name should be the same as VaporChainName in toolbar/federation/common/const.go --
--------------------------------------------------------------------------------------------
--- vapor mainnet consensus start--
-INSERT INTO `chains`
-(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
-VALUES
-(1,'vapor',0,'89fc0e98c5cf8a05f3eadb916542ff8a127d810d375c4023ff8fde07cc7eb982','2018-09-13 05:10:43','2018-11-27 09:42:06');
--- vapor mainnet consensus end--
------------------------------------- vapor consensus --------------------------------------
-
-/*!40000 ALTER TABLE `chains` ENABLE KEYS */;
 UNLOCK TABLES;
 
 
@@ -101,6 +70,7 @@ UNLOCK TABLES;
 
 # Dump of table cross_transaction_reqs
 # ------------------------------------------------------------
+
 CREATE TABLE `cross_transaction_reqs` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `cross_transaction_id` int(11) NOT NULL,
@@ -138,18 +108,4 @@ CREATE TABLE `assets` (
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 LOCK TABLES `assets` WRITE;
-/*!40000 ALTER TABLE `assets` DISABLE KEYS */;
-
-INSERT INTO `assets` (`id`, `asset_id`, `issuance_program`, `vm_version`, `definition`, `created_at`, `updated_at`)
-VALUES
-  (1,'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff','',1,
-  '{
-    "decimals": 8,
-    "description": "Bytom Official Issue",
-    "name": "BTM",
-    "symbol": "BTM"
-  }',
-  '2018-09-13 05:10:43','2018-11-27 09:43:35');
-
-/*!40000 ALTER TABLE `assets` ENABLE KEYS */;
 UNLOCK TABLES;
\ No newline at end of file
diff --git a/docs/federation/sql_dump/init_federation_mainnet.sql b/docs/federation/sql_dump/init_federation_mainnet.sql
new file mode 100644 (file)
index 0000000..64440ff
--- /dev/null
@@ -0,0 +1,49 @@
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+USE `federation`;
+
+# init table chains
+# ------------------------------------------------------------
+
+LOCK TABLES `chains` WRITE;
+/*!40000 ALTER TABLE `chains` DISABLE KEYS */;
+
+INSERT INTO `chains`
+(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
+VALUES
+(1,'btm',0,'a75483474799ea1aa6bb910a1a5025b4372bf20bef20f246a2c2dc5e12e8a053','2018-09-13 05:10:43','2018-11-27 09:42:06');
+
+INSERT INTO `chains`
+(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
+VALUES
+(1,'vapor',0,'89fc0e98c5cf8a05f3eadb916542ff8a127d810d375c4023ff8fde07cc7eb982','2018-09-13 05:10:43','2018-11-27 09:42:06');
+
+/*!40000 ALTER TABLE `chains` ENABLE KEYS */;
+UNLOCK TABLES;
+
+
+# init table assets
+# ------------------------------------------------------------
+
+LOCK TABLES `assets` WRITE;
+/*!40000 ALTER TABLE `assets` DISABLE KEYS */;
+
+INSERT INTO `assets` (`id`, `asset_id`, `issuance_program`, `vm_version`, `definition`, `created_at`, `updated_at`)
+VALUES
+  (1,'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff','',1,
+  '{
+    "decimals": 8,
+    "description": "Bytom Official Issue",
+    "name": "BTM",
+    "symbol": "BTM"
+  }',
+  '2018-09-13 05:10:43','2018-11-27 09:43:35');
+
+/*!40000 ALTER TABLE `assets` ENABLE KEYS */;
+UNLOCK TABLES;
\ No newline at end of file
diff --git a/docs/federation/sql_dump/init_federation_testnet.sql b/docs/federation/sql_dump/init_federation_testnet.sql
new file mode 100644 (file)
index 0000000..b149a92
--- /dev/null
@@ -0,0 +1,49 @@
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+USE `federation`;
+
+# init table chains
+# ------------------------------------------------------------
+
+LOCK TABLES `chains` WRITE;
+/*!40000 ALTER TABLE `chains` DISABLE KEYS */;
+
+INSERT INTO `chains`
+(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
+VALUES
+(1,'btm',0,'ce4fe9431cd0225b3a811f8f8ec922f2b07a921bb12a8dddae9a85540072c770','2018-09-13 05:10:43','2018-11-27 09:42:06');
+
+INSERT INTO `chains`
+(`id`, `name`, `block_height`, `block_hash`, `created_at`, `updated_at`)
+VALUES
+(1,'vapor',0,'242d1a7fa296b68b0eb15a0958ae57b979fa1dc2a6cc945778628af91ec15a9e','2018-09-13 05:10:43','2018-11-27 09:42:06');
+
+/*!40000 ALTER TABLE `chains` ENABLE KEYS */;
+UNLOCK TABLES;
+
+
+# init table assets
+# ------------------------------------------------------------
+
+LOCK TABLES `assets` WRITE;
+/*!40000 ALTER TABLE `assets` DISABLE KEYS */;
+
+INSERT INTO `assets` (`id`, `asset_id`, `issuance_program`, `vm_version`, `definition`, `created_at`, `updated_at`)
+VALUES
+  (1,'ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff','',1,
+  '{
+    "decimals": 8,
+    "description": "Bytom Official Issue",
+    "name": "BTM",
+    "symbol": "BTM"
+  }',
+  '2018-09-13 05:10:43','2018-11-27 09:43:35');
+
+/*!40000 ALTER TABLE `assets` ENABLE KEYS */;
+UNLOCK TABLES;
\ No newline at end of file