Skip to content

Commit

Permalink
Some small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Dec 8, 2023
1 parent 87fc797 commit 70f93b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
9 changes: 3 additions & 6 deletions lib/lambda_ethereum_consensus/state_transition/misc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -247,19 +247,16 @@ defmodule LambdaEthereumConsensus.StateTransition.Misc do
Return the signing root for the corresponding signing data.
"""
@spec compute_signing_root(SszTypes.bytes32(), SszTypes.domain()) :: SszTypes.root()
def compute_signing_root(<<_::256>> = data, domain) do
Ssz.hash_tree_root!(%SszTypes.SigningData{
object_root: data,
domain: domain
})
def compute_signing_root(<<_::256>> = root, domain) do
Ssz.hash_tree_root!(%SszTypes.SigningData{object_root: root, domain: domain})
end

@spec compute_signing_root(any(), SszTypes.domain()) :: SszTypes.root()
def compute_signing_root(ssz_object, domain) do
ssz_object |> Ssz.hash_tree_root!() |> compute_signing_root(domain)
end

@spec compute_signing_root(any(), module, SszTypes.domain()) :: SszTypes.root()
@spec compute_signing_root(any(), module(), SszTypes.domain()) :: SszTypes.root()
def compute_signing_root(ssz_object, schema, domain) do
ssz_object |> Ssz.hash_tree_root!(schema) |> compute_signing_root(domain)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ defmodule LambdaEthereumConsensus.StateTransition do
Bls.valid?(proposer.pubkey, signing_root, signed_block.signature)
end

# TODO: uncomment when implemented
def process_block(state, block) do
verify_and_notify_new_payload = &Execution.verify_and_notify_new_payload/1

Expand Down

0 comments on commit 70f93b2

Please sign in to comment.