Commit Graph

578 Commits

Author SHA1 Message Date
Eric fc41c08d74
Remove marketplace example dist test clone
No longer needed and the unit tests checking expiry < duration in other modules and on the contracts should cover this case.
2023-12-06 16:19:18 +11:00
Eric 8f8eefba5e
bump codex-contracts-eth 2023-12-06 15:42:19 +11:00
Eric d6c20e8b5d
Clone and fix MarketplaceExample dist test
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.
2023-12-06 15:42:19 +11:00
Eric e456432577
bump contracts to increase pointer by 67 each period 2023-12-06 15:42:18 +11:00
Eric 2ec384f295
Update logging for state transition
Logs state transitioning from. Useful for transitioning to SaleErrored state.
2023-12-06 15:41:53 +11:00
Eric fd2721ce97
split codex_testing compilation flag
split codex_testing compilation flag into two flags:
1. codex_enable_proof_failures - used for simulating proof failures in the tests
2. codex_use_hardhat - used for a workaround to a Hardhat bug that obtains the current block for clock.now in the OnChainClock
2023-12-06 15:41:53 +11:00
Eric 3e4a585fa6
move marketplace test to its own file 2023-12-06 15:41:52 +11:00
Eric ec5cf2ad96
terminate process before waiting for exit with timeout
solved an issue on windows where the processes were not exiting cleanly and causing an attempted write to the dht db after the data dir had already been deleted
2023-12-06 15:41:18 +11:00
Eric cccec6574c
fixes to get hardhat process launching at the test-level
- 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
2023-12-06 15:41:18 +11:00
Eric 109f9461b3
small fixes to get all tests building
ALL TESTS PASSING when hardhat is already running
2023-12-06 15:41:18 +11:00
Eric fa8f5148b2
Refactor to use CodexProcess/CodexConfig and HardhatProcess/HardhatConfig
Test work as long as hardhat is already running. Hardhat config needs to be moved back to suite-level
2023-12-06 15:41:18 +11:00
Eric 47e4783b14
line endings in windows are normalized for chronos output 2023-12-06 15:41:18 +11:00
Eric 075e89de2b
get next free port instead of waiting for ports to close 2023-12-06 15:41:18 +11:00
Eric 428f6d68fb
switch to using chronos process handling
- chronos startProcess starts a process and uses an AsyncStream for output which allows us to consume when needed and not needed
2023-12-06 15:41:18 +11:00
Eric 8997573d60
force output to parent streams in windows 2023-12-06 15:41:18 +11:00
Eric a7f33bf15f
debugging windows integration tests
- 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
2023-12-06 15:41:18 +11:00
Eric 93c1b30a98
debugging in ci, *commit previous passed all but macos
reduce period advancement speed in windows
2023-12-06 15:41:18 +11:00
Eric bb010791e3
debugging in ci
add .debug() to all validators
2023-12-06 15:41:18 +11:00
Eric 218b7849e3
debugging in ci
try commenting out first marketplacesuite test in testproofs so there's only one in that file
2023-12-06 15:41:18 +11:00
Eric b6d2f0433e
debugging in ci
try extending expiry by 6 periods
2023-12-06 15:41:18 +11:00
Eric 836a4cc067
debugging in ci
- Add additional logging to purchasing
- remove chronicles logging from multinodes
- enable log topics in the integration test of interest
2023-12-06 15:41:18 +11:00
Eric e6d025ca5b
cleanup after rebase 2023-12-06 15:41:17 +11:00
Eric 8df351d917
extra debug 2023-12-06 15:40:47 +11:00
Eric 082a07b6fc
debugging in ci
change artifact upload action to occur always
2023-12-06 15:40:47 +11:00
Eric 256d66c2a8
debugging in ci
artifact action to be executed with 'all'
2023-12-06 15:40:47 +11:00
Eric 723babb634
debugging in ci
change if conditional to upload artifacts
2023-12-06 15:40:47 +11:00
Eric 3652be89d6
debugging in ci
add logging to OnChainClock
2023-12-06 15:40:47 +11:00
Eric 4b6db30f64
debugging in ci
try ./ instead of {{github.workspace}} (could have been missing spaces on either side, eg {{ github.workspace }})
2023-12-06 15:40:47 +11:00
Eric f1f9d7a825
debugging in ci
enable writing to log file
2023-12-06 15:40:47 +11:00
Eric c8f40b1a67
debugging in ci
add integration tests logs as ci artifact
2023-12-06 15:40:47 +11:00
Eric d3c07cf1d4
debugging in ci
set all debug modes to true, to write to stdout, otherwise seems to "freeze"
2023-12-06 15:40:47 +11:00
Eric c48e3d6d93
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 29b27b619a
fix rebase on master 2023-12-06 15:40:47 +11:00
Eric 43fc6bd7b8
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 83d36c06fc
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 18640e339b
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 1cc5f21da0
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 3d186dd0a5
debugging in ci 2023-12-06 15:40:47 +11:00
Eric 48ab78da3b
debugging in ci 2023-12-06 15:40:47 +11:00
Eric d0d041add0
openapi - add slotid component 2023-12-06 15:40:47 +11:00
Eric 4524a609a4
debugging on ci 2023-12-06 15:40:47 +11:00
Eric 6b1e0b0f38
attempt to fix windows ci not starting codex fast enough 2023-12-06 15:40:47 +11:00
Eric 424d6fb560
add back import needed in linux CI 2023-12-06 15:40:47 +11:00
Eric 30e8071681
clean up warnings 2023-12-06 15:40:47 +11:00
Eric c1e5d0e9c2
cleanup imports after rebase, fix toJson 2023-12-06 15:40:47 +11:00
Eric 34c4fb07fe
add openapi spec for /sales/slots/{slotId} 2023-12-06 15:40:47 +11:00
Eric 658302802f
Use compile flag to determine if the latest block should be used for clock.now
Due to a bug in hardhat, the latest block timestamp was out of sync from the newHeads block timestamp which was causing some timing issues in the tests. To fix this, a compile flag, `codex_testing` (which was changed from `codex_enable_proof_failures`) is used to determine the bevhaviour of clock.now. If `codex_testing` is true, clock.now uses the latest block timestamp, else it uses the cached block.timestamp that was populated in the `newHeads` event.
2023-12-06 15:40:47 +11:00
Eric c19a94ddc1
move node config from suite-level to test-level 2023-12-06 15:40:47 +11:00
Eric ec4f5c015f
clean up unused import warnings 2023-12-06 15:40:47 +11:00
Eric c9b6bfb2a7
clean up 2023-12-06 15:40:47 +11:00