-
Notifications
You must be signed in to change notification settings - Fork 366
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 hevm to 0.53.0 #1189
Update hevm to 0.53.0 #1189
Conversation
WalkthroughThe overall change introduces a more specific type parameter, 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 (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
package.yaml
is excluded by:!**/*.yaml
stack.yaml
is excluded by:!**/*.yaml
Files selected for processing (17)
- flake.nix (1 hunks)
- lib/Echidna.hs (1 hunks)
- lib/Echidna/Campaign.hs (10 hunks)
- lib/Echidna/Deploy.hs (2 hunks)
- lib/Echidna/Etheno.hs (6 hunks)
- lib/Echidna/Events.hs (2 hunks)
- lib/Echidna/Exec.hs (7 hunks)
- lib/Echidna/Shrink.hs (3 hunks)
- lib/Echidna/Solidity.hs (3 hunks)
- lib/Echidna/Test.hs (8 hunks)
- lib/Echidna/Transaction.hs (2 hunks)
- lib/Echidna/Types.hs (1 hunks)
- lib/Echidna/Types/Test.hs (3 hunks)
- lib/Echidna/Types/Tx.hs (3 hunks)
- lib/Echidna/UI.hs (2 hunks)
- lib/Echidna/UI/Report.hs (9 hunks)
- lib/Echidna/UI/Widgets.hs (5 hunks)
Additional comments: 72
lib/Echidna/Types.hs (1)
- 25-25: The update to the
fromEVM
function's type signature to include theConcrete
type parameter aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.lib/Echidna/Deploy.hs (1)
- 28-29: The update to the type signatures of
deployContracts
,deployBytecodes
, anddeployBytecodes'
functions to include theConcrete
type parameter aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.Also applies to: 36-37, 48-49
lib/Echidna/Shrink.hs (1)
- 12-12: The introduction of the
Concrete
type parameter and the import ofVMType(Concrete)
in theshrinkTest
andshrinkSeq
functions' type signatures aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.Also applies to: 25-25, 56-60
lib/Echidna/Events.hs (1)
- 32-32: The update to the
extractEvents
anddecodeRevert
functions' type signatures to include theConcrete
type parameter aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.Also applies to: 79-79
lib/Echidna/Types/Test.hs (1)
- 11-11: The introduction of the
Concrete
type parameter in theEchidnaTest
data structure and theclassifier
function's argument inTestConf
aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.Also applies to: 14-14, 25-25, 58-58, 104-104
lib/Echidna.hs (1)
- 52-52: The update to the
prepareContract
function's return type to include theConcrete
type parameter aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.lib/Echidna/Transaction.hs (1)
- 38-38: The update to the
hasSelfdestructed
andsetupTx
functions' type signatures to include theConcrete
type parameter aligns with the PR's objectives to refine the type system's expressiveness and accuracy. This change should enhance the handling of the virtual machine's state and execution context. Ensure that this modification is compatible with the rest of the codebase and does not introduce any unintended side effects.Also applies to: 157-157
flake.nix (1)
- 54-55: The update of
hevm
to version0.53.0
and the correspondingsha256
checksum change are correctly implemented. Ensure to verify the compatibility of this new version with the rest of the project dependencies and the overall system to avoid potential integration issues.lib/Echidna/Types/Tx.hs (2)
- 183-183: The addition of
ErrorNonexistentFork
to theTxResult
data type is a good update for handling new error scenarios. Ensure that all new error cases introduced by the updated VM or project requirements are adequately handled throughout the project.- 200-213: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [203-230]
The modification of the
getResult
function to handleVMResult Concrete s
instead ofVMResult s
is a significant improvement towards type safety and clarity in handling VM states. Ensure that this change is consistently applied across all relevant parts of the project and that any necessary adjustments are made to accommodate the new type specificity.lib/Echidna/Etheno.hs (5)
- 124-124: The update to include the
Concrete
type parameter in theVM
type for theloadEthenoBatch
function is a positive change towards enhancing type safety and clarity. Ensure thorough testing to verify that this modification integrates well with the rest of the project without introducing unintended side effects.- 135-135: The inclusion of the
Concrete
type parameter in theinitAddress
function's type signature aligns with the project's move towards more specific type handling. Verify that all interactions with this function are updated accordingly to accommodate the new type specificity.- 147-148: Updating the
crashWithQueryError
function to handle theConcrete
type parameter is a good practice for maintaining type safety and clarity. Ensure that error handling throughout the project is consistent with this change.- 169-169: The modifications to the
execEthenoTxs
function to include theConcrete
type parameter enhance the project's type safety and clarity in VM state management. Conduct comprehensive testing to ensure that these changes do not negatively impact the project's functionality.- 191-191: The update to the
setupEthenoTx
function to include theConcrete
type parameter is in line with the project's efforts to improve type specificity and safety. Confirm that this change is consistently applied and tested across all relevant parts of the project.lib/Echidna/UI/Report.hs (10)
- 38-38: The update to the
ppCampaign
function signature to include theConcrete
type parameter in theVM
type is consistent with the PR's objectives. This change enhances type specificity, which can improve code clarity and correctness.- 56-56: The modification of the
ppTx
function signature to incorporate theConcrete
type parameter is appropriate and aligns with the overall goal of refining type usage within the project. This change contributes to more precise type definitions.- 73-73: Updating the
contractNameForAddr
function signature to include theConcrete
type parameter is a positive change, ensuring consistency in the handling of the virtual machine's state across the codebase.- 104-104: The adjustment in the
ppGasInfo
function signature to use theConcrete
type parameter is in line with the PR's objectives of enhancing type specificity. This change is beneficial for maintaining type consistency.- 111-111: The update to the
ppGasOne
function signature, including theConcrete
type parameter, is consistent with the PR's goal of refining type usage. This change aids in ensuring type accuracy and clarity.- 120-120: Modifying the
ppFail
function signature to incorporate theConcrete
type parameter aligns with the PR's objectives and contributes to a more specific and accurate type system within the project.- 133-133: The change in the
ppFailWithTraces
function signature to include theConcrete
type parameter is appropriate and supports the PR's goal of enhancing type specificity and consistency across the codebase.- 151-151: Updating the
ppTS
function signature to use theConcrete
type parameter is consistent with the PR's objectives of refining type usage. This change is beneficial for maintaining type consistency and clarity.- 161-161: The modification of the
ppOPT
function signature to include theConcrete
type parameter aligns with the overall goal of enhancing type specificity within the project. This change contributes to more precise type definitions.- 171-171: Adjusting the
ppOptimized
function signature to incorporate theConcrete
type parameter is in line with the PR's objectives of improving type specificity. This change aids in ensuring type accuracy and consistency.lib/Echidna/Test.hs (16)
- 35-35: The update to the
classifyRes
function signature to include theConcrete
type parameter in theVMResult
type is consistent with the PR's objectives. This change enhances type specificity, which can improve code clarity and correctness.- 43-43: The modification of the
getResultFromVM
function signature to incorporate theConcrete
type parameter is appropriate and aligns with the overall goal of refining type usage within the project. This change contributes to more precise type definitions.- 117-117: Updating the
updateOpenTest
function signature to use theConcrete
type parameter is consistent with the PR's objectives of refining type usage. This change is beneficial for maintaining type consistency and clarity.- 141-142: The change in the
checkETest
function signature to include theConcrete
type parameter is appropriate and supports the PR's goal of enhancing type specificity and consistency across the codebase.- 154-157: Modifying the
checkProperty
function signature to incorporate theConcrete
type parameter aligns with the PR's objectives and contributes to a more specific and accurate type system within the project.- 168-172: The update to the
runTx
function signature, including theConcrete
type parameter, is consistent with the PR's goal of refining type usage. This change aids in ensuring type accuracy and clarity.- 180-180: Adjusting the
getIntFromResult
function to explicitly handleVMResult Concrete RealWorld
is in line with the PR's objectives of improving type specificity. This change aids in ensuring type accuracy and consistency.- 191-194: The modification of the
checkOptimization
function signature to include theConcrete
type parameter aligns with the overall goal of enhancing type specificity within the project. This change contributes to more precise type definitions.- 202-205: Updating the
checkStatefulAssertion
function signature to use theConcrete
type parameter is consistent with the PR's objectives of refining type usage. This change is beneficial for maintaining type consistency and clarity.- 232-235: The change in the
checkDapptestAssertion
function signature to include theConcrete
type parameter is appropriate and supports the PR's goal of enhancing type specificity and consistency across the codebase.- 256-258: Modifying the
checkCall
function signature to incorporate theConcrete
type parameter aligns with the PR's objectives and contributes to a more specific and accurate type system within the project.- 263-263: The update to the
checkAssertionTest
function to explicitly handleVM Concrete RealWorld
is consistent with the PR's goal of refining type usage. This change aids in ensuring type accuracy and clarity.- 271-271: Adjusting the
checkSelfDestructedTarget
function to explicitly handleVM Concrete RealWorld
is in line with the PR's objectives of improving type specificity. This change aids in ensuring type accuracy and consistency.- 276-276: The modification of the
checkAnySelfDestructed
function to include theConcrete
type parameter aligns with the overall goal of enhancing type specificity within the project. This change contributes to more precise type definitions.- 283-283: Updating the
checkOverflowTest
function signature to use theConcrete
type parameter is consistent with the PR's objectives of refining type usage. This change is beneficial for maintaining type consistency and clarity.- 291-293: The change in the
reproduceTest
function signature to include theConcrete
type parameter is appropriate and supports the PR's goal of enhancing type specificity and consistency across the codebase.lib/Echidna/UI.hs (2)
- 33-33: The import statement has been updated to include
VMType(Concrete)
, which aligns with the PR's objective to integrate theConcrete
type parameter across the codebase. This change ensures that theVM
type is now explicitly parameterized withConcrete
, enhancing type specificity and accuracy.- 60-60: The
ui
function signature has been modified to include theConcrete
type parameter in theVM
type, along withRealWorld
. This change is consistent with the PR's objective and improves the clarity and expressiveness of the code by making the handling of the virtual machine's state and execution context more specific.lib/Echidna/UI/Widgets.hs (5)
- 39-39: The import statement has been updated to include
VMType(Concrete)
, which is consistent with the PR's objective to integrate theConcrete
type parameter across the codebase. This change ensures that theVM
type is now explicitly parameterized withConcrete
, enhancing type specificity and accuracy.- 294-294: The
tracesWidget
function signature has been modified to specify theConcrete
type parameter in theVM
type. This change aligns with the PR's objective and improves the clarity and expressiveness of the code by making the handling of the virtual machine's state and execution context more specific.- 309-309: The
failWidget
function signature has been updated to include theConcrete
type parameter in theVM
type. This change is consistent with the PR's objective and enhances the type system's specificity and accuracy regarding the handling of the virtual machine's state and execution context.- 347-347: The
maxWidget
function signature has been modified to specify theConcrete
type parameter in theVM
type. This change aligns with the PR's objective and improves the clarity and expressiveness of the code by making the handling of the virtual machine's state and execution context more specific.- 365-365: The
seqWidget
function signature has been updated to include theConcrete
type parameter in theVM
type. This change is consistent with the PR's objective and enhances the type system's specificity and accuracy regarding the handling of the virtual machine's state and execution context.lib/Echidna/Exec.hs (11)
- 30-30: The import of
Gas
fromEVM.Types
is noted. Ensure that this import is utilized effectively in the file, especially given the changes to function signatures and type declarations involvingGas
.- 60-60: The
getQuery
function's type signature has been refined to use theConcrete
type parameter. This change aligns with the overall goal of enhancing type specificity and accuracy in handling the VM's state. Ensure that all calls togetQuery
are updated accordingly.- 65-65: The pattern
Reversion
has been updated to use theConcrete
type parameter. This change is consistent with the PR's objective of integrating theConcrete
type parameter throughout the codebase. Verify that this pattern is correctly used in all relevant match expressions.- 69-69: The pattern
Illegal
has been updated to use theConcrete
type parameter. This update is part of the systematic integration of theConcrete
type parameter. Ensure that this pattern is appropriately utilized in all relevant match expressions.- 78-81: The function
execTxWith
now explicitly specifiesVM Concrete RealWorld
in its type signature. This change is crucial for ensuring type safety and clarity. However, it's important to review all usages ofexecTxWith
to confirm that they comply with the updated type signature.- 223-225: The
execTx
function's type signature has been refined to useVM Concrete RealWorld
. This adjustment is part of the broader effort to enhance type specificity. Ensure that all invocations ofexecTx
are consistent with this updated type signature.- 233-235: The
execTxWithCov
function's type signature now includesVM Concrete RealWorld
, aligning with the PR's objectives. Review all calls toexecTxWithCov
to ensure they adhere to the new type signature.- 266-266: The
loop
function withinexecCov
has been updated to work withVM Concrete RealWorld
. This change is part of the effort to consistently apply theConcrete
type parameter. Verify that theloop
function's logic remains correct and efficient with this type refinement.- 274-274: The
stepVM
function has been modified to useVM Concrete RealWorld
. This update is consistent with the PR's goal of integrating theConcrete
type parameter. Ensure thatstepVM
is correctly utilized in the context of theexecCov
function.- 278-278: The
addCoverage
function now operates onVM Concrete RealWorld
. This change enhances type specificity and accuracy in handling coverage data. Confirm thataddCoverage
functions correctly within theexecCov
logic.- 315-315: The
initialVM
function's type signature has been refined to include theConcrete
type parameter. This adjustment aligns with the PR's objectives. Review the usage ofinitialVM
to ensure it is consistent with the updated type signature.lib/Echidna/Solidity.hs (3)
- 117-117: The
populateAddresses
function has been updated to useVM Concrete s
. This change is part of the effort to enhance type safety and clarity in the codebase. Ensure that all calls topopulateAddresses
are updated accordingly.- 171-171: The
loadSpecified
function's return type has been updated to useVM Concrete RealWorld
. This change aligns with the PR's objective of integrating theConcrete
type parameter. Review all usages ofloadSpecified
to confirm that they comply with the updated return type.- 362-362: The
loadSolTests
function's return type now includesVM Concrete RealWorld
, which is consistent with the PR's goals. Ensure that all invocations ofloadSolTests
are consistent with this updated return type.lib/Echidna/Campaign.hs (10)
- 31-31: The import statement for
EVM.Types
now hidesGas
. This change is consistent with the modifications made in the file, whereGas
is explicitly imported fromEchidna.Types
instead. This helps avoid naming conflicts and clarifies the source of theGas
type used in this module.- 66-66: The function signature for
replayCorpus
now explicitly specifiesVM Concrete RealWorld
as the type for the VM parameter. This change aligns with the overall objective of integrating theConcrete
type parameter into theVM
type across the project. It enhances type specificity and accuracy, potentially improving the robustness of the virtual machine simulation and manipulation functionalities.- 88-88: Similar to
replayCorpus
, therunWorker
function now also usesVM Concrete RealWorld
for its VM parameter type. This consistent application of theConcrete
type parameter across different functions further strengthens the type system's expressiveness within the project.- 190-192: The
callseq
function's signature has been updated to both accept and returnVM Concrete RealWorld
. This change is crucial for maintaining the consistency of the VM's type throughout its usage in transaction sequences, ensuring that the concrete state of the VM is correctly handled.- 264-264: The
returnValues
function now operates on a list of(Tx, VMResult Concrete RealWorld)
, aligning with the changes made to handle the VM's concrete state more explicitly. This adjustment is essential for processing transaction results accurately within the context of the updated VM type.- 283-283: The
addToCorpus
function's parameters have been updated to work with(VMResult Concrete RealWorld, Gas)
instead of(VMResult RealWorld, Gas)
. This change ensures that the corpus management functions are compatible with the new VM type, facilitating accurate tracking and manipulation of test results and gas usage.- 292-293: The
execTxOptC
function now explicitly usesVM Concrete RealWorld
for both its input VM and the VM included in its return type. This change is part of the broader effort to integrate theConcrete
type parameter into the VM type, ensuring that execution functions operate on the correctly typed VM state.- 308-308: The
updateGasInfo
function's signature has been updated to accept a list of(Tx, (VMResult Concrete RealWorld, Gas))
, aligning with the changes made to handle the VM's concrete state. This update is crucial for accurately updating gas usage information based on the results of executed transactions.- 329-332: The
evalSeq
function's signature has been updated to specifyVM Concrete RealWorld
for both its input VM and the VM included in its return type. Additionally, it now operates on a function that takes and returnsVM Concrete RealWorld
, ensuring consistency in the handling of the VM's state across transaction evaluations.- 372-373: The
updateTest
function now usesVM Concrete RealWorld
for both its input VM and the VM included in the parameters of the test update rule. This change ensures that test updates are performed with the correct VM state, aligning with the project's goal of integrating theConcrete
type parameter into the VM 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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
package.yaml
is excluded by:!**/*.yaml
stack.yaml
is excluded by:!**/*.yaml
Files selected for processing (17)
- flake.nix (1 hunks)
- lib/Echidna.hs (1 hunks)
- lib/Echidna/Campaign.hs (10 hunks)
- lib/Echidna/Deploy.hs (2 hunks)
- lib/Echidna/Etheno.hs (6 hunks)
- lib/Echidna/Events.hs (2 hunks)
- lib/Echidna/Exec.hs (7 hunks)
- lib/Echidna/Shrink.hs (3 hunks)
- lib/Echidna/Solidity.hs (3 hunks)
- lib/Echidna/Test.hs (8 hunks)
- lib/Echidna/Transaction.hs (2 hunks)
- lib/Echidna/Types.hs (1 hunks)
- lib/Echidna/Types/Test.hs (3 hunks)
- lib/Echidna/Types/Tx.hs (3 hunks)
- lib/Echidna/UI.hs (2 hunks)
- lib/Echidna/UI/Report.hs (9 hunks)
- lib/Echidna/UI/Widgets.hs (5 hunks)
Files skipped from review as they are similar to previous changes (17)
- flake.nix
- lib/Echidna.hs
- lib/Echidna/Campaign.hs
- lib/Echidna/Deploy.hs
- lib/Echidna/Etheno.hs
- lib/Echidna/Events.hs
- lib/Echidna/Exec.hs
- lib/Echidna/Shrink.hs
- lib/Echidna/Solidity.hs
- lib/Echidna/Test.hs
- lib/Echidna/Transaction.hs
- lib/Echidna/Types.hs
- lib/Echidna/Types/Test.hs
- lib/Echidna/Types/Tx.hs
- lib/Echidna/UI.hs
- lib/Echidna/UI/Report.hs
- lib/Echidna/UI/Widgets.hs
Summary by CodeRabbit
New Features
hevm
to version0.53.0
for improved functionality.Refactor
Concrete
in theVM
type across various modules.VM
type.