-
Notifications
You must be signed in to change notification settings - Fork 123
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
Feature/resource movements static analysis #1909
Conversation
…to feature/resource-movements-static-analysis
Docker tags |
Benchmark for e275fc7Click to view benchmark
|
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.
Really nice work! Have left a few comments. Haven't looked through it with a fine tooth-comb.
I suggest when you're back you can rebase on develop and we can have a chat and possibly do some markups I can review it properly when I get your thumbs up that it's good to go :)
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements_visitor.rs
Outdated
Show resolved
Hide 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.
Really nice work. The separation across different files has made it a lot easier to review 💯.
My comments are quite numerous, and spread across a few areas:
- Comments on code style
- Incorrect native invocation matching, inaccurate typings, and incomplete invocation listing
- Incorrect bound adjustment logic, including a number of places where we attempt to recover instead of error when impossible bounds are discovered.
- Suggestions for remodelling to reduce possibility of errors (essentially introducing simpler abstractions, separated into very thin layers, where each layer can be handled / validated separately)
Possibly it's worth us pairing on this tomorrow and we can bash out the tweaks to the models together in an hour or two?
radix-transactions/src/manifest/static_resource_movements/effect.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/effect.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/effect.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/visitor.rs
Outdated
Show resolved
Hide resolved
radix-transactions/src/manifest/static_resource_movements/visitor.rs
Outdated
Show resolved
Hide resolved
radix-engine-tests/tests/application/static_resource_movements_visitor.rs
Show resolved
Hide resolved
* It errors if it can't encode/decode, or can't match the native method/function * Named / reserved addresses work
…ovements-static-analysis
…tic-analysis-rework rework: Rework the manifest resource interpreter
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.
I'm happy to get this merged (not least to unblock my new manifest instruction PR) and to do the follow ups in a separate PR :)
The follow-ups I think are detailed in:
- Comments on this PR: rework: Rework the manifest resource interpreter #1931
- A few oustanding comments on this PR
And notably:
- Complete defining the packages
- Possibly move the type native invocations to the interfaces crate
- Add a test which iterates over every blueprint definition in post-latest DB, and:
- Ensures Completeness: Checks that resolving a native invocation with () results in either a success or a "CantDecode" error.
- Ensures Schema Accuracy: Checks that resolving a schema for the native invocation aligns with the type from the Database.
Summary
This PR adds an analyzer for the resource movements in the manifest.