-
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 Cadence v1.0.0-preview.39 #367
Conversation
WalkthroughThe updates across various files enhance type safety, streamline data handling, and upgrade dependencies to boost performance and maintainability. Notable changes include the replacement of deprecated methods, refinement of logging mechanisms, and the introduction of new data structures for improved encapsulation. These modifications underscore a commitment to efficient coding practices and robust functionality, ensuring the codebase remains agile and responsive to future needs. 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 Configuration File (
|
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (2)
- go.mod (4 hunks)
- tests/go.mod (7 hunks)
Additional comments not posted (26)
go.mod (22)
7-7
: Approved: Update to stable version.The update from a specific commit to a stable version
v1.1.1
forjackfan.us.kg/cockroachdb/pebble
is beneficial for stability and includes potential bug fixes and improvements.
10-10
: Approved: Update to latest preview version.The update to
github.com/onflow/cadence
versionv1.0.0-preview.38
follows the latest preview release, which likely includes new features, improvements, and bug fixes.
11-11
: Approved: Update to specific commit.The update to
github.com/onflow/flow-go
to commit9ea6faeee3e7
may include critical fixes or features not yet available in a stable release.
12-12
: Approved: Update to latest preview version.The update to
github.com/onflow/flow-go-sdk
versionv1.0.0-preview.41
follows the latest preview release, which likely includes new features, improvements, and bug fixes.
13-13
: Approved: Update to newer version.The update to
github.com/onflow/flow/protobuf/go/flow
versionv0.4.5
likely includes improvements and bug fixes.
14-14
: Approved: Update to newer version.The update to
github.com/onflow/go-ethereum
versionv1.14.7
likely includes improvements and bug fixes.
21-21
: Approved: Update to newer version.The update to
golang.org/x/sync
versionv0.7.0
likely includes improvements and bug fixes.
33-33
: Approved: Update to newer version.The update to
github.com/Microsoft/go-winio
versionv0.6.2
likely includes improvements and bug fixes.
36-36
: Approved: Update to newer version.The update to
github.com/VictoriaMetrics/fastcache
versionv1.12.2
likely includes improvements and bug fixes.
42-42
: Approved: Update to newer version.The update to
github.com/cespare/xxhash/v2
versionv2.3.0
likely includes improvements and bug fixes.
43-43
: Approved: Update to newer version.The update to
github.com/cockroachdb/errors
versionv1.11.3
likely includes improvements and bug fixes.
46-46
: Approved: Update to newer version.The update to
github.com/cockroachdb/redact
versionv1.1.5
likely includes improvements and bug fixes.
52-52
: Approved: Update to stable version.The update to
github.com/crate-crypto/go-kzg-4844
versionv1.0.0
ensures more stability and potentially includes bug fixes and improvements.
54-54
: Approved: Update to newer version.The update to
github.com/deckarep/golang-set/v2
versionv2.6.0
likely includes improvements and bug fixes.
61-61
: Approved: Update to stable version.The update to
github.com/ethereum/c-kzg-4844
versionv1.0.0
ensures more stability and potentially includes bug fixes and improvements.
70-70
: Approved: Update to newer version.The update to
github.com/getsentry/sentry-go
versionv0.27.0
likely includes improvements and bug fixes.
73-73
: Approved: Update to newer version.The update to
github.com/go-ole/go-ole
versionv1.3.0
likely includes improvements and bug fixes.
93-93
: Approved: Update to newer version.The update to
github.com/holiman/uint256
versionv1.3.0
likely includes improvements and bug fixes.
195-195
: Approved: Update to newer version.The update to
golang.org/x/crypto
versionv0.22.0
likely includes improvements and bug fixes.
196-196
: Approved: Update to newer version.The update to
golang.org/x/net
versionv0.24.0
likely includes improvements and bug fixes.
44-44
: Verify the necessity and compatibility of the new dependency.The addition of
github.com/cockroachdb/fifo
should be verified for necessity and compatibility with the existing codebase.
51-51
: Verify the necessity and compatibility of the new dependency.The addition of
github.com/crate-crypto/go-ipa
should be verified for necessity and compatibility with the existing codebase.tests/go.mod (4)
7-7
: Approved: Update to latest preview version.The update to
github.com/onflow/cadence
versionv1.0.0-preview.38
follows the latest preview release, which likely includes new features, improvements, and bug fixes.
9-9
: Approved: Update to latest preview version.The update to
github.com/onflow/flow-emulator
versionv1.0.0-preview.35
follows the latest preview release, which likely includes new features, improvements, and bug fixes.
11-11
: Approved: Update to specific commit.The update to
github.com/onflow/flow-go
to commit9ea6faeee3e7
may include critical fixes or features not yet available in a stable release.
12-12
: Approved: Update to latest preview version.The update to
github.com/onflow/flow-go-sdk
versionv1.0.0-preview.41
follows the latest preview release, which likely includes new features, improvements, and bug fixes.
There are several changes in flow-go and geth which need to be resolved:
|
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: 0
Outside diff range, codebase verification and nitpick comments (1)
models/transaction.go (1)
205-205
: Clarification: BlockHash is not available.The TODO comment clarifies that the
BlockHash
is not available in the event payload.Consider using a more descriptive comment to indicate why
BlockHash
is not available.- // TODO: BlockHash is not available in the event payload + // Note: BlockHash is not available in the event payload due to current data structure limitations.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
go.sum
is excluded by!**/*.sum
Files selected for processing (5)
- go.mod (4 hunks)
- models/block.go (2 hunks)
- models/transaction.go (3 hunks)
- services/ingestion/engine_test.go (1 hunks)
- services/requester/requester.go (5 hunks)
Files skipped from review due to trivial changes (1)
- models/block.go
Additional comments not posted (20)
models/transaction.go (2)
195-195
: Simplified assignment ofPayload
.The direct assignment of
Payload
simplifies the function by removing unnecessary hex decoding.
200-205
: Simplified assignment of transaction event attributes.The direct assignment of
Logs
andReturnedData
attributes simplifies the function by removing unnecessary hex decoding.go.mod (12)
7-7
: Updated dependency:github.com/cockroachdb/pebble
tov1.1.1
.The update from
v0.0.0-20230928194634-aa077af62593
tov1.1.1
should improve stability and performance.
11-15
: Updated dependencies: Cadence, Flow Go, Flow Go SDK, Flow protobuf, Go Ethereum.The updates to these dependencies should enhance functionality and compatibility with the latest versions.
22-22
: Updated dependency:golang.org/x/sync
tov0.7.0
.The update from
v0.6.0
tov0.7.0
should include bug fixes and performance improvements.
34-34
: Updated dependency:github.com/Microsoft/go-winio
tov0.6.2
.The update from
v0.6.1
tov0.6.2
should include bug fixes and performance improvements.
37-37
: Updated dependency:github.com/VictoriaMetrics/fastcache
tov1.12.2
.The update from
v1.12.1
tov1.12.2
should include bug fixes and performance improvements.
43-53
: Updated dependencies: xxhash, cockroachdb/errors, cockroachdb/fifo, cockroachdb/redact, crate-crypto/go-kzg-4844.The updates to these dependencies should enhance functionality and compatibility with the latest versions.
55-55
: Updated dependency:github.com/deckarep/golang-set/v2
tov2.6.0
.The update from
v2.1.0
tov2.6.0
should include bug fixes and performance improvements.
62-62
: Updated dependency:github.com/ethereum/c-kzg-4844
tov1.0.0
.The update from
v0.4.0
tov1.0.0
should enhance functionality and stability.
64-64
: Updated dependency:github.com/ethereum/go-verkle
tov0.1.1-0.20240306133620-7d920df305f0
.The update should include bug fixes and performance improvements.
71-74
: Updated dependencies: sentry-go, go-ole.The updates to these dependencies should enhance functionality and compatibility with the latest versions.
92-92
: Updated dependency:github.com/holiman/uint256
tov1.3.0
.The update from
v1.2.4
tov1.3.0
should include bug fixes and performance improvements.
194-197
: Updated dependencies: golang.org/x/crypto, golang.org/x/net, golang.org/x/sys.The updates to these dependencies should enhance functionality and compatibility with the latest versions.
services/requester/requester.go (6)
251-253
: LGTM! The type update improves type safety.The change from
int
touint32
forkeyIndex
enhances type safety and consistency.
270-270
: LGTM! The type update improves type safety.The change from
int
touint32
forkeyIndex
enhances type safety and consistency.
281-281
: LGTM! The type update improves type safety.The change from
int
touint32
forkeyIndex
enhances type safety and consistency.
598-598
: LGTM! The return type update improves type safety.The change from
int
touint32
for the key index return type enhances type safety and consistency.
260-262
: Ensure consistent usage ofkeyIndex
type.Verify that all function calls to
getSignerNetworkInfo
and subsequent usage ofkeyIndex
are consistent with the newuint32
type.Verification successful
Ensure consistent usage of
keyIndex
type.The
keyIndex
variable is consistently used asuint32
in the main code. The declaration and subsequent usages inservices/requester/requester.go
confirm this.
services/requester/requester.go
:keyIndex
is declared asuint32
and used consistently.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the consistent usage of `keyIndex` type. # Test: Search for the function usage. Expect: Only occurances of the new type. rg --type go -A 5 $'getSignerNetworkInfo'Length of output: 929
Script:
#!/bin/bash # Description: Verify all instances of `getSignerNetworkInfo` and check the type of `keyIndex`. # Search for all instances of `getSignerNetworkInfo` in the codebase. rg --type go 'getSignerNetworkInfo' # Check the type of `keyIndex` in the codebase. rg --type go 'var keyIndex'Length of output: 402
Script:
#!/bin/bash # Description: Verify all instances of `keyIndex` usage in the codebase and check its type. # Search for all instances of `keyIndex` usage in the codebase. rg --type go 'keyIndex'Length of output: 498
Line range hint
601-603
:
Ensure consistent usage ofkeyIndex
type.Verify that all function calls to
getSignerNetworkInfo
and subsequent usage ofkeyIndex
are consistent with the newuint32
type.
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (21)
- api/server.go (2 hunks)
- api/stream.go (1 hunks)
- bootstrap/create-multi-key-account.go (6 hunks)
- go.mod (5 hunks)
- models/events.go (1 hunks)
- models/events_test.go (1 hunks)
- models/receipt.go (1 hunks)
- models/transaction.go (3 hunks)
- models/transaction_test.go (2 hunks)
- services/logs/filter.go (1 hunks)
- services/logs/filter_test.go (1 hunks)
- storage/index.go (2 hunks)
- storage/index_testsuite.go (2 hunks)
- storage/mocks/ReceiptIndexer.go (2 hunks)
- storage/pebble/receipts.go (4 hunks)
- tests/go.mod (8 hunks)
- tests/integration_test.go (2 hunks)
- tests/web3js/config.js (1 hunks)
- tests/web3js/eth_deploy_contract_and_interact_test.js (8 hunks)
- tests/web3js/eth_non_interactive_test.js (9 hunks)
- tests/web3js/eth_revert_reason_test.js (2 hunks)
Files skipped from review due to trivial changes (3)
- models/events_test.go
- models/transaction_test.go
- tests/web3js/eth_deploy_contract_and_interact_test.js
Files skipped from review as they are similar to previous changes (2)
- models/transaction.go
- tests/go.mod
Additional comments not posted (59)
tests/web3js/config.js (1)
9-9
: Verify the appropriateness of the newstartBlockHeight
.The
startBlockHeight
has been changed from3n
to2n
. Ensure that this new block height is appropriate for the setup and does not cause any unintended side effects in the tests or blockchain interactions.storage/mocks/ReceiptIndexer.go (1)
22-48
: Verify the correctness of the new return type handling.The
BloomsForBlockRange
method now returns a slice ofmodels.BloomsHeight
and an error, instead of a tuple with an additional slice ofbig.Int
. Ensure that the new return type is correctly handled and that the removal of the second return value does not cause any issues.models/events.go (1)
73-92
: Verify the correctness of the new block information retrieval logic.The
Transactions
method now retrieves block information and associates it with transaction receipts. Ensure that the new logic correctly retrieves block information and associates it with transaction receipts without introducing any errors.tests/web3js/eth_revert_reason_test.js (2)
46-46
: Verify the correctness of the updated block number.The expected block number in the assertion has been changed from
5n
to4n
. Ensure this update aligns with the new test environment or the underlying blockchain state.
80-80
: Verify the correctness of the updated block number.The expected block number in the assertion has been changed from
6n
to5n
. Ensure this update aligns with the new test environment or the underlying blockchain state.storage/index.go (1)
87-87
: Verify the correctness of the updated method signature.The method signature for
BloomsForBlockRange
has been altered to return a slice of pointers tomodels.BloomsHeight
and an error. Ensure this update aligns with the new data structure and verify its impact on the codebase.api/stream.go (1)
Line range hint
1-100
: Verify the correctness of the removal of the deprecated notifier.The case statement handling the deprecated
notifier.Closed()
channel has been removed. Ensure that this removal is complete and does not affect the overall functionality of thenewSubscription
method.services/logs/filter.go (4)
80-84
: LGTM! The new structure simplifies data handling.The refactoring consolidates the retrieval of bloom filters and their heights into a single structure, enhancing code clarity and maintainability.
86-90
: LGTM! The iteration logic is correct.The refactoring simplifies the iteration process by directly accessing the
Blooms
field frombloomsHeight
.
Line range hint
94-103
:
LGTM! The error handling and log processing remain intact.The refactoring maintains the core functionality of filtering logs based on bloom criteria while simplifying the control flow.
Line range hint
175-178
:
LGTM! The new type definition is correct.The
BloomsHeight
structure encapsulates bloom filters and their corresponding height, enhancing the data model.models/receipt.go (1)
175-178
: LGTM! The new type definition is correct.The
BloomsHeight
structure encapsulates bloom filters and their corresponding height, enhancing the data model.tests/web3js/eth_non_interactive_test.js (9)
8-8
: LGTM! The additional line enhances test clarity.The test for retrieving the chain ID remains unchanged in logic but now includes an additional line for clarity.
32-32
: LGTM! The updated transaction count reflects the current blockchain state.The expected transaction count for a specific block has been updated from
1n
to3n
, indicating a change in the blockchain state or test setup.
35-42
: LGTM! The loop enhances test coverage.The logic for retrieving transactions from a block has been altered to a loop that retrieves multiple transactions, ensuring that multiple transactions can be correctly fetched and validated.
45-45
: LGTM! The updated index reflects a deeper understanding of the blockchain state.The index for retrieving a non-existent transaction has been changed from
1
to5
.
50-55
: LGTM! The simplified logic ensures robustness.The tests for block interactions have been simplified to retrieve a block based on
conf.startBlockHeight
, consolidating the logic and ensuring robustness.
66-71
: LGTM! The assertions validate the transaction fields correctly.The test for block transaction retrieval includes assertions for transaction fields, ensuring they are correctly validated.
Line range hint
104-122
:
LGTM! The additional assertions validate the transaction fields correctly.The test for retrieving a transaction from a block includes additional assertions for transaction fields, ensuring they are correctly validated.
139-141
: LGTM! The adjusted values reflect the current blockchain state.The expected values for syncing status have been adjusted, reflecting changes in the expected blockchain state.
Line range hint
188-208
:
LGTM! The modified results reflect the current server responses.The expected results for batch requests have been modified, indicating a change in the server responses that the tests are designed to validate.
services/logs/filter_test.go (1)
132-148
: Ensure correct data structure usage inBloomsForBlockRange
.The function now returns a slice of
models.BloomsHeight
, encapsulating both blooms and their heights. Ensure that the new data structure is correctly populated and returned.- blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) bloomsHeight := make([]*models.BloomsHeight, 0) for _, r := range receipts { if r.BlockNumber.Cmp(start) >= 0 && r.BlockNumber.Cmp(end) <= 0 { - blooms = append(blooms, &r.Bloom) - heights = append(heights, r.BlockNumber) bloomsHeight = append(bloomsHeight, &models.BloomsHeight{ - Blooms: blooms, + Blooms: []*gethTypes.Bloom{&r.Bloom}, Height: r.BlockNumber, }) } } return bloomsHeight, niltests/integration_test.go (2)
50-50
: Ensure type consistency forkeyCount
.The variable
keyCount
has been changed fromint
touint32
. Ensure that this change is consistent with its usage throughout the function.
97-100
: Ensure type consistency fortotalTxs
and loop index.The variable
totalTxs
has been changed fromint
touint32
, and the loop index has been updated accordingly. Ensure that this change is consistent with its usage throughout the function.storage/pebble/receipts.go (3)
200-205
: Ensure correct return type and error handling inBloomsForBlockRange
.The function's return type has been changed to a slice of
models.BloomsHeight
, and error handling has been streamlined. Ensure that the new data structure is correctly used and returned, and error handling is consistent.
Line range hint
211-224
:
Ensure range validation inBloomsForBlockRange
.The function validates that the start and end values are within the indexed range. Ensure that this validation is correctly implemented.
Line range hint
239-274
:
Ensure correct data structure usage inBloomsForBlockRange
.The function now returns a slice of
models.BloomsHeight
, encapsulating both blooms and their heights. Ensure that the new data structure is correctly populated and returned.- blooms := make([]*gethTypes.Bloom, 0) - heights := make([]*big.Int, 0) result := make([]*models.BloomsHeight, 0) for iterator.First(); iterator.Valid(); iterator.Next() { val, err := iterator.ValueAndErr() if err != nil { return nil, err } var bloomsHeight []*gethTypes.Bloom if err := rlp.DecodeBytes(val, &bloomsHeight); err != nil { return nil, fmt.Errorf("failed to decode blooms: %w", err) } h := stripPrefix(iterator.Key()) height := new(big.Int).SetBytes(h) - blooms = append(blooms, bloomsHeight...) - heights = append(heights, height) result = append(result, &models.BloomsHeight{ Blooms: bloomsHeight, Height: height, }) } return result, nilbootstrap/create-multi-key-account.go (6)
69-69
: LGTM!The change to use
uint32
for thekeyCount
parameter enhances type safety.
78-78
: LGTM!The loop variable
i
is correctly updated touint32
.
158-158
: LGTM!The
Index
field in theflow.AccountKey
struct is correctly updated touint32
.
285-285
: LGTM!The
Index
field in theflow.AccountKey
struct is correctly updated touint32
.
51-51
: Verify the function usage.Ensure that all function calls to
CreateMultiKeyAccount
match the new signature.Verification successful
Verify the type of
keyCount
intests/integration_test.go
.Ensure that the
keyCount
parameter intests/integration_test.go
matches the newuint32
type.
Verification successful.
The function calls to
CreateMultiKeyAccount
match the new signature withuint32
for thekeyCount
parameter.
tests/integration_test.go
:keyCount
is correctly declared asuint32
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `CreateMultiKeyAccount` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go -A 5 $'CreateMultiKeyAccount'Length of output: 2342
Script:
#!/bin/bash # Description: Verify the type of `keyCount` in `tests/integration_test.go`. # Test: Search for the declaration of `keyCount` in `tests/integration_test.go`. rg --type go -A 5 $'keyCount' tests/integration_test.goLength of output: 953
219-219
: Verify the function usage.Ensure that all function calls to
CreateMultiCloudKMSKeysAccount
match the new signature.Verification successful
Verify the function usage consistency in
integration_test.go
.Ensure that the
Index
field is correctly passed asuint32
inintegration_test.go
.
Verify the function usage consistency in
integration_test.go
with more context.Ensure that the
Index
field is correctly passed asuint32
by fetching additional lines around the function call intests/integration_test.go
.
Verification successful.
The function
CreateMultiCloudKMSKeysAccount
is used correctly intests/integration_test.go
and the change to theIndex
field being of typeuint32
is an internal detail that does not affect the function's external usage.
tests/integration_test.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `CreateMultiCloudKMSKeysAccount` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type go -A 5 $'CreateMultiCloudKMSKeysAccount'Length of output: 733
Script:
#!/bin/bash # Description: Verify if the usage of CreateMultiCloudKMSKeysAccount in integration_test.go matches the new signature. # Test: Search for the function call and inspect the relevant lines. rg --type go -A 5 'CreateMultiCloudKMSKeysAccount' tests/integration_test.goLength of output: 230
Script:
#!/bin/bash # Description: Fetch more lines around the CreateMultiCloudKMSKeysAccount function call in integration_test.go to verify the usage. # Test: Search for the function call and fetch additional lines for full context. rg --type go -A 10 -B 5 'CreateMultiCloudKMSKeysAccount' tests/integration_test.goLength of output: 475
go.mod (20)
7-7
: LGTM!The update to
github.com/cockroachdb/pebble v1.1.1
is approved.
11-11
: LGTM!The update to
github.com/onflow/cadence v1.0.0-preview.38
is approved.
12-12
: LGTM!The update to
github.com/onflow/flow-go v0.36.2-0.20240717214129-9ea6faeee3e7
is approved.
13-13
: LGTM!The update to
github.com/onflow/flow-go-sdk v1.0.0-preview.41
is approved.
14-14
: LGTM!The update to
github.com/onflow/flow/protobuf/go/flow v0.4.5
is approved.
15-15
: LGTM!The update to
github.com/onflow/go-ethereum v1.14.7
is approved.
22-22
: LGTM!The update to
golang.org/x/sync v0.7.0
is approved.
34-34
: LGTM!The update to
github.com/Microsoft/go-winio v0.6.2
is approved.
37-37
: LGTM!The update to
github.com/VictoriaMetrics/fastcache v1.12.2
is approved.
43-43
: LGTM!The update to
github.com/cespare/xxhash/v2 v2.3.0
is approved.
7-7
: Verify compatibility with the project.Ensure that the update to
github.com/cockroachdb/pebble v1.1.1
is compatible with the project.
11-11
: Verify compatibility with the project.Ensure that the update to
github.com/onflow/cadence v1.0.0-preview.38
is compatible with the project.
34-34
: Verify compatibility with the project.Ensure that the update to
github.com/Microsoft/go-winio v0.6.2
is compatible with the project.Verification successful
The update to
github.com/Microsoft/go-winio v0.6.2
is compatible with the project.The dependency is indirect and does not have direct references in the project's Go files. The update from
v0.6.1
tov0.6.2
should not introduce breaking changes.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of `github.com/Microsoft/go-winio v0.6.2` with the project. # Test: Search for the dependency usage. Expect: No breaking changes. rg --type go -A 5 $'go-winio'Length of output: 28
Script:
#!/bin/bash # Description: Verify compatibility of `github.com/Microsoft/go-winio v0.6.2` with the project. # Test: Search for the dependency usage with a broader pattern. Expect: No breaking changes. rg --type go -A 5 'winio'Length of output: 25
Script:
#!/bin/bash # Description: Verify compatibility of `github.com/Microsoft/go-winio v0.6.2` with the project by checking `go.mod` and `go.sum`. # Check `go.mod` for references to `go-winio`. rg 'go-winio' go.mod # Check `go.sum` for references to `go-winio`. rg 'go-winio' go.sumLength of output: 360
37-37
: Verify compatibility with the project.Ensure that the update to
github.com/VictoriaMetrics/fastcache v1.12.2
is compatible with the project.
13-13
: Verify compatibility with the project.Ensure that the update to
github.com/onflow/flow-go-sdk v1.0.0-preview.41
is compatible with the project.Verification successful
Verify compatibility with the project.
The update to
github.com/onflow/flow-go-sdk v1.0.0-preview.41
is compatible with the project. TheAccountKey
structure usage in the project aligns with the changes in the new version.
bootstrap/create-multi-key-account.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of `github.com/onflow/flow-go-sdk v1.0.0-preview.41` with the project. # Test: Search for the dependency usage. Expect: No breaking changes. rg --type go -A 5 $'flow-go-sdk'Length of output: 12260
Script:
#!/bin/bash # Description: Check the changelog or release notes of `github.com/onflow/flow-go-sdk` for breaking changes between `v1.0.0-preview.38` and `v1.0.0-preview.41`. # Fetch the changelog or release notes from the GitHub repository. gh api repos/onflow/flow-go-sdk/releases --jq '.[] | select(.tag_name == "v1.0.0-preview.41" or .tag_name == "v1.0.0-preview.38") | {tag_name, body}'Length of output: 989
Script:
#!/bin/bash # Description: Search for the usage of flow account key id in the project to determine if the change to uint32 impacts the project. # Search for the usage of flow account key id. rg --type go 'flow\.AccountKey\.ID'Length of output: 37
Script:
#!/bin/bash # Description: Search for any usage of AccountKey in the project to determine if the change to uint32 impacts the project. # Search for the usage of AccountKey. rg --type go 'AccountKey'Length of output: 558
Script:
#!/bin/bash # Description: Extract relevant lines from `bootstrap/create-multi-key-account.go` to review the usage of `AccountKey`. # Extract lines around the usage of `AccountKey`. rg --type go -A 5 -B 5 'AccountKey' bootstrap/create-multi-key-account.goLength of output: 1564
22-22
: Verify compatibility with the project.Ensure that the update to
golang.org/x/sync v0.7.0
is compatible with the project.Verification successful
Verify compatibility with the project.
The update to
golang.org/x/sync v0.7.0
is compatible with the project. There are no breaking changes in theerrgroup
package that affect its usage in the codebase.
- The only commit between
v0.6.0
andv0.7.0
is related to thesemaphore
package and does not impacterrgroup
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of `golang.org/x/sync v0.7.0` with the project. # Test: Search for the dependency usage. Expect: No breaking changes. rg --type go -A 5 $'x/sync'Length of output: 439
Script:
#!/bin/bash # Extract the relevant code from services/requester/requester.go where errgroup is used rg --type go -A 20 'errgroup' services/requester/requester.goLength of output: 1034
Script:
#!/bin/bash # Fetch and compare the changelog or release notes for golang.org/x/sync between versions v0.6.0 and v0.7.0 # Fetch the changelog curl -s https://pkg.go.dev/golang.org/x/[email protected] | grep -A 10 'v0.7.0' curl -s https://pkg.go.dev/golang.org/x/[email protected] | grep -A 10 'v0.6.0'Length of output: 9907
Script:
#!/bin/bash # Search for changelog or release notes in the golang.org/x/sync repository # Clone the repository git clone https://go.googlesource.com/sync # Check for changelog or release notes cd sync git log v0.6.0..v0.7.0 --onelineLength of output: 232
14-14
: Verify compatibility with the project.Ensure that the update to
github.com/onflow/flow/protobuf/go/flow v0.4.5
is compatible with the project.
43-43
: Verify compatibility with the project.Ensure that the update to
github.com/cespare/xxhash/v2 v2.3.0
is compatible with the project.
15-15
: Verify compatibility with the project.Ensure that the update to
github.com/onflow/go-ethereum v1.14.7
is compatible with the project.
12-12
: Verify compatibility with the project.Ensure that the update to
github.com/onflow/flow-go v0.36.2-0.20240717214129-9ea6faeee3e7
is compatible with the project.api/server.go (1)
64-72
: Verify the logging configuration.Ensure that the new logging configuration using
gethLog.SetDefault
with a terminal handler targeting error-level logs is correctly set up.#!/bin/bash # Description: Verify <details> <summary>Verification successful</summary> --- <!-- [monologue] [task review_file_3/3 function_1/1] Verify the logging configuration in the `NewHTTPServer` function. [observations] The `NewHTTPServer` function in `api/server.go` includes the logging configuration using `gethLog.SetDefault` with a terminal handler targeting error-level logs. The function then returns an instance of `httpServer` with the provided logger and configuration. [analysis] The logging setup is correctly implemented within the `NewHTTPServer` function, and there are no conflicting logging configurations present. [actions] Conclude the verification process by confirming the correctness of the logging configuration. --> **Verified the logging configuration.** The `NewHTTPServer` function correctly sets up the logging configuration using `gethLog.SetDefault` with a terminal handler targeting error-level logs. - `api/server.go`: - `NewHTTPServer` function: Lines 64-72 </details> <details> <summary>Scripts executed</summary> The following scripts were executed for the analysis: --- Script: ```shell #!/bin/bash # Locate and review the NewHTTPServer function in api/server.go to verify the logging configuration ast-grep --lang go --pattern $'func NewHTTPServer($_, $_, $_) $_ { $$$ }' --jsonLength of output: 86
Script:
#!/bin/bash # Search for the NewHTTPServer function definition across the entire codebase rg 'func NewHTTPServer' -A 10Length of output: 405
Script:
#!/bin/bash # Extract the entire NewHTTPServer function from api/server.go to verify the logging configuration ast-grep --lang go --pattern $'func NewHTTPServer($_, $_) $_ { $$$ }' api/server.goLength of output: 695
storage/index_testsuite.go (5)
261-261
: Verify the consistency of the length check.The length of
bloomsHeights
is being checked againsttestBlooms
. Ensure that this length check is valid and consistent with the expected output.
259-259
: Verify the correct usage of the new return type.The variable
bloomsHeights
is introduced to handle the return value froms.ReceiptIndexer.BloomsForBlockRange
. Ensure that this change aligns with the new return type of the method.Verification successful
Verified the correct usage of the new return type.
The method
BloomsForBlockRange
returns([]*models.BloomsHeight, error)
, and the variablebloomsHeights
correctly handles this return type.
storage/pebble/receipts.go
storage/mocks/ReceiptIndexer.go
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the return type of the method `BloomsForBlockRange`. # Test: Search for the method definition. Expect: The method returns a single structure or tuple. rg --type go -A 5 'func (r *ReceiptIndexer) BloomsForBlockRange'Length of output: 66
Script:
#!/bin/bash # Description: Verify the return type of the method `BloomsForBlockRange`. # Test: Search for the method definition with a more inclusive pattern. rg --type go 'func BloomsForBlockRange' -A 10Length of output: 47
Script:
#!/bin/bash # Description: Verify the return type of the method `BloomsForBlockRange`. # Test: Search for all method definitions in the codebase to locate `BloomsForBlockRange`. rg --type go 'func ' -A 10 | grep -A 10 'BloomsForBlockRange'Length of output: 2884
288-288
: Verify the correct reuse of the variable.The variable
bloomsHeights
is reused to handle the return value froms.ReceiptIndexer.BloomsForBlockRange
for another block range. Ensure that this change aligns with the new return type of the method.Verification successful
The variable reuse is correct.
The method
BloomsForBlockRange
returns([]*models.BloomsHeight, error)
, which aligns with the reuse of the variablebloomsHeights
in the code snippet.
storage/pebble/receipts.go: BloomsForBlockRange
storage/mocks/ReceiptIndexer.go: BloomsForBlockRange
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct reuse of the variable. # Test: Search for the method definition. Expect: The method returns a single structure or tuple. rg --type go -A 5 'func (r *ReceiptIndexer) BloomsForBlockRange'Length of output: 66
Script:
#!/bin/bash # Description: Verify the correct reuse of the variable. # Test: Search for the method definition. Expect: The method returns a single structure or tuple. rg --type go -A 10 'func .*BloomsForBlockRange'Length of output: 2129
266-266
: Verify the correct reuse of the variable.The variable
bloomsHeights
is reused to handle the return value froms.ReceiptIndexer.BloomsForBlockRange
for a different block range. Ensure that this change aligns with the new return type of the method.Verification successful
The reuse of the variable
bloomsHeights
is correct.The method
BloomsForBlockRange
returns a slice of*models.BloomsHeight
and an error, which aligns with the expected usage wherebloomsHeights
is assigned the first return value.
storage/index.go: BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error)
storage/mocks/ReceiptIndexer.go:func (_m *ReceiptIndexer) BloomsForBlockRange(start *big.Int, end *big.Int) ([]*models.BloomsHeight, error)
storage/pebble/receipts.go:func (r *Receipts) BloomsForBlockRange(start, end *big.Int) ([]*models.BloomsHeight, error)
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the correct reuse of the variable. # Test: Search for the method definition. Expect: The method returns a single structure or tuple. rg --type go -A 5 'func (r *ReceiptIndexer) BloomsForBlockRange'Length of output: 66
Script:
#!/bin/bash # Description: Verify the correct reuse of the variable. # Test: Search for the method definition using ast-grep. Expect: The method returns a single structure or tuple. ast-grep --lang go --pattern 'func (r *ReceiptIndexer) BloomsForBlockRange($_, $_) ($_,$$$)'Length of output: 94
Script:
#!/bin/bash # Description: Verify the correct reuse of the variable. # Test: Search for the method definition using rg. Expect: The method definition should be found in the Go codebase. rg --type go 'BloomsForBlockRange'Length of output: 1500
299-299
: Verify the correct usage of the variable.The variable
bloomsHeights
is used to handle the return value froms.ReceiptIndexer.BloomsForBlockRange
for an invalid block range. Ensure that this change aligns with the new return type of the method.
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- tests/web3js/eth_non_interactive_test.js (10 hunks)
Files skipped from review as they are similar to previous changes (1)
- tests/web3js/eth_non_interactive_test.js
…ntegration package
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (2)
- go.mod (4 hunks)
- tests/go.mod (8 hunks)
Files skipped from review as they are similar to previous changes (2)
- go.mod
- tests/go.mod
…0-preview.39' into auto-update-onflow-cadence-v1.0.0-preview.38
@m-Peter @sideninja The fixes in the dependencies are merged now:
Releases have been tagged in the dependencies, and I updated everything again, which resulted in #382, which I merged into this PR. It looks like the EVM implementation changed once again and block transaction hashes have been replaced by a transaction hash root. However, I don't know anything about these. From what I can tell this should be the last issue that has to be addressed. Let me know how I can assist! cc @ramtinms |
TxHash: txEvent.Hash, | ||
ContractAddress: common.HexToAddress(txEvent.ContractAddress), | ||
GasUsed: txEvent.GasConsumed, | ||
CumulativeGasUsed: txEvent.GasConsumed, // todo use cumulative after added to the tx result |
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.
This might be a bad merge (re-)introducing it, not sure
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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (2)
go.sum
is excluded by!**/*.sum
tests/go.sum
is excluded by!**/*.sum
Files selected for processing (17)
- api/server.go (2 hunks)
- api/stream.go (1 hunks)
- go.mod (5 hunks)
- models/block.go (2 hunks)
- models/block_test.go (1 hunks)
- models/events.go (4 hunks)
- models/events_test.go (2 hunks)
- models/transaction.go (4 hunks)
- models/transaction_test.go (3 hunks)
- services/ingestion/engine.go (1 hunks)
- services/ingestion/engine_test.go (3 hunks)
- services/ingestion/subscriber.go (2 hunks)
- services/requester/requester.go (5 hunks)
- storage/mocks/mocks.go (1 hunks)
- tests/go.mod (8 hunks)
- tests/web3js/eth_deploy_contract_and_interact_test.js (8 hunks)
- tests/web3js/eth_non_interactive_test.js (11 hunks)
Files skipped from review due to trivial changes (4)
- api/stream.go
- models/transaction_test.go
- storage/mocks/mocks.go
- tests/web3js/eth_deploy_contract_and_interact_test.js
Files skipped from review as they are similar to previous changes (8)
- api/server.go
- models/block.go
- models/events.go
- models/events_test.go
- models/transaction.go
- services/ingestion/engine_test.go
- services/requester/requester.go
- tests/web3js/eth_non_interactive_test.js
Additional comments not posted (20)
models/block_test.go (2)
7-9
: LGTM! Import statements updated correctly.The import statements have been updated to use the
events
package fromflow-go/fvm/evm
, aligning with the updated event handling logic in the Flow framework.
17-25
: LGTM! Function updated correctly.The function has been updated to use
events.NewBlockEvent
andblock.TransactionHashRoot
, aligning with the updated event handling logic in the Flow framework.services/ingestion/subscriber.go (2)
9-9
: LGTM! Import statements updated correctly.The import statements have been updated to use the
events
package fromflow-go/fvm/evm
, aligning with the updated event handling logic in the Flow framework.
237-243
: LGTM! Function updated correctly.The function has been updated to use
events.EventTypeBlockExecuted
andevents.EventTypeTransactionExecuted
, aligning with the updated event handling logic in the Flow framework.services/ingestion/engine.go (1)
210-217
: LGTM! Logging updated correctly.The function has been updated to log
block.TransactionHashRoot
instead of individual transaction hashes, simplifying the logging process and aligning with the updated event handling logic in the Flow framework.go.mod (11)
7-7
: Approve the update tojackfan.us.kg/cockroachdb/pebble
.The update moves the dependency from a pre-release version to a stable release, which is generally beneficial. Ensure that the new version does not introduce breaking changes.
Verification successful
Approve the update to
github.com/cockroachdb/pebble
.The update moves the dependency from a pre-release version to a stable release, which is generally beneficial. Ensure that the new version does not introduce breaking changes by reviewing the official release notes or changelog for
pebble
v1.1.1.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/cockroachdb/pebble` dependency. # Test: Check for breaking changes in the new version. rg --type go -A 5 'pebble'Length of output: 34658
11-11
: Approve the update tojackfan.us.kg/onflow/cadence
.The update is a minor version change within the preview releases. Ensure that the new version does not introduce breaking changes.
37-37
: Approve the update tojackfan.us.kg/VictoriaMetrics/fastcache
.The update is a minor version change. Ensure that the new version does not introduce breaking changes.
43-43
: Approve the update tojackfan.us.kg/cespare/xxhash/v2
.The update is a minor version change. Ensure that the new version does not introduce breaking changes.
Verification successful
The dependency
github.com/cespare/xxhash/v2
is not directly imported or used in the codebase.Since it is an indirect dependency, it is likely used by another package. The update to
v2.3.0
should be safe, but it is recommended to verify the compatibility of the dependent package.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/cespare/xxhash/v2` dependency. # Test: Check for breaking changes in the new version. rg --type go -A 5 'xxhash/v2'Length of output: 29
Script:
#!/bin/bash # Description: Search for import statements of the updated `github.com/cespare/xxhash/v2` dependency. # Find all Go files that import `xxhash/v2`. rg --type go 'import "github.com/cespare/xxhash/v2"' -lLength of output: 57
Script:
#!/bin/bash # Description: Search for usage of the `xxhash` package from `github.com/cespare/xxhash/v2` in the codebase. # Find all instances where `xxhash` is used in the codebase. rg --type go 'xxhash\.' -A 5Length of output: 30
13-13
: Approve the update tojackfan.us.kg/onflow/flow-go-sdk
.The update is a minor version change within the preview releases. Ensure that the new version does not introduce breaking changes.
Verification successful
Approve the update to
github.com/onflow/flow-go-sdk
.The release notes for the updated version do not indicate any breaking changes. Please verify the functionality by running the relevant tests to ensure compatibility.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/onflow/flow-go-sdk` dependency. # Test: Check for breaking changes in the new version. rg --type go -A 5 'flow-go-sdk'Length of output: 12226
Script:
#!/bin/bash # Description: Fetch the changelog or release notes for `github.com/onflow/flow-go-sdk` to verify changes between v1.0.0-preview.38 and v1.0.0-preview.42. # Fetch the changelog or release notes from the repository. curl -s https://api.github.com/repos/onflow/flow-go-sdk/releases | jq -r '.[] | select(.tag_name == "v1.0.0-preview.42" or .tag_name == "v1.0.0-preview.38") | .body'Length of output: 865
34-34
: Approve the update tojackfan.us.kg/Microsoft/go-winio
.The update is a minor version change. Ensure that the new version does not introduce breaking changes.
Verification successful
Approve the update to
github.com/Microsoft/go-winio
.The update is a minor version change from
v0.6.1
tov0.6.2
. There are no direct usages ofgo-winio
found in the codebase, and it is listed as an indirect dependency. Ensure that the indirect dependencies that rely ongo-winio
are compatible with the new version.
go.mod
:
github.com/Microsoft/go-winio v0.6.2 // indirect
go.sum
:
github.com/Microsoft/go-winio v0.6.2
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/Microsoft/go-winio` dependency. # Test: Check for breaking changes in the new version. rg --type go -A 5 'go-winio'Length of output: 28
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/Microsoft/go-winio` dependency. # Search for usage of `go-winio` in the codebase. rg 'go-winio' # Check the `go.mod` file for the version of `go-winio`. rg 'github.com/Microsoft/go-winio' go.mod # Check the `go.sum` file for the version of `go-winio`. rg 'github.com/Microsoft/go-winio' go.sumLength of output: 1134
22-22
: Approve the update togolang.org/x/sync
.The update is a minor version change. Ensure that the new version does not introduce breaking changes.
44-44
: Approve the update tojackfan.us.kg/cockroachdb/errors
.The update includes a minor version change. Ensure that the new version does not introduce breaking changes.
14-14
: Approve the update tojackfan.us.kg/onflow/flow/protobuf/go/flow
.The update is a minor version change. Ensure that the new version does not introduce breaking changes.
Verification successful
Approve the update to
github.com/onflow/flow/protobuf/go/flow
to versionv0.4.5
.The newly added methods
GetAccountBalance*
andGetAccountKeys*
are not used in the project's codebase. However, ensure that other changes in the update do not affect the existing functionality by performing a manual verification.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify compatibility of the updated `github.com/onflow/flow/protobuf/go/flow` dependency. # Test: Check for breaking changes in the new version. rg --type go -A 5 'protobuf/go/flow'Length of output: 1024
Script:
#!/bin/bash # Description: Fetch the changelog or release notes for `github.com/onflow/flow` to identify any breaking changes or new features in version `v0.4.5`. # Fetch the changelog or release notes from the GitHub repository. curl -s https://api.github.com/repos/onflow/flow/releases | jq -r '.[] | select(.tag_name=="v0.4.5") | .body'Length of output: 1930
Script:
#!/bin/bash # Description: Verify the usage of newly added methods `GetAccountBalance*` and `GetAccountKeys*` in the project's codebase. # Search for the usage of `GetAccountBalance*` and `GetAccountKeys*` in the project's Go files. rg --type go 'GetAccountBalance' rg --type go 'GetAccountKeys'Length of output: 62
12-12
: Approve the update tojackfan.us.kg/onflow/flow-go
.The update includes a minor version change and a specific commit reference. Ensure that the new version does not introduce breaking changes.
15-15
: Approve the update tojackfan.us.kg/onflow/go-ethereum
.The update includes a major version change. Ensure that the new version does not introduce breaking changes.
tests/go.mod (4)
11-11
: Approve the update tojackfan.us.kg/onflow/flow-go
.The update includes a minor version change and a specific commit reference. Ensure that the new version does not introduce breaking changes.
12-12
: Approve the update tojackfan.us.kg/onflow/flow-go-sdk
.The update is a minor version change within the preview releases. Ensure that the new version does not introduce breaking changes.
7-7
: Approve the update tojackfan.us.kg/onflow/cadence
.The update is a minor version change within the preview releases. Ensure that the new version does not introduce breaking changes.
9-9
: Approve the update tojackfan.us.kg/onflow/flow-emulator
.The update is a minor version change within the preview releases. Ensure that the new version does not introduce breaking changes.
@turbolent We have incrementally fixed all the breaking changes, via: So now we have |
Closing this one in favour of #381 |
Awesome, great work @m-Peter and @sideninja! 👏 |
Description
Automatically update to:
Summary by CodeRabbit
Dependency Updates
Improvements