Skip to content

Commit

Permalink
Squash all previous commits
Browse files Browse the repository at this point in the history
commit 0f8a5540d189e6281bc641618dec1c8d304d7ec5
Merge: 2e1d657 a97ec31
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 23 13:07:53 2020 +1000

    Merge branch 'v0.3.0-staging' into standard-http

commit 2e1d657
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 23 13:04:19 2020 +1000

    Rename BeaconNodeClient -> BeaconNodeHttpClient

commit f14e58b
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 23 10:09:18 2020 +1000

    Increase simulator HTTP timeout

commit 5797b9a
Merge: 91e88b5 d85d5a4
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 16:56:28 2020 +1000

    Merge branch 'master' into standard-http

commit 91e88b5
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 15:55:58 2020 +1000

    Add extra arg to NetworkGlobals

commit 06eaa24
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 14:27:40 2020 +1000

    Add comment about peers endpoints

commit 8bb990a
Merge: c831c3c bd39cc8
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 14:00:40 2020 +1000

    Merge branch 'master' into standard-http

commit c831c3c
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 13:50:30 2020 +1000

    Run cargo update, fix compile error

commit 1dc9b86
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 11:42:56 2020 +1000

    Fix clippy lints

commit 7b5e1fd
Merge: 33f0d97 5d17eb8
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 11:38:41 2020 +1000

    Merge branch 'master' into standard-http

commit 33f0d97
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 11:38:31 2020 +1000

    Perform a self-review

commit 4e230ab
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 10:52:17 2020 +1000

    Rename consensus.rs

commit 7543968
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 10:47:52 2020 +1000

    Add extra comment

commit 4472e5a
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 10:36:41 2020 +1000

    Add comments to http_metrics crate

commit dc2518d
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 10:33:25 2020 +1000

    Add comments to http_api crate

commit 852a38e
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 22 09:34:10 2020 +1000

    Tidy docs

commit 7129b41
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 21 17:53:59 2020 +1000

    Add warning about incomplete API

commit 008c206
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 21 17:44:31 2020 +1000

    Refactor docs for standard API

commit 6f7b476
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 21 16:38:54 2020 +1000

    Fix return type for node client

commit b8eff38
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 16:41:28 2020 +1000

    Move lighthouse off /eth1/v1, handle errors better

commit 083663b
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 16:14:53 2020 +1000

    Run cargo update

commit 997f182
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 16:11:54 2020 +1000

    Fix bug with chain spec decoding

commit 6aae0bd
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 15:48:18 2020 +1000

    Tidy cors header

commit 1f7445b
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 15:43:43 2020 +1000

    Add cors support

commit 9202f89
Merge: a68171c 49ab414
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 15:10:33 2020 +1000

    Merge branch 'master' into standard-http

commit a68171c
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 15:08:33 2020 +1000

    Add docs about Prom

commit 3cf0de3
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 14:56:15 2020 +1000

    Slow down sims

commit 6823048
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 14:54:03 2020 +1000

    Add support for quotes in indexed attestation

commit 000eb00
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 14:09:51 2020 +1000

    Add more quoted int types

commit a3e2281
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 12:24:56 2020 +1000

    Add quotes to u64 in types

commit b6768fe
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 12:00:16 2020 +1000

    Remove todo

commit 1fb92df
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:57:46 2020 +1000

    Add Arbitrary for Graffiti

commit 6e02e12
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:40:23 2020 +1000

    Remove rest_types

commit aa1d3fc
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:40:10 2020 +1000

    Fix graffiti compile error

commit b18fc1c
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:16:18 2020 +1000

    Remove reference to merged PR

commit f914db4
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:13:25 2020 +1000

    Remove duplicate health structs

commit 27f6bdc
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 11:00:43 2020 +1000

    Remove serde_utils duplication

commit 803ce9b
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 10:46:40 2020 +1000

    Unify Graffiti structs

commit e754995
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 09:41:58 2020 +1000

    Add more skip slots tests

commit 3b22a83
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 09:35:11 2020 +1000

    Fix bug in proposer endpoint

commit 2e9afb8
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 09:22:52 2020 +1000

    Add (failing) skip slots tests

commit 6aa9f30
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 18 09:16:15 2020 +1000

    Fix errors in duties request

commit 40d285a
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 17 18:02:08 2020 +1000

    Refactor duties endpoint

commit 394abba
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 17 15:08:02 2020 +1000

    Fix bad assumption when checking finalized desc.

commit d16bdeb
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 17 14:43:55 2020 +1000

    Fix typo resulting in bug

commit 297b88f
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 17 12:16:35 2020 +1000

    Add more detail to ShufflingId error

commit 7c01e39
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 20:38:46 2020 +1000

    Remove reject into new warp_utils

commit e8ad813
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 20:16:47 2020 +1000

    Fix clippy lint

commit 85beedd
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 18:00:28 2020 +1000

    Only allow health test in linux

commit 262c8f0
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 17:56:30 2020 +1000

    Speed up sim

commit e49a3e1
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 17:19:45 2020 +1000

    Return result in client builder

commit 09494e0
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:41:18 2020 +1000

    Add comments, safety to block shuffle id

commit 0d970a7
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:34:39 2020 +1000

    Fix failing voluntary exit test

commit 327569a
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:28:25 2020 +1000

    Fix URL comment

commit c58df48
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:28:17 2020 +1000

    Remove unused deps

commit 249c06d
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:27:01 2020 +1000

    Add "the" before http flags

commit dbdc177
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:26:23 2020 +1000

    Ensure metrics port is set to 0

commit f4d92b4
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:25:09 2020 +1000

    Attempt to fix failing exit test

commit ccf1cd9
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:21:29 2020 +1000

    Remove unused crate

commit 89438ff
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 16:03:38 2020 +1000

    Update Cargo.lock

commit 196ca29
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 14:57:49 2020 +1000

    Remove rest_api, remote_beacon_node

commit ec260b9
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 14:55:26 2020 +1000

    Fix clippy lints

commit 6adfa5d
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 14:46:12 2020 +1000

    Add tests for LH endpoints

commit d727451
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 13:45:46 2020 +1000

    Add network endpoint

commit cc0823f
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 16 12:20:36 2020 +1000

    Add additional non-standard metrics

commit 791ace4
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 15:29:17 2020 +1000

    Fix clippy lints

commit faa415f
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 15:11:09 2020 +1000

    Add cache metrics

commit 8c84f4b
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 14:58:43 2020 +1000

    Add filter for validator/blocks

commit 9a5a265
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 14:44:56 2020 +1000

    Fix metrics formatting

commit 61f9d6c
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 12:21:04 2020 +1000

    Add metrics

commit 6a14342
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 15 07:43:53 2020 +1000

    Fix subscriptions endpoint

commit 3766027
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 18:43:56 2020 +1000

    Delete rest_api tests

commit 46b8a8f
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 18:43:39 2020 +1000

    Fix test compile issues

commit 41c5a6b
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 18:26:37 2020 +1000

    Fix cargo fmt issue

commit 7e819bc
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 18:25:26 2020 +1000

    Fix aggregator index calculation

commit 404d681
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 18:02:35 2020 +1000

    Add dedicated prometheus metrics endpoint

commit 528ffa1
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 12:30:05 2020 +1000

    Run cargo update

commit 288488e
Merge: 6172437 c9596fc
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 12:28:31 2020 +1000

    Merge branch 'master' into standard-http

commit 6172437
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 11:52:20 2020 +1000

    Fix clippy lints

commit cef90e6
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 11:10:54 2020 +1000

    Drop HTTP log level

commit 67bfe99
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 11:06:20 2020 +1000

    Fix seconds per eth1 block field

commit 0178cfe
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 11:05:53 2020 +1000

    Add logging

commit cb4cede
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 09:28:08 2020 +1000

    Fix compile errors in sim

commit 7a36bcd
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 07:57:22 2020 +1000

    Fix compile error

commit a377ed9
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 14 07:40:54 2020 +1000

    Enforce max skip value for proposer cache

commit 9c99d05
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 11 16:34:05 2020 +1000

    First basic working version

commit 21f8a3a
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 11 14:37:28 2020 +1000

    First compiling version of validator

commit 086c449
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 11 11:33:51 2020 +1000

    Migrate duties service to new API

commit 1bbabae
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 16:40:00 2020 +1000

    Start merging VC to new API

commit 002228d
Merge: 0af5795 cb031b5
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 15:26:02 2020 +1000

    Merge branch 'lockfile-fix' into standard-http

commit 0af5795
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 15:23:10 2020 +1000

    Add version endpoint

commit e93f95c
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 14:54:15 2020 +1000

    Add syncing endpoint

commit 838464c
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 13:15:18 2020 +1000

    Add test for invalid aggregate

commit 9ac9482
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 11:55:00 2020 +1000

    Add test for aggregate and proofs

commit 40b12b5
Author: Paul Hauner <[email protected]>
Date:   Thu Sep 10 08:01:44 2020 +1000

    Add aggregate and subscriptions endpoints

commit cd94717
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 21:11:36 2020 +1000

    Add committees at slot field

commit 1c788af
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 16:35:34 2020 +1000

    Add aggregates POST method

commit 71cd921
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 15:55:33 2020 +1000

    Add aggregate getter endpoint

commit f81ea20
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 15:28:44 2020 +1000

    Add more routes

commit 998889b
Merge: eab7b88 9cf8f45
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 12:54:06 2020 +1000

    Merge branch 'master' into standard-http

commit eab7b88
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 12:49:13 2020 +1000

    Fix clippy lints

commit 59cb877
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 12:46:07 2020 +1000

    Add passing block production test

commit 98bade5
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 11:30:04 2020 +1000

    Add beacon proposer endpoint

commit 510bc72
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 9 08:26:49 2020 +1000

    Add request & incomplete test for validator blocks

commit 767b036
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 22:23:17 2020 +1000

    Add incomplete validators/blocks endpoint

commit 87f6125
Merge: dea298e 19be7ab
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 21:48:11 2020 +1000

    Merge branch 'master' into standard-http

commit dea298e
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 21:47:02 2020 +1000

    Fix attestation duties bug

commit b8f4d72
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 20:45:38 2020 +1000

    Add failing duties test

commit 0bbe830
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 20:45:24 2020 +1000

    Add (failing) duties endpoint

commit 3da5da1
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 20:44:28 2020 +1000

    Bump harness log level

commit 3b83253
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 11:54:59 2020 +1000

    Move shuffling cache onto beacon chain

commit 0aff41b
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 11:54:35 2020 +1000

    Fix broken fork choice tests

