nim-dagger/vendor
markspanbroek 4175689745
Load purchase state from chain (#283)
* [purchasing] Simplify test

* [utils] Move StorageRequest.example up one level

* [purchasing] Load purchases from market

* [purchasing] load purchase states

* Implement myRequest() and getState() methods for OnChainMarket

* [proofs] Fix intermittently failing tests

Ensures that examples of proofs in tests are never of length 0;
these are considered invalid proofs by the smart contract logic.

* [contracts] Fix failing test

With the new solidity contracts update, a contract can only
be paid out after it started.

* [market] Add method to get request end time

* [purchasing] wait until purchase is finished

Purchase.wait() would previously wait until purchase
was started, now we wait until it is finished.

* [purchasing] Handle 'finished' and 'failed' states

* [marketplace] move to failed state once request fails

- Add support for subscribing to request failure events.
- Add supporting contract tests for subscribing to request failure events.
- Allow the PurchaseStarted state to move to PurchaseFailure once a request failure event is emitted
- Add supporting tests for moving from PurchaseStarted to PurchaseFailure
- Add state transition tests for PurchaseUnknown.

* [marketplace] Fix test with longer sleepAsync

* [integration] Add function to restart a codex node

* [purchasing] Set client address before requesting storage

To prevent the purchase id (which equals the request id)
from changing once it's been submitted.

* [contracts] Fix: OnChainMarket.getState()

Had the wrong method signature before

* [purchasing] Load purchases on node start

* [purchasing] Rename state 'PurchaseError' to 'PurchaseErrored'

Allows for an exception type called 'PurchaseError'

* [purchasing] Load purchases in background

No longer calls market.getRequest() for every purchase
on node start.

* [contracts] Add `$` for RequestId, SlotId and Nonce

To aid with debugging

* [purchasing] Add Purchasing.stop()

To ensure that all contract interactions have both a
start() and a stop() for

* [tests] Remove sleepAsync where possible

Use `eventually` loop instead, to make sure that we're
not waiting unnecessarily.

* [integration] Fix: handle non-json response in test

* [purchasing] Add purchase state to json

* [integration] Ensure that purchase is submitted before restart

Fixes test failure on slower CI

* [purchasing] re-implement `description` as method

Allows description to be set in the same module where the
state type is defined.

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>

* [contracts] fix typo

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>

* [market] Use more generic error type

Should we decide to change the provider type later

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2022-11-08 08:10:17 +01:00
..
asynctest@a236a5f0f3 Persist Dht providers (#257) 2022-09-29 20:16:59 -06:00
combparser@ba4464c005 adding submodules 2021-11-25 09:37:12 +01:00
dagger-contracts@61b8f5fc35 Load purchase state from chain (#283) 2022-11-08 08:10:17 +01:00
dnsclient.nim@fbb76f8af8 Add DHT (#75) 2022-04-13 10:32:35 -06:00
lrucache.nim@8767ade0b7 Add DHT (#75) 2022-04-13 10:32:35 -06:00
nim-bearssl@f4c4233de4 bump bearssl to latest 2022-09-27 12:56:07 +10:00
nim-blscurve@0237e4e0e9 Cleanup-manifest (#52) 2022-03-14 10:06:36 -06:00
nim-chronicles@7631f7b2ee track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-chronos@8e8263370b track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-confutils@0435e67832 Minor cleanup and update deps (#42) 2022-01-12 16:19:37 -06:00
nim-contract-abi@b111c27b61 Subscribe to proof submissions (#83) 2022-04-13 10:41:48 -06:00
nim-datastore@6c06a3b095 Dht maintenance (#267) 2022-10-01 11:08:44 -06:00
nim-eth@5885f638e4 Fix vendor/nim-eth (#246) 2022-09-12 21:30:16 -06:00
nim-ethers@e8592bb922 bump nim-ethers (to main) 2022-10-25 15:10:35 +11:00
nim-faststreams@1b561a9e71 adding submodules 2021-11-25 09:37:12 +01:00
nim-http-utils@e88e231dfc track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-json-rpc@5a28176080 feat: integrate dagger contracts 2022-02-04 15:34:56 +11:00
nim-json-serialization@e5b18fb710 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-leopard@2a6a63923e enable build on Mac M1 2022-05-19 11:34:49 +02:00
nim-libbacktrace@b29c22ba0e Bump libbacktrace and secp256k1 2022-06-28 11:04:18 +03:00
nim-libp2p@a3e9d1ed80 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-libp2p-dht@e4e7a3e11f track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-metrics@743f81d4f6 adding submodules 2021-11-25 09:37:12 +01:00
nim-nat-traversal@8994b67b07 adding submodules 2021-11-25 09:37:12 +01:00
nim-nitro@6b4c455bf4 Fix version conflict on nimble install 2022-05-19 09:36:47 +02:00
nim-presto@3984431dc0 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-secp256k1@5340cf1881 Bump libbacktrace and secp256k1 2022-06-28 11:04:18 +03:00
nim-serialization@493d18b829 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-sqlite3-abi@fda455cfea [build] add github.com/arnetheduck/nim-sqlite3-abi to vendor 2022-08-08 02:12:43 -05:00
nim-stew@0c379cf1d8 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-taskpools@8d408ac6cf Cleanup-manifest (#52) 2022-03-14 10:06:36 -06:00
nim-toml-serialization@4e15e00ed9 Node setup (#32) 2022-01-10 09:32:56 -06:00
nim-unittest2@02c49b8a99 Node setup (#32) 2022-01-10 09:32:56 -06:00
nim-websock@7b2ed397d6 track latest nim-libp2p's master branch (#248) 2022-11-02 11:40:28 -06:00
nim-zlib@74cdeb54b2 feat: integrate dagger contracts 2022-02-04 15:34:56 +11:00
nimbus-build-system@daff2b4670 Dht providers lru (#247) 2022-09-13 13:37:49 -06:00
nimcrypto@a5742a9a21 adding submodules 2021-11-25 09:37:12 +01:00
questionable@30e4184a99 [build] update questionable to 0.10.6 2022-09-29 10:16:41 +02:00
stint@036c71d06a adding submodules 2021-11-25 09:37:12 +01:00
upraises@ff4f8108e4 adding submodules 2021-11-25 09:37:12 +01:00