mirror of
https://github.com/status-im/dagger-contracts.git
synced 2025-01-14 00:30:53 +00:00
Add proof probability to Request
This commit is contained in:
parent
036a214427
commit
ee4683e50c
@ -98,6 +98,7 @@ contract Marketplace is Collateral {
|
||||
uint256 duration;
|
||||
uint256 size;
|
||||
bytes32 contentHash;
|
||||
uint256 proofProbability;
|
||||
uint256 maxPrice;
|
||||
uint256 expiry;
|
||||
bytes32 nonce;
|
||||
|
@ -7,6 +7,7 @@ const exampleRequest = () => ({
|
||||
duration: 150, // 150 blocks ≈ half an hour
|
||||
size: 1 * 1024 * 1024 * 1024, // 1 Gigabyte
|
||||
contentHash: sha256("0xdeadbeef"),
|
||||
proofProbability: 5, // require a proof roughly once every 5^2 periods
|
||||
maxPrice: 84,
|
||||
expiry: now() + hours(1),
|
||||
nonce: hexlify(randomBytes(32)),
|
||||
|
@ -11,6 +11,7 @@ function requestId(request) {
|
||||
"bytes32",
|
||||
"uint256",
|
||||
"uint256",
|
||||
"uint256",
|
||||
"bytes32",
|
||||
],
|
||||
requestToArray(request)
|
||||
@ -33,6 +34,7 @@ function requestToArray(request) {
|
||||
request.duration,
|
||||
request.size,
|
||||
request.contentHash,
|
||||
request.proofProbability,
|
||||
request.maxPrice,
|
||||
request.expiry,
|
||||
request.nonce,
|
||||
|
Loading…
x
Reference in New Issue
Block a user