Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.10.1:
- fix fulu support
Comment thread
AntiD2ta marked this conversation as resolved.
Outdated
Comment thread
Bez625 marked this conversation as resolved.
Outdated

0.10.0:
- support fulu
- use updated event handlers from go-eth2-client
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func main2() int {
func fetchConfig() error {
pflag.String("base-dir", "", "base directory for configuration files")
pflag.Bool("version", false, "show version and exit")
pflag.String("log-level", "info", "minimum level of messsages to log")
pflag.String("log-level", "info", "minimum level of messages to log")
pflag.String("log-file", "", "redirect log output to a file")
pflag.String("profile-address", "", "Address on which to run Go profile server")
pflag.String("tracing-address", "", "Address to which to send tracing data")
Expand Down
4 changes: 2 additions & 2 deletions metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func registerPrometheusMetrics() error {
Help: "The timestamp at which this instance started.",
})
if err := prometheus.Register(startTime); err != nil {
return errors.Wrap(err, "failed to regsiter start_time_secs")
return errors.Wrap(err, "failed to register start_time_secs")
}
startTime.SetToCurrentTime()

Expand All @@ -72,7 +72,7 @@ func registerPrometheusMetrics() error {
Help: "1 if ready to serve requests, otherwise 0.",
})
if err := prometheus.Register(readyMetric); err != nil {
return errors.Wrap(err, "failed to regsiter ready")
return errors.Wrap(err, "failed to register ready")
}

return nil
Expand Down
5 changes: 4 additions & 1 deletion services/blocks/standard/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ func (s *Service) OnBeaconChainHeadUpdated(
slot phase0.Slot,
blockRoot phase0.Root,
stateRoot phase0.Root,
// skipcq: RVV-A0005
epochTransition bool,
) {
ctx, span := otel.Tracer("wealdtech.chaind.services.blocks.standard").Start(ctx, "OnBeaconChainHeadUpdated",
Expand Down Expand Up @@ -194,6 +193,8 @@ func (s *Service) OnBlock(ctx context.Context, signedBlock *spec.VersionedSigned
return s.onBlockDeneb(ctx, signedBlock.Deneb, dbBlock)
case spec.DataVersionElectra:
return s.onBlockElectra(ctx, signedBlock.Electra, dbBlock)
case spec.DataVersionFulu:
return s.onBlockElectra(ctx, signedBlock.Fulu, dbBlock)
case spec.DataVersionUnknown:
return errors.New("unknown block version")
default:
Expand Down Expand Up @@ -757,6 +758,8 @@ func (s *Service) dbBlock(
return s.dbBlockDeneb(ctx, block.Deneb.Message)
case spec.DataVersionElectra:
return s.dbBlockElectra(ctx, block.Electra.Message)
case spec.DataVersionFulu:
return s.dbBlockElectra(ctx, block.Fulu.Message)
case spec.DataVersionUnknown:
return nil, errors.New("unknown block version")
default:
Expand Down
8 changes: 4 additions & 4 deletions services/chaindb/postgresql/validators.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,8 @@ func (s *Service) ValidatorBalancesByIndexAndEpochRange(
return validatorIndices[i] < validatorIndices[j]
})

// Create a matrix of the values we require. This allows the database to fill in the blanks when it doesn't have a balance for
// the required (index,epoch) tuple (for exmple when the balance is 0).
// Create a matrix of the values we require. This allows the database to fill in the blanks when it doesn't have a balance for
// the required (index,epoch) tuple (for example when the balance is 0).
values := make([]string, 0)
for _, validatorIndex := range validatorIndices {
for epoch := startEpoch; epoch < endEpoch; epoch++ {
Expand Down Expand Up @@ -599,8 +599,8 @@ func (s *Service) ValidatorBalancesByIndexAndEpochs(
return validatorIndices[i] < validatorIndices[j]
})

// Create a matrix of the values we require. This allows the database to fill in the blanks when it doesn't have a balance for
// the required (index,epoch) tuple (for exmple when the balance is 0).
// Create a matrix of the values we require. This allows the database to fill in the blanks when it doesn't have a balance for
// the required (index,epoch) tuple (for example when the balance is 0).
values := make([]string, 0)
for _, validatorIndex := range validatorIndices {
for _, epoch := range epochs {
Expand Down
2 changes: 1 addition & 1 deletion services/chaindb/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type ValidatorBalance struct {
EffectiveBalance phase0.Gwei
}

// AggregateValidatorBalance holds aggreated information about validators' balances at a given epoch.
// AggregateValidatorBalance holds aggregated information about validators' balances at a given epoch.
type AggregateValidatorBalance struct {
Epoch phase0.Epoch
Balance phase0.Gwei
Expand Down
2 changes: 1 addition & 1 deletion util/calendarduration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func TestCalendarDuration(t *testing.T) {
// Because Go normalises dates, months addition can be counter-intuitive.
// Please refer to for details.
// We reimplement months addition following the logic in https://lubridate.tidyverse.org/reference/mplus.html
// which matches implemenation of Moment.js and Java
// which matches implementation of Moment.js and Java
{
name: "EndMonths",
duration: "P1M",
Expand Down
2 changes: 1 addition & 1 deletion util/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func LogLevel(path string) zerolog.Level {
return LogLevel(path[0:lastPeriod])
}

// stringtoLevel converts a string to a log level.
// stringToLevel converts a string to a log level.
// It returns the user-supplied level by default.
func stringToLevel(input string) zerolog.Level {
switch strings.ToLower(input) {
Expand Down