mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
spec: update tags to v0.5.1
This commit is contained in:
@@ -8,7 +8,7 @@ use types::*;
|
||||
///
|
||||
/// Returns `Ok(())` if the `Attestation` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn validate_attestation(
|
||||
state: &BeaconState,
|
||||
attestation: &Attestation,
|
||||
@@ -31,7 +31,7 @@ pub fn validate_attestation_time_independent_only(
|
||||
///
|
||||
/// Returns `Ok(())` if the `Attestation` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn validate_attestation_without_signature(
|
||||
state: &BeaconState,
|
||||
attestation: &Attestation,
|
||||
@@ -44,7 +44,7 @@ pub fn validate_attestation_without_signature(
|
||||
/// given state, optionally validating the aggregate signature.
|
||||
///
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn validate_attestation_parametric(
|
||||
state: &BeaconState,
|
||||
attestation: &Attestation,
|
||||
@@ -167,7 +167,7 @@ fn validate_attestation_parametric(
|
||||
/// Verify that the `source_epoch` and `source_root` of an `Attestation` correctly
|
||||
/// match the current (or previous) justified epoch and root from the state.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn verify_justified_epoch_and_root(
|
||||
attestation: &Attestation,
|
||||
state: &BeaconState,
|
||||
@@ -222,7 +222,7 @@ fn verify_justified_epoch_and_root(
|
||||
/// - `custody_bitfield` does not have a bit for each index of `committee`.
|
||||
/// - A `validator_index` in `committee` is not in `state.validator_registry`.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn verify_attestation_signature(
|
||||
state: &BeaconState,
|
||||
committee: &[usize],
|
||||
|
||||
@@ -7,7 +7,7 @@ use types::*;
|
||||
///
|
||||
/// Returns `Ok(())` if the `AttesterSlashing` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_attester_slashing(
|
||||
state: &BeaconState,
|
||||
attester_slashing: &AttesterSlashing,
|
||||
@@ -41,7 +41,7 @@ pub fn verify_attester_slashing(
|
||||
///
|
||||
/// Returns Ok(indices) if `indices.len() > 0`.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn gather_attester_slashing_indices(
|
||||
state: &BeaconState,
|
||||
attester_slashing: &AttesterSlashing,
|
||||
|
||||
@@ -15,7 +15,7 @@ use types::*;
|
||||
///
|
||||
/// Note: this function is incomplete.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_deposit(
|
||||
state: &BeaconState,
|
||||
deposit: &Deposit,
|
||||
@@ -46,7 +46,7 @@ pub fn verify_deposit(
|
||||
|
||||
/// Verify that the `Deposit` index is correct.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_deposit_index(state: &BeaconState, deposit: &Deposit) -> Result<(), Error> {
|
||||
verify!(
|
||||
deposit.index == state.deposit_index,
|
||||
@@ -88,7 +88,7 @@ pub fn get_existing_validator_index(
|
||||
|
||||
/// Verify that a deposit is included in the state's eth1 deposit root.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn verify_deposit_merkle_proof(state: &BeaconState, deposit: &Deposit, spec: &ChainSpec) -> bool {
|
||||
let leaf = hash(&get_serialized_deposit_data(deposit));
|
||||
verify_merkle_proof(
|
||||
@@ -102,7 +102,7 @@ fn verify_deposit_merkle_proof(state: &BeaconState, deposit: &Deposit, spec: &Ch
|
||||
|
||||
/// Helper struct for easily getting the serialized data generated by the deposit contract.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
#[derive(Encode)]
|
||||
struct SerializedDepositData {
|
||||
amount: u64,
|
||||
@@ -113,7 +113,7 @@ struct SerializedDepositData {
|
||||
/// Return the serialized data generated by the deposit contract that is used to generate the
|
||||
/// merkle proof.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn get_serialized_deposit_data(deposit: &Deposit) -> Vec<u8> {
|
||||
let serialized_deposit_data = SerializedDepositData {
|
||||
amount: deposit.deposit_data.amount,
|
||||
|
||||
@@ -7,7 +7,7 @@ use types::*;
|
||||
///
|
||||
/// Returns `Ok(())` if the `Exit` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_exit(
|
||||
state: &BeaconState,
|
||||
exit: &VoluntaryExit,
|
||||
|
||||
@@ -7,7 +7,7 @@ use types::*;
|
||||
///
|
||||
/// Returns `Ok(())` if the `ProposerSlashing` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_proposer_slashing(
|
||||
proposer_slashing: &ProposerSlashing,
|
||||
state: &BeaconState,
|
||||
@@ -67,7 +67,7 @@ pub fn verify_proposer_slashing(
|
||||
///
|
||||
/// Returns `true` if the signature is valid.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
fn verify_header_signature(
|
||||
header: &BeaconBlockHeader,
|
||||
pubkey: &PublicKey,
|
||||
|
||||
@@ -10,7 +10,7 @@ use types::*;
|
||||
///
|
||||
/// Returns `Ok(())` if the `SlashableAttestation` is valid, otherwise indicates the reason for invalidity.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_slashable_attestation(
|
||||
state: &BeaconState,
|
||||
slashable_attestation: &SlashableAttestation,
|
||||
|
||||
@@ -10,7 +10,7 @@ use types::*;
|
||||
///
|
||||
/// Note: this function is incomplete.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn verify_transfer(
|
||||
state: &BeaconState,
|
||||
transfer: &Transfer,
|
||||
@@ -122,7 +122,7 @@ fn verify_transfer_parametric(
|
||||
///
|
||||
/// Does not check that the transfer is valid, however checks for overflow in all actions.
|
||||
///
|
||||
/// Spec v0.5.0
|
||||
/// Spec v0.5.1
|
||||
pub fn execute_transfer(
|
||||
state: &mut BeaconState,
|
||||
transfer: &Transfer,
|
||||
|
||||
Reference in New Issue
Block a user