bump spec version to 0.10.1 (more accurate than 0.10.0); fix inspector building
This commit is contained in:
parent
6c87af9aab
commit
32872c7ee6
|
@ -4,7 +4,7 @@
|
|||
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
||||
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
||||
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
||||
import strutils, os, tables
|
||||
import sequtils, strutils, os, tables
|
||||
import confutils, chronicles, chronos, libp2p/daemon/daemonapi,
|
||||
libp2p/multiaddress
|
||||
import stew/byteutils as bu
|
||||
|
@ -93,18 +93,18 @@ type
|
|||
abbr: "d"
|
||||
defaultValue: false }: bool
|
||||
|
||||
proc getTopic(filter: TopicFilter): string {.inline.} =
|
||||
func getTopic(filter: TopicFilter): seq[string] {.inline.} =
|
||||
case filter
|
||||
of TopicFilter.Blocks:
|
||||
topicBeaconBlocks
|
||||
@[topicBeaconBlocks]
|
||||
of TopicFilter.Attestations:
|
||||
topicAttestations
|
||||
mapIt(0'u64 ..< ATTESTATION_SUBNET_COUNT.uint64, it.getAttestationTopic)
|
||||
of TopicFilter.Exits:
|
||||
topicVoluntaryExits
|
||||
@[topicVoluntaryExits]
|
||||
of TopicFilter.ProposerSlashing:
|
||||
topicProposerSlashings
|
||||
@[topicProposerSlashings]
|
||||
of TopicFilter.AttesterSlashings:
|
||||
topicAttesterSlashings
|
||||
@[topicAttesterSlashings]
|
||||
|
||||
proc getPeerId(peer: PeerID, conf: InspectorConf): string {.inline.} =
|
||||
if conf.fullPeerId:
|
||||
|
@ -278,7 +278,8 @@ proc run(conf: InspectorConf) {.async.} =
|
|||
|
||||
try:
|
||||
for filter in topics:
|
||||
let topic = getTopic(filter)
|
||||
let topics = getTopic(filter)
|
||||
for topic in topics:
|
||||
let t = await api.pubsubSubscribe(topic, pubsubLogger)
|
||||
info "Subscribed to topic", topic = topic
|
||||
subs.add((ticket: t, future: t.transp.join()))
|
||||
|
|
|
@ -57,7 +57,7 @@ else:
|
|||
loadCustomPreset const_preset
|
||||
|
||||
const
|
||||
SPEC_VERSION* = "0.10.0" ## \
|
||||
SPEC_VERSION* = "0.10.1" ## \
|
||||
## Spec version we're aiming to be compatible with, right now
|
||||
## TODO: improve this scheme once we can negotiate versions in protocol
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ const
|
|||
topicProposerSlashings* = "/eth2/proposer_slashing/ssz"
|
||||
topicAttesterSlashings* = "/eth2/attester_slashing/ssz"
|
||||
|
||||
# https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/p2p-interface.md#configuration
|
||||
# https://github.com/ethereum/eth2.0-specs/blob/v0.10.1/specs/phase0/p2p-interface.md#configuration
|
||||
ATTESTATION_SUBNET_COUNT* = 64
|
||||
|
||||
func getAttestationTopic*(committeeIndex: uint64): string =
|
||||
|
|
Loading…
Reference in New Issue