Update nph to 0.6.0 for fluffy and nimbus_verified_proxy (#2511)
This commit is contained in:
parent
5dfbebd4c0
commit
ff40c1e1a2
|
@ -320,7 +320,7 @@ jobs:
|
|||
# Updating nph version should be accompanied with running the new
|
||||
# version on the fluffy directory.
|
||||
run: |
|
||||
VERSION="v0.5.1"
|
||||
VERSION="v0.6.0"
|
||||
ARCHIVE="nph-linux_x64.tar.gz"
|
||||
curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE}
|
||||
tar -xzf ${ARCHIVE}
|
||||
|
|
|
@ -238,7 +238,7 @@ jobs:
|
|||
# Updating nph version should be accompanied with running the new
|
||||
# version on the fluffy directory.
|
||||
run: |
|
||||
VERSION="v0.5.1"
|
||||
VERSION="v0.6.0"
|
||||
ARCHIVE="nph-linux_x64.tar.gz"
|
||||
curl -L "https://github.com/arnetheduck/nph/releases/download/${VERSION}/${ARCHIVE}" -o ${ARCHIVE}
|
||||
tar -xzf ${ARCHIVE}
|
||||
|
|
|
@ -251,8 +251,7 @@ proc size*(db: ContentDB): int64 =
|
|||
var size: int64 = 0
|
||||
discard (
|
||||
db.sizeStmt.exec do(res: int64):
|
||||
size = res
|
||||
).expectDb()
|
||||
size = res).expectDb()
|
||||
return size
|
||||
|
||||
proc unusedSize(db: ContentDB): int64 =
|
||||
|
@ -261,8 +260,7 @@ proc unusedSize(db: ContentDB): int64 =
|
|||
var size: int64 = 0
|
||||
discard (
|
||||
db.unusedSizeStmt.exec do(res: int64):
|
||||
size = res
|
||||
).expectDb()
|
||||
size = res).expectDb()
|
||||
return size
|
||||
|
||||
proc usedSize*(db: ContentDB): int64 =
|
||||
|
@ -275,16 +273,14 @@ proc contentSize*(db: ContentDB): int64 =
|
|||
var size: int64 = 0
|
||||
discard (
|
||||
db.contentSizeStmt.exec do(res: int64):
|
||||
size = res
|
||||
).expectDb()
|
||||
size = res).expectDb()
|
||||
return size
|
||||
|
||||
proc contentCount*(db: ContentDB): int64 =
|
||||
var count: int64 = 0
|
||||
discard (
|
||||
db.contentCountStmt.exec do(res: int64):
|
||||
count = res
|
||||
).expectDb()
|
||||
count = res).expectDb()
|
||||
return count
|
||||
|
||||
## Pruning related calls
|
||||
|
@ -295,8 +291,7 @@ proc getLargestDistance*(db: ContentDB, localId: UInt256): UInt256 =
|
|||
db.largestDistanceStmt.exec(
|
||||
localId.toBytesBE(),
|
||||
proc(res: array[32, byte]) =
|
||||
distanceBytes = res
|
||||
,
|
||||
distanceBytes = res,
|
||||
)
|
||||
).expectDb()
|
||||
|
||||
|
|
|
@ -1081,8 +1081,7 @@ proc lookup*(
|
|||
closestNodes.lowerBound(
|
||||
n,
|
||||
proc(x: Node, n: Node): int =
|
||||
cmp(p.distance(x.id, target), p.distance(n.id, target))
|
||||
,
|
||||
cmp(p.distance(x.id, target), p.distance(n.id, target)),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -1201,8 +1200,7 @@ proc contentLookup*(
|
|||
closestNodes.lowerBound(
|
||||
n,
|
||||
proc(x: Node, n: Node): int =
|
||||
cmp(p.distance(x.id, targetId), p.distance(n.id, targetId))
|
||||
,
|
||||
cmp(p.distance(x.id, targetId), p.distance(n.id, targetId)),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -1335,8 +1333,7 @@ proc traceContentLookup*(
|
|||
closestNodes.lowerBound(
|
||||
n,
|
||||
proc(x: Node, n: Node): int =
|
||||
cmp(p.distance(x.id, targetId), dist)
|
||||
,
|
||||
cmp(p.distance(x.id, targetId), dist),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
@ -289,11 +289,9 @@ procSuite "Portal testnet tests":
|
|||
return res
|
||||
except CatchableError as exc:
|
||||
await client.close()
|
||||
raise exc
|
||||
,
|
||||
raise exc,
|
||||
proc(mc: Opt[BlockObject]): bool =
|
||||
return mc.isSome()
|
||||
,
|
||||
return mc.isSome(),
|
||||
"Did not receive expected Block with hash " & hash.data.toHex(),
|
||||
i,
|
||||
)
|
||||
|
@ -315,11 +313,9 @@ procSuite "Portal testnet tests":
|
|||
return res
|
||||
except CatchableError as exc:
|
||||
await client.close()
|
||||
raise exc
|
||||
,
|
||||
raise exc,
|
||||
proc(mc: seq[LogObject]): bool =
|
||||
return true
|
||||
,
|
||||
return true,
|
||||
"",
|
||||
i,
|
||||
)
|
||||
|
|
|
@ -462,32 +462,27 @@ proc run(config: BeaconBridgeConf) {.raises: [CatchableError].} =
|
|||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.phase0),
|
||||
proc(signedBlock: phase0.SignedBeaconBlock): errors.ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.altair),
|
||||
proc(signedBlock: altair.SignedBeaconBlock): errors.ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.bellatrix),
|
||||
proc(signedBlock: bellatrix.SignedBeaconBlock): errors.ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.capella),
|
||||
proc(signedBlock: capella.SignedBeaconBlock): errors.ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.deneb),
|
||||
proc(signedBlock: deneb.SignedBeaconBlock): errors.ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
lightClient.installMessageValidators()
|
||||
|
||||
|
|
|
@ -161,32 +161,27 @@ proc run*(
|
|||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.phase0),
|
||||
proc(signedBlock: phase0.SignedBeaconBlock): ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.altair),
|
||||
proc(signedBlock: altair.SignedBeaconBlock): ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.bellatrix),
|
||||
proc(signedBlock: bellatrix.SignedBeaconBlock): ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.capella),
|
||||
proc(signedBlock: capella.SignedBeaconBlock): ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
network.addValidator(
|
||||
getBeaconBlocksTopic(forkDigests.deneb),
|
||||
proc(signedBlock: deneb.SignedBeaconBlock): ValidationResult =
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock))
|
||||
,
|
||||
toValidationResult(optimisticProcessor.processSignedBeaconBlock(signedBlock)),
|
||||
)
|
||||
lightClient.installMessageValidators()
|
||||
|
||||
|
|
Loading…
Reference in New Issue