Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
a8f5762
Rename 0.19-changes.md to 0.19.0-changes.md
salis Feb 3, 2024
bdc5ab4
Merge pull request #104 from salis/fix_docs_path
mcdee Feb 3, 2024
cf7bf33
Add nil checks to VersionedSignedBeaconBlock funcs
jtraglia Feb 28, 2024
0802562
Fix another minor typo
jtraglia Feb 28, 2024
79285e0
Fix some things in VersionedBeaconBlock
jtraglia Feb 28, 2024
8e9579c
Merge pull request #111 from jtraglia/versionedbeaconblock-nil-checks
mcdee Feb 28, 2024
9008528
Update linting.
mcdee Feb 28, 2024
28deb89
Rebalance fetching validator chunks vs state.
mcdee Feb 28, 2024
d5194c9
Tidy imports.
mcdee Feb 28, 2024
44f5e38
Allow delayed start of client.
mcdee Feb 29, 2024
cf0bded
Check for metric before setting it.
mcdee Feb 29, 2024
c71c446
internal separation of endpoint and query.
mcdee Feb 29, 2024
23494e2
Better handling of URLs.
mcdee Feb 29, 2024
cfbeb30
Add hooks.
mcdee Feb 29, 2024
f563b0a
Tidy-ups.
mcdee Feb 29, 2024
e06a551
Add states to validators options.
mcdee Feb 29, 2024
b49c7d2
Add a couple missing nil checks
jtraglia Feb 29, 2024
56516b3
Update blob limits for block contents.
mcdee Mar 1, 2024
98869c9
Reject negative base fee per gas
jtraglia Mar 1, 2024
e4547d3
Enforce transaction size limits
jtraglia Mar 1, 2024
cfe0cca
Merge pull request #115 from jtraglia/transaction-limits
mcdee Mar 1, 2024
59df749
Merge pull request #114 from jtraglia/neg-base-fee-per-gas
mcdee Mar 1, 2024
499e866
Merge pull request #112 from jtraglia/a-couple-nil-checks
mcdee Mar 1, 2024
595a7a6
Ensure slice values are not nil.
mcdee Mar 2, 2024
644acdf
Fix validators chunked vs state decision.
mcdee Mar 3, 2024
c4ef742
Handle failover between http and multi.
mcdee Mar 4, 2024
d79b541
Multi only active if synced.
mcdee Mar 4, 2024
b62ba85
Allow submission of proposal preparations and validator registrations…
mcdee Mar 5, 2024
48c9750
Provide allowDelayedStart() for multi
mcdee Mar 5, 2024
3341a4b
Add name to multi to differentiate multiple instances.
mcdee Mar 5, 2024
79aba77
Add ProposerIndex() to VersionedSignedProposal.
mcdee Mar 11, 2024
b9dcb64
Update changelog for 0.20.0
mcdee Mar 15, 2024
aee7c4b
Bump version.
mcdee Mar 15, 2024
0e08b7e
Unified proposals using v3.
mcdee Mar 1, 2024
8a03865
Update ProposerIndex() for VersionedSignedProposal.
mcdee Mar 11, 2024
3a40bf1
Check correctness of ValidatorState value
Mar 19, 2024
cd0eaf4
Workaround for lodestar not supporting SSZ for proposal submission.
mcdee Mar 19, 2024
605f842
Merge pull request #116 from attestantio/v3-proposals
mcdee Mar 19, 2024
c531d84
Merge pull request #117 from ObolNetwork/gsora/validatorstate-panic
mcdee Mar 19, 2024
bc5d64c
Update changelog.
mcdee Mar 19, 2024
5a33417
Bump version.
mcdee Mar 19, 2024
5120eb3
Fixed endpoint in SubmitBlindedProposal
pinebit Mar 25, 2024
35616e0
Merge pull request #120 from ObolNetwork/submit-blinded-proposal-endp…
mcdee Mar 25, 2024
ea6aa3c
Add optional parameter to reduce client memory usage instead of the W…
nkryuchkov Mar 25, 2024
f837408
Merge remote-tracking branch 'origin/master' into optional-beaconstat…
nkryuchkov Mar 25, 2024
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
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ linters:
- maligned
- musttag
- nosnakecase
- perfsprint
- scopelint
- structcheck
- varcheck
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
dev:
0.21.0:
- use v3 of the endpoint to obtain proposals
- add bounds checking for ValidatorState

0.20.0:
- allow delayed start of client, enabling the service even if the underlying beacon node is not ready
- add IsActive() and IsSynced() methods to understand the status of the service
- update multi clients to be aware of delayed start, only using clients that are synced
- use standard errors for common function issues
- add ProposerIndex() to VersionedSignedProposal
- add name to multi clients to differentiate multiple instances
- fully parse provided client URLs, allowing pass through of username, password, etc.

0.19.10:
- add proposer_slashing and attester_slashing events
- add bls_to_execution_change event

Expand Down
8 changes: 6 additions & 2 deletions api/proposalopts.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2023 Attestant Limited.
// Copyright © 2023, 2024 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand All @@ -23,9 +23,13 @@ type ProposalOpts struct {
Slot phase0.Slot
// RandaoReveal is the RANDAO reveal for the proposal.
RandaoReveal phase0.BLSSignature
// Graffit is the graffiti to be included in the beacon block body.
// Graffiti is the graffiti to be included in the beacon block body.
Graffiti [32]byte
// SkipRandaoVerification is true if we do not want the server to verify our RANDAO reveal.
// If this is set then the RANDAO reveal should be passed as the point at infinity (0xc0…00)
SkipRandaoVerification bool
// BuilderBoostFactor is the relative weight of the builder payload versus a locally-produced
// payload, as per https://ethereum.github.io/beacon-APIs/#/Validator/produceBlockV3
// This is optional; if not supplied it will use the default value of 100.
BuilderBoostFactor *uint64
}
27 changes: 27 additions & 0 deletions api/submitblindedproposalopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright © 2024 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

