Commit Graph

187 Commits

Author SHA1 Message Date
Dmitriy Ryajov 298d857e1b
add top level utils file 2022-04-19 19:52:10 -06:00
Dmitriy Ryajov a9cd7982fd
rework discovery with methods 2022-04-19 19:42:38 -06:00
Dmitriy Ryajov 29d829d51c
don't force moc discovery on all tests 2022-04-19 19:25:37 -06:00
Dmitriy Ryajov 05f356e0a4
don't force logging syncs 2022-04-19 19:25:06 -06:00
Dmitriy Ryajov 69b7dff09b
move discovery moc to disc dir 2022-04-19 19:22:55 -06:00
Dmitriy Ryajov 8fafc3edf3
rework moc discovery 2022-04-19 19:22:08 -06:00
Dmitriy Ryajov 6b0e5f95e7
add discovery tests 2022-04-19 19:21:55 -06:00
Dmitriy Ryajov 4f5f142a37
add list block tests 2022-04-19 19:21:32 -06:00
Dmitriy Ryajov 9b729e0d76
don't auto mount network 2022-04-19 19:19:51 -06:00
Dmitriy Ryajov c3df822724
fix tests and split out discovery tests 2022-04-19 19:19:17 -06:00
Dmitriy Ryajov 06e043871c
check for nil on start/stop 2022-04-19 19:18:20 -06:00
Dmitriy Ryajov 1e0cc290f8
make list blocks trigger a callback on each block 2022-04-19 19:16:29 -06:00
Dmitriy Ryajov 45fe5ee8ff
pass config 2022-04-19 19:15:28 -06:00
Dmitriy Ryajov ec6f3b8058
increase sleep time to 100 millis 2022-04-19 19:15:11 -06:00
Dmitriy Ryajov 0ee9dca1c9
use upraises and avoid exceptions on key access 2022-04-19 19:14:53 -06:00
Dmitriy Ryajov 1f78a7655c
increase max message size for large manifests 2022-04-19 19:14:23 -06:00
Dmitriy Ryajov 110c61de36
misc style changes 2022-04-19 19:13:47 -06:00
Dmitriy Ryajov 259a9adcff
rework discovery with async queues 2022-04-19 19:13:02 -06:00
markspanbroek 81eabd4252
[contracts] add --eth-provider and --eth-account options (#86) 2022-04-14 10:20:01 -06:00
Tanguy c06c9b578c
Various dev-ops things (#85)
* Add metrics server
* Add --version
* Fixes for chronicles=trace + ci
2022-04-14 12:49:03 +02:00
markspanbroek b88561e090
Subscribe to proof submissions (#83)
* Update dagger-contracts

* [proving] rename ProofTiming -> Proofs

* Update nim-ethers to 0.1.4

* [proving] Subscribe to proof submissions

* [proving] support proof submission through the Proving abstraction
2022-04-13 10:41:48 -06:00
Tanguy 4d681102e5
Add DHT (#75)
* First implem

* Add persistent net key option

* Working DHT setup

* Bootstrap nodes

* Implement DaggerNode.findPeer

* Remove unrelevant comment

* Added discovery to blockexchange requestBlock

* add FSStore.blockList

* Block advertisement

* Tests compiles

* Green tests

* toDiscoveryId instead of toNodeId

* remove stopAdvertisingBlock

* Removed nim-eth dependency

* Move discovery stuff to discovery.nim

* Add missing file, start of discovery tests

* Better discovery logic

* Add tests

* Address comment

* Better E2E test
2022-04-13 10:32:35 -06:00
zah 4bf28f1619
Merge pull request #80 from status-im/nimble-lock-file
Nimble lock file
2022-04-12 19:24:43 +03:00
Zahary Karadjov b658192540
Nimble lock file 2022-04-12 16:59:00 +03:00
Tanguy bade020d67
Propper logging options (#81) 2022-04-12 15:21:07 +02:00
markspanbroek 1a3003e043
Update to latest dagger-contracts (#78)
- StorageRequest struct has changed

- StorageRequested event has changed,
  it no longer returns the entire request,
  but only the id and the ask
2022-04-11 12:03:55 -06:00
markspanbroek 168468a3fd
[ci] Speed up CI by eliminating unnecessary runs (#79) 2022-04-11 12:01:32 -06:00
markspanbroek 03fa370624
Proving (#66)
* Add Proving object, which maintains contract id's to watch

* [proving] invoke callback when proof is required

# Conflicts:
#	dagger/por/timing/periods.nim
#	dagger/por/timing/prooftiming.nim

* [proving] check proof requirements for all our contracts

# Conflicts:
#	tests/dagger/helpers/mockprooftiming.nim

* Update vendor/dagger-contracts

* [proving] call onProofRequired() when proof is required soon

* [proving] stop checking contracts that have ended

* [proving] Remove duplicated funcs

* [proving] Implement ProofTiming on top of smart contract

* [proving] Fix race condition in waitUntilNextPeriod()

Sometimes waitUntilNextPeriod would take a while to
determine the current period, leading to unexpected results.

Splits waitUntilNextPeriod() into getCurrentPeriod()
and waitUntilPeriod(), to ensure that we're really waiting
for the period that we think we're waiting for.
2022-04-08 15:58:16 -06:00
Dmitriy Ryajov 2e8b39cf7c
fix random failing test (#77) 2022-04-07 17:08:43 -06:00
Tanguy aa50127c14
Compiler dagger.nim in the CI (#71) 2022-04-06 14:00:25 +02:00
Dmitriy Ryajov ffa9b624f1
Integrate erasure (#73)
* wip: adding request for storage endpoint

* wire in erasure coding

* fix tests for erasure coding

* put type definitions into separate file

* integrate erasure coding

* change run/shutdown to start/stop

* temporary sleep, otherwise the fsstore blocks
2022-04-05 18:34:29 -06:00
Dmitriy Ryajov 22c6705312
rename storageproofs to por (#74) 2022-04-05 14:44:53 -06:00
Dmitriy Ryajov 49c41e27b7
Erasure coding dataset (#72)
* add erasure coding support

* add leopard support

* erasure coding tests
2022-04-05 13:12:59 -06:00
Dmitriy Ryajov 70e4b2e5eb
handle empty blocks (#70) 2022-04-05 08:24:48 -06:00
Dmitriy Ryajov 8ef8cfcd74
add sample proc with exclude array (#68) 2022-04-05 08:24:39 -06:00
Dmitriy Ryajov 3222f436cc
Protected manifest (#69)
* add protected manifes type

* encode protected manifest

* add empty block type handling

* add tests for protected manifest
2022-04-04 18:46:13 -06:00
Dmitriy Ryajov 8146198869
Update deps (#67)
* update nim-presto

* update asynctest to latest

* upgrading deps
2022-04-04 15:49:13 -06:00
Mark Spanbroek befebcf325 [sales] Make storage available again when offer expires 2022-04-04 11:29:32 +02:00
Mark Spanbroek 55e326b467 [sales] Introduce Negotiation object 2022-04-04 11:29:32 +02:00
Mark Spanbroek e46c9816fa [sales] Make storage available again when offer declined 2022-04-04 11:29:32 +02:00
Mark Spanbroek 5d434f20d3 [sales] onSale() callback is optional 2022-04-04 11:29:32 +02:00
Mark Spanbroek 11f7b4b4d8 [sales] Clean up tests 2022-04-04 11:29:32 +02:00
Mark Spanbroek 3810889fcb [sales] Do not call onSale() when someone else's offer is selected 2022-04-04 11:29:32 +02:00
Mark Spanbroek 71f25d40c7 [market] offerStorage() returns submitted offer 2022-04-04 11:29:32 +02:00
Mark Spanbroek 94e34e7d28 [market] requestStorage() returns submitted request 2022-04-04 11:29:32 +02:00
Mark Spanbroek 2ffde32772 [sales] call onSale() when offer has been selected 2022-04-04 11:29:32 +02:00
Mark Spanbroek 71baedb5ec [sales] Set offer expiry timestamp 2022-04-04 11:29:32 +02:00
Mark Spanbroek 76be728f61 [sales] Availability.new -> Availability.init 2022-04-04 11:29:32 +02:00
Mark Spanbroek 291c506e0b [market] Fix timing of test for slow CI 2022-04-04 11:29:32 +02:00
Mark Spanbroek dd89a55351 [market] Add Market.getTime() 2022-04-04 11:29:32 +02:00