Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In-memory tree states #5533

Merged
merged 46 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1b4620f
Consensus changes
michaelsproul Apr 8, 2024
bba555d
EF tests
michaelsproul Apr 8, 2024
9d3ff45
lcli
michaelsproul Apr 8, 2024
1f5516a
common and watch
michaelsproul Apr 8, 2024
6b5a37c
account manager
michaelsproul Apr 8, 2024
67a881d
cargo
michaelsproul Apr 8, 2024
19f3020
fork choice
michaelsproul Apr 8, 2024
083cf64
promise cache
michaelsproul Apr 8, 2024
429db72
beacon chain
michaelsproul Apr 8, 2024
eff12d7
interop genesis
michaelsproul Apr 8, 2024
7e66ce1
http api
michaelsproul Apr 8, 2024
c34ccab
lighthouse
michaelsproul Apr 8, 2024
0adb24f
op pool
michaelsproul Apr 8, 2024
3d09bf5
beacon chain misc
michaelsproul Apr 8, 2024
a197ffb
parallel state cache
michaelsproul Apr 8, 2024
4139cbe
store
michaelsproul Apr 8, 2024
2d551c4
fix issues in store
michaelsproul Apr 8, 2024
8fca797
IT COMPILES
michaelsproul Apr 8, 2024
2b3b71a
Remove some unnecessary module qualification
michaelsproul Apr 8, 2024
8fda723
Revert Arced pubkey optimization (#5536)
dapplion Apr 11, 2024
de7ae83
Merge remote-tracking branch 'origin/unstable' into tree-states-memory
michaelsproul Apr 11, 2024
cf341b6
Fix caching, rebasing and some tests
michaelsproul Apr 12, 2024
38b0765
Remove unused deps
michaelsproul Apr 12, 2024
7592355
Merge remote-tracking branch 'origin/unstable' into tree-states-memory
michaelsproul Apr 12, 2024
f4285e5
Small cleanups
michaelsproul Apr 12, 2024
d0d0b37
Revert shuffling cache/promise cache changes
michaelsproul Apr 12, 2024
627cac5
Fix state advance bugs
michaelsproul Apr 12, 2024
e7a8fd7
Fix shuffling tests
michaelsproul Apr 12, 2024
b570e0d
Remove some resolved FIXMEs
michaelsproul Apr 15, 2024
db5f5ea
Remove StateProcessingStrategy
michaelsproul Apr 15, 2024
297cea5
Optimise withdrawals calculation
michaelsproul Apr 15, 2024
3be919d
Don't reorg if state cache is missed
michaelsproul Apr 15, 2024
78d02d5
Remove inconsistent state func
michaelsproul Apr 15, 2024
e0b30ad
Fix beta compiler
michaelsproul Apr 15, 2024
cddbcbf
Rebase early, rebase often
michaelsproul Apr 15, 2024
d2657cc
Fix state caching behaviour
michaelsproul Apr 15, 2024
bca33f1
Update to milhouse release
michaelsproul Apr 16, 2024
3a16649
Fix on-disk consensus context format
michaelsproul Apr 18, 2024
1d715b9
Merge remote-tracking branch 'origin/unstable' into tree-states-memory
michaelsproul Apr 18, 2024
9d3c321
Squashed commit of the following:
michaelsproul Apr 18, 2024
62ebdac
Keep indexed attestations, thanks Sean
michaelsproul Apr 19, 2024
8238c19
Merge branch 'on-disk-consensus-context' into tree-states-memory
michaelsproul Apr 19, 2024
900b880
Merge branch 'unstable' into tree-states-memory
realbigsean Apr 19, 2024
a359c74
Address half of Sean's review
michaelsproul Apr 22, 2024
9bf31a2
More simplifications from Sean's review
michaelsproul Apr 23, 2024
970f3df
Cache state after get_advanced_hot_state
michaelsproul Apr 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
beacon chain
  • Loading branch information
michaelsproul committed Apr 8, 2024
commit 429db72145b5397ec18d9caa451476de844abfea
80 changes: 41 additions & 39 deletions beacon_node/beacon_chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,58 +19,60 @@ environment = { workspace = true }
serde_json = { workspace = true }

[dependencies]
serde_json = { workspace = true }
bitvec = { workspace = true }
bls = { workspace = true }
crossbeam-channel = { workspace = true }
derivative = { workspace = true }
eth1 = { workspace = true }
eth2 = { workspace = true }
eth2_network_config = { workspace = true }
merkle_proof = { workspace = true }
store = { workspace = true }
parking_lot = { workspace = true }
ethereum_hashing = { workspace = true }
ethereum_serde_utils = { workspace = true }
ethereum_ssz = { workspace = true }
ethereum_ssz_derive = { workspace = true }
execution_layer = { workspace = true }
fork_choice = { workspace = true }
futures = { workspace = true }
genesis = { workspace = true }
hex = { workspace = true }
int_to_bytes = { workspace = true }
itertools = { workspace = true }
kzg = { workspace = true }
lazy_static = { workspace = true }
smallvec = { workspace = true }
lighthouse_metrics = { workspace = true }
logging = { workspace = true }
lru = { workspace = true }
merkle_proof = { workspace = true }
oneshot_broadcast = { path = "../../common/oneshot_broadcast/" }
operation_pool = { workspace = true }
parking_lot = { workspace = true }
promise_cache = { path = "../../common/promise_cache" }
proto_array = { workspace = true }
rand = { workspace = true }
rayon = { workspace = true }
safe_arith = { workspace = true }
sensitive_url = { workspace = true }
serde = { workspace = true }
ethereum_serde_utils = { workspace = true }
serde_json = { workspace = true }
slasher = { workspace = true }
slog = { workspace = true }
slog-async = { workspace = true }
slog-term = { workspace = true }
sloggers = { workspace = true }
slot_clock = { workspace = true }
ethereum_hashing = { workspace = true }
ethereum_ssz = { workspace = true }
smallvec = { workspace = true }
ssz_types = { workspace = true }
ethereum_ssz_derive = { workspace = true }
state_processing = { workspace = true }
tree_hash_derive = { workspace = true }
tree_hash = { workspace = true }
types = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
eth1 = { workspace = true }
futures = { workspace = true }
genesis = { workspace = true }
int_to_bytes = { workspace = true }
rand = { workspace = true }
proto_array = { workspace = true }
lru = { workspace = true }
tempfile = { workspace = true }
bitvec = { workspace = true }
bls = { workspace = true }
kzg = { workspace = true }
safe_arith = { workspace = true }
fork_choice = { workspace = true }
task_executor = { workspace = true }
derivative = { workspace = true }
itertools = { workspace = true }
slasher = { workspace = true }
eth2 = { workspace = true }
store = { workspace = true }
strum = { workspace = true }
logging = { workspace = true }
execution_layer = { workspace = true }
sensitive_url = { workspace = true }
superstruct = { workspace = true }
hex = { workspace = true }
oneshot_broadcast = { path = "../../common/oneshot_broadcast/" }
slog-term = { workspace = true }
slog-async = { workspace = true }
task_executor = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tree_hash = { workspace = true }
tree_hash_derive = { workspace = true }
types = { workspace = true }

[[test]]
name = "beacon_chain_tests"
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/attestation_rewards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,13 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
let mut inactivity_penalty = 0i64;

if eligible {
let effective_balance = validator.effective_balance;
let effective_balance = validator.effective_balance();

for flag_index in 0..PARTICIPATION_FLAG_WEIGHTS.len() {
let (ideal_reward, penalty) = ideal_rewards_hashmap
.get(&(flag_index, effective_balance))
.ok_or(BeaconChainError::AttestationRewardsError)?;
let voted_correctly = !validator.slashed
let voted_correctly = !validator.slashed()
&& previous_epoch_participation_flags.has_flag(flag_index)?;
if voted_correctly {
if flag_index == TIMELY_HEAD_FLAG_INDEX {
Expand Down
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/beacon_block_reward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
proposer_slashing_reward.safe_add_assign(
state
.get_validator(proposer_slashing.proposer_index() as usize)?
.effective_balance
.effective_balance()
.safe_div(self.spec.whistleblower_reward_quotient)?,
)?;
}
Expand All @@ -157,7 +157,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
attester_slashing_reward.safe_add_assign(
state
.get_validator(attester_index as usize)?
.effective_balance
.effective_balance()
.safe_div(self.spec.whistleblower_reward_quotient)?,
)?;
}
Expand Down
Loading