This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sympy import * | |
# n = number of initial leaves | |
# u = number of updates in a block | |
# r = range of blocks | |
# d = depth of the storage trie | |
n, u, r, d = symbols('n u r d',positive=True) | |
# depth of the state trie | |
dstate = 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/csv" | |
"encoding/hex" | |
"fmt" | |
"os" | |
"strconv" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* | |
Verifying Drands BLS12-381 Signatures in GoLang | |
Using the following randomness payloads: | |
{ | |
"round": 1657526, | |
"randomness": "58b26a65bf4032555748c2949311abb2c4f580e7d7d7f70b13d0533b793c4c7d", | |
"signature": "8434e45af135f363b04b792c1d77b83e36ef66829b0a09f7eed058103429f0e7f759ebf6d001cf73e9138f5b7a7f04b602c4167390c323432562d6367e09169422707a9778eba260c4d6434ea5e1d2c81462a4e3cd430990aebc593f4ae7517c", | |
"previous_signature": "ab9e594732265dd737b536a144fb955bfeabe929116fc78f7bb740de3f43629691cabcec507eeb39a98d51be11942cf4062b0a38dd1be18be5e23bea7efd3935bb23032dba4da0374899e583feb937119f33f6b645048e0e91cde0de00e3e9ee" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import math | |
def bench(n,f,N): | |
lf = math.ceil(math.log(f,2)) | |
d = math.ceil(math.log(n,f)) # number of layers in the vtree | |
c_h = 505 # constraints to hash | |
c_f = 506 # constraints to perform fixed based multiplication | |
c_v = 2249 # constraints to perform variable based multiplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import math | |
n = 2**30 # number of nodes in total | |
f = 256 # width of each node in the vtree | |
lf = math.log(f,2) | |
d = math.log(n,f) # number of layers in the vtree | |
c_h = 505 # constraints to hash | |
c_f = 506 # constraints to perform fixed based multiplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import math | |
n = 2**29 # number of nodes in total | |
f = 256 # width of each node in the vtree | |
lf = math.log(f,2) | |
d = math.log(n,f) # number of layers in the vtree | |
c_h = 505 # constraints to hash | |
c_f = 506 # constraints to perform fixed based multiplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import math | |
n = 2**29 # number of nodes in total | |
f = 256 # width of each node in the vtree | |
lf = math.log(f,2) | |
d = math.log(n,f) # number of layers in the vtree | |
c_h = 505 # constraints to hash | |
c_f = 506 # constraints to perform fixed based multiplication |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
precommitGas = 9000000 | |
provecommitGas = 40000000 | |
windowpostGas = 512265727 | |
sectorsInPartition = 2349 | |
maxSectorsPerWindowPost = 10000 | |
sectorSize = 32 | |
blockLimitGas = 10e9 | |
tipset = 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
precommitGas = 9000000 | |
provecommitGas = 40000000 | |
windowpostGas = 512265727 | |
maxSectorsPerWindowPost = 10000 | |
sectorSize = 32 | |
blockLimitGas = 10e9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
precommitGas = 9000000 | |
provecommitGas = 40000000 | |
windowpostGas = 512265727 | |
windowPostInPartition = 2349 | |
sectorSize = 32 | |
blockLimitGas = 10e9 |
NewerOlder