2023-06-22 20:32:18 +10:00
|
|
|
import std/sequtils
|
2023-04-19 15:06:00 +02:00
|
|
|
import std/os
|
2023-06-22 20:32:18 +10:00
|
|
|
from std/times import getTime, toUnix
|
|
|
|
|
import pkg/chronicles
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
import pkg/stew/byteutils
|
|
|
|
|
import pkg/codex/contracts
|
|
|
|
|
import pkg/codex/periods
|
|
|
|
|
import pkg/codex/rng
|
2023-03-27 15:47:25 +02:00
|
|
|
import ../contracts/time
|
2023-05-03 09:24:25 +02:00
|
|
|
import ../contracts/deployment
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
import ../codex/helpers
|
2023-03-27 15:47:25 +02:00
|
|
|
import ./twonodes
|
2023-06-22 20:32:18 +10:00
|
|
|
import ./multinodes
|
|
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
export chronicles
|
2023-04-14 11:04:17 +02:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
logScope:
|
|
|
|
|
topics = "integration test proofs"
|
|
|
|
|
|
|
|
|
|
# twonodessuite "Proving integration test", debug1=false, debug2=false:
|
|
|
|
|
# let validatorDir = getTempDir() / "CodexValidator"
|
|
|
|
|
|
|
|
|
|
# var marketplace: Marketplace
|
|
|
|
|
# var period: uint64
|
|
|
|
|
|
|
|
|
|
# proc purchaseStateIs(client: CodexClient, id: PurchaseId, state: string): bool =
|
|
|
|
|
# client.getPurchase(id).option.?state == some state
|
|
|
|
|
|
|
|
|
|
# setup:
|
|
|
|
|
# marketplace = Marketplace.new(Marketplace.address, provider)
|
|
|
|
|
# period = (await marketplace.config()).proofs.period.truncate(uint64)
|
|
|
|
|
|
|
|
|
|
# # Our Hardhat configuration does use automine, which means that time tracked by `provider.currentTime()` is not
|
|
|
|
|
# # advanced until blocks are mined and that happens only when transaction is submitted.
|
|
|
|
|
# # As we use in tests provider.currentTime() which uses block timestamp this can lead to synchronization issues.
|
|
|
|
|
# await provider.advanceTime(1.u256)
|
|
|
|
|
|
|
|
|
|
# proc waitUntilPurchaseIsStarted(proofProbability: uint64 = 3,
|
|
|
|
|
# duration: uint64 = 100 * period,
|
|
|
|
|
# expiry: uint64 = 30) {.async.} =
|
|
|
|
|
# discard client2.postAvailability(
|
|
|
|
|
# size=0xFFFFF.u256,
|
|
|
|
|
# duration=duration.u256,
|
|
|
|
|
# minPrice=300.u256,
|
|
|
|
|
# maxCollateral=200.u256
|
|
|
|
|
# )
|
|
|
|
|
# let cid = client1.upload("some file contents").get
|
|
|
|
|
# let expiry = (await provider.currentTime()) + expiry.u256
|
|
|
|
|
# let id = client1.requestStorage(
|
|
|
|
|
# cid,
|
|
|
|
|
# expiry=expiry,
|
|
|
|
|
# duration=duration.u256,
|
|
|
|
|
# proofProbability=proofProbability.u256,
|
|
|
|
|
# collateral=100.u256,
|
|
|
|
|
# reward=400.u256
|
|
|
|
|
# ).get
|
|
|
|
|
# check eventually client1.purchaseStateIs(id, "started")
|
|
|
|
|
|
|
|
|
|
# proc advanceToNextPeriod {.async.} =
|
|
|
|
|
# let periodicity = Periodicity(seconds: period.u256)
|
|
|
|
|
# let currentPeriod = periodicity.periodOf(await provider.currentTime())
|
|
|
|
|
# let endOfPeriod = periodicity.periodEnd(currentPeriod)
|
|
|
|
|
# await provider.advanceTimeTo(endOfPeriod + 1)
|
|
|
|
|
|
|
|
|
|
# proc startValidator: NodeProcess =
|
|
|
|
|
# startNode([
|
|
|
|
|
# "--data-dir=" & validatorDir,
|
|
|
|
|
# "--api-port=8089",
|
|
|
|
|
# "--disc-port=8099",
|
|
|
|
|
# "--listen-addrs=/ip4/127.0.0.1/tcp/0",
|
|
|
|
|
# "--validator",
|
|
|
|
|
# "--eth-account=" & $accounts[2]
|
|
|
|
|
# ], debug = false)
|
|
|
|
|
|
|
|
|
|
# proc stopValidator(node: NodeProcess) =
|
|
|
|
|
# node.stop()
|
|
|
|
|
# removeDir(validatorDir)
|
|
|
|
|
|
|
|
|
|
# test "hosts submit periodic proofs for slots they fill":
|
|
|
|
|
# await waitUntilPurchaseIsStarted(proofProbability=1)
|
|
|
|
|
# var proofWasSubmitted = false
|
|
|
|
|
# proc onProofSubmitted(event: ProofSubmitted) =
|
|
|
|
|
# proofWasSubmitted = true
|
|
|
|
|
# let subscription = await marketplace.subscribe(ProofSubmitted, onProofSubmitted)
|
|
|
|
|
# await provider.advanceTime(period.u256)
|
|
|
|
|
# check eventually proofWasSubmitted
|
|
|
|
|
# await subscription.unsubscribe()
|
|
|
|
|
|
|
|
|
|
# test "validator will mark proofs as missing":
|
|
|
|
|
# let validator = startValidator()
|
|
|
|
|
# await waitUntilPurchaseIsStarted(proofProbability=1)
|
|
|
|
|
|
|
|
|
|
# node2.stop()
|
|
|
|
|
|
|
|
|
|
# var slotWasFreed = false
|
|
|
|
|
# proc onSlotFreed(event: SlotFreed) =
|
|
|
|
|
# slotWasFreed = true
|
|
|
|
|
# let subscription = await marketplace.subscribe(SlotFreed, onSlotFreed)
|
|
|
|
|
|
|
|
|
|
# for _ in 0..<100:
|
|
|
|
|
# if slotWasFreed:
|
|
|
|
|
# break
|
|
|
|
|
# else:
|
|
|
|
|
# await advanceToNextPeriod()
|
|
|
|
|
# await sleepAsync(1.seconds)
|
|
|
|
|
|
|
|
|
|
# check slotWasFreed
|
|
|
|
|
|
|
|
|
|
# await subscription.unsubscribe()
|
|
|
|
|
# stopValidator(validator)
|
|
|
|
|
|
|
|
|
|
# multinodesuite "Simulate invalid proofs",
|
|
|
|
|
# StartNodes.init(clients=1, providers=0, validators=1),
|
|
|
|
|
# DebugConfig.init(client=false, provider=false, validator=false):
|
|
|
|
|
# # .simulateProofFailuresFor(providerIdx = 0, failEveryNProofs = 2),
|
|
|
|
|
|
|
|
|
|
# proc purchaseStateIs(client: CodexClient, id: PurchaseId, state: string): bool =
|
|
|
|
|
# client.getPurchase(id).option.?state == some state
|
|
|
|
|
|
|
|
|
|
# var marketplace: Marketplace
|
|
|
|
|
# var period: uint64
|
|
|
|
|
# var slotId: SlotId
|
|
|
|
|
|
|
|
|
|
# setup:
|
|
|
|
|
# marketplace = Marketplace.new(Marketplace.address, provider)
|
|
|
|
|
# let config = await marketplace.config()
|
|
|
|
|
# period = config.proofs.period.truncate(uint64)
|
|
|
|
|
# slotId = SlotId(array[32, byte].default) # ensure we aren't reusing from prev test
|
|
|
|
|
|
|
|
|
|
# # Our Hardhat configuration does use automine, which means that time tracked by `provider.currentTime()` is not
|
|
|
|
|
# # advanced until blocks are mined and that happens only when transaction is submitted.
|
|
|
|
|
# # As we use in tests provider.currentTime() which uses block timestamp this can lead to synchronization issues.
|
|
|
|
|
# await provider.advanceTime(1.u256)
|
|
|
|
|
|
|
|
|
|
# proc periods(p: int): uint64 =
|
|
|
|
|
# p.uint64 * period
|
|
|
|
|
|
|
|
|
|
# proc advanceToNextPeriod {.async.} =
|
|
|
|
|
# let periodicity = Periodicity(seconds: period.u256)
|
|
|
|
|
# let currentPeriod = periodicity.periodOf(await provider.currentTime())
|
|
|
|
|
# let endOfPeriod = periodicity.periodEnd(currentPeriod)
|
|
|
|
|
# await provider.advanceTimeTo(endOfPeriod + 1)
|
|
|
|
|
|
|
|
|
|
# proc waitUntilPurchaseIsStarted(proofProbability: uint64 = 1,
|
|
|
|
|
# duration: uint64 = 12.periods,
|
|
|
|
|
# expiry: uint64 = 4.periods) {.async.} =
|
|
|
|
|
|
|
|
|
|
# if clients().len < 1 or providers().len < 1:
|
|
|
|
|
# raiseAssert("must start at least one client and one provider")
|
|
|
|
|
|
|
|
|
|
# let client = clients()[0].restClient
|
|
|
|
|
# let storageProvider = providers()[0].restClient
|
|
|
|
|
|
|
|
|
|
# discard storageProvider.postAvailability(
|
|
|
|
|
# size=0xFFFFF.u256,
|
|
|
|
|
# duration=duration.u256,
|
|
|
|
|
# minPrice=300.u256,
|
|
|
|
|
# maxCollateral=200.u256
|
|
|
|
|
# )
|
|
|
|
|
# let cid = client.upload("some file contents " & $ getTime().toUnix).get
|
|
|
|
|
# let expiry = (await provider.currentTime()) + expiry.u256
|
|
|
|
|
# # avoid timing issues by filling the slot at the start of the next period
|
|
|
|
|
# await advanceToNextPeriod()
|
|
|
|
|
# let id = client.requestStorage(
|
|
|
|
|
# cid,
|
|
|
|
|
# expiry=expiry,
|
|
|
|
|
# duration=duration.u256,
|
|
|
|
|
# proofProbability=proofProbability.u256,
|
|
|
|
|
# collateral=100.u256,
|
|
|
|
|
# reward=400.u256
|
|
|
|
|
# ).get
|
|
|
|
|
# check eventually client.purchaseStateIs(id, "started")
|
|
|
|
|
# let purchase = client.getPurchase(id).get
|
|
|
|
|
# slotId = slotId(purchase.requestId, 0.u256)
|
|
|
|
|
|
|
|
|
|
# # TODO: these are very loose tests in that they are not testing EXACTLY how
|
|
|
|
|
# # proofs were marked as missed by the validator. These tests should be
|
|
|
|
|
# # tightened so that they are showing, as an integration test, that specific
|
|
|
|
|
# # proofs are being marked as missed by the validator.
|
|
|
|
|
|
|
|
|
|
# test "slot is freed after too many invalid proofs submitted":
|
|
|
|
|
# let failEveryNProofs = 2
|
|
|
|
|
# let totalProofs = 100
|
|
|
|
|
|
|
|
|
|
# startProviderNode(@[
|
|
|
|
|
# CliOption(
|
|
|
|
|
# nodeIdx: 0,
|
|
|
|
|
# key: "--simulate-proof-failures",
|
|
|
|
|
# value: $failEveryNProofs
|
|
|
|
|
# )
|
|
|
|
|
# ])
|
|
|
|
|
|
|
|
|
|
# await waitUntilPurchaseIsStarted(duration=totalProofs.periods)
|
|
|
|
|
|
|
|
|
|
# var slotWasFreed = false
|
|
|
|
|
# proc onSlotFreed(event: SlotFreed) =
|
|
|
|
|
# if slotId(event.requestId, event.slotIndex) == slotId:
|
|
|
|
|
# slotWasFreed = true
|
|
|
|
|
# let subscription = await marketplace.subscribe(SlotFreed, onSlotFreed)
|
|
|
|
|
|
|
|
|
|
# for _ in 0..<totalProofs:
|
|
|
|
|
# if slotWasFreed:
|
|
|
|
|
# break
|
|
|
|
|
# else:
|
|
|
|
|
# await advanceToNextPeriod()
|
|
|
|
|
# await sleepAsync(1.seconds)
|
|
|
|
|
|
|
|
|
|
# check slotWasFreed
|
|
|
|
|
|
|
|
|
|
# await subscription.unsubscribe()
|
|
|
|
|
|
|
|
|
|
# test "slot is not freed when not enough invalid proofs submitted":
|
|
|
|
|
# let failEveryNProofs = 3
|
|
|
|
|
# let totalProofs = 12
|
|
|
|
|
# startProviderNode(@[
|
|
|
|
|
# CliOption(
|
|
|
|
|
# nodeIdx: 0,
|
|
|
|
|
# key: "--simulate-proof-failures",
|
|
|
|
|
# value: $failEveryNProofs
|
|
|
|
|
# )
|
|
|
|
|
# ])
|
|
|
|
|
|
|
|
|
|
# await waitUntilPurchaseIsStarted(duration=totalProofs.periods)
|
|
|
|
|
|
|
|
|
|
# var slotWasFreed = false
|
|
|
|
|
# proc onSlotFreed(event: SlotFreed) =
|
|
|
|
|
# if slotId(event.requestId, event.slotIndex) == slotId:
|
|
|
|
|
# slotWasFreed = true
|
|
|
|
|
# let subscription = await marketplace.subscribe(SlotFreed, onSlotFreed)
|
|
|
|
|
|
|
|
|
|
# for _ in 0..<totalProofs:
|
|
|
|
|
# if slotWasFreed:
|
|
|
|
|
# break
|
|
|
|
|
# else:
|
|
|
|
|
# await advanceToNextPeriod()
|
|
|
|
|
# await sleepAsync(1.seconds)
|
|
|
|
|
|
|
|
|
|
# check not slotWasFreed
|
|
|
|
|
|
|
|
|
|
# await subscription.unsubscribe()
|
2023-06-22 20:32:18 +10:00
|
|
|
|
|
|
|
|
multinodesuite "Simulate invalid proofs",
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
StartNodes(
|
2023-10-24 14:00:36 +11:00
|
|
|
hardhat: StartHardhatConfig()
|
|
|
|
|
.withLogFile(),
|
|
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
clients: StartNodeConfig()
|
|
|
|
|
.nodes(1)
|
|
|
|
|
.debug()
|
2023-10-24 13:59:14 +11:00
|
|
|
.withLogFile()
|
|
|
|
|
.withLogTopics("node"),
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
|
2023-10-24 14:00:36 +11:00
|
|
|
providers: StartNodeConfig()
|
|
|
|
|
.nodes(2)
|
|
|
|
|
.simulateProofFailuresFor(providerIdx=0, failEveryNProofs=2)
|
|
|
|
|
.debug()
|
|
|
|
|
.withLogFile()
|
|
|
|
|
.withLogTopics(
|
|
|
|
|
"marketplace",
|
|
|
|
|
"sales",
|
|
|
|
|
"reservations",
|
|
|
|
|
"node",
|
|
|
|
|
"JSONRPC-HTTP-CLIENT",
|
|
|
|
|
"JSONRPC-WS-CLIENT",
|
|
|
|
|
"ethers",
|
|
|
|
|
"restapi"
|
|
|
|
|
),
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
|
|
|
|
|
validators: StartNodeConfig()
|
|
|
|
|
.nodes(1)
|
|
|
|
|
.withLogFile()
|
2023-10-24 13:59:14 +11:00
|
|
|
.withLogTopics("validator", "initial-proving", "proving")
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
):
|
|
|
|
|
|
|
|
|
|
# .simulateProofFailuresFor(providerIdx = 0, failEveryNProofs = 2),
|
|
|
|
|
# DebugConfig.init(client=false, provider=true, validator=false, topics="marketplace,sales,proving,reservations,node,JSONRPC-HTTP-CLIENT,JSONRPC-WS-CLIENT,ethers"):
|
2023-06-22 20:32:18 +10:00
|
|
|
|
2023-09-01 15:44:41 +10:00
|
|
|
proc purchaseStateIs(client: CodexClient, id: PurchaseId, state: string): bool =
|
|
|
|
|
client.getPurchase(id).option.?state == some state
|
|
|
|
|
|
2023-06-22 20:32:18 +10:00
|
|
|
var marketplace: Marketplace
|
|
|
|
|
var period: uint64
|
|
|
|
|
|
|
|
|
|
setup:
|
|
|
|
|
marketplace = Marketplace.new(Marketplace.address, provider)
|
|
|
|
|
let config = await marketplace.config()
|
|
|
|
|
period = config.proofs.period.truncate(uint64)
|
|
|
|
|
|
|
|
|
|
# Our Hardhat configuration does use automine, which means that time tracked by `provider.currentTime()` is not
|
|
|
|
|
# advanced until blocks are mined and that happens only when transaction is submitted.
|
|
|
|
|
# As we use in tests provider.currentTime() which uses block timestamp this can lead to synchronization issues.
|
|
|
|
|
await provider.advanceTime(1.u256)
|
|
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
proc periods(p: int): uint64 =
|
|
|
|
|
p.uint64 * period
|
2023-06-22 20:32:18 +10:00
|
|
|
|
|
|
|
|
proc advanceToNextPeriod {.async.} =
|
|
|
|
|
let periodicity = Periodicity(seconds: period.u256)
|
|
|
|
|
let currentPeriod = periodicity.periodOf(await provider.currentTime())
|
|
|
|
|
let endOfPeriod = periodicity.periodEnd(currentPeriod)
|
|
|
|
|
await provider.advanceTimeTo(endOfPeriod + 1)
|
|
|
|
|
|
|
|
|
|
proc waitUntilPurchaseIsStarted(proofProbability: uint64 = 1,
|
|
|
|
|
duration: uint64 = 12.periods,
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
expiry: uint64 = 4.periods): Future[PurchaseId] {.async.} =
|
2023-06-22 20:32:18 +10:00
|
|
|
|
2023-10-24 14:00:36 +11:00
|
|
|
if clients().len < 1 or providers().len < 2:
|
|
|
|
|
raiseAssert("must start at least one client and two providers")
|
2023-06-22 20:32:18 +10:00
|
|
|
|
2023-10-24 14:00:36 +11:00
|
|
|
let client0 = clients()[0].node.client
|
|
|
|
|
let storageProvider0 = providers()[0].node.client
|
|
|
|
|
let storageProvider1 = providers()[1].node.client
|
2023-06-22 20:32:18 +10:00
|
|
|
|
2023-10-24 14:00:36 +11:00
|
|
|
discard storageProvider0.postAvailability(
|
|
|
|
|
size=0xFFFFF.u256,
|
|
|
|
|
duration=duration.u256,
|
|
|
|
|
minPrice=300.u256,
|
|
|
|
|
maxCollateral=200.u256
|
|
|
|
|
)
|
|
|
|
|
discard storageProvider1.postAvailability(
|
2023-09-01 15:44:41 +10:00
|
|
|
size=0xFFFFF.u256,
|
|
|
|
|
duration=duration.u256,
|
|
|
|
|
minPrice=300.u256,
|
|
|
|
|
maxCollateral=200.u256
|
2023-06-22 20:32:18 +10:00
|
|
|
)
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
let rng = rng.Rng.instance()
|
|
|
|
|
let chunker = RandomChunker.new(rng, size = DefaultBlockSize * 2, chunkSize = DefaultBlockSize * 2)
|
|
|
|
|
let data = await chunker.getBytes()
|
2023-10-24 14:00:36 +11:00
|
|
|
let cid = client0.upload(byteutils.toHex(data)).get
|
2023-06-22 20:32:18 +10:00
|
|
|
let expiry = (await provider.currentTime()) + expiry.u256
|
|
|
|
|
# avoid timing issues by filling the slot at the start of the next period
|
|
|
|
|
await advanceToNextPeriod()
|
2023-10-24 14:00:36 +11:00
|
|
|
let id = client0.requestStorage(
|
2023-06-22 20:32:18 +10:00
|
|
|
cid,
|
|
|
|
|
expiry=expiry,
|
2023-09-01 15:44:41 +10:00
|
|
|
duration=duration.u256,
|
|
|
|
|
proofProbability=proofProbability.u256,
|
|
|
|
|
collateral=100.u256,
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
reward=400.u256,
|
|
|
|
|
nodes=2'u
|
2023-09-01 15:44:41 +10:00
|
|
|
).get
|
2023-10-24 14:00:36 +11:00
|
|
|
check eventually client0.purchaseStateIs(id, "started")
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
return id
|
|
|
|
|
|
|
|
|
|
proc waitUntilPurchaseIsFinished(purchaseId: PurchaseId, duration: int) {.async.} =
|
2023-10-24 14:00:36 +11:00
|
|
|
let client = clients()[0].node.client
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
check eventually(client.purchaseStateIs(purchaseId, "finished"), duration * 1000)
|
2023-06-22 20:32:18 +10:00
|
|
|
|
|
|
|
|
# TODO: these are very loose tests in that they are not testing EXACTLY how
|
|
|
|
|
# proofs were marked as missed by the validator. These tests should be
|
|
|
|
|
# tightened so that they are showing, as an integration test, that specific
|
|
|
|
|
# proofs are being marked as missed by the validator.
|
|
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
test "provider that submits invalid proofs is paid out less":
|
2023-10-24 14:00:36 +11:00
|
|
|
let totalProofs = 7
|
2023-06-22 20:32:18 +10:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
let purchaseId = await waitUntilPurchaseIsStarted(duration=totalProofs.periods)
|
2023-10-24 14:00:36 +11:00
|
|
|
# await waitUntilPurchaseIsFinished(purchaseId, duration=totalProofs.periods.int)
|
|
|
|
|
|
|
|
|
|
let client = clients()[0].node.client
|
|
|
|
|
let duration = totalProofs.periods.int
|
|
|
|
|
check eventually(client.purchaseStateIs(purchaseId, "finished"), duration * 1000)
|
2023-06-22 20:32:18 +10:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
# var slotWasFreed = false
|
|
|
|
|
# proc onSlotFreed(event: SlotFreed) =
|
|
|
|
|
# if slotId(event.requestId, event.slotIndex) == slotId:
|
|
|
|
|
# slotWasFreed = true
|
|
|
|
|
# let subscription = await marketplace.subscribe(SlotFreed, onSlotFreed)
|
2023-06-22 20:32:18 +10:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
# for _ in 0..<totalProofs:
|
|
|
|
|
# if slotWasFreed:
|
|
|
|
|
# break
|
|
|
|
|
# else:
|
|
|
|
|
# await advanceToNextPeriod()
|
|
|
|
|
# await sleepAsync(1.seconds)
|
2023-06-22 20:32:18 +10:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
# check slotWasFreed
|
2023-06-22 20:32:18 +10:00
|
|
|
|
fix: unknown state goes to payout when slot state is finished (#555)
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 0c2362658b523e0de425794b1fa30ebd53bd30ae.
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
2023-09-27 15:57:41 +02:00
|
|
|
# await subscription.unsubscribe()
|