mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 13:56:23 +00:00
850eece949
This PR fixes two issues with block publishing: * Gossip-valid blocks are published before integrating them into the chain, giving broadcasting a head start, both for rest block and * Outright invalid blocks from the API that could lead to the descoring of the node are no longer broadcast Bonus: * remove undocumented and duplicated `post_v1_validator_block` JSON-RPC call
27 lines
1.2 KiB
Nim
27 lines
1.2 KiB
Nim
import
|
|
options,
|
|
rpc_types
|
|
|
|
# calls that return a bool are actually without a return type in the main REST API
|
|
# spec but nim-json-rpc requires that all RPC calls have a return type.
|
|
|
|
proc get_v1_validator_block(slot: Slot, graffiti: GraffitiBytes, randao_reveal: ValidatorSig): phase0.BeaconBlock
|
|
|
|
proc get_v1_validator_attestation_data(slot: Slot, committee_index: CommitteeIndex): AttestationData
|
|
|
|
proc get_v1_validator_aggregate_attestation(slot: Slot, attestation_data_root: Eth2Digest): Attestation
|
|
|
|
proc post_v1_validator_aggregate_and_proofs(payload: SignedAggregateAndProof): bool
|
|
|
|
# TODO epoch is part of the REST path
|
|
proc get_v1_validator_duties_attester(epoch: Epoch, public_keys: seq[ValidatorPubKey]): seq[RpcAttesterDuties]
|
|
|
|
# TODO epoch is part of the REST path
|
|
proc get_v1_validator_duties_proposer(epoch: Epoch): seq[RpcValidatorDuties]
|
|
|
|
proc post_v1_validator_beacon_committee_subscriptions(committee_index: CommitteeIndex,
|
|
slot: Slot,
|
|
aggregator: bool,
|
|
validator_pubkey: ValidatorPubKey,
|
|
slot_signature: ValidatorSig): bool
|