Commit Graph

5469 Commits

Author SHA1 Message Date
Pawan Dhananjay
c0445e2536 Add sus gossip verification for blobs 2023-03-20 20:28:35 +05:30
Pawan Dhananjay
acd36ccaa6 Reprocess an ExecutedBlock on unavailable blobs 2023-03-20 19:54:08 +05:30
realbigsean
05db0d2ba3 everything, everywhere, all at once 2023-03-17 16:12:40 -04:00
realbigsean
98babb2e67 Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into too-many-blob-branches 2023-03-17 09:38:14 -04:00
Jimmy Chen
1301c62436 Validator blob signing for the unblinded flow (#4096)
* Implement validator blob signing (full block and full blob)

* Fix compilation error and remove redundant slot check

* Fix clippy error
2023-03-17 09:29:25 -04:00
realbigsean
be4d70eeff tons of changes, just tryna compile 2023-03-16 22:25:04 -04:00
Divma
3c18e1a3a4 thread blocks and blobs to sync (#4100)
* thread blocks and blobs to sync

* satisfy dead code analysis
2023-03-16 19:20:39 -05:00
Pawan Dhananjay
9df968c992 more progress 2023-03-16 20:55:21 +05:30
realbigsean
8c79358d35 cargo fmt 2023-03-15 22:18:39 -04:00
realbigsean
4edca9117d extended chaos 2023-03-15 20:24:47 -04:00
realbigsean
c26ce824a0 general chaos 2023-03-15 17:48:22 -04:00
realbigsean
3f3358f8af Merge branch 'deneb-free-blobs' of https://github.com/sigp/lighthouse into sean-blob-blob-blob 2023-03-15 17:34:56 -04:00
realbigsean
73ab4d85d7 cache cleanup 2023-03-15 17:21:18 -04:00
realbigsean
1a87222641 Merge pull request #4094 from realbigsean/free-blob-lints
Free blob lints
2023-03-15 16:56:53 -04:00
realbigsean
cf4285e1d4 compile tests 2023-03-15 16:34:00 -04:00
realbigsean
fb7d729d92 migrate types to API crate 2023-03-15 16:03:36 -04:00
Pawan Dhananjay
49862c7e48 Add gossip verification conditions 2023-03-16 01:11:16 +05:30
Pawan Dhananjay
bef3a54c4a Fix after rebase 2023-03-16 01:10:46 +05:30
realbigsean
b303d2fb7e lints 2023-03-15 15:32:22 -04:00
Pawan Dhananjay
761df83597 Initial commit 2023-03-16 00:56:18 +05:30
realbigsean
13b54f7879 shard memory blob cache 2023-03-16 00:56:16 +05:30
realbigsean
736a24e35a add 'gossip blob cache' and start to clean up processing and transition types 2023-03-16 00:53:15 +05:30
realbigsean
956ac7cbe9 small fixes 2023-03-16 00:46:33 +05:30
realbigsean
c332bc272c add intoavailableblock trait 2023-03-16 00:46:31 +05:30
realbigsean
110eaf92c4 introduce availability pending block 2023-03-16 00:45:12 +05:30
Diva M
34cea6d1c3 fmt 2023-03-15 12:37:53 -05:00
realbigsean
91a06ba484 Merge pull request #4083 from jimmygchen/post-block-and-blobs
Implement POST beacon block for EIP-4844
2023-03-15 13:35:37 -04:00
Diva M
4a39e43f96 Merge branch 'eip4844' into deneb-free-blobs 2023-03-15 12:26:30 -05:00
realbigsean
2e075c0a80 Merge pull request #4091 from realbigsean/get-validator-block-and-blobs
Get validator block and blobs
2023-03-15 12:22:03 -04:00
realbigsean
3d99e1f14d move block contents to api crate, rename blob sidecars list 2023-03-15 12:15:08 -04:00
Divma
2c9477de43 Fix block and blob coupling in the network context (#4086)
* update docs

* introduce a temp enum to model an adjusted `BlockWrapper` and fix blob coupling

* fix compilation issue

* fix blob coupling in the network context

* review comments
2023-03-15 11:04:45 -05:00
Jimmy Chen
2ef3ebbef3 Update SignedBlobSidecar container (#4078) 2023-03-15 11:03:56 -05:00
Jimmy Chen
fa9baab0f7 Temporarily allow Rust check warnings on 4844 branch. (#4088) 2023-03-15 09:43:31 -05:00
Jimmy Chen
775ca89801 Add blobs publishing 2023-03-15 15:57:30 +11:00
Jimmy Chen
5887c8fe92 Update commented code to use todo! 2023-03-15 15:29:16 +11:00
Jimmy Chen
02a88f0704 Add KZG proof and blob validation 2023-03-15 15:15:46 +11:00
Jimmy Chen
62627d984c Comment out code that fails to compile 2023-03-15 12:30:59 +11:00
Jimmy Chen
e4608d44ea Merge branch 'deneb-free-blobs' into get-validator-block-and-blobs 2023-03-15 10:55:00 +11:00
Diva M
9974dfe87b fix merge mistake 2023-03-14 14:45:17 -05:00
Diva M
7f2e9b80bb Merge branch 'unstable' into eip4844 2023-03-14 12:00:32 -05:00
Pawan Dhananjay
76f49bdb44 Update kzg interface (#4077)
* Update kzg interface

* Update utils

* Update dependency

* Address review comments
2023-03-14 12:13:15 +05:30
Michael Sproul
36e163c042 Add parent_block_number to payload SSE (#4053)
## Issue Addressed

In #4027 I forgot to add the `parent_block_number` to the payload attributes SSE.

## Proposed Changes

Compute the parent block number while computing the pre-payload attributes. Pass it on to the SSE stream.

## Additional Info

Not essential for v3.5.1 as I suspect most builders don't need the `parent_block_root`. I would like to use it for my dummy no-op builder however.
2023-03-14 06:26:37 +00:00
Jimmy Chen
a8978a5f69 Implement publish block and blobs endpoint (WIP) 2023-03-14 17:03:45 +11:00
Divma
e190ebb8a0 Support for Ipv6 (#4046)
## Issue Addressed
Add support for ipv6 and dual stack in lighthouse. 

## Proposed Changes
From an user perspective, now setting an ipv6 address, optionally configuring the ports should feel exactly the same as using an ipv4 address. If listening over both ipv4 and ipv6 then the user needs to:
- use the `--listen-address` two times (ipv4 and ipv6 addresses)
- `--port6` becomes then required
- `--discovery-port6` can now be used to additionally configure the ipv6 udp port

### Rough list of code changes
- Discovery:
  - Table filter and ip mode set to match the listening config. 
  - Ipv6 address, tcp port and udp port set in the ENR builder
  - Reported addresses now check which tcp port to give to libp2p
- LH Network Service:
  - Can listen over Ipv6, Ipv4, or both. This uses two sockets. Using mapped addresses is disabled from libp2p and it's the most compatible option.
- NetworkGlobals:
  - No longer stores udp port since was not used at all. Instead, stores the Ipv4 and Ipv6 TCP ports.
- NetworkConfig:
  - Update names to make it clear that previous udp and tcp ports in ENR were Ipv4
  - Add fields to configure Ipv6 udp and tcp ports in the ENR
  - Include advertised enr Ipv6 address.
  - Add type to model Listening address that's either Ipv4, Ipv6 or both. A listening address includes the ip, udp port and tcp port.
- UPnP:
  - Kept only for ipv4
- Cli flags:
  - `--listen-addresses` now can take up to two values
  - `--port` will apply to ipv4 or ipv6 if only one listening address is given. If two listening addresses are given it will apply only to Ipv4.
  - `--port6` New flag required when listening over ipv4 and ipv6 that applies exclusively to Ipv6.
  - `--discovery-port` will now apply to ipv4 and ipv6 if only one listening address is given.
  - `--discovery-port6` New flag to configure the individual udp port of ipv6 if listening over both ipv4 and ipv6.
  - `--enr-udp-port` Updated docs to specify that it only applies to ipv4. This is an old behaviour.
  - `--enr-udp6-port` Added to configure the enr udp6 field.
  - `--enr-tcp-port` Updated docs to specify that it only applies to ipv4. This is an old behaviour.
  - `--enr-tcp6-port` Added to configure the enr tcp6 field.
  - `--enr-addresses` now can take two values.
  - `--enr-match` updated behaviour.
- Common:
  - rename `unused_port` functions to specify that they are over ipv4.
  - add functions to get unused ports over ipv6.
- Testing binaries
  - Updated code to reflect network config changes and unused_port changes.

## Additional Info

TODOs:
- use two sockets in discovery. I'll get back to this and it's on https://github.com/sigp/discv5/pull/160
- lcli allow listening over two sockets in generate_bootnodes_enr
- add at least one smoke flag for ipv6 (I have tested this and works for me)
- update the book
2023-03-14 01:13:34 +00:00
Jimmy Chen
9ba390f7c5 Merge branch 'update-signed-blob-sidecar' into post-block-and-blobs 2023-03-14 11:52:25 +11:00
Jimmy Chen
e81a5029b8 Update SignedBlobSidecar container 2023-03-14 11:48:58 +11:00
Jimmy Chen
6ec0ce6070 Implement get validator block endpoint for EIP-4844 2023-03-13 16:50:08 +11:00
Michael Sproul
06af31a66a Correct /lighthouse/nat implementation (#4069)
## Proposed Changes

The current `/lighthouse/nat` implementation checks for _zero_ address updated messages, when it should check for a _non-zero_ number. This was spotted while debugging an issue on Discord where a user's ports weren't forwarded but `/lighthouse/nat` was still returning `true`.
2023-03-13 04:08:15 +00:00
Sebastian Richel
373beaf913 Added warning when new jwt is generated (#4000)
## Issue Addressed
#3435

## Proposed Changes
Fire a warning with the path of JWT to be created when the path given by --execution-jwt is not found
Currently, the same error is logged if the jwt is found but doesn't match the execution client's jwt, and if no jwt was found at the given path. This makes it very hard to tell if you accidentally typed the wrong path, as a new jwt is created silently that won't match the execution client's jwt. So instead, it will now fire a warning stating that a jwt is being generated at the given path.

## Additional Info
In the future, it may be smarter to handle this case by adding an InvalidJWTPath member to the Error enum in lib.rs or auth.rs
that can be handled during upcheck()

This is my first PR and first project with rust. so thanks to anyone who looks at this for their patience and help!

Co-authored-by: Sebastian Richel <47844429+sebastianrich18@users.noreply.github.com>
2023-03-13 04:08:14 +00:00
Michael Sproul
90cef1db86 Appease Clippy 1.68 and refactor http_api (#4068)
## Proposed Changes

Two tiny updates to satisfy Clippy 1.68

Plus refactoring of the `http_api` into less complex types so the compiler can chew and digest them more easily.

Co-authored-by: Michael Sproul <michael@sigmaprime.io>
2023-03-13 01:40:03 +00:00