Commit Graph

101 Commits

Author SHA1 Message Date
Jim McDonald 919a519b32
Linting.
Fix lint warnings given by revive (successor to golint).
2021-07-18 07:46:01 +01:00
Jim McDonald 4598f9f639
Merge pull request #19 from attestantio/mixed-accounts
Separate accounts before batch signing.
2021-06-27 12:36:29 +01:00
Jim McDonald 30702489e3
Merge pull request #18 from attestantio/scatter-wallet-fetch
Fetch remote wallet information in parallel
2021-06-27 12:36:20 +01:00
Jim McDonald b1f9b940f7
Separate accounts before batch signing.
Accounts and distributed accounts were bundled up together for signing.
This was non-optimal, as they have different requirements (single shot
Vs. distributed threshold).  This separates them in to two groups, and
signs them as separate sets of requests.
2021-06-26 14:40:10 +01:00
Jim McDonald d175f068ff
Fetch remote wallet information in parallel
If a Vouch instance has many wallets it can be slow to start up, as
wallet information is fetched in sequence.  This changes the methodology
to fetch wallets to be parallel, allowing for faster startup times even
when there are many wallets in use.
2021-06-26 14:33:18 +01:00
Jim McDonald 820ef73a9d
Merge pull request #17 from attestantio/strategy-monitor
Strategy monitor.
2021-05-21 12:30:15 +01:00
Jim McDonald f24671e4fb
Reduce log level of debug message. 2021-05-19 15:34:15 +01:00
Jim McDonald b825ba40b7
Add metrics to track strategy operations. 2021-05-19 15:29:23 +01:00
Jim McDonald 1439ee1937
Merge pull request #16 from attestantio/reorgs
Rework conditions for reorgs.
2021-05-04 17:56:21 +01:00
Jim McDonald dc0847acfd
Rework conditions for reorgs.
Avoid refetching attestation and proposal duties when not necessary in
the situation where a block for slot 0 of the epoch is not presented.
2021-05-04 10:51:25 +01:00
Jim McDonald fba445ced0
Sync changelog with 1.0.x branch. 2021-03-13 20:16:12 +00:00
Jim McDonald c377442e24
Do not overwrite validator list with null.
If Vouch contains a list of validators, and on refresh obtains an empty
list, assume the empty response is a result of an error and do not
remove the existing list in favor of it.

It is possible for network issues to result in an empty response when
requesting an update on the list of validators for which Vouch should
operate.  In this situation, where Vouch already has a list of
validators, it retains that list rather than replace it with the empty
results of the request.

(cherry picked from commit 52c58216cb)
2021-03-06 00:27:50 +00:00
Jim McDonald 88a8c2978b
Tidy-ups. 2021-03-06 00:23:34 +00:00
Jim McDonald 5950f8f562
Address crash when proposing block.
If a validator is due to propose a block but cannot obtain the RANDO
reveal it causes Vouch to crash.  This change checks for an empty RANDAO
reveal and exits early from the block proposal process on such a
condition.

Fixes #15.

(cherry picked from commit fb2d95e97b)
2021-03-06 00:17:31 +00:00
Jim McDonald 3b6e160fb8
Provide flag to enable chain reorganisations. 2021-02-24 22:05:11 +00:00
Jim McDonald 5cc55776fb
Merge pull request #14 from attestantio/remove-dependency
Remove dependency on Dirk.
2021-02-16 11:49:22 +00:00
Jim McDonald 93be4a3df6
Remove dependency on Dirk.
An earlier commit introduced a dependency on the attestantio/dirk
repository that is unnecessary.  This change removes that dependency,
and related references to Dirk.
2021-02-15 10:12:02 +00:00
Jim McDonald 999b9520c2
Bump version. 2021-02-01 19:28:56 +00:00
Jim McDonald f56fa48655
Add `vouch_ready` and `vouch_release` metrics.
`vouch_ready` is a prometheus metric that is `0` if Vouch is not yet
ready to validate, and `1` if it is.

`vouch_release` has a labeled value `version` that contains the release
version of Vouch.
2021-02-01 19:27:06 +00:00
Jim McDonald 05e5464948
Reduce log message 2021-02-01 16:11:13 +00:00
Jim McDonald 1ec2f4e4a9
Merge pull request #13 from attestantio/reorgs
Handle chain reorganisations.
2021-02-01 16:10:33 +00:00
Jim McDonald 443ca18d4e
Handle chain reorganisations.
When a chain reorganisation occurs it is possible that this impacts
Vouch's attestations and proposals for the current and next epoch.  This
patch listens to the Ethereum 2 events stream for reorganisation
notifications.  If it finds one it cancels existing and creates new
duties, as required.
2021-01-31 13:49:15 +00:00
Gary Rowe 648e506413
Merge pull request #11 from attestantio/remove-lock
Remove unused lock.
2020-12-31 10:09:14 +00:00
Gary Rowe 4c45a7a0ed
Merge pull request #12 from attestantio/max-attestation-delay
Max attestation delay
2020-12-31 10:07:10 +00:00
Jim McDonald 4e2aaf6c5c
Add `controller.max-attestation-delay`
This option allows users to control the maximum amount of time that
Vouch will wait for a block to arrive before starting its attestation
process.  Note that this is a spec value, so changes can have a highly
detrimental impact on Vouch's behaviour.
2020-12-30 23:12:05 +00:00
Jim McDonald a17f71a90d
Update mocks.
Create mocks for services that do not have them.
Update eth2client mock with more mocks.
2020-12-30 22:07:47 +00:00
Jim McDonald 67f7078828
Remove unused lock.
This removes a mutex lock followed by an unlock that has no code
inbetween.  This was a remnant from when job management was handled
within the control function, and is no longer required.
2020-12-30 16:56:06 +00:00
Jim McDonald cc09d86dd6
Update changelog 2020-12-30 16:53:59 +00:00
Jim McDonald eba4161a02
Update version. 2020-12-28 08:33:29 +00:00
Jim McDonald d7dd5875ca
Update changelog 2020-12-28 08:32:33 +00:00
Jim McDonald ce99b4328d
Changes for v1.0.3 2020-12-28 08:24:50 +00:00
Jim McDonald 6be25aed85
Update changelog. 2020-12-26 17:31:10 +00:00
Jim McDonald 052bc332d4
Add `epoch_slot` to block receipt delay.
This adds a label `epoch_slot` to the prometheus metric
`vouch_block_receipt_delay_seconds`.  It has been noted that the receipt
delay is often significantly higher for the first (and, to a lesser
extent, second) slot in a given epoch.  This allows the receipt delay to
be examined for specific slots in a given epoch.
2020-12-26 17:28:01 +00:00
Jim McDonald fcab5aa757
Add aggregate attestation strategy.
The "best" aggregate attestation strategy obtains aggregate attestations
from all listed nodes, scores them according to their attestation
coverage, and signs and broadcasts the one with the highest coverage.

The "first" aggregate attestation strategy signs and broadcasts the
first aggregate attestation returned from all listed nodes.
2020-12-24 08:53:54 +00:00
Jim McDonald c8385dd4d9
Update go-eth2-client dependency.
go-eth2-client was missing some defensive checks for server-sent events.
This upgrades to a newer version of go-eth2-client that provides these
checks, giving resiliency in situations where beacon nodes send
malformed or otherwise incorrect messages.

Fixes #10
2020-12-17 22:09:28 +00:00
Jim McDonald ad1495bae6
Fix 'vouch_attestation_process_duration_seconds'.
This metric used to count the number of internal attestation processes
carried out, however a single attestation process can involve multiple
validators if they are attesting in the same slot and committee.  This
fix ensures that the metrics reflect the number of attestations, not the
number of processes.
2020-12-16 14:05:11 +00:00
Jim McDonald 4071dabf9e
Re-implement accountmanager metrics.
This reintroduces prometheus metrics for the account manager module.
The metrics track the validating state of each account, and are found
under the `vouch_accountmanager_accounts_total` metric.  The metrics are
differentiated using the `state` label.
2020-12-16 13:46:00 +00:00
Jim McDonald fda79aa31a
Increment version. 2020-12-15 10:51:10 +00:00
Jim McDonald 3a8098981c
Avoid crash on nil beacon block.
Situation reported where a node returns nil for a beacon block when
scoring attestation data.  Although this should not happen (the provider
told us about the block via the attestation, it should know it) this
patch covers the situation where the returned block is empty or
malformed.

Fixes #9
2020-12-14 09:29:34 +00:00
Jim McDonald 57fcf15be1
Increment version 2020-11-29 16:07:58 +00:00
Jim McDonald 6a28a2ce86
Include source and target epochs when scoring attestation data.
Fixes #8
2020-11-29 10:21:51 +00:00
Jim McDonald b22c451636
Version update 2020-11-27 15:55:57 +00:00
Jim McDonald db61a4e96f
Update release workflow. 2020-11-27 15:34:59 +00:00
Jim McDonald aed5402fbb
Tidy ups 2020-11-27 15:26:22 +00:00
Jim McDonald 68fb49a21b
Add --version flag.
Fixes #2
2020-11-26 20:35:34 +00:00
Jim McDonald a0a6d2ffa8
Add note regarding Lighthouse SSE 2020-11-26 20:32:26 +00:00
Jim McDonald 925e69fb9a
Update dependencies 2020-11-26 20:32:04 +00:00
Jim McDonald e66a4a3613
Tidy-ups for attestation data strategy 2020-11-26 20:31:28 +00:00
Jim McDonald 0b4d840beb
Enable scoring for attestation data 2020-11-26 20:29:34 +00:00
Jim McDonald 5b9f103612
Tweak timings 2020-11-26 02:37:22 +00:00