diff options
author | Martin Schanzenbach <schanzen@gnunet.org> | 2022-05-26 18:06:08 +0200 |
---|---|---|
committer | Martin Schanzenbach <schanzen@gnunet.org> | 2022-05-26 18:06:08 +0200 |
commit | 4479d21d26a91249fd415fa59f3de8624d579d5f (patch) | |
tree | 1d79144129d02d6ad26076c70086684ecbb3bab4 | |
parent | 370e8d1cffbf537b0b7799c35557b3e15b1b543a (diff) | |
download | lsd0001-4479d21d26a91249fd415fa59f3de8624d579d5f.tar.gz lsd0001-4479d21d26a91249fd415fa59f3de8624d579d5f.zip |
modify difficulty calculation
-rw-r--r-- | draft-schanzen-gns.xml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/draft-schanzen-gns.xml b/draft-schanzen-gns.xml index 960d6f5..f113141 100644 --- a/draft-schanzen-gns.xml +++ b/draft-schanzen-gns.xml | |||
@@ -686,8 +686,8 @@ zTLD[126..129].zTLD[63..125].zTLD[0..62] | |||
686 | </dl> | 686 | </dl> |
687 | <t> | 687 | <t> |
688 | Usually, PoW schemes require to find one POW value such that | 688 | Usually, PoW schemes require to find one POW value such that |
689 | at least D leading zeroes are found in the hash result. | 689 | a specific number of leading zeroes are found in the hash result. |
690 | D is then referred to as the difficulty of the PoW. | 690 | This number is then referred to as the difficulty of the PoW. |
691 | In order to reduce the variance in time it takes to calculate the | 691 | In order to reduce the variance in time it takes to calculate the |
692 | PoW, a valid GNS revocation requires that a number Z different PoWs | 692 | PoW, a valid GNS revocation requires that a number Z different PoWs |
693 | must be found that on average have D leading zeroes. | 693 | must be found that on average have D leading zeroes. |
@@ -709,7 +709,7 @@ zTLD[126..129].zTLD[63..125].zTLD[0..62] | |||
709 | <dt>Z</dt> | 709 | <dt>Z</dt> |
710 | <dd>The number of PoWs that are required. Its value is fixed at 32.</dd> | 710 | <dd>The number of PoWs that are required. Its value is fixed at 32.</dd> |
711 | <dt>D</dt> | 711 | <dt>D</dt> |
712 | <dd>The minimum average difficulty. Its value is fixed at 22.</dd> | 712 | <dd>The lower limit of the average difficulty. Its value is fixed at 22.</dd> |
713 | <dt>EPOCH</dt> | 713 | <dt>EPOCH</dt> |
714 | <dd>A single epoch. Its value is fixed at 365 days in microseconds.</dd> | 714 | <dd>A single epoch. Its value is fixed at 365 days in microseconds.</dd> |
715 | </dl> | 715 | </dl> |
@@ -757,7 +757,7 @@ zTLD[126..129].zTLD[63..125].zTLD[0..62] | |||
757 | microseconds in network byte order. | 757 | microseconds in network byte order. |
758 | The field <bcp14>SHOULD</bcp14> be set to EPOCH * 1.1. | 758 | The field <bcp14>SHOULD</bcp14> be set to EPOCH * 1.1. |
759 | Given an average number of leading zeros D', then the field value | 759 | Given an average number of leading zeros D', then the field value |
760 | <bcp14>MAY</bcp14> be increased up to (D'-D) * EPOCH * 1.1. | 760 | <bcp14>MAY</bcp14> be increased up to (D'-D+1) * EPOCH * 1.1. |
761 | Validators <bcp14>MAY</bcp14> reject messages with lower or higher | 761 | Validators <bcp14>MAY</bcp14> reject messages with lower or higher |
762 | values when received. | 762 | values when received. |
763 | The EPOCH is extended by | 763 | The EPOCH is extended by |
@@ -847,7 +847,7 @@ zTLD[126..129].zTLD[63..125].zTLD[0..62] | |||
847 | <li>The signature <bcp14>MUST</bcp14> be verified against the zone key.</li> | 847 | <li>The signature <bcp14>MUST</bcp14> be verified against the zone key.</li> |
848 | <li>The set of POW values <bcp14>MUST</bcp14> NOT contain duplicates which <bcp14>MUST</bcp14> be checked by verifying that the values are strictly monotonically increasing.</li> | 848 | <li>The set of POW values <bcp14>MUST</bcp14> NOT contain duplicates which <bcp14>MUST</bcp14> be checked by verifying that the values are strictly monotonically increasing.</li> |
849 | <li>The average number of leading zeroes D' resulting from the provided | 849 | <li>The average number of leading zeroes D' resulting from the provided |
850 | POW values <bcp14>MUST</bcp14> be greater than and not equal to D. Implementers | 850 | POW values <bcp14>MUST</bcp14> be greater than or equal to D. Implementers |
851 | <bcp14>MUST NOT</bcp14> use an integer data type to calculate or represent D'.</li> | 851 | <bcp14>MUST NOT</bcp14> use an integer data type to calculate or represent D'.</li> |
852 | </ol> | 852 | </ol> |
853 | <t> | 853 | <t> |
@@ -861,7 +861,7 @@ zTLD[126..129].zTLD[63..125].zTLD[0..62] | |||
861 | </t> | 861 | </t> |
862 | <t> | 862 | <t> |
863 | The validity period of the revocation is calculated as | 863 | The validity period of the revocation is calculated as |
864 | (D'-D) * EPOCH * 1.1. The EPOCH is extended by | 864 | (D'-D+1) * EPOCH * 1.1. The EPOCH is extended by |
865 | 10% in order to deal with unsynchronized clocks. | 865 | 10% in order to deal with unsynchronized clocks. |
866 | The validity period added on top of the TIMESTAMP yields the | 866 | The validity period added on top of the TIMESTAMP yields the |
867 | expiration date. | 867 | expiration date. |