The main issue was caused by an underflow in the partial payouts calculation. The underflow has been fixed.
The rest is creation of the test and supporting changes for the test.
- removed ethersuite as the base testing suite for multinodesuite because the need to launch hardhat before ethersuite setup and kill hardhat after ethersuite teardown was required. Removing ethersuite allowed for checking if a connection to hardhat was established. If no connection established, hardhat would need to be started via the test config. If there was a connection established, a snapshot is taken during test setup and reverted during teardown.
- modified the way the hardhat process was launched, because evaluating a command using chronos startProcess would wait for the command to complete before access to the output stream was given. Instead, we now launch the hardhat executable from node_modules/.bin/hardhat.
- modify the way the processes are exited by killing them immediately.
- fix warnings
- Use rest api check to determine when node started
- Use poInteractive and poStdErrToStdOut process start options in the hopes it may help with the small windows buffers
In proving.onCancelled, the `waitFor state.loop.cancelAndWait()` was never completing. Turns out this was not needed, because when changing states, the current state's run is cancelled, which automatically cancels the state prove loop, because it is a child of proving.run. Therefore, the logic to cancelAndWait the prove loop was removed as it was not needed.
Support logging to file
Log the entire config and fix build error
Process slot queue on reservation callback onMarkUnused
Add Reservation object, rename reserve > create
refactor Reservations api to include Reservation CRUD
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
Add deletion of inactive reservations on sales load
clean up
add exception message detail util
Apply to onStore errors as we are seeing undetailed errors in the dist tests logs
add missing file
change slotsize to reflect current implemenation
Fix slotSize to reduce by one block
Revert change to slotSize that reduces it by one block
Add additional test check for querying reservations/availabilities
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.
Revert "filter past requests based on availability"
This reverts commit 0c2362658b.
Add debugging for dist tests
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).
more debug logging
fix build
wait for fillSlot to be mined (so that a revert error can be extracted)
fix confirmation of fillSlot
add more debugging
moar debugging
debugging: change echo to trace
bump ethers to add chronicles
fix contracts tests
switch to earlier nim-ethers commit
bump json-rpc and nim-ethers
bump nim-ethers to prevent parsing newHeads log from crashing sales state machine
moar debugging
moar debugging
moar debugging
bump ethers to fix "key not found: data" error
ethers debug logging
bump ethers - better Transaction object deserialization
bump ethers to replay tx with past tx format
bump ethers to add serialization for PastTransaction
ethers bump: better logging, separate logic for revert reason string
fix build
ethers: update revert reason retreival
remove unneeded confirm
ethers: try replay without decrementing blockNumber
ethers: include type and chainId in replayed txs
ethers: add gas into and remove type from replayed txs
ensure gas is being serialized in Transaction
ethers: fix build error
bump ethers: rebased on top of cancel tx due to estimateGas error PR
Fix proving with latest ethers bump (tested on master)
Update multinode suite for better simulateFailedProofs enabling, add proofs test
Improve multinode suite for better debug options, including logging to file
There is a 503 "sales unavailable" error
improve multinode test suite, add logging to file
* Fix REST endpoints semantics
* update endpoint description
* update, operation id
* Adding enum support
* make enum descerializer public
* add support for listing manifests
* test `/data` endpoint to list local manifests
* debug leftovers
* remove commented out line
* Adds endpoint for listing files (manifests) in node. Useful for demo UI.
* Moves upload/download/files into content API calls.
* Cleans up json serialization for manifest
* Cleans up some more json serialization
* Moves block iteration and decoding to node.nim
* Moves api methods into their own init procs.
* Applies RestContent api object.
* Replaces format methods with Rest objects in json.nim
* Unused import
* Review comments by Adam
* Fixes issue where content/local endpoint clashes with content/cid.
* faulty merge resolution
* Renames content API to data.
* Fixes faulty rebase
* Adds test for data/local API
* Renames local and download api.
* 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
* Fixes/workarounds for nimsuggest failures in codex.nim.
* remove rng prefix - it appears to work now
* format new's to be more consistent
* making proc formatting a bit more consistent