Skip to content

Conversation

@dapplion
Copy link
Owner

@dapplion dapplion commented Mar 27, 2023

The purpose of this implementation is to guide spec decisions based on practical considerations

Progress

  • types
  • state transition function
  • state upgrade on fork
  • new crypto
  • spec tests
  • block producer updates
  • HTTP API updates
  • VC updates
    • k creation
    • detect proposal
  • gossip validation

Open questions

Initial k value has trade-offs. Current implementation ensures not proposals are missed but requires more verification complexity
Initial k value is computed from public key so validator client implementations are simpler, but does not guarantee that k commitments are unique for new deposits

// TODO: The resulting k may not be unique
let k = compute_initial_whisk_k_from_pubkey(&deposit.data.pubkey);

Should new validators submit k trackers on deposits to prevent insecure proposals for new validators?

Can the validator_client produce the opening proof to not have to submit k?

Blockers

Running test harness with mainnet preset on whisk_few_epochs test so WHISK_CANDIDATE_TRACKERS_COUNT = 16384 but VALIDATOR_COUNT = 32 so there are many repetitions in the selected trackers. If a validator first and second proposal are in the same whisk round, it will not be able to produce a valid opening proof since the tracker and commitment in the state are computed with different k values.

RUST_BACKTRACE=full FORK_NAME=deneb cargo test --release --features fork_from_env,logging/test_logger -p beacon_chain whisk_few_epochs -- --nocapture

@dapplion dapplion force-pushed the whisk branch 5 times, most recently from 919a478 to 7b9411f Compare March 29, 2023 02:51
@dapplion dapplion force-pushed the whisk branch 5 times, most recently from ed63dc9 to 91cd87e Compare April 13, 2023 10:36
@dapplion dapplion force-pushed the whisk branch 5 times, most recently from 6b335f4 to 03a5ac0 Compare May 15, 2023 05:09
@dapplion dapplion force-pushed the whisk branch 2 times, most recently from 24bbea0 to fb6520a Compare July 11, 2023 14:24
@dapplion dapplion changed the base branch from deneb-free-blobs to unstable July 11, 2023 14:24
@dapplion dapplion changed the base branch from unstable to stable July 11, 2023 14:25
@dapplion dapplion changed the base branch from stable to unstable July 11, 2023 14:29
@dapplion dapplion force-pushed the whisk branch 3 times, most recently from 2e63783 to 034c97a Compare July 11, 2023 22:58
@dapplion dapplion force-pushed the whisk branch 2 times, most recently from 1e17c2e to e24fde0 Compare July 28, 2023 19:13
@dapplion
Copy link
Owner Author

dapplion commented Aug 9, 2023

Currently fixing broken release tests

RUST_BACKTRACE=1 cargo test --workspace --release --features logging/test_logger --exclude ef_tests --exclude beacon_chain --exclude slasher interactive_tests::proposer_boost_re_org_parent_distance -- --nocapture

Whisk breaks proposer registration

Aug 09 16:51:08.736 CRIT Failed to prepare proposers after fork choice, error: BeaconStateError(NoProposerShuffleAfterWhisk), module: beacon_chain::canonical_head:1212

Beacon node doesn't not currently who is the next proposer


Adding a new route /eth/v2/validator/prepare_beacon_proposer where the validator declares to the beacon node that it is the proposer. Beacon chain caches that information and uses it to figure out who proposes next in beacon_chain.rs prepare_beacon_proposer().

  • Q: What if multiple validators register for the same slot? Validator could submit the opening proof since it's constant
  • Q: How to handle re-orgs? polling trackers should return a dependant_root, and validator should submit it, declaring I'm the proposer at slot N for this dependant_root.

@dapplion dapplion force-pushed the whisk branch 3 times, most recently from 05935aa to a6858e8 Compare August 15, 2023 12:19
Add Whisk ForkName, same types

Add new block body fields

fmt

Add extra beacon state properties

state transition changes

Add upgrade_to_whisk

