Merge pull request #127 from drozdziak1/122-rust-2018
2018-ify everything
This commit is contained in:
commit
2c04d343e9
@ -2,6 +2,7 @@
|
||||
name = "lighthouse"
|
||||
version = "0.0.1"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
blake2-rfc = "0.2.18"
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "attestation_validation"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls = { path = "../utils/bls" }
|
||||
|
@ -15,9 +15,9 @@ mod justified_slot;
|
||||
mod shard_block;
|
||||
mod signature;
|
||||
|
||||
pub use enums::{Invalid, Outcome, Error};
|
||||
pub use block_inclusion::validate_attestation_for_block;
|
||||
pub use justified_slot::validate_attestation_justified_slot;
|
||||
pub use justified_block::validate_attestation_justified_block_hash;
|
||||
pub use signature::validate_attestation_signature;
|
||||
pub use shard_block::validate_attestation_data_shard_block_hash;
|
||||
pub use crate::enums::{Invalid, Outcome, Error};
|
||||
pub use crate::block_inclusion::validate_attestation_for_block;
|
||||
pub use crate::justified_slot::validate_attestation_justified_slot;
|
||||
pub use crate::justified_block::validate_attestation_justified_block_hash;
|
||||
pub use crate::signature::validate_attestation_signature;
|
||||
pub use crate::shard_block::validate_attestation_data_shard_block_hash;
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "chain"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls = { path = "../utils/bls" }
|
||||
|
@ -14,11 +14,11 @@ mod stores;
|
||||
mod transition;
|
||||
|
||||
use db::ClientDB;
|
||||
use genesis::{genesis_states, Error as GenesisError};
|
||||
use maps::{generate_attester_and_proposer_maps, AttesterAndProposerMapError};
|
||||
use crate::genesis::{genesis_states, Error as GenesisError};
|
||||
use crate::maps::{generate_attester_and_proposer_maps, AttesterAndProposerMapError};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use stores::BeaconChainStore;
|
||||
use crate::stores::BeaconChainStore;
|
||||
use types::{ActiveState, AttesterMap, ChainConfig, CrystallizedState, Hash256, ProposerMap};
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "naive_fork_choice"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
db = { path = "../../lighthouse/db" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "spec"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
types = { path = "../types" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "state-transition"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
types = { path = "../types" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "types"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls = { path = "../utils/bls" }
|
||||
|
@ -23,20 +23,20 @@ pub mod validator_registration;
|
||||
use self::ethereum_types::{H160, H256, U256};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub use active_state::ActiveState;
|
||||
pub use attestation_data::AttestationData;
|
||||
pub use attestation::Attestation;
|
||||
pub use beacon_block::BeaconBlock;
|
||||
pub use beacon_state::BeaconState;
|
||||
pub use chain_config::ChainConfig;
|
||||
pub use crosslink_record::CrosslinkRecord;
|
||||
pub use crystallized_state::CrystallizedState;
|
||||
pub use fork_data::ForkData;
|
||||
pub use pending_attestation_record::PendingAttestationRecord;
|
||||
pub use shard_and_committee::ShardAndCommittee;
|
||||
pub use special_record::{SpecialRecord, SpecialRecordKind};
|
||||
pub use validator_record::{ValidatorRecord, ValidatorStatus};
|
||||
pub use validator_registration::ValidatorRegistration;
|
||||
pub use crate::active_state::ActiveState;
|
||||
pub use crate::attestation_data::AttestationData;
|
||||
pub use crate::attestation::Attestation;
|
||||
pub use crate::beacon_block::BeaconBlock;
|
||||
pub use crate::beacon_state::BeaconState;
|
||||
pub use crate::chain_config::ChainConfig;
|
||||
pub use crate::crosslink_record::CrosslinkRecord;
|
||||
pub use crate::crystallized_state::CrystallizedState;
|
||||
pub use crate::fork_data::ForkData;
|
||||
pub use crate::pending_attestation_record::PendingAttestationRecord;
|
||||
pub use crate::shard_and_committee::ShardAndCommittee;
|
||||
pub use crate::special_record::{SpecialRecord, SpecialRecordKind};
|
||||
pub use crate::validator_record::{ValidatorRecord, ValidatorStatus};
|
||||
pub use crate::validator_registration::ValidatorRegistration;
|
||||
|
||||
pub type Hash256 = H256;
|
||||
pub type Address = H160;
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "bls"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls-aggregates = { git = "https://github.com/sigp/signature-schemes" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "boolean-bitfield"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
ssz = { path = "../ssz" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "hashing"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
tiny-keccak = "1.4.2"
|
@ -2,5 +2,6 @@
|
||||
name = "honey-badger-split"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
|
@ -2,5 +2,6 @@
|
||||
name = "slot-clock"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "ssz"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4.9"
|
||||
|
@ -16,8 +16,8 @@ pub mod encode;
|
||||
mod impl_decode;
|
||||
mod impl_encode;
|
||||
|
||||
pub use decode::{decode_ssz, decode_ssz_list, Decodable, DecodeError};
|
||||
pub use encode::{Encodable, SszStream};
|
||||
pub use crate::decode::{decode_ssz, decode_ssz_list, Decodable, DecodeError};
|
||||
pub use crate::encode::{Encodable, SszStream};
|
||||
|
||||
pub const LENGTH_BYTES: usize = 4;
|
||||
pub const MAX_LIST_SIZE: usize = 1 << (4 * 8);
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "ssz_helpers"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls = { path = "../bls" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "vec_shuffle"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
hashing = { path = "../hashing" }
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "validator_change"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bytes = "0.4.10"
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "validator_induction"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
bls = { path = "../utils/bls" }
|
||||
|
@ -4,4 +4,4 @@ extern crate types;
|
||||
|
||||
mod inductor;
|
||||
|
||||
pub use inductor::{ValidatorInductionError, ValidatorInductor};
|
||||
pub use crate::inductor::{ValidatorInductionError, ValidatorInductor};
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "validator_shuffling"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
honey-badger-split = { path = "../utils/honey-badger-split" }
|
||||
|
@ -4,4 +4,4 @@ extern crate vec_shuffle;
|
||||
|
||||
mod shuffle;
|
||||
|
||||
pub use shuffle::{shard_and_committees_for_cycle, ValidatorAssignmentError};
|
||||
pub use crate::shuffle::{shard_and_committees_for_cycle, ValidatorAssignmentError};
|
||||
|
@ -2,6 +2,7 @@
|
||||
name = "db"
|
||||
version = "0.1.0"
|
||||
authors = ["Paul Hauner <paul@paulhauner.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
blake2-rfc = "0.2.18"
|
||||
|
@ -13,7 +13,7 @@ mod config;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::{App, Arg};
|
||||
use config::LighthouseConfig;
|
||||
use crate::config::LighthouseConfig;
|
||||
use slog::Drain;
|
||||
|
||||
fn main() {
|
||||
|
Loading…
Reference in New Issue
Block a user