Dmitriy Ryajov 56b80d6f6d
Por serialize (#106)
* move por into storage proofs

* use SeekableStream

* adding serialization for por

* remove leftovers

* add empty block support

* add basic por test

* rename block exchange for consistency

* add storageproofstests

* moving timing to storageproofs

* fix imports

* fix imports

* fix imports

* add top level exports

* move delete blocks helper to helpers

* more import/export fixes

* cleanup

* more import fixes

* fix unused warnings

* detect corrupt blocks tests

* add serialization tests

* move init method around

* bump asynctest

* fix CID version

* get rid of warning

* wip: fix CI

* increase CI timeout
2022-05-23 23:24:15 -06:00

44 lines
1.3 KiB
Nim

import pkg/chronos
import pkg/stint
import pkg/upraises
import ./periods
export chronos
export stint
export periods
type
Proofs* = ref object of RootObj
Subscription* = ref object of RootObj
OnProofSubmitted* = proc(id: ContractId, proof: seq[byte]) {.gcsafe, upraises:[].}
ContractId* = array[32, byte]
method periodicity*(proofs: Proofs):
Future[Periodicity] {.base, async.} =
raiseAssert("not implemented")
method isProofRequired*(proofs: Proofs,
id: ContractId): Future[bool] {.base, async.} =
raiseAssert("not implemented")
method willProofBeRequired*(proofs: Proofs,
id: ContractId): Future[bool] {.base, async.} =
raiseAssert("not implemented")
method getProofEnd*(proofs: Proofs,
id: ContractId): Future[UInt256] {.base, async.} =
raiseAssert("not implemented")
method submitProof*(proofs: Proofs,
id: ContractId,
proof: seq[byte]) {.base, async.} =
raiseAssert("not implemented")
method subscribeProofSubmission*(proofs: Proofs,
callback: OnProofSubmitted):
Future[Subscription] {.base, async.} =
raiseAssert("not implemented")
method unsubscribe*(subscription: Subscription) {.base, async, upraises:[].} =
raiseAssert("not implemented")