Update beacon node crate

Annotate todo!("whisk")

Add crypto/curdleproofs_whisk

Update block proposing bn side

Complete whisk fork logic

Add GET beacon/states/{state_id}/proposer_trackers

Whisk validator client

FIx PR

Clean up PR

Clippy warnings

Fixes from tests

Run whisk on beacon_chain tests

Patch for remote validators

Use expect in simulator checks

debug tests

fix opening proof logic

fix shuffle trackers len bug

handle NoProposerShuffleAfterWhisk

able to produce blocks up to repeated proposal

Use minimal preset

rebase fixes

Handle case of double proposal on bootstrap phase

fix subsequent registration

clippy warnings

remove unused dep

print ef test missing files

make proposer_index query param optional

remove unwraps in validator client

Remove unwraps from block production flow

Implement gossip validation

Simplify wwhisk tracker error

backwards compatible blocks query

Add note

Compute whisk candidates only in same epoch

Skip always failing tests

fix cargo fmt

set target peers in simulator

Test fixes

Add prepare whisk beacon proposer functionality

Lint and fix serde

handle whisk proposer registration in reorg tests

skip builder in capella test

Test get_proposer_trackers

do not prime beacon cache on state advance

Allow get_proposer_trackers to advance state

Update curdleproofs
@dapplion dapplion changed the base branch from unstable to stable August 15, 2023 16:21
@dapplion dapplion changed the base branch from stable to unstable August 15, 2023 16:22
@dapplion
Copy link
Owner Author

dapplion-whisk-CI-run-beaconchaintests-bf52a25453830d133fdf62f93bbe56a7bc6ccc6d.log

beacon-chain tests timeout, all forks pass except capella

