File tree Expand file tree Collapse file tree 4 files changed +4
-2
lines changed
lambda_ethereum_consensus/state_transition Expand file tree Collapse file tree 4 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ Benchee.run(
35
35
time: 5
36
36
)
37
37
38
- ## Benchmark Merkleization
38
+ ## Benchmark Merkleization
39
39
40
40
list = Stream . cycle ( [ 65_535 ] ) |> Enum . take ( 316 )
41
41
schema = { :list , { :int , 16 } , 1024 }
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ defmodule LambdaEthereumConsensus.StateTransition.Misc do
170
170
first_8_bytes
171
171
end
172
172
173
- @ spec uint_to_bytes ( non_neg_integer ( ) , 8 | 32 | 64 ) :: binary ( )
173
+ @ spec uint_to_bytes ( non_neg_integer ( ) , 8 | 16 | 32 | 64 ) :: binary ( )
174
174
def uint_to_bytes ( value , size ) do
175
175
# Converts an unsigned integer value to a bytes value
176
176
<< value :: unsigned - integer - little - size ( size ) >>
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ defmodule LambdaEthereumConsensus.SszEx do
18
18
@ zero_chunk << 0 :: size ( @ bits_per_chunk ) >>
19
19
@ zero_hashes ZeroHashes . compute_zero_hashes ( )
20
20
21
+ @ compile { :inline , hash: 1 }
21
22
@ spec hash ( iodata ( ) ) :: binary ( )
22
23
def hash ( data ) , do: :crypto . hash ( :sha256 , data )
23
24
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ defmodule Types.Store do
39
39
proposer_boost_root: Types . root ( ) | nil ,
40
40
equivocating_indices: MapSet . t ( Types . validator_index ( ) ) ,
41
41
checkpoint_states: % { Checkpoint . t ( ) => BeaconState . t ( ) } ,
42
+ # NOTE: the `Checkpoint` values in latest_messages are `LatestMessage`s
42
43
latest_messages: % { Types . validator_index ( ) => Checkpoint . t ( ) } ,
43
44
unrealized_justifications: % { Types . root ( ) => Checkpoint . t ( ) } ,
44
45
tree_cache: Tree . t ( )
You can’t perform that action at this time.
0 commit comments