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:
Revertron
2021-04-10 09:47:21 +02:00
parent e06088e0b0
commit a74a0733ac
24 changed files with 700 additions and 273 deletions
+12 -7
View File
@@ -1,9 +1,10 @@
pub const CHAIN_VERSION: u32 = 2;
pub const DB_VERSION: u32 = 0;
pub const CHAIN_VERSION: u32 = 0;
pub const ZONE_DIFFICULTY: u32 = 22;
pub const BLOCK_DIFFICULTY: u32 = 20;
pub const LOCKER_DIFFICULTY: u32 = 14;
pub const KEYSTORE_DIFFICULTY: usize = 23;
pub const ZONE_DIFFICULTY: u32 = 28;
pub const ZONE_MIN_DIFFICULTY: u32 = 22;
pub const LOCKER_DIFFICULTY: u32 = 16;
pub const KEYSTORE_DIFFICULTY: u32 = 23;
pub const LOCKER_BLOCK_START: u64 = 35;
pub const LOCKER_BLOCK_LOCKERS: u64 = 7;
@@ -11,7 +12,11 @@ pub const LOCKER_BLOCK_SIGNS: u64 = 4;
pub const LOCKER_BLOCK_TIME: i64 = 300;
pub const LOCKER_BLOCK_INTERVAL: u64 = 50;
pub const FULL_BLOCKS_INTERVAL: i64 = 86400; // One day in seconds
pub const NEW_DOMAINS_INTERVAL: i64 = 86400; // One day in seconds
pub const DOMAIN_LIFETIME: i64 = 86400 * 365; // One year
pub const ZONE_MAX_LENGTH: usize = 10;
pub const MAX_RECONNECTS: u32 = 5;
pub const MAX_RECONNECTS: u32 = 5;
pub const CLASS_ZONE: &str = "zone";
pub const CLASS_DOMAIN: &str = "domain";