import v2 "github.com/attestantio/go-eth2-client/api/v2"

// SubmitBlindedProposalOpts are the options for submitting proposals.
type SubmitBlindedProposalOpts struct {
Common CommonOpts

// Proposal is the proposal to submit.
Proposal *VersionedSignedBlindedProposal

// BroadcastValidation is the validation required of the consensus node before broadcasting the proposal.
BroadcastValidation *v2.BroadcastValidation
}
27 changes: 27 additions & 0 deletions api/submitproposalopts.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright © 2024 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package api

import v2 "github.com/attestantio/go-eth2-client/api/v2"

// SubmitProposalOpts are the options for submitting proposals.
type SubmitProposalOpts struct {
Common CommonOpts

// Proposal is the proposal to submit.
Proposal *VersionedSignedProposal

// BroadcastValidation is the validation required of the consensus node before broadcasting the proposal.
BroadcastValidation *v2.BroadcastValidation
}
27 changes: 26 additions & 1 deletion api/v1/bellatrix/blindedbeaconblockbody_json.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Attestant Limited.
// Copyright © 2022, 2024 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -95,23 +95,48 @@ func (b *BlindedBeaconBlockBody) unpack(data *blindedBeaconBlockBodyJSON) error
if data.ProposerSlashings == nil {
return errors.New("proposer slashings missing")
}
for i := range data.ProposerSlashings {
if data.ProposerSlashings[i] == nil {
return fmt.Errorf("proposer slashings entry %d missing", i)
}
}
b.ProposerSlashings = data.ProposerSlashings
if data.AttesterSlashings == nil {
return errors.New("attester slashings missing")
}
for i := range data.AttesterSlashings {
if data.AttesterSlashings[i] == nil {
return fmt.Errorf("attester slashings entry %d missing", i)
}
}
b.AttesterSlashings = data.AttesterSlashings
if data.Attestations == nil {
return errors.New("attestations missing")
}
for i := range data.Attestations {
if data.Attestations[i] == nil {
return fmt.Errorf("attestations entry %d missing", i)
}
}
b.Attestations = data.Attestations
if data.Deposits == nil {
return errors.New("deposits missing")
}
for i := range data.Deposits {
if data.Deposits[i] == nil {
return fmt.Errorf("deposits entry %d missing", i)
}
}
b.Deposits = data.Deposits
if data.VoluntaryExits == nil {
return errors.New("voluntary exits missing")
}
b.VoluntaryExits = data.VoluntaryExits
for i := range data.VoluntaryExits {
if data.VoluntaryExits[i] == nil {
return fmt.Errorf("voluntary exits entry %d missing", i)
}
}
if data.SyncAggregate == nil {
return errors.New("sync aggregate missing")
}
Expand Down
27 changes: 26 additions & 1 deletion api/v1/bellatrix/blindedbeaconblockbody_test.go

Large diffs are not rendered by default.

32 changes: 31 additions & 1 deletion api/v1/capella/blindedbeaconblockbody_json.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2022 Attestant Limited.
// Copyright © 2022, 2024 Attestant Limited.
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
Expand Down Expand Up @@ -97,22 +97,47 @@ func (b *BlindedBeaconBlockBody) unpack(data *blindedBeaconBlockBodyJSON) error
if data.ProposerSlashings == nil {
return errors.New("proposer slashings missing")
}
for i := range data.ProposerSlashings {
if data.ProposerSlashings[i] == nil {
return fmt.Errorf("proposer slashings entry %d missing", i)
}
}
b.ProposerSlashings = data.ProposerSlashings
if data.AttesterSlashings == nil {
return errors.New("attester slashings missing")
}
for i := range data.AttesterSlashings {
if data.AttesterSlashings[i] == nil {
return fmt.Errorf("attester slashings entry %d missing", i)
}
}
b.AttesterSlashings = data.AttesterSlashings
if data.Attestations == nil {
return errors.New("attestations missing")
}
for i := range data.Attestations {
if data.Attestations[i] == nil {
return fmt.Errorf("attestations entry %d missing", i)
}
}
b.Attestations = data.Attestations
if data.Deposits == nil {
return errors.New("deposits missing")
}
for i := range data.Deposits {
if data.Deposits[i] == nil {
return fmt.Errorf("deposits entry %d missing", i)
}
}
b.Deposits = data.Deposits
if data.VoluntaryExits == nil {
return errors.New("voluntary exits missing")
}
for i := range data.VoluntaryExits {
if data.VoluntaryExits[i] == nil {
return fmt.Errorf("voluntary exits entry %d missing", i)
}
}
b.VoluntaryExits = data.VoluntaryExits
if data.SyncAggregate == nil {
return errors.New("sync aggregate missing")
Expand All @@ -125,6 +150,11 @@ func (b *BlindedBeaconBlockBody) unpack(data *blindedBeaconBlockBodyJSON) error
if data.BLSToExecutionChanges == nil {
b.BLSToExecutionChanges = make([]*capella.SignedBLSToExecutionChange, 0)
} else {
for i := range data.BLSToExecutionChanges {
if data.BLSToExecutionChanges[i] == nil {
return fmt.Errorf("bls to execution changes entry %d missing", i)
}
}
b.BLSToExecutionChanges = data.BLSToExecutionChanges
}

Expand Down
Loading