-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
*: fix compatibility with latest go-eth2-client #2650
Conversation
77fc3df
to
81aaaba
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #2650 +/- ##
==========================================
- Coverage 53.27% 53.16% -0.12%
==========================================
Files 202 202
Lines 27517 27980 +463
==========================================
+ Hits 14661 14875 +214
- Misses 11005 11244 +239
- Partials 1851 1861 +10
☔ View full report in Codecov by Sentry. |
defer span.End() | ||
|
||
return c.awaitAttFunc(ctx, int64(slot), int64(committeeIndex)) | ||
att, err := c.awaitAttFunc(ctx, int64(opts.Slot), int64(opts.CommitteeIndex)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
defer span.End() | ||
|
||
return c.awaitAttFunc(ctx, int64(slot), int64(committeeIndex)) | ||
att, err := c.awaitAttFunc(ctx, int64(opts.Slot), int64(opts.CommitteeIndex)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
core/validatorapi/validatorapi.go
Outdated
awaitSyncContributionFunc func(ctx context.Context, slot, subcommIdx int64, beaconBlockRoot eth2p0.Root) (*altair.SyncCommitteeContribution, error) | ||
awaitAggAttFunc func(ctx context.Context, slot int64, attestationRoot eth2p0.Root) (*eth2p0.Attestation, error) | ||
awaitAggSigDBFunc func(context.Context, core.Duty, core.PubKey) (core.SignedData, error) | ||
dutyDefFunc func(ctx context.Context, duty core.Duty) (core.DutyDefinitionSet, error) | ||
subs []func(context.Context, core.Duty, core.ParSignedDataSet) error | ||
} | ||
|
||
func (c *Component) Proposal(ctx context.Context, opts *eth2api.ProposalOpts) (*eth2api.Response[*eth2api.VersionedProposal], error) { | ||
// Get proposer pubkey (this is a blocking query). | ||
pubkey, err := c.getProposerPubkey(ctx, core.NewProposerDuty(int64(opts.Slot))) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
core/validatorapi/validatorapi.go
Outdated
Signature: opts.RandaoReveal, | ||
} | ||
|
||
duty := core.NewRandaoDuty(int64(opts.Slot)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
core/validatorapi/validatorapi.go
Outdated
|
||
func (c *Component) BlindedProposal(ctx context.Context, opts *eth2api.BlindedProposalOpts) (*eth2api.Response[*eth2api.VersionedBlindedProposal], error) { | ||
// Get proposer pubkey (this is a blocking query). | ||
pubkey, err := c.getProposerPubkey(ctx, core.NewBuilderProposerDuty(int64(opts.Slot))) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
core/validatorapi/validatorapi.go
Outdated
Signature: opts.RandaoReveal, | ||
} | ||
|
||
duty := core.NewRandaoDuty(int64(opts.Slot)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
60465c3
to
92a7df9
Compare
FYI: This PR also solves #2477 |
421242e
to
0d1921d
Compare
// Query unsigned block (this is blocking). | ||
block, err := c.awaitBlockFunc(ctx, int64(slot)) | ||
// Query unsigned proposal (this is blocking). | ||
proposal, err := c.awaitProposalFunc(ctx, int64(opts.Slot)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
@@ -446,17 +407,56 @@ | |||
// - Once inserted, the query below will return. | |||
|
|||
// Query unsigned block (this is blocking). | |||
block, err := c.awaitBlindedBlockFunc(ctx, int64(slot)) | |||
proposal, err := c.awaitBlindedProposalFunc(ctx, int64(opts.Slot)) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseUint
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Fix charon's compatibility with latest release of
go-eth2-client
which contains breaking changes, notably the ETH2 client interface methods. This PR also enables easy integration of deneb fork as the data structures for deneb are included in the new release. An example of the API change is as follows:Earlier
Now
Also fix corresponding tests.
category: feature
ticket: #2646