2023-08-15T17:13:36.0795690Z env FORK_NAME=capella cargo test --release --features fork_from_env,slasher/lmdb -p beacon_chain
...
2023-08-15T17:14:35.1616347Z running 115 tests
2023-08-15T17:14:39.9984230Z test attestation_production::early_attester_cache_old_request ... ok
2023-08-15T17:15:01.8646934Z test attestation_verification::aggregated_attestation_verification_use_head_state_fork ... ok
2023-08-15T17:15:35.1626741Z test attestation_production::produces_attestations has been running for over 60 seconds
2023-08-15T17:16:01.8648048Z test attestation_verification::aggregated_gossip_verification has been running for over 60 seconds
2023-08-15T17:17:14.1329459Z test attestation_verification::aggregated_gossip_verification ... ok
2023-08-15T17:17:42.1623434Z test attestation_production::produces_attestations ... ok
2023-08-15T17:18:14.1330242Z test attestation_verification::attestation_that_skips_epochs has been running for over 60 seconds
2023-08-15T17:18:42.1623834Z test attestation_verification::attestation_to_finalized_block has been running for over 60 seconds
2023-08-15T17:19:21.8593003Z test attestation_verification::attestation_that_skips_epochs ... ok
2023-08-15T17:20:21.8593980Z test attestation_verification::attestation_validator_receive_proposer_reward_and_withdrawals has been running for over 60 seconds
2023-08-15T17:20:46.8968582Z test attestation_verification::attestation_to_finalized_block ... ok
2023-08-15T17:21:08.6384505Z test attestation_verification::attestation_verification_use_head_state_fork ... ok
2023-08-15T17:21:14.5537351Z test attestation_verification::attestation_validator_receive_proposer_reward_and_withdrawals ... ok
2023-08-15T17:22:08.6385176Z test attestation_verification::unaggregated_gossip_verification has been running for over 60 seconds
2023-08-15T17:22:14.5538059Z test attestation_verification::verify_aggregate_for_gossip_doppelganger_detection has been running for over 60 seconds
2023-08-15T17:23:22.5406232Z test attestation_verification::unaggregated_gossip_verification ... ok
2023-08-15T17:23:28.7090598Z test attestation_verification::verify_aggregate_for_gossip_doppelganger_detection ... ok
2023-08-15T17:23:29.1322712Z test block_verification::add_altair_block_to_base_chain ... ok
2023-08-15T17:23:33.3477237Z test block_verification::add_base_block_to_altair_chain ... ok
2023-08-15T17:24:22.5406704Z test attestation_verification::verify_attestation_for_gossip_doppelganger_detection has been running for over 60 seconds
2023-08-15T17:24:33.3477991Z test block_verification::block_gossip_verification has been running for over 60 seconds
2023-08-15T17:25:35.4265289Z test attestation_verification::verify_attestation_for_gossip_doppelganger_detection ... ok
2023-08-15T17:26:35.4265885Z test block_verification::chain_segment_full_segment has been running for over 60 seconds
2023-08-15T18:02:00.9132123Z test block_verification::block_gossip_verification ... FAILED
2023-08-15T18:03:00.9132522Z test block_verification::chain_segment_non_linear_parent_roots has been running for over 60 seconds
2023-08-15T18:05:14.3769369Z test block_verification::chain_segment_full_segment ... ok
2023-08-15T18:06:14.3770775Z test block_verification::chain_segment_non_linear_slots has been running for over 60 seconds
2023-08-15T18:40:24.5905963Z test block_verification::chain_segment_non_linear_parent_roots ... ok
2023-08-15T18:41:24.5906371Z test block_verification::chain_segment_varying_chunk_size has been running for over 60 seconds
2023-08-15T18:43:37.5068970Z test block_verification::chain_segment_non_linear_slots ... ok
2023-08-15T18:43:47.5197470Z test block_verification::import_duplicate_block_unrealized_justification ... ok
2023-08-15T18:44:47.5197985Z test block_verification::invalid_signature_attestation has been running for over 60 seconds
2023-08-15T19:22:08.5735436Z test block_verification::invalid_signature_attestation ... FAILED
2023-08-15T19:23:08.5735882Z test block_verification::invalid_signature_attester_slashing has been running for over 60 seconds
2023-08-15T20:00:28.1944603Z test block_verification::invalid_signature_attester_slashing ... FAILED
2023-08-15T20:01:28.1945291Z test block_verification::invalid_signature_block_proposal has been running for over 60 seconds
2023-08-15T20:41:12.5938139Z test block_verification::invalid_signature_block_proposal ... ok
2023-08-15T20:42:12.5938449Z test block_verification::invalid_signature_deposit has been running for over 60 seconds
2023-08-15T21:19:26.1659667Z test block_verification::invalid_signature_deposit ... FAILED
2023-08-15T21:20:26.1659770Z test block_verification::invalid_signature_exit has been running for over 60 seconds
2023-08-15T21:51:13.6502123Z ##[error]The operation was canceled.
2023-08-15T21:51:13.6758382Z Post job cleanup.
2023-08-15T21:51:14.0065055Z [command]/usr/bin/git version
2023-08-15T21:51:14.4796937Z git version 2.41.0
2023-08-15T21:51:14.4804091Z Temporarily overriding HOME='/home/runner/work/_temp/d1b96c56-a9a3-49eb-8f5b-3dc4fc654577' before making global git config changes
2023-08-15T21:51:14.4804697Z Adding repository directory to the temporary git global config as a safe directory
2023-08-15T21:51:14.4805353Z [command]/usr/bin/git config --global --add safe.directory /home/runner/work/lighthouse/lighthouse
2023-08-15T21:51:14.4806444Z [command]/usr/bin/git config --local --name-only --get-regexp core\.sshCommand
2023-08-15T21:51:14.4807633Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
2023-08-15T21:51:14.4809177Z [command]/usr/bin/git config --local --name-only --get-regexp http\.https\:\/\/github\.com\/\.extraheader
2023-08-15T21:51:14.4809760Z http.https://github.com/.extraheader
2023-08-15T21:51:14.4810780Z [command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
2023-08-15T21:51:14.4812232Z [command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant