Changed identity format in transactions, now it will be double Sha256.
Added new checks for forked blocks. Added options table. Added posibility to replace blocks in DB by more appropriate forks. Divided transactions table to domains and zones tables. Added a timestamp to domains and zones table, it will give us possibility to purge old domains. Changed difficulty check to check head and tail (sum of them) of the hash. Added encrypted (by Chacha20) domain name to DomainData, added contacts and owners vectors for it too. Added yggdrasil flag to ZoneData - it will restrict all IPs for domains in particular zone to Yggdrasil only. Changed difficulties of various block types. Added a temporary (for a run) unique ID to all handshakes. Start of signing blocks mining will be after 60 seconds after full block. Added mining status to statusbar.
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<div class="tab row page" id="tab_credentials">
|
||||
<div class="field is-grouped">
|
||||
<div class="control is-expanded has-icons-left">
|
||||
<input class="input is-expanded" type="text" id="public_key_hash" placeholder="No key loaded" readonly>
|
||||
<input class="input is-expanded" type="text" id="public_key" placeholder="No key loaded" readonly>
|
||||
<span class="icon is-small is-left">
|
||||
<svg viewBox="0 0 24 24" style="width: 20px; height: 20px;"><path d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z"></path></svg>
|
||||
</span>
|
||||
@@ -130,13 +130,17 @@
|
||||
<div class="control has-icons-left">
|
||||
<input class="input" type="number" placeholder="Difficulty: 15-30" id="new_zone_difficulty" name="Just a name" oninput="onZoneChange()">
|
||||
<span class="icon is-small is-left">
|
||||
<i class="fas fa-fire"></i>
|
||||
<svg viewBox="0 0 24 24" style="width: 24px; height: 24px;"><path d="M17.66 11.2C17.43 10.9 17.15 10.64 16.89 10.38C16.22 9.78 15.46 9.35 14.82 8.72C13.33 7.26 13 4.85 13.95 3C13 3.23 12.17 3.75 11.46 4.32C8.87 6.4 7.85 10.07 9.07 13.22C9.11 13.32 9.15 13.42 9.15 13.55C9.15 13.77 9 13.97 8.8 14.05C8.57 14.15 8.33 14.09 8.14 13.93C8.08 13.88 8.04 13.83 8 13.76C6.87 12.33 6.69 10.28 7.45 8.64C5.78 10 4.87 12.3 5 14.47C5.06 14.97 5.12 15.47 5.29 15.97C5.43 16.57 5.7 17.17 6 17.7C7.08 19.43 8.95 20.67 10.96 20.92C13.1 21.19 15.39 20.8 17.03 19.32C18.86 17.66 19.5 15 18.56 12.72L18.43 12.46C18.22 12 17.66 11.2 17.66 11.2M14.5 17.5C14.22 17.74 13.76 18 13.4 18.1C12.28 18.5 11.16 17.94 10.5 17.28C11.69 17 12.4 16.12 12.61 15.23C12.78 14.43 12.46 13.77 12.33 13C12.21 12.26 12.23 11.63 12.5 10.94C12.69 11.32 12.89 11.7 13.13 12C13.9 13 15.11 13.44 15.37 14.8C15.41 14.94 15.43 15.08 15.43 15.23C15.46 16.05 15.1 16.95 14.5 17.5H14.5Z"></path></svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="buttons has-addons">
|
||||
<button class="button is-info" id="new_zone_button" onclick="createZone();">Mine zone</button>
|
||||
</div>
|
||||
</div>
|
||||
<label class="checkbox mb-1">
|
||||
<input type="checkbox" id="yggdrasil_only">
|
||||
Restrict this zone to <a onclick="open_link('https://yggdrasil-network.github.io');">Yggdrasil</a> only.
|
||||
</label>
|
||||
<p class="help">If you feel that we need another zone you can mine that too. Just select a name, a difficulty for domains in that zone, and hit "Mine zone".</p>
|
||||
</div>
|
||||
|
||||
|
||||
+13
-4
@@ -161,6 +161,12 @@ function createDomain() {
|
||||
var new_domain = document.getElementById("new_domain").value.toLowerCase();
|
||||
var new_dom_records = JSON.stringify(recordsBuffer);
|
||||
var domain = new_domain + "." + currentZone.name;
|
||||
var data = {};
|
||||
data.domain = [];
|
||||
data.zone = currentZone.name;
|
||||
data.records = new_dom_records;
|
||||
data.owners = []; // TODO make a dialog to fill them
|
||||
data.contacts = []; // TODO make a dialog to fill them
|
||||
external.invoke(JSON.stringify({cmd: 'mineDomain', name: domain, records: new_dom_records}));
|
||||
}
|
||||
|
||||
@@ -172,9 +178,12 @@ function domainMiningStarted() {
|
||||
function createZone() {
|
||||
var new_zone = document.getElementById("new_zone").value;
|
||||
var difficulty = document.getElementById("new_zone_difficulty").value;
|
||||
obj = {};
|
||||
var yggdrasil = document.getElementById("yggdrasil_only").checked;
|
||||
var obj = {};
|
||||
obj.name = new_zone;
|
||||
obj.difficulty = parseInt(difficulty);
|
||||
obj.yggdrasil = yggdrasil;
|
||||
obj.owners = []; // TODO make a dialog to fill them
|
||||
data = JSON.stringify(obj);
|
||||
external.invoke(JSON.stringify({cmd: 'mineZone', name: new_zone, data: data}));
|
||||
}
|
||||
@@ -338,9 +347,9 @@ function keystoreChanged(path, pub_key, hash) {
|
||||
if (path == '') {
|
||||
path = "In memory";
|
||||
}
|
||||
var public_key_hash = document.getElementById("public_key_hash");
|
||||
public_key_hash.value = hash;
|
||||
public_key_hash.title = path + "\n" + pub_key;
|
||||
var public_key_field = document.getElementById("public_key");
|
||||
public_key_field.value = pub_key;
|
||||
public_key_field.title = path + "\n" + hash;
|
||||
|
||||
var save_key = document.getElementById("save_key");
|
||||
save_key.disabled = false;
|
||||
|
||||
Reference in New Issue
Block a user