-
Notifications
You must be signed in to change notification settings - Fork 10
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
Update to Flow Go v0.34.0-crescendo-preview.16 #218
Conversation
Important Auto Review SkippedReview was skipped due to path filters Files ignored due to path filters (2)
You can disable this status message by setting the WalkthroughThe updates involve refining blockchain components and event handling in the software system. Changes include adding new fields like Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Could you please update to the new releases:
Thanks! |
Return proper timestamp value for block endpoints
…to gregor/update-flow-go-latest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
CumulativeGasUsed: tx.GasConsumed, // todo use cumulative after added to the tx result | ||
EffectiveGasPrice: t.GasPrice(), // since there's no base fee we can always use gas price |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider verifying the assignment of CumulativeGasUsed
and GasUsed
. If they are intended to be different, adjust the logic accordingly.
return nil, errors.Join(flowgoStorage.ErrNotFound, err) | ||
if errors.Is(err, storageErrs.ErrNotFound) { | ||
// make sure to wrap in not found error as the streamer expects it | ||
return nil, errors.Join(subscription.ErrBlockNotReady, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace errors.Join
with fmt.Errorf
to correctly format the error message with subscription.ErrBlockNotReady
.
- return nil, errors.Join(subscription.ErrBlockNotReady, err)
+ return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
return nil, errors.Join(subscription.ErrBlockNotReady, err) | |
return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err) |
return nil, errors.Join(flowgoStorage.ErrNotFound, err) | ||
if errors.Is(err, storageErrs.ErrNotFound) { | ||
// make sure to wrap in not found error as the streamer expects it | ||
return nil, errors.Join(subscription.ErrBlockNotReady, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace errors.Join
with fmt.Errorf
to correctly format the error message with subscription.ErrBlockNotReady
.
- return nil, errors.Join(subscription.ErrBlockNotReady, err)
+ return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
return nil, errors.Join(subscription.ErrBlockNotReady, err) | |
return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err) |
return nil, errors.Join(flowgoStorage.ErrNotFound, err) | ||
if errors.Is(err, storageErrs.ErrNotFound) { | ||
// make sure to wrap in not found error as the streamer expects it | ||
return nil, errors.Join(subscription.ErrBlockNotReady, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace errors.Join
with fmt.Errorf
to correctly format the error message with subscription.ErrBlockNotReady
.
- return nil, errors.Join(subscription.ErrBlockNotReady, err)
+ return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err)
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
return nil, errors.Join(subscription.ErrBlockNotReady, err) | |
return nil, fmt.Errorf("%w: %v", subscription.ErrBlockNotReady, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Could we please continue to go through the normal dependency update flow and update all upstream dependencies first? This PR updates the emulator, but e.g. the Cadence test framework hasn't gotten updated yet. |
Update to latest flow-go feature/cadence release v0.34.0-crescendo-preview.16 version that includes several breaking changes which this PR addresses.
Breaking changes are coming from these PRs:
Summary by CodeRabbit
New Features
subscription.ErrBlockNotReady
for better clarity on block readiness.Timestamp
andTotalGasUsed
fields in block information to provide more detailed block data.block.timestamp
to ensure accuracy in block data retrieval.Bug Fixes
Refactor
Tests
Chores