Strip out old code

All of these files have been moved to either:

- https://github.com/sigp/lighthouse-beacon
- https://github.com/sigp/lighthouse-validator
- https://github.com/sigp/lighthouse-common

For rationale, see: https://github.com/sigp/lighthouse/issues/197
This commit is contained in:
Paul Hauner
2019-02-13 14:15:53 +11:00
parent e4f6fe047d
commit 1d5ff4359a
150 changed files with 0 additions and 14694 deletions

2
protos/.gitignore vendored
View File

@@ -1,2 +0,0 @@
src/services.rs
src/services_grpc.rs

View File

@@ -1,14 +0,0 @@
[package]
name = "protos"
version = "0.1.0"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = "2018"
description = "Google protobuf message and service definitions used in Lighthouse APIs."
[dependencies]
futures = "0.1"
grpcio = { version = "0.4", default-features = false, features = ["protobuf-codec"] }
protobuf = "2.0"
[build-dependencies]
protoc-grpcio = "0.3.1"

View File

@@ -1,10 +0,0 @@
extern crate protoc_grpcio;
use std::path::Path;
fn main() {
let proto_root = Path::new("src");
println!("cargo:rerun-if-changed={}", proto_root.display());
protoc_grpcio::compile_grpc_protos(&["services.proto"], &[proto_root], &proto_root)
.expect("Failed to compile gRPC definitions!");
}

View File

@@ -1,5 +0,0 @@
// The protobuf code-generator is not up-to-date with clippy, therefore we silence some warnings.
#[allow(renamed_and_removed_lints)]
pub mod services;
#[allow(renamed_and_removed_lints)]
pub mod services_grpc;

View File

@@ -1,94 +0,0 @@
// TODO: This setup requires that the BN (beacon node) holds the block in state
// during the interval between the `GenerateProposalRequest` and the
// `SubmitProposalRequest`.
//
// This is sub-optimal as if a validator client switches BN during this process
// the block will be lost.
//
// This "stateful" method is being used presently because it's easier and
// requires less maintainence as the `BeaconBlock` definition changes.
syntax = "proto3";
package ethereum.beacon.rpc.v1;
service BeaconBlockService {
rpc ProduceBeaconBlock(ProduceBeaconBlockRequest) returns (ProduceBeaconBlockResponse);
rpc PublishBeaconBlock(PublishBeaconBlockRequest) returns (PublishBeaconBlockResponse);
}
service ValidatorService {
// rpc ValidatorAssignment(ValidatorAssignmentRequest) returns (ValidatorAssignmentResponse);
rpc ProposeBlockSlot(ProposeBlockSlotRequest) returns (ProposeBlockSlotResponse);
rpc ValidatorIndex(PublicKey) returns (IndexResponse);
}
message BeaconBlock {
uint64 slot = 1;
bytes block_root = 2;
bytes randao_reveal = 3;
bytes signature = 4;
}
// Validator requests an unsigned proposal.
message ProduceBeaconBlockRequest {
uint64 slot = 1;
}
// Beacon node returns an unsigned proposal.
message ProduceBeaconBlockResponse {
BeaconBlock block = 1;
}
// Validator submits a signed proposal.
message PublishBeaconBlockRequest {
BeaconBlock block = 1;
}
// Beacon node indicates a sucessfully submitted proposal.
message PublishBeaconBlockResponse {
bool success = 1;
bytes msg = 2;
}
// A validators duties for some epoch.
// TODO: add shard duties.
message ValidatorAssignment {
oneof block_production_slot_oneof {
bool block_production_slot_none = 1;
uint64 block_production_slot = 2;
}
}
message ValidatorAssignmentRequest {
uint64 epoch = 1;
bytes validator_index = 2;
}
/*
* Propose slot
*/
message ProposeBlockSlotRequest {
uint64 epoch = 1;
uint64 validator_index = 2;
}
message ProposeBlockSlotResponse {
oneof slot_oneof {
bool none = 1;
uint64 slot = 2;
}
}
/*
* Validator Assignment
*/
message PublicKey {
bytes public_key = 1;
}
message IndexResponse {
uint64 index = 1;
}