Skip to content
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

bump babylon v18 #102

Merged
merged 4 commits into from
Dec 5, 2024
Merged

bump babylon v18 #102

merged 4 commits into from
Dec 5, 2024

Conversation

KonradStaniec
Copy link
Collaborator

  • bumps babylon to v18
  • fixes incompatibilites
  • used parameters based on inclusion block height to build delegations

Copy link
Member

@gitferry gitferry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than linter errors! Minor comments:

Comment on lines 254 to 272
var stakingTrackerParams *StakingTrackerResponse
if err := retry.Do(func() error {
trackerParams, err := bc.QueryStakingTrackerByBtcHeight(btcHeight)
if err != nil {
return err
}
stakingTrackerParams = trackerParams
return nil
}, RtyAtt, RtyDel, RtyErr, retry.OnRetry(func(n uint, err error) {
bc.logger.WithFields(logrus.Fields{
"attempt": n + 1,
"max_attempts": RtyAttNum,
"error": err,
}).Error("Failed to query babylon client for staking tracker params")
})); err != nil {
return nil, err
}

return stakingTrackerParams, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems can by refactored by a bc.stakingTrackerByBtcHeightWithRetry

Comment on lines +218 to +233
if err := retry.Do(func() error {
trackerParams, err := bc.QueryStakingTrackerByBtcHeight(btcHeight)
if err != nil {
return err
}
stakingTrackerParams = trackerParams
return nil
}, RtyAtt, RtyDel, RtyErr, retry.OnRetry(func(n uint, err error) {
bc.logger.WithFields(logrus.Fields{
"attempt": n + 1,
"max_attempts": RtyAttNum,
"error": err,
}).Error("Failed to query babylon client for staking tracker params")
})); err != nil {
return nil, err
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems can by refactored by a bc.stakingTrackerByBtcHeightWithRetry

Params() (*StakingParams, error)
ParamsByBtcHeight(btcHeight uint32) (*StakingParams, error)
StakingTrackerByBtcHeight(btcHeight uint32) (*StakingTrackerResponse, error)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this called anywhere?

@KonradStaniec KonradStaniec merged commit 5955acb into main Dec 5, 2024
12 checks passed
@KonradStaniec KonradStaniec deleted the konradstaniec/bump-babylon-v18 branch December 5, 2024 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants