-
Notifications
You must be signed in to change notification settings - Fork 95
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
Test safe arithmetic checks in blockchain.rs #202
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh> # Conflicts: # src/interpreter/blockchain.rs
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
vlopes11
reviewed
Sep 2, 2022
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
vlopes11
suggested changes
Sep 14, 2022
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.
looks good overall; small nit
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Voxelot
previously approved these changes
Sep 15, 2022
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
Voxelot
previously approved these changes
Sep 16, 2022
vlopes11
suggested changes
Sep 21, 2022
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.
last nit
Signed-off-by: Mitch Martin <mitch.martin@fuel.sh>
vlopes11
approved these changes
Sep 21, 2022
ControlCplusControlV
pushed a commit
that referenced
this pull request
Nov 24, 2022
* Moved anonymous structures from `Transaction` to own types `Script` and `Create`. Moved all getters from `Transaction` to `Create` and `Script`. Splitted the previous logic of the transaction into traits and implemented traits for `Create` and `Script`. Adapted tests to use generic code or code with exactly expected types. Prepared the code to easily integrate a new `Mint` transaction. TODO: Add support of metadata * Fixed the build for different targets * Make clippy happy * Add some comments * Renamed `Validatable` into `Checkable` and all `validate` into `check` Re-worked `CheckedTransaction`. Introduced a new `Checked` wrapper that allows to wrap any data in generic way. Added covertion to "checked" enum for `Transaction` * Make CI happy * Make clippy happy * Make clippy happy * Added comments. Fixed bug with size of the `Transaciton` * Added static offset methods for fields that supports it. Implemented `Default` for `Script`. Made checked metadata public. Made `Stage` also public to allow writing a generic code. Added input argument to `ConsensusParameters::tx_offset` to highlight breaking work with offsets. * Add support of metadata for offsets * Added check for `serialized_size` * Fix build for all platforms * Added some help functions after integration with `fuel-core` * Added some help functions after integration with `fuel-core` * Fix CI * Highlight that buffer is read here * Added explicit `discriminant` to `Create` and `Script` * Fix compilation with `vec` * Added two helper functions to simplify tests in the `fuel-core` * Removed `Stage` from the `Checked`, replaced with enum. * Forgot about `finalize_checked_stateless` * Removed `discriminant` field after discussion in the PR * Replaced enum with bitmask. The basic checks it a minimal way to create a `Checked` transaction. * Make clippy happy * Private `new` * Added `Mint` transaction without tests * Added tests for `Mint` * Move `TxPointer` to the root, because can be compiled with `alloc` * Fix compilation erros * Swap methods to minimize number of changes * Remove TODO, because it is resovled
ControlCplusControlV
pushed a commit
that referenced
this pull request
Dec 1, 2022
* Moved anonymous structures from `Transaction` to own types `Script` and `Create`. Moved all getters from `Transaction` to `Create` and `Script`. Splitted the previous logic of the transaction into traits and implemented traits for `Create` and `Script`. Adapted tests to use generic code or code with exactly expected types. Prepared the code to easily integrate a new `Mint` transaction. TODO: Add support of metadata * Fixed the build for different targets * Make clippy happy * Add some comments * Renamed `Validatable` into `Checkable` and all `validate` into `check` Re-worked `CheckedTransaction`. Introduced a new `Checked` wrapper that allows to wrap any data in generic way. Added covertion to "checked" enum for `Transaction` * Make CI happy * Make clippy happy * Make clippy happy * Added comments. Fixed bug with size of the `Transaciton` * Added static offset methods for fields that supports it. Implemented `Default` for `Script`. Made checked metadata public. Made `Stage` also public to allow writing a generic code. Added input argument to `ConsensusParameters::tx_offset` to highlight breaking work with offsets. * Add support of metadata for offsets * Added check for `serialized_size` * Fix build for all platforms * Added some help functions after integration with `fuel-core` * Added some help functions after integration with `fuel-core` * Fix CI * Highlight that buffer is read here * Added explicit `discriminant` to `Create` and `Script` * Fix compilation with `vec` * Added two helper functions to simplify tests in the `fuel-core` * Removed `Stage` from the `Checked`, replaced with enum. * Forgot about `finalize_checked_stateless` * Removed `discriminant` field after discussion in the PR * Replaced enum with bitmask. The basic checks it a minimal way to create a `Checked` transaction. * Make clippy happy * Private `new` * Added `Mint` transaction without tests * Added tests for `Mint` * Move `TxPointer` to the root, because can be compiled with `alloc` * Fix compilation erros * Swap methods to minimize number of changes * Remove TODO, because it is resovled
xgreenx
added a commit
that referenced
this pull request
Dec 20, 2022
* Moved anonymous structures from `Transaction` to own types `Script` and `Create`. Moved all getters from `Transaction` to `Create` and `Script`. Splitted the previous logic of the transaction into traits and implemented traits for `Create` and `Script`. Adapted tests to use generic code or code with exactly expected types. Prepared the code to easily integrate a new `Mint` transaction. TODO: Add support of metadata * Fixed the build for different targets * Make clippy happy * Add some comments * Renamed `Validatable` into `Checkable` and all `validate` into `check` Re-worked `CheckedTransaction`. Introduced a new `Checked` wrapper that allows to wrap any data in generic way. Added covertion to "checked" enum for `Transaction` * Make CI happy * Make clippy happy * Make clippy happy * Added comments. Fixed bug with size of the `Transaciton` * Added static offset methods for fields that supports it. Implemented `Default` for `Script`. Made checked metadata public. Made `Stage` also public to allow writing a generic code. Added input argument to `ConsensusParameters::tx_offset` to highlight breaking work with offsets. * Add support of metadata for offsets * Added check for `serialized_size` * Fix build for all platforms * Added some help functions after integration with `fuel-core` * Added some help functions after integration with `fuel-core` * Fix CI * Highlight that buffer is read here * Added explicit `discriminant` to `Create` and `Script` * Fix compilation with `vec` * Added two helper functions to simplify tests in the `fuel-core` * Removed `Stage` from the `Checked`, replaced with enum. * Forgot about `finalize_checked_stateless` * Removed `discriminant` field after discussion in the PR * Replaced enum with bitmask. The basic checks it a minimal way to create a `Checked` transaction. * Make clippy happy * Private `new` * Added `Mint` transaction without tests * Added tests for `Mint` * Move `TxPointer` to the root, because can be compiled with `alloc` * Fix compilation erros * Swap methods to minimize number of changes * Remove TODO, because it is resovled
xgreenx
added a commit
that referenced
this pull request
Dec 20, 2022
* Moved anonymous structures from `Transaction` to own types `Script` and `Create`. Moved all getters from `Transaction` to `Create` and `Script`. Splitted the previous logic of the transaction into traits and implemented traits for `Create` and `Script`. Adapted tests to use generic code or code with exactly expected types. Prepared the code to easily integrate a new `Mint` transaction. TODO: Add support of metadata * Fixed the build for different targets * Make clippy happy * Add some comments * Renamed `Validatable` into `Checkable` and all `validate` into `check` Re-worked `CheckedTransaction`. Introduced a new `Checked` wrapper that allows to wrap any data in generic way. Added covertion to "checked" enum for `Transaction` * Make CI happy * Make clippy happy * Make clippy happy * Added comments. Fixed bug with size of the `Transaciton` * Added static offset methods for fields that supports it. Implemented `Default` for `Script`. Made checked metadata public. Made `Stage` also public to allow writing a generic code. Added input argument to `ConsensusParameters::tx_offset` to highlight breaking work with offsets. * Add support of metadata for offsets * Added check for `serialized_size` * Fix build for all platforms * Added some help functions after integration with `fuel-core` * Added some help functions after integration with `fuel-core` * Fix CI * Highlight that buffer is read here * Added explicit `discriminant` to `Create` and `Script` * Fix compilation with `vec` * Added two helper functions to simplify tests in the `fuel-core` * Removed `Stage` from the `Checked`, replaced with enum. * Forgot about `finalize_checked_stateless` * Removed `discriminant` field after discussion in the PR * Replaced enum with bitmask. The basic checks it a minimal way to create a `Checked` transaction. * Make clippy happy * Private `new` * Added `Mint` transaction without tests * Added tests for `Mint` * Move `TxPointer` to the root, because can be compiled with `alloc` * Fix compilation erros * Swap methods to minimize number of changes * Remove TODO, because it is resovled
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes issue #201