Commit Graph

513 Commits

Author SHA1 Message Date
Eric 10c5c0b919
bump ethers to add serialization for PastTransaction 2023-09-29 14:36:17 +10:00
Eric 64b5f00955
bump ethers to replay tx with past tx format 2023-09-29 14:36:17 +10:00
Eric eadf1ccf88
bump ethers - better Transaction object deserialization 2023-09-29 14:36:17 +10:00
Eric 012613115c
ethers debug logging 2023-09-29 14:36:17 +10:00
Eric 5888170f95
bump ethers to fix "key not found: data" error 2023-09-29 14:36:17 +10:00
Eric 170f897607
moar debugging 2023-09-29 14:36:17 +10:00
Eric 7fb335767a
moar debugging 2023-09-29 14:36:17 +10:00
Eric 2ab9034c12
moar debugging 2023-09-29 14:36:17 +10:00
Eric 9fe0f2ae81
bump nim-ethers to prevent parsing newHeads log from crashing sales state machine 2023-09-29 14:36:17 +10:00
Eric 0cf876b3a0
bump json-rpc and nim-ethers 2023-09-29 14:36:17 +10:00
Eric 7d5a0c8747
switch to earlier nim-ethers commit 2023-09-29 14:36:17 +10:00
Eric 64e5ad4f4a
fix contracts tests 2023-09-29 14:36:17 +10:00
Eric 3cde50596f
bump ethers to add chronicles 2023-09-29 14:36:17 +10:00
Eric 668ff7be8d
debugging: change echo to trace 2023-09-29 14:36:17 +10:00
Eric 658ef1a217
moar debugging 2023-09-29 14:36:17 +10:00
Eric 0365ddc0eb
add more debugging 2023-09-29 14:36:16 +10:00
Eric 52e61a0c58
fix confirmation of fillSlot 2023-09-29 14:36:16 +10:00
Eric 1fb3681c91
wait for fillSlot to be mined (so that a revert error can be extracted) 2023-09-29 14:36:16 +10:00
Eric 27ae16c1f8
fix build 2023-09-29 14:36:16 +10:00
Eric a74e657515
more debug logging 2023-09-29 14:36:16 +10:00
Eric 58a97856b4
Add cancel on error during filling state
When calling fillSlot, any transaction errors that occur (possibly during estimate gas) will cause that tx to be replaced with a cancellation transaction (a 0-valued tx to ourselves).
2023-09-29 14:36:16 +10:00
Eric c068e7425b
Add debugging for dist tests 2023-09-29 14:36:16 +10:00
Eric 7b6f137cf4
Revert "filter past requests based on availability"
This reverts commit 0c2362658b.
2023-09-29 14:36:16 +10:00
Eric 6270e8ef1f
filter past requests based on availability
Because availability filtering on push was removed, when availability is added and past storage request events are queried, those requests need to be filtered by availability before being added to the queue.
2023-09-29 14:36:16 +10:00
Eric 29d6853a19
Add additional test check for querying reservations/availabilities 2023-09-29 14:36:16 +10:00
Eric 1ba108e481
Revert change to slotSize that reduces it by one block 2023-09-29 14:36:16 +10:00
Eric 5a0ccc4d62
Fix slotSize to reduce by one block 2023-09-29 14:36:16 +10:00
Eric f3f7974a10
change slotsize to reflect current implemenation 2023-09-29 14:36:16 +10:00
Eric 38b1017e1d
add missing file 2023-09-29 14:36:16 +10:00
Eric 320164c2c0
add exception message detail util
Apply to onStore errors as we are seeing undetailed errors in the dist tests logs
2023-09-29 14:36:16 +10:00
Eric 21403e6411
clean up 2023-09-29 14:36:16 +10:00
Eric ec99992665
Add deletion of inactive reservations on sales load 2023-09-29 14:36:16 +10:00
Eric 0d6b3f862b
All tests that use the Reservation module updated
- add requestId and slotIndex to Reservation (hopefully these will prove to be useful when we persist Reservations until request are completed, to add back bytes to Availability)
- add querying of all reservations, with accompanying tests
- change from find to findAvailabilities
- move onCleanUp from SalesContext to SalesAgent as it was getting overwritten for each slot processed
- remove sales agent AFTER deleting reservation, as this was causing some SIGSEGVs
- retrofit testsales and testslotqueue to match updated Reservations module API
2023-09-29 14:36:16 +10:00
Eric 0e751fe27d
refactor Reservations api to include Reservation CRUD 2023-09-29 14:36:16 +10:00
Eric e925927278
Add Reservation object, rename reserve > create 2023-09-29 14:36:16 +10:00
Eric a24efbdf56
Process slot queue on reservation callback onMarkUnused 2023-09-29 14:36:16 +10:00
Eric c87715046e
Log the entire config and fix build error 2023-09-29 14:32:02 +10:00
Eric 1351b0d222
Support logging to file 2023-09-29 12:13:41 +10:00
Adam Uhlíř 2f1c778d02
fix: unknown state goes to payout when slot state is finished (#555) 2023-09-27 15:57:41 +02:00
Dmitriy Ryajov 25ea7fd0b2
Erasure cleanup (#545)
* cleanup erasure coding

* moar cleanup

* fix off by 1 issues in tests

* style

* consolidate decoding data code

* simplify tuple unpacking

* fix retrieve purchase

We don't support single blocks for now

* Apply suggestions from code review

Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>

---------

Signed-off-by: Dmitriy Ryajov <dryajov@gmail.com>
Co-authored-by: Eric <5089238+emizzle@users.noreply.github.com>
2023-09-25 07:31:10 -07:00
Ben Bierens 13de6dc500
Adds script to inject private key for the purpose of testing. (#553) 2023-09-19 09:57:39 +02:00
markspanbroek 71cd35112b
Taiko L2 (#483)
* [docs] fix two client scenario: add missing collateral

* [integration] separate step to wait for node to be started

* [cli] add option to specify ethereum private key

* Remove unused imports

* Fix warnings

* [integration] move type definitions to correct place

* [integration] wait a bit longer for a node to start in debug mode

When e.g. running against Taiko test net rpc, the node start
takes longer

* [integration] simplify handling of codex node and client

* [integration] add Taiko integration test

* [contracts] await token approval confirmation before next tx

* [contracts] deployment address of marketplace on Taiko

* [cli] --eth-private-key now takes a file name

Instead of supplying the private key on the command line,
expect the private key to be in a file with the correct
permissions.

* [utils] Fixes undeclared `activeChroniclesStream` on Windows

* [build] update nim-ethers to include PR #52

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

* [cli] Better error messages when reading eth private key

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

* [integration] simplify reading of cmd line arguments

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

* [build] update to latest version of nim-ethers

* [contracts] updated contract address for Taiko L2

* [build] update codex contracts to latest version

---------

Co-authored-by: Eric Mastro <eric.mastro@gmail.com>
2023-09-13 16:17:56 +02:00
Vaclav Pavlin d399290ba6
chore: move the docker-compose volume (#507) 2023-09-05 16:50:47 -07:00
Adam Uhlíř ae89db1eea
fix: sales concurrency bug (#537) 2023-09-05 16:47:29 +02:00
markspanbroek d3a22a7b7b
Fix slot queue push (#542)
* [sales] remove availability check before adding to slot queue

* [sales] add missing return statement

* [tests] remove 'eventuallyCheck' helper

* [sales] remove reservations from slot queue

* [tests] rename module `eventually` -> `always`

* [sales] increase slot queue size

Because it will now also hold items for which we haven't
checked availability yet.
2023-09-04 16:42:09 +02:00
Ben Bierens d279eebd69
Start discovery after announce address is updated (#536)
* Start discovery after announce address is updated

* Moves switch start-stop to codex.nim. Adjusts timing to solve issue
2023-09-04 11:12:20 +02:00
Ben Bierens 545e0d47e1
Slows down block maintenance iteration (#543)
* Slows down block maintenance iteration

* Fixes unstable integration test.
2023-09-04 11:12:14 +02:00
Eric 37b3d99c3d
Improve integration testing client (CodexClient) and json serialization (#514)
* Improve integration testing client (CodexClient) and json serialization

The current client used for integration testing against the REST endpoints for Codex accepts and passes primitive types. This caused a hard to diagnose bug where a `uint` was not being deserialized correctly.

In addition, the json de/serializing done between the CodexClient and REST client was not easy to read and was not tested.

These changes bring non-primitive types to most of the CodexClient functions, allowing us to lean on the compiler to ensure we're providing correct typings. More importantly, a json de/serialization util was created as a drop-in replacement for the std/json lib, with the main two differences being that field serialization is opt-in (instead of opt-out as in the case of json_serialization) and serialization errors are captured and logged, making debugging serialization issues much easier.

* Update integration test to use nodes=2 and tolerance=1

* clean up
2023-09-01 15:44:41 +10:00
Slava fc3eac9dbc
Use latest tag for Tags and Default branch only (#540) 2023-08-30 13:09:52 +03:00
Adam Uhlíř 098baf47d1
chore: improve logging (#526) 2023-08-28 11:33:44 +02:00