237 Commits

Author SHA1 Message Date
Csaba Kiraly
d6dbd19865
por: bump Constantine version to include BN254 multipairings
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 13:59:55 +02:00
Csaba Kiraly
45848527ca
por: add description for backend selection
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:54:31 +02:00
Csaba Kiraly
9cc4f449f7
enabling PoR over BN254 curves
To enable the use of BN254, change the value of
`C` in backend_constantine.nim to `BN254_Snarks`

This also requires https://github.com/mratsim/constantine/pull/193

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:18 +02:00
Csaba Kiraly
ce566d2548
switching back role of G1/G2
newly implemented Constantine feature allows us to use
G1 for authenticators and G2 for the PoS public key.

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:18 +02:00
Csaba Kiraly
7d8f2f9944
fixup: bad return value for signature deserialize
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:17 +02:00
Csaba Kiraly
35688c9b3a
fix debug printing of Constantine BigInt values 2022-05-19 11:49:17 +02:00
Csaba Kiraly
d47376f267
bumping Constantine verison to include Hash-to-Curve BLS12-381 G1
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:17 +02:00
Csaba Kiraly
9767390018
fix isOnCurve check
this needs to be changed as well when switching between G1 and G2

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:17 +02:00
Csaba Kiraly
d2cd79a754
remove unused generics to ease compilation
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:17 +02:00
Csaba Kiraly
aa4596310a
faster verifyPairings
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:17 +02:00
Csaba Kiraly
ddb613249a
fix verifyPairings implementation
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:49:16 +02:00
Csaba Kiraly
9cc92f117f
WIP: adding constantine backend
This is WIP, not compiling yet
test with
  cd dagger/storageproofs
  ../../env.sh nim c -r testbls.nim
2022-05-19 11:49:06 +02:00
Csaba Kiraly
31d7e712e5
por: separating BLST backend
WIP: func and proc names might be improved later.
2022-05-19 11:46:48 +02:00
Csaba Kiraly
bad8186939
storegeproofs: update README
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:44:57 +02:00
Csaba Kiraly
17d802a2f0
use more inplace procs 2022-05-19 11:44:56 +02:00
Csaba Kiraly
aec9a6eb92 enable build on Mac M1
- On Mac, -march=native is only supported in newest Clang versions,
better disable it for now.

- Bumping Leopard version to one that support arm64

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
2022-05-19 11:34:49 +02:00
Mark Spanbroek
15a571387f [test] Give integration test a bit more time to complete
For slow windows CI runners.
2022-05-19 10:38:19 +02:00
Mark Spanbroek
49e60d6a5c [clock] Fix test failure when sleepAsync takes a bit longer than expected 2022-05-19 10:38:19 +02:00
Mark Spanbroek
d6393de324 [test] Add integration test for sales and purchasing 2022-05-19 10:38:19 +02:00
Mark Spanbroek
a87986cdd6 [purchasing] add expiry to storage request via REST API 2022-05-19 10:38:19 +02:00
Mark Spanbroek
8086dda3f2 [purchasing] set selected offer on purchase 2022-05-19 10:38:19 +02:00
Mark Spanbroek
d8ef633fb0 [proving] Do not log error when cancelling 2022-05-19 10:38:19 +02:00
Mark Spanbroek
cdcab43590 [proving] Use clock instead of getPeriod() and waitUntilPeriod() 2022-05-19 10:38:19 +02:00
Mark Spanbroek
09a7aa3eed [clock] Replace Market.waitUntil() with Clock.waitUntil() 2022-05-19 10:38:19 +02:00
Mark Spanbroek
2992229c3a [ci] limit CI runs to 40 minutes 2022-05-19 10:38:19 +02:00
Mark Spanbroek
dcf3d485c4 [tests] Ensure that tests don't hang on closing process 2022-05-19 10:38:19 +02:00
Mark Spanbroek
83522e459c [clock] Avoid crash when getBlock fails 2022-05-19 10:38:19 +02:00
Mark Spanbroek
3a8ce485e4 [sales] Use Clock instead of getTime() 2022-05-19 10:38:19 +02:00
Mark Spanbroek
1e44ed5fd3 [purchasing] Use Clock instead of getTime() 2022-05-19 10:38:19 +02:00
Mark Spanbroek
4210cca6e7 [proving] Use Clock instead of getTime() 2022-05-19 10:38:19 +02:00
Mark Spanbroek
8d19476a4c [sales] Ensure that Sales is completely stopped 2022-05-19 10:38:19 +02:00
Mark Spanbroek
3f627790f8 [proving] Ensure that proving is completely stopped 2022-05-19 10:38:19 +02:00
Mark Spanbroek
ea72d99798 [clock] Add Clock interface that abstracts away ethereum details 2022-05-19 10:38:19 +02:00
Mark Spanbroek
fa84861d86 [contracts] Add Clock that synchronizes time with EVM 2022-05-19 10:38:19 +02:00
Mark Spanbroek
ce38a38849 Update nim-ethers to version 0.1.6 2022-05-19 10:38:19 +02:00
Mark Spanbroek
1848c0334d [purchasing] add purchase status to json output 2022-05-19 10:38:19 +02:00
Mark Spanbroek
43c0a48245 [tests] move node management into separate module
And add a debug option that writes the output of
the node during integration tests to stdout.
2022-05-19 10:38:19 +02:00
Mark Spanbroek
7f9fa0a183 [tests] move ethertest module up one level
It's going to be used by both contract and integration tests.
2022-05-19 10:38:19 +02:00
Mark Spanbroek
b31ef8356b [purchasing] retrieve purchase details through REST API 2022-05-19 10:38:19 +02:00
Mark Spanbroek
fb56f60d77 [purchasing] keep track of all purchases 2022-05-19 10:38:19 +02:00
Mark Spanbroek
466f109193 [purchasing] start purchase through REST API 2022-05-19 10:38:19 +02:00
Mark Spanbroek
7d03e83bfc [rest api] submit storage request parameters as json 2022-05-19 10:38:19 +02:00
Mark Spanbroek
fec9ad8141 [erasure] remove duplication in tests 2022-05-19 10:38:19 +02:00
Mark Spanbroek
4d00814f9e [erasure] Handle edge case of 0 parity blocks 2022-05-19 10:38:19 +02:00
Mark Spanbroek
11581fd12c [sales] REST endpoint that lists available storage 2022-05-19 09:36:47 +02:00
Mark Spanbroek
1fbb91ddc6 Remove obsolete ASDF versions file
We support multiple versions of Nim in CI, no need to
fix to a single version in development.
2022-05-19 09:36:47 +02:00
Mark Spanbroek
d564cc2375 [sales] Use UInt256 for size and duration
Use the same data types for availability and requests
for simplicity.
2022-05-19 09:36:47 +02:00
Mark Spanbroek
ef80871984 [sales] Perform POST with JSON body instead of URL params 2022-05-19 09:36:47 +02:00
Mark Spanbroek
a43e3d6d94 Fix version conflict on nimble install
Resolves version conflict between
questionable 0.9.x and 0.10.x.
2022-05-19 09:36:47 +02:00
Mark Spanbroek
45c55ab2a8 [sales] Test sales rest api 2022-05-19 09:36:47 +02:00