commit 531e16c
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 8 10:47:29 2020 +1000

    Squashed in `shuffling-id`

    commit 1671f29
    Merge: 068ff88 9833eca
    Author: Paul Hauner <[email protected]>
    Date:   Mon Sep 7 20:45:01 2020 +1000

        Merge branch 'master' into shuffling-id

    commit 9833eca
    Author: Age Manning <[email protected]>
    Date:   Mon Sep 7 07:44:17 2020 +0000

        Use simple logger builder pattern (#1594)

        ## Issue Addressed

        `simple_logger` depricated the functions we are currently using causing our CI to fail. This updates the to the builder pattern.

    commit 2a9a815
    Author: Daniel Schonfeld <[email protected]>
    Date:   Mon Sep 7 06:47:05 2020 +0000

        conforming to the p2p specs, requiring error_messages to be bound (#1593)

        ## Issue Addressed

        #1421

        ## Proposed Changes

        Bounding the error_message that can be returned for RPC domain errors

        Co-authored-by: Age Manning <[email protected]>

    commit a6376b4
    Author: Age Manning <[email protected]>
    Date:   Mon Sep 7 05:53:20 2020 +0000

        Update discv5 to v10 (#1592)

        ## Issue Addressed

        Code improvements, dependency improvements and better async handling.

    commit 068ff88
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 21:22:57 2020 +1000

        Ensure correct cache is used

    commit 2ae9cf5
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 20:42:36 2020 +1000

        Move to two sets of shuffling ids

    commit 54c5dc2
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 17:47:54 2020 +1000

        Add comments

    commit c0473c6
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 17:08:00 2020 +1000

        Tighten fn visibility

    commit a2f1eff
    Merge: f2f3848 04e4389
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 16:09:21 2020 +1000

        Merge branch 'master' into shuffling-id

    commit f2f3848
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 11:53:37 2020 +1000

        Cache next-epoch shuffling on block processing

    commit 08df338
    Author: Paul Hauner <[email protected]>
    Date:   Mon Aug 10 07:05:21 2020 +1000

        Remove unused var

    commit 2ab88f7
    Author: Paul Hauner <[email protected]>
    Date:   Sun Aug 9 16:55:19 2020 +1000

        Integrate into shuffling

    commit a4453d5
    Author: Paul Hauner <[email protected]>
    Date:   Sun Aug 9 13:02:57 2020 +1000

        Add incomplete progress

commit 5fd243c
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 17:23:49 2020 +1000

    Start adding validator duties endpoint

commit 7b5b5ee
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 15:47:24 2020 +1000

    Add some quotes

commit 9c46f66
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 15:40:27 2020 +1000

    Fix mistake in clippy fixes

commit 70b716f
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 15:37:03 2020 +1000

    Address clippy lints

commit 886909c
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 15:27:51 2020 +1000

    Fix issue with hex encoding

commit 8bc966a
Merge: 01761e4 74fa87a
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 15:12:46 2020 +1000

    Merge branch 'master' into standard-http

commit 01761e4
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 12:10:22 2020 +1000

    Add debug endpoints

commit 95c6564
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 11:17:46 2020 +1000

    Finish deposit contract endpoint

commit 0046ec5
Author: Paul Hauner <[email protected]>
Date:   Mon Sep 7 08:20:32 2020 +1000

    Add non-functional deposit contract endpoints

commit 3714d20
Author: Paul Hauner <[email protected]>
Date:   Sun Sep 6 16:07:10 2020 +1000

    Add two config endpoints

commit eece914
Author: Paul Hauner <[email protected]>
Date:   Sun Sep 6 10:17:51 2020 +1000

    Update validator status

commit a0bc953
Author: Paul Hauner <[email protected]>
Date:   Sun Sep 6 08:11:45 2020 +1000

    Fix exit tests

commit 4e41e9b
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 18:05:11 2020 +1000

    Add other pool post tests

commit 7ce6183
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 17:31:56 2020 +1000

    Add attester slashing test

commit 78fc2cf
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 16:58:25 2020 +1000

    Delete commented-out code

commit 2e8941d
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 16:55:08 2020 +1000

    Fix test compile errors

commit cf5da09
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 16:24:55 2020 +1000

    Fix errors after master rebase

commit 69b3219
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 16:24:40 2020 +1000

    Update Cargo.lock

commit e623ea1
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 15:56:05 2020 +1000

    Fix tests

commit 2ceba05
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 15:55:54 2020 +1000

    Fix issue with harness

commit 0f3cdf3
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 15:28:43 2020 +1000

    Add pool POST endpoints, fix error issue, bugs

commit dba921f
Author: Paul Hauner <[email protected]>
Date:   Fri Sep 4 09:36:45 2020 +1000

    Add more pool endpoints

commit 4379669
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 2 17:23:38 2020 +1000

    Add pool routes, add get_ prefixes

commit 23c1fef
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 2 16:31:33 2020 +1000

    Improve error handling

commit 444a06f
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 2 14:07:02 2020 +1000

    Add failing test

commit 37bde29
Author: Paul Hauner <[email protected]>
Date:   Wed Sep 2 13:39:05 2020 +1000

    Start adding post route, fix method issue

commit c7326e1
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 1 15:00:55 2020 +1000

    Add blocks attestations endpoint

commit 364bdb3
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 1 14:44:54 2020 +1000

    Add blocks endpoint

commit cb74420
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 1 13:29:06 2020 +1000

    Fix failing test

commit 85d4593
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 1 11:41:21 2020 +1000

    Add std-http flags

commit de52827
Author: Paul Hauner <[email protected]>
Date:   Tue Sep 1 10:25:08 2020 +1000

    Add new (failing) test

commit bd3d306
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 12:48:27 2020 +1000

    Start writing headers/block_id endpoint

commit b4e9438
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 12:16:02 2020 +1000

    Fix issue with iteration tests

commit 01c53c0
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 11:45:56 2020 +1000

    Add new, failing headers test

commit 512e53b
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 11:12:56 2020 +1000

    Add headers endpoint

commit 6994cd3
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 09:03:50 2020 +1000

    Remove extra mod from types

commit 95b34a1
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 08:02:47 2020 +1000

    Add beacon genesis

commit 49b6c8d
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 31 07:42:56 2020 +1000

    Add more detailed error message

commit 5a6e1a1
Author: Paul Hauner <[email protected]>
Date:   Fri Aug 28 14:08:56 2020 +1000

    Add bad request responses

commit 044da99
Author: Paul Hauner <[email protected]>
Date:   Fri Aug 28 14:05:01 2020 +1000

    Update Url scheme

commit e9da8a4
Author: Paul Hauner <[email protected]>
Date:   Fri Aug 28 13:50:56 2020 +1000

    Add (failing) committees endpoint

commit c48ba5e
Author: Paul Hauner <[email protected]>
Date:   Thu Aug 27 16:53:10 2020 +1000

    Progress with quoted lists

commit 925722c
Author: Paul Hauner <[email protected]>
Date:   Thu Aug 27 13:55:38 2020 +1000

    Change serde deser for bls

commit b1b364c
Author: Paul Hauner <[email protected]>
Date:   Thu Aug 27 13:38:45 2020 +1000

    Impl display for bls

commit e76d476
Author: Paul Hauner <[email protected]>
Date:   Thu Aug 27 13:23:08 2020 +1000

    Fix validator id decoding

commit d9f5773
Author: Paul Hauner <[email protected]>
Date:   Thu Aug 27 13:04:57 2020 +1000

    Generate more interesting ids

commit 6324b56
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 18:23:59 2020 +1000

    Tidy endpoint

commit ac1a668
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 18:19:05 2020 +1000

    Add (failing) validator id endpoints

commit 6e87a81
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 17:05:00 2020 +1000

    Tidy serde utils, add endpoint

commit 002be83
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 15:42:48 2020 +1000

    Add tests for block roots

commit 02026b9
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 15:25:43 2020 +1000

    Add finality checkpoints tests

commit 66a1cdb
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 15:13:30 2020 +1000

    Update tests, fix bugs

commit c552b0a
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 12:50:26 2020 +1000

    Ensure skip slot states are loaded

commit 036f3ec
Author: Paul Hauner <[email protected]>
Date:   Wed Aug 26 11:43:46 2020 +1000

    Add test framework

commit e164815
Author: Paul Hauner <[email protected]>
Date:   Tue Aug 25 17:11:46 2020 +1000

    Start adding eth2 crate

commit abbd216
Author: Paul Hauner <[email protected]>
Date:   Tue Aug 25 14:00:15 2020 +1000

    Update serde utils

commit 0922a39
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 15:57:57 2020 +1000

    Progress with implementation

commit 49ac075
Author: Paul Hauner <[email protected]>
Date:   Mon Aug 24 18:13:21 2020 +1000

    Add first attempt at warp server

commit cb031b5
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 12:13:54 2020 +1000

    Move all init tasks into fn

commit 59f4d02
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 11:58:39 2020 +1000

    Update VC flags, shutdown VC more gracefully

commit be4e7cf
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 10:29:38 2020 +1000

    Use spawn_blocking for validator keystores

commit 1f0e035
Author: Paul Hauner <[email protected]>
Date:   Sat Sep 5 09:50:32 2020 +1000

    Use async for main.rs

Add comment
  • Loading branch information
paulhauner committed Sep 23, 2020
1 parent a97ec31 commit 3291d91
Show file tree
Hide file tree
Showing 158 changed files with 9,014 additions and 9,000 deletions.
450 changes: 334 additions & 116 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ members = [
"beacon_node/client",
"beacon_node/eth1",
"beacon_node/eth2_libp2p",
"beacon_node/http_api",
"beacon_node/http_metrics",
"beacon_node/network",
"beacon_node/rest_api",
"beacon_node/store",
"beacon_node/timer",
"beacon_node/websocket_server",
Expand All @@ -20,6 +21,7 @@ members = [
"common/compare_fields",
"common/compare_fields_derive",
"common/deposit_contract",
"common/eth2",
"common/eth2_config",
"common/eth2_interop_keypairs",
"common/eth2_testnet_config",
Expand All @@ -29,10 +31,9 @@ members = [
"common/lighthouse_version",
"common/logging",
"common/lru_cache",
"common/remote_beacon_node",
"common/rest_types",
"common/slot_clock",
"common/test_random_derive",
"common/warp_utils",
"common/validator_dir",

"consensus/cached_tree_hash",
Expand All @@ -43,7 +44,6 @@ members = [
"consensus/ssz",
"consensus/ssz_derive",
"consensus/ssz_types",
"consensus/serde_hex",
"consensus/serde_utils",
"consensus/state_processing",
"consensus/swap_or_not_shuffle",
Expand Down
1 change: 0 additions & 1 deletion beacon_node/beacon_chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,3 @@ environment = { path = "../../lighthouse/environment" }
bus = "2.2.3"
derivative = "2.1.1"
itertools = "0.9.0"
regex = "1.3.9"
163 changes: 48 additions & 115 deletions beacon_node/beacon_chain/src/attestation_verification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,18 @@
use crate::{
beacon_chain::{
ATTESTATION_CACHE_LOCK_TIMEOUT, HEAD_LOCK_TIMEOUT, MAXIMUM_GOSSIP_CLOCK_DISPARITY,
VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT,
HEAD_LOCK_TIMEOUT, MAXIMUM_GOSSIP_CLOCK_DISPARITY, VALIDATOR_PUBKEY_CACHE_LOCK_TIMEOUT,
},
metrics,
observed_attestations::ObserveOutcome,
observed_attesters::Error as ObservedAttestersError,
BeaconChain, BeaconChainError, BeaconChainTypes,
};
use bls::verify_signature_sets;
use slog::debug;
use slot_clock::SlotClock;
use state_processing::{
common::get_indexed_attestation,
per_block_processing::errors::AttestationValidationError,
per_slot_processing,
signature_sets::{
indexed_attestation_signature_set_from_pubkeys,
signed_aggregate_selection_proof_signature_set, signed_aggregate_signature_set,
Expand All @@ -52,7 +49,7 @@ use std::borrow::Cow;
use tree_hash::TreeHash;
use types::{
Attestation, BeaconCommittee, CommitteeIndex, Epoch, EthSpec, Hash256, IndexedAttestation,
RelativeEpoch, SelectionProof, SignedAggregateAndProof, Slot, SubnetId,
SelectionProof, SignedAggregateAndProof, Slot, SubnetId,
};

/// Returned when an attestation was not successfully verified. It might not have been verified for
Expand Down Expand Up @@ -251,6 +248,7 @@ pub struct VerifiedAggregatedAttestation<T: BeaconChainTypes> {
pub struct VerifiedUnaggregatedAttestation<T: BeaconChainTypes> {
attestation: Attestation<T::EthSpec>,
indexed_attestation: IndexedAttestation<T::EthSpec>,
subnet_id: SubnetId,
}

/// Custom `Clone` implementation is to avoid the restrictive trait bounds applied by the usual derive
Expand All @@ -260,6 +258,7 @@ impl<T: BeaconChainTypes> Clone for VerifiedUnaggregatedAttestation<T> {
Self {
attestation: self.attestation.clone(),
indexed_attestation: self.indexed_attestation.clone(),
subnet_id: self.subnet_id,
}
}
}
Expand Down Expand Up @@ -412,6 +411,11 @@ impl<T: BeaconChainTypes> VerifiedAggregatedAttestation<T> {
pub fn attestation(&self) -> &Attestation<T::EthSpec> {
&self.signed_aggregate.message.aggregate
}

/// Returns the underlying `signed_aggregate`.
pub fn aggregate(&self) -> &SignedAggregateAndProof<T::EthSpec> {
&self.signed_aggregate
}
}

impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
Expand All @@ -422,7 +426,7 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
/// verify that it was received on the correct subnet.
pub fn verify(
attestation: Attestation<T::EthSpec>,
subnet_id: SubnetId,
subnet_id: Option<SubnetId>,
chain: &BeaconChain<T>,
) -> Result<Self, Error> {
// Ensure attestation is within the last ATTESTATION_PROPAGATION_SLOT_RANGE slots (within a
Expand Down Expand Up @@ -454,13 +458,15 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
)
.map_err(BeaconChainError::from)?;

// Ensure the attestation is from the correct subnet.
if subnet_id != expected_subnet_id {
return Err(Error::InvalidSubnetId {
received: subnet_id,
expected: expected_subnet_id,
});
}
// If a subnet was specified, ensure that subnet is correct.
if let Some(subnet_id) = subnet_id {
if subnet_id != expected_subnet_id {
return Err(Error::InvalidSubnetId {
received: subnet_id,
expected: expected_subnet_id,
});
}
};

let validator_index = *indexed_attestation
.attesting_indices
Expand Down Expand Up @@ -505,6 +511,7 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
Ok(Self {
attestation,
indexed_attestation,
subnet_id: expected_subnet_id,
})
}

Expand All @@ -513,6 +520,11 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
chain.add_to_naive_aggregation_pool(self)
}

/// Returns the correct subnet for the attestation.
pub fn subnet_id(&self) -> SubnetId {
self.subnet_id
}

/// Returns the wrapped `attestation`.
pub fn attestation(&self) -> &Attestation<T::EthSpec> {
&self.attestation
Expand All @@ -527,7 +539,8 @@ impl<T: BeaconChainTypes> VerifiedUnaggregatedAttestation<T> {
}
}

/// Returns `Ok(())` if the `attestation.data.beacon_block_root` is known to this chain.
/// Returns `Ok(shuffling_id)` if the `attestation.data.beacon_block_root` is known to this chain.
/// You can use this `shuffling_id` to read from the shuffling cache.
///
/// The block root may not be known for two reasons:
///
Expand Down Expand Up @@ -556,6 +569,7 @@ fn verify_head_block_is_known<T: BeaconChainTypes>(
});
}
}

Ok(())
} else {
Err(Error::UnknownHeadBlock {
Expand Down Expand Up @@ -711,7 +725,7 @@ type CommitteesPerSlot = u64;

/// Returns the `indexed_attestation` and committee count per slot for the `attestation` using the
/// public keys cached in the `chain`.
pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
chain: &BeaconChain<T>,
attestation: &Attestation<T::EthSpec>,
) -> Result<(IndexedAttestation<T::EthSpec>, CommitteesPerSlot), Error> {
Expand All @@ -731,7 +745,7 @@ pub fn obtain_indexed_attestation_and_committees_per_slot<T: BeaconChainTypes>(
///
/// If the committee for `attestation` isn't found in the `shuffling_cache`, we will read a state
/// from disk and then update the `shuffling_cache`.
pub fn map_attestation_committee<'a, T, F, R>(
fn map_attestation_committee<'a, T, F, R>(
chain: &'a BeaconChain<T>,
attestation: &Attestation<T::EthSpec>,
map_fn: F,
Expand All @@ -750,104 +764,23 @@ where
// processing an attestation that does not include our latest finalized block in its chain.
//
// We do not delay consideration for later, we simply drop the attestation.
let target_block = chain
.fork_choice
.read()
.get_block(&target.root)
.ok_or_else(|| Error::UnknownTargetRoot(target.root))?;

// Obtain the shuffling cache, timing how long we wait.
let cache_wait_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_SHUFFLING_CACHE_WAIT_TIMES);

let mut shuffling_cache = chain
.shuffling_cache
.try_write_for(ATTESTATION_CACHE_LOCK_TIMEOUT)
.ok_or_else(|| BeaconChainError::AttestationCacheLockTimeout)?;

metrics::stop_timer(cache_wait_timer);

if let Some(committee_cache) = shuffling_cache.get(attestation_epoch, target.root) {
let committees_per_slot = committee_cache.committees_per_slot();
committee_cache
.get_beacon_committee(attestation.data.slot, attestation.data.index)
.map(|committee| map_fn((committee, committees_per_slot)))
.unwrap_or_else(|| {
Err(Error::NoCommitteeForSlotAndIndex {
slot: attestation.data.slot,
index: attestation.data.index,
})
})
} else {
// Drop the shuffling cache to avoid holding the lock for any longer than
// required.
drop(shuffling_cache);

debug!(
chain.log,
"Attestation processing cache miss";
"attn_epoch" => attestation_epoch.as_u64(),
"target_block_epoch" => target_block.slot.epoch(T::EthSpec::slots_per_epoch()).as_u64(),
);

let state_read_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_STATE_READ_TIMES);

let mut state = chain
.store
.get_inconsistent_state_for_attestation_verification_only(
&target_block.state_root,
Some(target_block.slot),
)
.map_err(BeaconChainError::from)?
.ok_or_else(|| BeaconChainError::MissingBeaconState(target_block.state_root))?;

metrics::stop_timer(state_read_timer);
let state_skip_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_STATE_SKIP_TIMES);

while state.current_epoch() + 1 < attestation_epoch {
// Here we tell `per_slot_processing` to skip hashing the state and just
// use the zero hash instead.
//
// The state roots are not useful for the shuffling, so there's no need to
// compute them.
per_slot_processing(&mut state, Some(Hash256::zero()), &chain.spec)
.map_err(BeaconChainError::from)?;
}

metrics::stop_timer(state_skip_timer);
let committee_building_timer =
metrics::start_timer(&metrics::ATTESTATION_PROCESSING_COMMITTEE_BUILDING_TIMES);

let relative_epoch = RelativeEpoch::from_epoch(state.current_epoch(), attestation_epoch)
.map_err(BeaconChainError::IncorrectStateForAttestation)?;

state
.build_committee_cache(relative_epoch, &chain.spec)
.map_err(BeaconChainError::from)?;

let committee_cache = state
.committee_cache(relative_epoch)
.map_err(BeaconChainError::from)?;

chain
.shuffling_cache
.try_write_for(ATTESTATION_CACHE_LOCK_TIMEOUT)
.ok_or_else(|| BeaconChainError::AttestationCacheLockTimeout)?
.insert(attestation_epoch, target.root, committee_cache);

metrics::stop_timer(committee_building_timer);

let committees_per_slot = committee_cache.committees_per_slot();
committee_cache
.get_beacon_committee(attestation.data.slot, attestation.data.index)
.map(|committee| map_fn((committee, committees_per_slot)))
.unwrap_or_else(|| {
Err(Error::NoCommitteeForSlotAndIndex {
slot: attestation.data.slot,
index: attestation.data.index,
})
})
if !chain.fork_choice.read().contains_block(&target.root) {
return Err(Error::UnknownTargetRoot(target.root));
}

chain
.with_committee_cache(target.root, attestation_epoch, |committee_cache| {
let committees_per_slot = committee_cache.committees_per_slot();

Ok(committee_cache
.get_beacon_committee(attestation.data.slot, attestation.data.index)
.map(|committee| map_fn((committee, committees_per_slot)))
.unwrap_or_else(|| {
Err(Error::NoCommitteeForSlotAndIndex {
slot: attestation.data.slot,
index: attestation.data.index,
})
}))
})
.map_err(BeaconChainError::from)?
}
Loading

0 comments on commit 3291d91

Please sign in to comment.