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

Deneb #4054

Merged
merged 672 commits into from
Oct 16, 2023
Merged

Deneb #4054

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
672 commits
Select commit Hold shift + click to select a range
a3862e4
Revert "Clean capella (#4019)"
divagant-martian Mar 3, 2023
6fb1681
Merge branch 'unstable-up-to-clean-capella' into eip4844
divagant-martian Mar 3, 2023
f16e82a
Merge branch 'unstable' into eip4844
divagant-martian Mar 3, 2023
56841bc
fix gitignore
divagant-martian Mar 3, 2023
91a8d45
add missing eip4844 core topics placeholder
divagant-martian Mar 6, 2023
39d4f0a
Add BlobSidecar type
pawanjay176 Feb 8, 2023
bf40acd
adjust constant to spec values and names
divagant-martian Mar 6, 2023
75a0d52
get back the Blobs pub use to fix compilation issues
divagant-martian Mar 6, 2023
63011c5
fmt
divagant-martian Mar 6, 2023
545532a
fix rpc types to free the blobs (#4059)
divagant-martian Mar 7, 2023
3898cf7
Modify `lighthouse_network` gossip types to free the blobs (#4064)
divagant-martian Mar 10, 2023
140bdd3
update code paths in the `network` crate (#4065)
divagant-martian Mar 10, 2023
203a9e5
Merge branch 'unstable' into eip4844
divagant-martian Mar 10, 2023
fe421f7
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Mar 10, 2023
ae3e5f7
fmt
divagant-martian Mar 10, 2023
61b12c2
bump up recursion limits by a lot
divagant-martian Mar 10, 2023
9e30c3c
new lints
divagant-martian Mar 10, 2023
ea23d55
more lints
divagant-martian Mar 10, 2023
0ae3078
bump up recursion limits in the sim bin
divagant-martian Mar 10, 2023
6ec0ce6
Implement get validator block endpoint for EIP-4844
jimmygchen Feb 15, 2023
e81a502
Update SignedBlobSidecar container
jimmygchen Mar 14, 2023
9ba390f
Merge branch 'update-signed-blob-sidecar' into post-block-and-blobs
jimmygchen Mar 14, 2023
a8978a5
Implement publish block and blobs endpoint (WIP)
jimmygchen Mar 14, 2023
76f49bd
Update kzg interface (#4077)
pawanjay176 Mar 14, 2023
7f2e9b8
Merge branch 'unstable' into eip4844
divagant-martian Mar 14, 2023
9974dfe
fix merge mistake
divagant-martian Mar 14, 2023
e4608d4
Merge branch 'deneb-free-blobs' into get-validator-block-and-blobs
jimmygchen Mar 14, 2023
62627d9
Comment out code that fails to compile
jimmygchen Mar 15, 2023
02a88f0
Add KZG proof and blob validation
jimmygchen Mar 15, 2023
5887c8f
Update commented code to use todo!
jimmygchen Mar 15, 2023
775ca89
Add blobs publishing
jimmygchen Mar 15, 2023
fa9baab
Temporarily allow Rust check warnings on 4844 branch. (#4088)
jimmygchen Mar 15, 2023
2ef3ebb
Update SignedBlobSidecar container (#4078)
jimmygchen Mar 15, 2023
2c9477d
Fix block and blob coupling in the network context (#4086)
divagant-martian Mar 15, 2023
3d99e1f
move block contents to api crate, rename blob sidecars list
realbigsean Mar 15, 2023
2e075c0
Merge pull request #4091 from realbigsean/get-validator-block-and-blobs
realbigsean Mar 15, 2023
4a39e43
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Mar 15, 2023
91a06ba
Merge pull request #4083 from jimmygchen/post-block-and-blobs
realbigsean Mar 15, 2023
34cea6d
fmt
divagant-martian Mar 15, 2023
b303d2f
lints
realbigsean Mar 15, 2023
fb7d729
migrate types to API crate
realbigsean Mar 15, 2023
cf4285e
compile tests
realbigsean Mar 15, 2023
1a87222
Merge pull request #4094 from realbigsean/free-blob-lints
realbigsean Mar 15, 2023
3c18e1a
thread blocks and blobs to sync (#4100)
divagant-martian Mar 17, 2023
1301c62
Validator blob signing for the unblinded flow (#4096)
jimmygchen Mar 17, 2023
607242c
Merge branch 'unstable' into eip4844
divagant-martian Mar 17, 2023
7841433
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Mar 17, 2023
b40dcea
Update get blobs endpoint to return a list of BlobSidecars (#4109)
jimmygchen Mar 21, 2023
d1e653c
Update Blob Storage Structure (#4104)
ethDreamer Mar 21, 2023
7fad926
Merge commit '65a5eb829264cb279ed66814c961991ae3a0a04b' into eip4844
divagant-martian Mar 24, 2023
1b9cfcc
Merge branch 'unstable' into eip4844
divagant-martian Mar 24, 2023
1093ba1
revert change to ef_tests
divagant-martian Mar 24, 2023
25a2d8f
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Mar 24, 2023
b276af9
Rework block processing (#4092)
pawanjay176 Mar 24, 2023
d84117c
Removed TODO (#4128)
ethDreamer Mar 24, 2023
a5addf6
Rename eip4844 to deneb (#4129)
realbigsean Mar 26, 2023
af974dc
use block wrapper in sync pairing (#4131)
realbigsean Mar 26, 2023
f580863
Add simple pruning to data availability checker (#4132)
realbigsean Mar 27, 2023
da7fab5
Ef test version update (#4142)
realbigsean Mar 28, 2023
d24e5cc
clean up blobs by range response (#4137)
realbigsean Mar 28, 2023
deec9c5
clean up blob by root response (#4136)
realbigsean Mar 28, 2023
ffefd20
Block processing cleanup (#4153)
pawanjay176 Apr 3, 2023
3a21317
Unified Availability Cache into One (#4161)
ethDreamer Apr 4, 2023
9053223
Merge commit '036b797b2c1831352f937356576b3c78c65220ad' into eip4844
divagant-martian Apr 4, 2023
9558c18
Merge commit 'c5383e393acee152e92641ce4699d05913953e70' into eip4844
divagant-martian Apr 4, 2023
3c1a22c
Merge commit '1e029ce5384e911390a513e2d1885532f34a8b2b' into eip4844
divagant-martian Apr 4, 2023
cb81815
Merge branch 'unstable' into eip4844
divagant-martian Apr 4, 2023
32f9ba0
fix merge conflict
divagant-martian Apr 4, 2023
1b8225c
Revert upgrade to tokio utils to reprocessing queue (#4167)
pawanjay176 Apr 5, 2023
911a635
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Apr 5, 2023
df1da10
Merge branch 'unstable' into eip4844
divagant-martian Apr 10, 2023
f6f63b1
Merge branch 'eip4844' into deneb-free-blobs
divagant-martian Apr 10, 2023
fca8559
Update kzg to get windows going, expose blst features (#4177)
divagant-martian Apr 11, 2023
9dee718
Remove unused blob endpoint and types (#4209)
jimmygchen Apr 20, 2023
2d08343
Switch blob tx type to 0x03 (#4186)
jimmygchen Apr 20, 2023
a6335eb
bump ef tests version (#4217)
realbigsean Apr 20, 2023
e6b033a
update blob transaction (#4218)
realbigsean Apr 20, 2023
895bbd6
Gossip conditions deneb (#4164)
pawanjay176 Apr 20, 2023
689c0f7
Merge branch 'unstable' into eip4844
pawanjay176 Apr 21, 2023
b2ccc82
Fix compiler issues
pawanjay176 Apr 21, 2023
b6c0e91
Merge branch 'eip4844' into deneb-free-blobs
pawanjay176 Apr 21, 2023
7a36d00
Subscribe blob topics (#4224)
pawanjay176 Apr 22, 2023
cbe2e47
update blobs by range protocol name (#4229)
realbigsean Apr 24, 2023
a632969
Gossip verification cleanup (#4219)
pawanjay176 Apr 26, 2023
cbe4880
Fix deneb doppelganger tests (#4124)
pawanjay176 Apr 26, 2023
aa34339
Rename to MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS (#4206)
jtraglia Apr 26, 2023
c1d47da
Update `engine_api` to latest version (#4223)
ethDreamer Apr 27, 2023
9db6b39
fix check on max request size (#4250)
realbigsean May 2, 2023
a22e4bf
Implement KZG EF Tests (#4274)
ethDreamer May 8, 2023
46db304
Implement Overflow LRU Cache for Pending Blobs (#4203)
ethDreamer May 12, 2023
c4b2f1c
fix count usage in blobs by range (#4289)
realbigsean May 15, 2023
9b55d74
fix db startup (#4298)
realbigsean May 16, 2023
70c4ae3
Merge branch 'unstable' into deneb-free-blobs
jimmygchen May 30, 2023
81c9af5
Use patched versions of common libraries
jimmygchen May 30, 2023
1834723
Fix failing tests
jimmygchen May 30, 2023
c406305
Update testnet ETH1_BLOCK_HASH value
jimmygchen May 31, 2023
65a2ae3
Fix failing tests (workaround)
jimmygchen May 31, 2023
00ffd18
Empty commit.
jimmygchen May 31, 2023
e8f1d53
Merge pull request #4349 from jimmygchen/deneb-merge-from-unstable-20…
realbigsean May 31, 2023
a227959
Merge branch 'unstable' of https://github.com/sigp/lighthouse into de…
realbigsean Jun 2, 2023
6adb68c
fix compile after merge
realbigsean Jun 2, 2023
7a4be59
Merge pull request #4367 from realbigsean/merge-unstable-to-deneb
realbigsean Jun 2, 2023
ceaa740
Validate & Store Blobs During Backfill (#4307)
ethDreamer Jun 5, 2023
aef232c
Remove Unnecessary Option in Blob Pruning (#4363)
ethDreamer Jun 5, 2023
72d6cda
Revert "Temporarily allow Rust check warnings on 4844 branch. (#4088)…
realbigsean Jun 5, 2023
ec1b364
update automatic docker builds for the correct branch (#4375)
realbigsean Jun 5, 2023
0a2a00a
Update max blobs per block (#4391)
pawanjay176 Jun 12, 2023
801bf59
Merge branch 'unstable' into deneb-merge-from-unstable-20230613
jimmygchen Jun 12, 2023
5428e68
Merge pull request #4392 from jimmygchen/deneb-merge-from-unstable-20…
realbigsean Jun 13, 2023
a62e52f
Single blob lookups (#4152)
realbigsean Jun 15, 2023
e1af24b
Add more comments to overflow LRU cache (#4406)
ethDreamer Jun 16, 2023
97c4660
Merge branch 'unstable' into deneb-merge-from-unstable-20230627
jimmygchen Jun 26, 2023
d062f61
Fix failing tests after merge
jimmygchen Jun 27, 2023
cc03ba4
Merge branch 'unstable' into deneb-merge-from-unstable-20230627
jimmygchen Jun 27, 2023
56caccb
Added a few fixes from merge
jimmygchen Jun 27, 2023
dfbe4b1
Add missing Cargo.lock changes (`ssz_types` patch)
jimmygchen Jun 28, 2023
d1146ec
Sync finalized sync to 2 epochs + 1 slot past our peer's finalized sl…
jimmygchen Jun 28, 2023
5c4485e
Merge branch 'deneb-merge-from-unstable-20230627' of github.com:jimmy…
jimmygchen Jun 28, 2023
68140fa
Update max block request limit to `MAX_REQUEST_BLOCKS_DENEB` to ensur…
jimmygchen Jun 28, 2023
03a17a8
Update `handle_rpc_response` blobs match arms to be consistent with b…
jimmygchen Jun 28, 2023
5b85aec
Add BlobSidecar encode & decode test and fix `RpcLimit` for `BlobsByR…
jimmygchen Jun 28, 2023
4c9fcf1
Merge pull request #4432 from jimmygchen/deneb-merge-from-unstable-20…
realbigsean Jun 28, 2023
adbb62f
Devnet6 (#4404)
realbigsean Jun 29, 2023
4a79328
update clang in cross docker (#4451)
realbigsean Jun 30, 2023
d9254b7
update get blobs endpoint name from blobs to blob_sidecars (#4467)
realbigsean Jul 5, 2023
d41193c
fix failing network tests (#4472)
realbigsean Jul 5, 2023
af4a668
remove clang from Dockerfile (#4471)
realbigsean Jul 5, 2023
ba65812
remove patched dependencies (#4470)
realbigsean Jul 5, 2023
c3ef84b
remove uninlined arg lint suppression (#4469)
realbigsean Jul 5, 2023
246d52d
remove into gossip verified block
realbigsean Jul 6, 2023
cfe2452
Merge branch 'remove-into-gossip-verified-block' of https://github.co…
realbigsean Jul 6, 2023
c4da1ba
resolve merge issues
realbigsean Jul 7, 2023
6fd2ef4
Revert "remove into gossip verified block"
realbigsean Jul 10, 2023
782a53a
fix compile
realbigsean Jul 11, 2023
57bb1d9
fix progressive balance slashing tests
realbigsean Jul 11, 2023
1599487
fix tests
realbigsean Jul 12, 2023
c016f5d
gossip validate blobs prior to publish
realbigsean Jul 12, 2023
a6f48f5
Merge branch 'unstable' of https://github.com/sigp/lighthouse into me…
realbigsean Jul 12, 2023
2b93c0e
remove spec minimal feature gating in tests (#4468)
realbigsean Jul 14, 2023
42f54ee
fix merge conflict issues
realbigsean Jul 14, 2023
405e95b
fix merge
realbigsean Jul 14, 2023
1876082
Fix beta compiler warnings
pawanjay176 Jul 14, 2023
b96db45
Merge branch 'unstable' of https://github.com/sigp/lighthouse into me…
realbigsean Jul 17, 2023
0f514cb
fixes after merge
realbigsean Jul 17, 2023
a618830
fix smol lint
realbigsean Jul 17, 2023
aeee5be
smol fixes
realbigsean Jul 17, 2023
597389c
Merge branch 'merge-unstable-deneb-june-6th' of https://github.com/re…
realbigsean Jul 17, 2023
27a9901
Merge pull request #38 from realbigsean/merge-unstable-deneb-jul-14
realbigsean Jul 17, 2023
382b5ab
Merge branch 'deneb-free-blobs' into merge-unstable-deneb-june-6th
pawanjay176 Jul 17, 2023
e1d0724
Fix more beta compiler warnings
pawanjay176 Jul 17, 2023
cffa562
cargo fmt
realbigsean Jul 17, 2023
f98671f
Merge pull request #4477 from realbigsean/merge-unstable-deneb-june-6th
realbigsean Jul 17, 2023
f1f04bc
Add Changes to BlobSidecars Endpoint (#4455)
Gua00va Jul 21, 2023
4ca101e
Merge branch 'unstable' into deneb-free-blobs
jimmygchen Jul 24, 2023
54c6e1d
Fix compilation
jimmygchen Jul 24, 2023
fe94a05
Fix lint
jimmygchen Jul 24, 2023
3735450
Merge pull request #4533 from jimmygchen/deneb-free-blobs
realbigsean Jul 25, 2023
33dd13c
Refactor deneb block processing (#4511)
realbigsean Jul 25, 2023
8c341bb
cargo fmt (#4541)
realbigsean Jul 25, 2023
97bffd0
handle empty blocks gracefully
qu0b Jul 24, 2023
1be4d54
remove option & remove block check
qu0b Jul 24, 2023
28de041
cargo fmt & lint-fix
qu0b Jul 26, 2023
c991516
fix CI errors
qu0b Jul 27, 2023
e021575
formatting
qu0b Jul 28, 2023
9c75d80
Merge pull request #4535 from qu0b/blob/empty
jimmygchen Jul 28, 2023
a36e34e
Fix todos in deneb code (#4547)
pawanjay176 Aug 4, 2023
c8ea3e1
Fix small bug in test utils (#4570)
ethDreamer Aug 7, 2023
731b7e7
Refactor deneb networking (#4561)
realbigsean Aug 7, 2023
ec416df
Merge branch 'unstable' into merge-unstable-to-deneb-20230808
jimmygchen Aug 8, 2023
d401633
Add same error handling for blob signing when pubkey is missing
jimmygchen Aug 8, 2023
3ba9047
Fix release tests
jimmygchen Aug 8, 2023
efbf906
Merge pull request #4578 from jimmygchen/merge-unstable-to-deneb-2023…
realbigsean Aug 8, 2023
02c7a2e
Improve single block/blob logging (#4579)
realbigsean Aug 8, 2023
12b5e9a
Merge branch 'unstable' of https://github.com/sigp/lighthouse into me…
realbigsean Aug 9, 2023
c3ced28
cargo fmt
realbigsean Aug 9, 2023
4da6ca7
fix imports
realbigsean Aug 9, 2023
9e8a289
fix blobs by range test
realbigsean Aug 9, 2023
2b5385f
Changes for `devnet-8` (#4518)
ethDreamer Aug 9, 2023
fddd4e4
Merge pull request #4591 from realbigsean/merge-unstable-deneb-aug-9
realbigsean Aug 9, 2023
0b7a426
Builder flow for Deneb & Blobs (#4428)
jimmygchen Aug 10, 2023
8d81f1b
self hosted docker builds
realbigsean Aug 9, 2023
754ce5e
remove self hosted runner check where it might not be needed
realbigsean Aug 10, 2023
1440dc0
Merge pull request #4599 from realbigsean/self-hosted-docker-deneb
realbigsean Aug 10, 2023
87b165c
bump clang in cross.toml (#4602)
realbigsean Aug 10, 2023
11027e3
self hosted docker builds attempted fix (#4603)
realbigsean Aug 10, 2023
ab37f02
Fix env var references (#4604)
realbigsean Aug 10, 2023
7f7ad79
Fix manifest lists (#4605)
realbigsean Aug 10, 2023
ff792d9
Merge branch 'unstable' into merge-unstable-to-deneb-20230816
jimmygchen Aug 16, 2023
e1991e7
Merge pull request #4628 from jimmygchen/merge-unstable-to-deneb-2023…
realbigsean Aug 16, 2023
ba66623
Update docs to remove `lighthouse/database/historical_blocks` (remove…
jimmygchen Aug 16, 2023
0e04f36
Add Test for deneb Block Hash Calculation (#4621)
ethDreamer Aug 16, 2023
c280b48
Add back mplex
pawanjay176 Aug 15, 2023
f031a57
Merge pull request #4632 from jimmygchen/revive-mplex-deneb
jimmygchen Aug 17, 2023
4898430
Add Deneb builder test & update mock builder (#4607)
jimmygchen Aug 19, 2023
7d468cb
More deneb cleanup (#4640)
realbigsean Aug 21, 2023
63b876b
fix beacon chain tests (#4645)
realbigsean Aug 21, 2023
49d7fdf
Fix proposer cache miss in blob verification (#4646)
jimmygchen Aug 21, 2023
8a6f171
Merge branch 'unstable' into merge-unstable-to-deneb-20230822
jimmygchen Aug 22, 2023
7138763
Empty commit
jimmygchen Aug 22, 2023
03c610e
Fix release test compilation error
jimmygchen Aug 22, 2023
609c2c2
Update ckzg to latest version with blst 0.3.11
jimmygchen Aug 22, 2023
4bd5275
Fix failing beacon chain tests and remove unnecessary blob clone
jimmygchen Aug 23, 2023
2553944
Merge pull request #4649 from jimmygchen/merge-unstable-to-deneb-2023…
realbigsean Aug 23, 2023
8ed77d4
Merge branch 'unstable' of https://github.com/sigp/lighthouse into me…
realbigsean Aug 24, 2023
f90b190
Merge branch 'unstable' of https://github.com/sigp/lighthouse into me…
realbigsean Aug 24, 2023
42b34db
cargo fmt
realbigsean Aug 24, 2023
ce824e0
Merge pull request #4658 from realbigsean/merge-unstable-deneb-aug-24
realbigsean Aug 24, 2023
5ea38d9
Pin foundry toolchain version to fix stuck CI jobs (#4682)
jimmygchen Sep 5, 2023
e783a40
Deneb review suggestions (#4678)
paulhauner Sep 5, 2023
0bfc933
Deneb review suggestions (2) (#4680)
paulhauner Sep 5, 2023
2550170
Deneb review suggestions (3) (#4694)
paulhauner Sep 5, 2023
1360653
Simplifications for ./crypto (#4677)
michaelsproul Sep 5, 2023
f9bea3c
Deneb review `common/eth2` (#4698)
jimmygchen Sep 6, 2023
8db44de
Fix `parent_beacon_block_root` during proposer prep (#4703)
michaelsproul Sep 7, 2023
87ec759
Fix duplicate geth startup command in doppelganger_protection.sh (#4713)
jimmygchen Sep 8, 2023
50bf40b
Update `GET config/spec` endpoint to support Deneb config (#4708)
jimmygchen Sep 9, 2023
1db7394
Update `BlindedBlobsBundle` SSZ list max length and update builder te…
jimmygchen Sep 9, 2023
6771954
Merge `unstable` 20230911 into `deneb-free-blobs`.
jimmygchen Sep 11, 2023
d4aedab
Fix some compilation errors in tests
jimmygchen Sep 11, 2023
58cd506
fix the missing components response code for block publish (#4721)
realbigsean Sep 11, 2023
8e7b57a
Merge pull request #4719 from jimmygchen/deneb-merge-from-unstable-20…
realbigsean Sep 12, 2023
4a31e36
increase the max topic subscriptions #4581 (#4588)
qu0b Sep 13, 2023
2cfcb51
Blob references in ckzg (#4723)
pawanjay176 Sep 14, 2023
5f98a7b
Deneb PR feedback updates (#4716)
realbigsean Sep 15, 2023
665334e
Implement SSZ decoding for `SignedBlockContents` (#4744)
jimmygchen Sep 19, 2023
5c5afaf
Update Deneb to 1.4.0-beta.2 (devnet-9) (#4735)
dapplion Sep 25, 2023
9244f7f
Improvements to Deneb `store` upon review (#4693)
michaelsproul Sep 25, 2023
c0b6b92
Merge `unstable` 20230925 into `deneb-free-blobs`.
jimmygchen Sep 26, 2023
7a3cb13
Fix tests and add `BlockContents` decoding. Remove unused `builder_th…
jimmygchen Sep 26, 2023
1458394
Fix compilation issues after merging `unstable`.
jimmygchen Sep 26, 2023
8f07a96
Fix failing tests.
jimmygchen Sep 26, 2023
a642bd7
Merge pull request #4781 from jimmygchen/merge-unstable-to-deneb-2023…
realbigsean Sep 26, 2023
9f37d6d
reduce blob prune logging in forward sync (#4779)
realbigsean Sep 26, 2023
57edc0f
Add `serde(default)` to `max_per_epoch_activation_churn_limit` in spe…
jimmygchen Sep 26, 2023
67aeb6b
insert cached child at the front of a chain of parent lookups (#4780)
realbigsean Sep 29, 2023
c7ddf1f
add processing and processed caching to the DA checker (#4732)
realbigsean Oct 3, 2023
c5c84f1
Merge branch 'unstable' into merge-unstable-to-deneb-20231005
jimmygchen Oct 5, 2023
72563ff
Fix CI tests
jimmygchen Oct 5, 2023
3692622
Merge branch 'unstable' into merge-unstable-to-deneb-20231005
jimmygchen Oct 5, 2023
a96963f
Re-commit corrupted key files
jimmygchen Oct 5, 2023
203ac65
Merge pull request #4808 from jimmygchen/merge-unstable-to-deneb-2023…
realbigsean Oct 5, 2023
4ad7e15
Address Clippy 1.73 lints on Deneb branch (#4810)
jimmygchen Oct 6, 2023
8660043
Prevent Overflow LRU Cache from Exploding (#4801)
ethDreamer Oct 11, 2023
d9acee5
Delete unused ssz_types file (#4824)
michaelsproul Oct 11, 2023
4555e33
Remove serde derive references (#4830)
realbigsean Oct 11, 2023
38e7172
Add `blob_sidecar` event to SSE (#4790)
jimmygchen Oct 12, 2023
2d662f7
Use Deneb fork in generate_genesis_header
michaelsproul Oct 16, 2023
cf544b3
Very minor own nitpicks (#4845)
AgeManning Oct 16, 2023
ba0567d
Merge remote-tracking branch 'origin/unstable' into deneb-free-blobs
michaelsproul Oct 16, 2023
283ec8c
Deneb pr updates 2 (#4851)
realbigsean Oct 16, 2023
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
Deneb PR feedback updates (#4716)
* move length update outside of if let in LRU cache

* add comment and use hex for G1_POINT_AT_INFINITY

* remove some misleading comments from `ssz_snappy`

* make sure we can't overflow on blobs by range requests with large counts

* downgrade gossip verification internal availability check error

* change blob rpc responses from BlockingFnWithManualSendOnIdle to BlockingFn

* remove unnecessary collect in blobs by range response

* add a comment to blobs by range response start slot logic

* typo persist_data_availabilty_checker -> persist_data_availability_checker

* unify cheap_state_advance_to_obtain_committees
  • Loading branch information
realbigsean authored Sep 15, 2023
commit 5f98a7b8ad2573800fea292e88dbb8b5d795c0aa
4 changes: 2 additions & 2 deletions beacon_node/beacon_chain/src/beacon_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
Ok(())
}

pub fn persist_data_availabilty_checker(&self) -> Result<(), Error> {
pub fn persist_data_availability_checker(&self) -> Result<(), Error> {
let _timer = metrics::start_timer(&metrics::PERSIST_DATA_AVAILABILITY_CHECKER);
self.data_availability_checker.persist_all()?;

Expand Down Expand Up @@ -6298,7 +6298,7 @@ impl<T: BeaconChainTypes> Drop for BeaconChain<T> {
let drop = || -> Result<(), Error> {
self.persist_head_and_fork_choice()?;
self.persist_op_pool()?;
self.persist_data_availabilty_checker()?;
self.persist_data_availability_checker()?;
self.persist_eth1_cache()
};

Expand Down
72 changes: 11 additions & 61 deletions beacon_node/beacon_chain/src/blob_verification.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
use derivative::Derivative;
use slot_clock::SlotClock;
use state_processing::state_advance::partial_state_advance;
use std::sync::Arc;

use crate::beacon_chain::{
BeaconChain, BeaconChainTypes, BLOCK_PROCESSING_CACHE_LOCK_TIMEOUT,
VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT,
};
use crate::block_verification::cheap_state_advance_to_obtain_committees;
use crate::data_availability_checker::AvailabilityCheckError;
use crate::kzg_utils::{validate_blob, validate_blobs};
use crate::BeaconChainError;
use kzg::Kzg;
use slog::{debug, warn};
use ssz_derive::{Decode, Encode};
use ssz_types::VariableList;
use std::borrow::Cow;
use types::blob_sidecar::BlobIdentifier;
use types::{
BeaconState, BeaconStateError, BlobSidecar, BlobSidecarList, ChainSpec, CloneConfig, EthSpec,
Hash256, RelativeEpoch, SignedBlobSidecar, Slot,
BeaconStateError, BlobSidecar, BlobSidecarList, CloneConfig, EthSpec, Hash256,
SignedBlobSidecar, Slot,
};

/// An error occurred while validating a gossip blob.
Expand Down Expand Up @@ -308,12 +307,13 @@ pub fn validate_blob_sidecar_for_gossip<T: BeaconChainTypes>(
"block_root" => %block_root,
"index" => %blob_index,
);
let state = cheap_state_advance_to_obtain_committees(
&mut snapshot.beacon_state,
Some(snapshot.beacon_block_root),
blob_slot,
&chain.spec,
)?;
let state =
cheap_state_advance_to_obtain_committees::<_, GossipBlobError<T::EthSpec>>(
&mut snapshot.beacon_state,
Some(snapshot.beacon_block_root),
blob_slot,
&chain.spec,
)?;
(
state.get_beacon_proposer_index(blob_slot, &chain.spec)?,
state.fork(),
Expand Down Expand Up @@ -344,7 +344,7 @@ pub fn validate_blob_sidecar_for_gossip<T: BeaconChainTypes>(
parent_block.state_root()
))
})?;
let state = cheap_state_advance_to_obtain_committees(
let state = cheap_state_advance_to_obtain_committees::<_, GossipBlobError<T::EthSpec>>(
&mut parent_state,
Some(parent_block.state_root()),
blob_slot,
Expand Down Expand Up @@ -428,56 +428,6 @@ pub fn validate_blob_sidecar_for_gossip<T: BeaconChainTypes>(
})
}

/// Performs a cheap (time-efficient) state advancement so the committees and proposer shuffling for
/// `slot` can be obtained from `state`.
///
/// The state advancement is "cheap" since it does not generate state roots. As a result, the
/// returned state might be holistically invalid but the committees/proposers will be correct (since
/// they do not rely upon state roots).
///
/// If the given `state` can already serve the `slot`, the committees will be built on the `state`
/// and `Cow::Borrowed(state)` will be returned. Otherwise, the state will be cloned, cheaply
/// advanced and then returned as a `Cow::Owned`. The end result is that the given `state` is never
/// mutated to be invalid (in fact, it is never changed beyond a simple committee cache build).
///
/// Note: This is a copy of the `block_verification::cheap_state_advance_to_obtain_committees` to return
/// a BlobError error type instead.
fn cheap_state_advance_to_obtain_committees<'a, E: EthSpec>(
state: &'a mut BeaconState<E>,
state_root_opt: Option<Hash256>,
blob_slot: Slot,
spec: &ChainSpec,
) -> Result<Cow<'a, BeaconState<E>>, GossipBlobError<E>> {
let block_epoch = blob_slot.epoch(E::slots_per_epoch());

if state.current_epoch() == block_epoch {
// Build both the current and previous epoch caches, as the previous epoch caches are
// useful for verifying attestations in blocks from the current epoch.
state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;

Ok(Cow::Borrowed(state))
} else if state.slot() > blob_slot {
Err(GossipBlobError::BlobIsNotLaterThanParent {
blob_slot,
parent_slot: state.slot(),
})
} else {
let mut state = state.clone_with(CloneConfig::committee_caches_only());
let target_slot = block_epoch.start_slot(E::slots_per_epoch());

// Advance the state into the same epoch as the block. Use the "partial" method since state
// roots are not important for proposer/attester shuffling.
partial_state_advance(&mut state, state_root_opt, target_slot, spec)
.map_err(|e| GossipBlobError::BeaconChainError(BeaconChainError::from(e)))?;

state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;

Ok(Cow::Owned(state))
}
}

/// Wrapper over a `BlobSidecar` for which we have completed kzg verification.
/// i.e. `verify_blob_kzg_proof(blob, commitment, proof) == true`.
#[derive(Debug, Derivative, Clone, Encode, Decode)]
Expand Down
44 changes: 33 additions & 11 deletions beacon_node/beacon_chain/src/block_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ use state_processing::{
StateProcessingStrategy, VerifyBlockRoot,
};
use std::borrow::Cow;
use std::fmt::Debug;
use std::fs;
use std::io::Write;
use std::sync::Arc;
Expand Down Expand Up @@ -575,7 +576,7 @@ pub fn signature_verify_chain_segment<T: BeaconChainTypes>(
.map(|(_, block)| block.slot())
.unwrap_or_else(|| slot);

let state = cheap_state_advance_to_obtain_committees(
let state = cheap_state_advance_to_obtain_committees::<_, BlockError<T::EthSpec>>(
&mut parent.pre_state,
parent.beacon_state_root,
highest_slot,
Expand Down Expand Up @@ -887,7 +888,7 @@ impl<T: BeaconChainTypes> GossipVerifiedBlock<T> {
);

// The state produced is only valid for determining proposer/attester shuffling indices.
let state = cheap_state_advance_to_obtain_committees(
let state = cheap_state_advance_to_obtain_committees::<_, BlockError<T::EthSpec>>(
&mut parent.pre_state,
parent.beacon_state_root,
block.slot(),
Expand Down Expand Up @@ -1017,7 +1018,7 @@ impl<T: BeaconChainTypes> SignatureVerifiedBlock<T> {

let (mut parent, block) = load_parent(block_root, block, chain)?;

let state = cheap_state_advance_to_obtain_committees(
let state = cheap_state_advance_to_obtain_committees::<_, BlockError<T::EthSpec>>(
&mut parent.pre_state,
parent.beacon_state_root,
block.slot(),
Expand Down Expand Up @@ -1067,7 +1068,7 @@ impl<T: BeaconChainTypes> SignatureVerifiedBlock<T> {
load_parent(from.block_root, from.block, chain)?
};

let state = cheap_state_advance_to_obtain_committees(
let state = cheap_state_advance_to_obtain_committees::<_, BlockError<T::EthSpec>>(
&mut parent.pre_state,
parent.beacon_state_root,
block.slot(),
Expand Down Expand Up @@ -1900,6 +1901,30 @@ fn load_parent<T: BeaconChainTypes, B: AsBlock<T::EthSpec>>(
result
}

/// This trait is used to unify `BlockError` and `BlobError` so
/// `cheap_state_advance_to_obtain_committees` can be re-used in gossip blob validation.
pub trait CheapStateAdvanceError: From<BeaconStateError> + From<BeaconChainError> + Debug {
fn not_later_than_parent_error(block_slot: Slot, state_slot: Slot) -> Self;
}

impl<E: EthSpec> CheapStateAdvanceError for BlockError<E> {
fn not_later_than_parent_error(block_slot: Slot, parent_slot: Slot) -> Self {
BlockError::BlockIsNotLaterThanParent {
block_slot,
parent_slot,
}
}
}

impl<E: EthSpec> CheapStateAdvanceError for GossipBlobError<E> {
fn not_later_than_parent_error(blob_slot: Slot, parent_slot: Slot) -> Self {
GossipBlobError::BlobIsNotLaterThanParent {
blob_slot,
parent_slot,
}
}
}

/// Performs a cheap (time-efficient) state advancement so the committees and proposer shuffling for
/// `slot` can be obtained from `state`.
///
Expand All @@ -1911,12 +1936,12 @@ fn load_parent<T: BeaconChainTypes, B: AsBlock<T::EthSpec>>(
/// and `Cow::Borrowed(state)` will be returned. Otherwise, the state will be cloned, cheaply
/// advanced and then returned as a `Cow::Owned`. The end result is that the given `state` is never
/// mutated to be invalid (in fact, it is never changed beyond a simple committee cache build).
fn cheap_state_advance_to_obtain_committees<'a, E: EthSpec>(
pub fn cheap_state_advance_to_obtain_committees<'a, E: EthSpec, Err: CheapStateAdvanceError>(
state: &'a mut BeaconState<E>,
state_root_opt: Option<Hash256>,
block_slot: Slot,
spec: &ChainSpec,
) -> Result<Cow<'a, BeaconState<E>>, BlockError<E>> {
) -> Result<Cow<'a, BeaconState<E>>, Err> {
let block_epoch = block_slot.epoch(E::slots_per_epoch());

if state.current_epoch() == block_epoch {
Expand All @@ -1927,18 +1952,15 @@ fn cheap_state_advance_to_obtain_committees<'a, E: EthSpec>(

Ok(Cow::Borrowed(state))
} else if state.slot() > block_slot {
Err(BlockError::BlockIsNotLaterThanParent {
block_slot,
parent_slot: state.slot(),
})
Err(Err::not_later_than_parent_error(block_slot, state.slot()))
} else {
let mut state = state.clone_with(CloneConfig::committee_caches_only());
let target_slot = block_epoch.start_slot(E::slots_per_epoch());

// Advance the state into the same epoch as the block. Use the "partial" method since state
// roots are not important for proposer/attester shuffling.
partial_state_advance(&mut state, state_root_opt, target_slot, spec)
.map_err(|e| BlockError::BeaconChainError(BeaconChainError::from(e)))?;
.map_err(BeaconChainError::from)?;

state.build_committee_cache(RelativeEpoch::Previous, spec)?;
state.build_committee_cache(RelativeEpoch::Current, spec)?;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -691,9 +691,9 @@ impl<T: BeaconChainTypes> OverflowLRUCache<T> {
// it is still LRU entry -> delete it from memory & record that it's on disk
write_lock.in_memory.pop_entry(&lru_root);
write_lock.store_keys.insert(lru_root);
stored = write_lock.in_memory.len();
}
}
stored = write_lock.in_memory.len();
drop(write_lock);
}

Expand Down
12 changes: 6 additions & 6 deletions beacon_node/beacon_processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ pub enum Work<E: EthSpec> {
Status(BlockingFn),
BlocksByRangeRequest(BlockingFnWithManualSendOnIdle),
BlocksByRootsRequest(BlockingFnWithManualSendOnIdle),
BlobsByRangeRequest(BlockingFnWithManualSendOnIdle),
BlobsByRootsRequest(BlockingFnWithManualSendOnIdle),
BlobsByRangeRequest(BlockingFn),
BlobsByRootsRequest(BlockingFn),
GossipBlsToExecutionChange(BlockingFn),
LightClientBootstrapRequest(BlockingFn),
ApiRequestP0(BlockingOrAsync),
Expand Down Expand Up @@ -1461,10 +1461,10 @@ impl<E: EthSpec> BeaconProcessor<E> {
.spawn_async(async move {
work.await;
}),
Work::BlobsByRangeRequest(work)
| Work::BlobsByRootsRequest(work)
| Work::BlocksByRangeRequest(work)
| Work::BlocksByRootsRequest(work) => {
Work::BlobsByRangeRequest(process_fn) | Work::BlobsByRootsRequest(process_fn) => {
task_spawner.spawn_blocking(process_fn)
}
Work::BlocksByRangeRequest(work) | Work::BlocksByRootsRequest(work) => {
task_spawner.spawn_blocking_with_manual_send_idle(work)
}
Work::ChainSegmentBackfill(process_fn) => task_spawner.spawn_async(process_fn),
Expand Down
5 changes: 0 additions & 5 deletions beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,20 +402,15 @@ fn context_bytes<T: EthSpec>(
// NOTE: If you are adding another fork type here, be sure to modify the
// `fork_context.to_context_bytes()` function to support it as well!
SignedBeaconBlock::Deneb { .. } => {
// Deneb context being `None` implies that "merge never happened".
fork_context.to_context_bytes(ForkName::Deneb)
}
SignedBeaconBlock::Capella { .. } => {
// Capella context being `None` implies that "merge never happened".
fork_context.to_context_bytes(ForkName::Capella)
}
SignedBeaconBlock::Merge { .. } => {
// Merge context being `None` implies that "merge never happened".
fork_context.to_context_bytes(ForkName::Merge)
}
SignedBeaconBlock::Altair { .. } => {
// Altair context being `None` implies that "altair never happened".
// This code should be unreachable if altair is disabled since only Version::V1 would be valid in that case.
fork_context.to_context_bytes(ForkName::Altair)
}
SignedBeaconBlock::Base { .. } => Some(fork_context.genesis_context_bytes()),
Expand Down
6 changes: 6 additions & 0 deletions beacon_node/lighthouse_network/src/rpc/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,12 @@ pub struct BlobsByRangeRequest {
pub count: u64,
}

impl BlobsByRangeRequest {
pub fn max_blobs_requested<E: EthSpec>(&self) -> u64 {
self.count.saturating_mul(E::max_blobs_per_block() as u64)
}
}

/// Request a number of beacon block roots from a peer.
#[superstruct(
variants(V1, V2),
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/rpc/outbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ impl<TSpec: EthSpec> OutboundRequest<TSpec> {
OutboundRequest::Goodbye(_) => 0,
OutboundRequest::BlocksByRange(req) => *req.count(),
OutboundRequest::BlocksByRoot(req) => req.block_roots().len() as u64,
OutboundRequest::BlobsByRange(req) => req.count * TSpec::max_blobs_per_block() as u64,
OutboundRequest::BlobsByRange(req) => req.max_blobs_requested::<TSpec>(),
OutboundRequest::BlobsByRoot(req) => req.blob_ids.len() as u64,
OutboundRequest::Ping(_) => 1,
OutboundRequest::MetaData(_) => 1,
Expand Down
2 changes: 1 addition & 1 deletion beacon_node/lighthouse_network/src/rpc/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ impl<TSpec: EthSpec> InboundRequest<TSpec> {
InboundRequest::Goodbye(_) => 0,
InboundRequest::BlocksByRange(req) => *req.count(),
InboundRequest::BlocksByRoot(req) => req.block_roots().len() as u64,
InboundRequest::BlobsByRange(req) => req.count * TSpec::max_blobs_per_block() as u64,
InboundRequest::BlobsByRange(req) => req.max_blobs_requested::<TSpec>(),
InboundRequest::BlobsByRoot(req) => req.blob_ids.len() as u64,
InboundRequest::Ping(_) => 1,
InboundRequest::MetaData(_) => 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
| AvailabilityCheckError::MissingBlobs
| AvailabilityCheckError::StoreError(_)
| AvailabilityCheckError::DecodeError(_) => {
crit!(
warn!(
self.log,
"Internal availability check error";
"error" => ?err,
Expand Down
10 changes: 4 additions & 6 deletions beacon_node/network/src/network_beacon_processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,9 +562,8 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
request: BlobsByRangeRequest,
) -> Result<(), Error<T::EthSpec>> {
let processor = self.clone();
let process_fn = move |send_idle_on_drop| {
processor.handle_blobs_by_range_request(send_idle_on_drop, peer_id, request_id, request)
};
let process_fn =
move || processor.handle_blobs_by_range_request(peer_id, request_id, request);

self.try_send(BeaconWorkEvent {
drop_during_sync: false,
Expand All @@ -580,9 +579,8 @@ impl<T: BeaconChainTypes> NetworkBeaconProcessor<T> {
request: BlobsByRootRequest,
) -> Result<(), Error<T::EthSpec>> {
let processor = self.clone();
let process_fn = move |send_idle_on_drop| {
processor.handle_blobs_by_root_request(send_idle_on_drop, peer_id, request_id, request)
};
let process_fn =
move || processor.handle_blobs_by_root_request(peer_id, request_id, request);

self.try_send(BeaconWorkEvent {
drop_during_sync: false,
Expand Down
Loading