This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Service Level Agreement (SLA)** | |
This Service Level Agreement ("SLA") is entered into by and between [Service Provider Name] ("Provider") and [Client Name] ("Client") on [Date]. | |
**1. Scope** | |
This SLA outlines the agreed-upon levels of service and support provided by the Provider to the Client for the duration of the agreement. | |
**2. Services Provided** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.8.2 <0.9.0; | |
/** | |
* @title Voting | |
* @dev Store & retrieve value in a variable | |
* @custom:dev-run-script ./scripts/deploy_with_ethers.ts | |
*/ | |
contract Voting { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SignedMessage{ | |
Signers: []types.OperatorID{1, 2, 3, 4}, | |
Signature: []byte{}, | |
Message: Message{ | |
MsgType: RoundChangeMsgType, | |
Round: 2, | |
Height: 10, | |
Identifier: []byte{}, | |
Root: [32]byte{}, | |
DataRound: 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function registerValidator( | |
uint256[] operatorIds, | |
bytes[] signatures, | |
bytes[] encryptedShares, | |
bytes[] sharesPublicKeys | |
uint8 setSize, | |
bytes withdrawalCredentials, | |
bytes publicKey, | |
) external { | |
// verify signature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ProcessMessage pulls messages from the queue to be processed sequentially | |
func (i *Instance) ProcessMessage() (processedMsg bool, err error) { | |
if netMsg := i.MsgQueue.PopMessage(msgqueue.IBFTMessageIndexKey(i.State.Lambda.Get(), i.State.SeqNumber.Get(), i.State.Round.Get())); netMsg != nil { | |
var pp pipeline.Pipeline | |
switch netMsg.SignedMessage.Message.Type { | |
case proto.RoundState_PrePrepare: | |
pp = i.prePrepareMsgPipeline() | |
case proto.RoundState_Prepare: | |
pp = i.prepareMsgPipeline() | |
case proto.RoundState_Commit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_in_inactivity_leak(state: BeaconState) -> bool: | |
return get_finality_delay(state) > MIN_EPOCHS_TO_INACTIVITY_PENALTY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_base_reward(state: BeaconState, index: ValidatorIndex) -> Gwei: | |
total_balance = get_total_active_balance(state) | |
effective_balance = state.validators[index].effective_balance | |
return Gwei(effective_balance * BASE_REWARD_FACTOR // integer_squareroot(total_balance) // BASE_REWARDS_PER_EPOCH) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_attestation_deltas(state: BeaconState) -> Tuple[Sequence[Gwei], Sequence[Gwei]]: | |
""" | |
Return attestation reward/penalty deltas for each validator. | |
""" | |
source_rewards, source_penalties = get_source_deltas(state) | |
target_rewards, target_penalties = get_target_deltas(state) | |
head_rewards, head_penalties = get_head_deltas(state) | |
inclusion_delay_rewards, _ = get_inclusion_delay_deltas(state) | |
_, inactivity_penalties = get_inactivity_penalty_deltas(state) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_attestation_component_deltas(state: BeaconState, | |
attestations: Sequence[PendingAttestation] | |
) -> Tuple[Sequence[Gwei], Sequence[Gwei]]: | |
""" | |
Helper with shared logic for use by get source, target, and head deltas functions | |
""" | |
rewards = [Gwei(0)] * len(state.validators) | |
penalties = [Gwei(0)] * len(state.validators) | |
total_balance = get_total_active_balance(state) | |
unslashed_attesting_indices = get_unslashed_attesting_indices(state, attestations) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_attestation_deltas(state: BeaconState) -> Tuple[Sequence[Gwei], Sequence[Gwei]]: | |
""" | |
Return attestation reward/penalty deltas for each validator. | |
""" | |
source_rewards, source_penalties = get_source_deltas(state) | |
target_rewards, target_penalties = get_target_deltas(state) | |
head_rewards, head_penalties = get_head_deltas(state) | |
inclusion_delay_rewards, _ = get_inclusion_delay_deltas(state) | |
_, inactivity_penalties = get_inactivity_penalty_deltas(state) |
NewerOlder