mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Update go to 1.19.3 (#11630)
* Update go to 1.19.3 * Update other items to 1.19 * Update golangci-lint to latest release * Run gofmt -s with go1.19 * Huge gofmt changes Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
This commit is contained in:
@@ -16,13 +16,14 @@ import (
|
||||
// signed by the deposit key.
|
||||
//
|
||||
// Spec details about general deposit workflow:
|
||||
// To submit a deposit:
|
||||
//
|
||||
// - Pack the validator's initialization parameters into deposit_data, a Deposit_Data SSZ object.
|
||||
// - Let amount be the amount in Gwei to be deposited by the validator where MIN_DEPOSIT_AMOUNT <= amount <= MAX_EFFECTIVE_BALANCE.
|
||||
// - Set deposit_data.amount = amount.
|
||||
// - Let signature be the result of bls_sign of the signing_root(deposit_data) with domain=compute_domain(DOMAIN_DEPOSIT). (Deposits are valid regardless of fork version, compute_domain will default to zeroes there).
|
||||
// - Send a transaction on the Ethereum 1.0 chain to DEPOSIT_CONTRACT_ADDRESS executing `deposit(pubkey: bytes[48], withdrawal_credentials: bytes[32], signature: bytes[96])` along with a deposit of amount Gwei.
|
||||
// To submit a deposit:
|
||||
//
|
||||
// - Pack the validator's initialization parameters into deposit_data, a Deposit_Data SSZ object.
|
||||
// - Let amount be the amount in Gwei to be deposited by the validator where MIN_DEPOSIT_AMOUNT <= amount <= MAX_EFFECTIVE_BALANCE.
|
||||
// - Set deposit_data.amount = amount.
|
||||
// - Let signature be the result of bls_sign of the signing_root(deposit_data) with domain=compute_domain(DOMAIN_DEPOSIT). (Deposits are valid regardless of fork version, compute_domain will default to zeroes there).
|
||||
// - Send a transaction on the Ethereum 1.0 chain to DEPOSIT_CONTRACT_ADDRESS executing `deposit(pubkey: bytes[48], withdrawal_credentials: bytes[32], signature: bytes[96])` along with a deposit of amount Gwei.
|
||||
//
|
||||
// See: https://github.com/ethereum/consensus-specs/blob/master/specs/validator/0_beacon-chain-validator.md#submit-deposit
|
||||
func DepositInput(depositKey, withdrawalKey bls.SecretKey, amountInGwei uint64) (*ethpb.Deposit_Data, [32]byte, error) {
|
||||
@@ -68,8 +69,10 @@ func DepositInput(depositKey, withdrawalKey bls.SecretKey, amountInGwei uint64)
|
||||
// address.
|
||||
//
|
||||
// The specification is as follows:
|
||||
// withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX_BYTE
|
||||
// withdrawal_credentials[1:] == hash(withdrawal_pubkey)[1:]
|
||||
//
|
||||
// withdrawal_credentials[:1] == BLS_WITHDRAWAL_PREFIX_BYTE
|
||||
// withdrawal_credentials[1:] == hash(withdrawal_pubkey)[1:]
|
||||
//
|
||||
// where withdrawal_credentials is of type bytes32.
|
||||
func WithdrawalCredentialsHash(withdrawalKey bls.SecretKey) []byte {
|
||||
h := hash.Hash(withdrawalKey.PublicKey().Marshal())
|
||||
|
||||
Reference in New Issue
Block a user