NDRS-76: remove some nested error variants#17
Merged
Fraser999 merged 2 commits intocasper-network:masterfrom Jun 10, 2020
Merged
NDRS-76: remove some nested error variants#17Fraser999 merged 2 commits intocasper-network:masterfrom
Fraser999 merged 2 commits intocasper-network:masterfrom
Conversation
goral09
reviewed
Jun 10, 2020
marc-casperlabs
approved these changes
Jun 10, 2020
Contributor
marc-casperlabs
left a comment
There was a problem hiding this comment.
Looks good to me now!
mpapierski
pushed a commit
to mpapierski/casper-node
that referenced
this pull request
Nov 30, 2021
…est-1.4.2 Ignore failing test.
casperlabs-bors-ng bot
pushed a commit
that referenced
this pull request
Feb 10, 2023
nctl: fix arithmetic checks when a node is waiting for historical sync
casperlabs-bors-ng bot
pushed a commit
that referenced
this pull request
Feb 29, 2024
* Add information requests and other review changes * Remove mentions of DbId * Remove unused payload types * Cleanup
darthsiroftardis
referenced
this pull request
in darthsiroftardis/casper-node
Mar 28, 2024
Pricing mode ta check
mpapierski
pushed a commit
to mpapierski/casper-node
that referenced
this pull request
Apr 11, 2024
…ints Extend for vm2 entry points.
rafal-ch
pushed a commit
that referenced
this pull request
Sep 11, 2024
* Initial commit * Update README.md * Fuel VM in Rust merging files from original repo refactor impl ethcall completed todos refactor program into interpreter mod carry create2 programs through callframes impl create2 impl codesize based on callframes impl fuel tx init and data handling refactor update init code width impl eth ops impl fuel ops define eth and fuel ops Adding init field to eth tx format define eth account and tx types impl rotate ops sign extend from u16 to u64 impl subi op Sign extend imm val for arithmetic op fix and style impl of srav and sra impl of sltiu and sltu remove unnecessary refs working tx handler define op for data ld and test for tx exec first step of tx execution impl impl addtl tx types minor refactor initial tx format moving from usize to u8 for size types defining serder of eth opcodes advancing notes updating notes cleaner style base impl for all opcodes implement malloc/free, local var, and stack opcodes working call and return architecture improving architecture and execution some code improvements improved stack handling thru mutable references intermediate commit with some types and methods and cleanup intermediate commit for stackframes initial stack impl using values in registers for computations Run programs in loop to completion Update notes Adding tests for u32 bit manipulation Change opcode instructions to 32 bits wide change immediate values to 16-bit wide minor edits tidy completing a few opcode implementations including beq bug fix for tuple return Starting to implement opcodes intermediate commit with opcode deser intermediate commit with opcode ser Update status Adding simple unit tests to memory after execution Working simple execution with memory dump Removing unused const updating notes updating notes refactor u64 funcs to file applying unit tests to serder initial working serder of ADD opcode in program AND serialization and refactoring minor cleanup Adding some indexed methods Initial bit manipulation for opcode ser Intermediate commit to opcode serder Starting trait impl for Opcodes Implement bit manipulation for u64 Enable basic architecture for tests intermediate commit with restructured types for vm components Working memory with hi register splitting out base types adding binary that matches Cargo.toml adding binary that matches Cargo.toml running instance, more cleanup pending next step towards initial commit next step towards initial commit Fuel VM in Rust * Adding new tx format based on FuelLabs/fuel-specs#6 * lifting utxo_id into parent struct * working base ftx test * working new tx format * Adding `stateWitnessIndex` to OutputContract * Working extended Fuel tx contract subtype * impl sha256 Set $of flag in div and mod by 0 Rename of uf flags Rename of uf flags j jr tests xor xori tests sub subi tests sll sllv srl srlv tests or ori tests mult multi test updates to match spec #0d39f49 impl kecakk op Add convenience functions * jump ops memory copy and compare ops impl state opcodes using hashmap refactor overflow into distinct register impl sha256 Set $of flag in div and mod by 0 Rename of uf flags Rename of uf flags j jr tests xor xori tests sub subi tests sll sllv srl srlv tests or ori tests mult multi test updates to match spec #0d39f49 impl kecakk op Add convenience functions * cleanup jnzi test jnz test jump ops memory copy and compare ops impl state opcodes using hashmap refactor overflow into distinct register impl sha256 Set $of flag in div and mod by 0 Rename of uf flags Rename of uf flags j jr tests xor xori tests sub subi tests sll sllv srl srlv tests or ori tests mult multi test updates to match spec #0d39f49 impl kecakk op Add convenience functions * slight adjustment to hashmap access * added very basic gas * ecrecover op * Cfe and Cfs callframe stack opcodes * Add test and format CI (#12) * Add test and format CI. * fmt * Remove test suite unneeded. * Update test CI (#13) * Add private keys for dependencies. * Use minimal toolchain profile. * Use nightly toolchain. * Update opcodes list (#9) * Update opcodes list The opcodes list was outdated and needed to be resync with the specs. https://github.com/FuelLabs/fuel-specs/blob/master/specs/vm/opcodes.md Also, the previous implementation didn't consider the different sizes of immediate values, treating everything as u16. The API still need to improve to prevent users from allocating invalid register values with overflow. Resolves #8 * Update interpreter to latest specs The interpreter is not fully sync with the specs. Also, the functionality scope can be split into different modules to facilitate maintenance of the routines. * Implement interpreter mem and crypto functions Some of the functions contains particularities such as the ecrecover that uses a special encoding regarding the recovery id. These are not native to the public libraries and must be manually handled. * Add test case for keccak256 This new test case is symmetric to the sha256 test case with the crypto primitive as difference. * Add Transaction structure The transaction will define the VM initialization as well as the underlying input/output/contract types. * Implement recoverable secp256k1 signature The EcRecover scheme may benefit from a compression that can save an additional byte of storage. This crypto primitive is implemented using rusk-secp256k1 as backend. * Add MemClearI operation * Rename 32-byte storage ops to "quad word" * Rename opcodes to fit in 4 chars * Add serialization for all tx types * Change VM init to copy tx to stack The initialization of the VM should copy the hash of the transaction, its size and the serialized bytes to the stack area so the execution of the program can access it when required. * Update IO according to specs The specs points that every number should be stored as u64 and the arrays of bytes should be padded to multiples of 8. * Change `crypto::hash` to encapsulate primitive The underlying default hash function of the crypto module should not impact the API and any change in the primitive should be transparent to the users of the interpreter. * Add Log opcode This opcode will perform a naive dump of the selected registers ignoring the zeroed indices. This is a primitive implementation to a more complex log/event/topic tracing system. * Add binary interpreter This binary executes transactions and output the log opcodes. * Add tracing to interpreter execution * Add debug to registers The mutated registers should be print if the log level is set to debug. * Update memcopy to non-overlapping THe `MCP` operation should fail if the memory segments are overlapping. This will allow the internals to benefit from `memcopy` instead of `memmove`. * Add `is_valid` function for all transaction types * Add Tx validation to VM initialization The VM initialization must validate the transaction before the registers and memory are prepared for execution. The TX validation is critical and most of the edge cases must have test coverage. * Optimize code and remove redundant checks * Add Call, CallFrame and MemoryRange The memory range tuples in the VM are expected to behave as start/size pairs. However, Rust uses start/end patterns. The `MemoryRange` type is an abstraction to interface with the values provided by the bytecode operations and Rust memory scheme. The `Call` and `CallFrame` structures will heavily depend on that because they have internal references to owned memory regions. * Add Call opcode implementation The call frames structure and the reflection of a call in the registers and memory is critical to the system and must be broadly tested. This commit introduces the update of the program counter. * Update dependencies to use fuel-* libs The transaction and opcode structs were split into their own libraries. This commit introduces the usage of these libraries as dependencies. * Update ECR to clear err In case of failure, ECRecover should set the recovered public-key to `0` and turn the `err` flag on. In case of success, `$rA` will be set with the recovered public-key and the error flag will be cleared. * Add predicate verification for tx create coin * Add predicate verification Predicate verification should initialize the VM in a special state and execute the opcodes under special constraints defined in the specs. * Remove Travis config. (#14) * Add helper methods for VM executors (#17) * Change LW and SW to multiple of a Word immediate (#16) To maintain consistency with the high-level language, the LW and SW immediate values will be used as word-multiple values instead of raw memory addresses. * Mint and burn (#18) * Add CALL and CCP implementation Both call and ccp relies on contract deployment over the blockchain. These should be included with a refactor over the call frames structure to correctly point to a contract code after a call frame is pushed to the stack. * Fix memory boundaries ownership check The memory ranges are exclusive in the upper bound. This way, the ownership check must reflect that standard for range checks. * Add Mint and Burn opcode execution * Update SW and LW to take imm as words * Update LW and SW to mul word imm with explicit op * Add function to encapsulate external const check * Rename crate to `fuel-core` (#19) `fuel-vm-rust` don't reflect the repo name and this may be confusing under certain contexts. Also, there is no particular reason on why these two names should diverge. * Add data backend traits The VM must be agnostic to the data backend, and this should comply only with a non-restrictive trait. This commit introduces the `Storage` trait. Some of the interpreter functionality will specify implementation requirements for a given Key/Value concrete pair. * Use wrapper type for key structs * Rename to fuel-vm Co-authored-by: John Adler <adlerjohn@users.noreply.github.com> Co-authored-by: Shahan Khatchadourian <shahan.k.code@gmail.com>
rafal-ch
pushed a commit
that referenced
this pull request
Sep 11, 2024
rafal-ch
pushed a commit
that referenced
this pull request
Sep 11, 2024
The program counter is being set relative to the $fp instead of appending to $sp and incrementing both $sp and $ssp Resolves #16
rafal-ch
pushed a commit
that referenced
this pull request
Sep 11, 2024
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Jun 16, 2025
# This is the 1st commit message: Initial wip # The commit message #2 will be skipped: # Basic case working. Pre-fixture tests # The commit message #3 will be skipped: # Initial fixture tests passing # The commit message #4 will be skipped: # Test case passing for disabled versions # The commit message #5 will be skipped: # EE tests passing # The commit message #6 will be skipped: # Additional fixture tests and PR prep # The commit message #7 will be skipped: # Run make format # The commit message #8 will be skipped: # X # The commit message #9 will be skipped: # X # The commit message casper-network#10 will be skipped: # X # The commit message casper-network#11 will be skipped: # X # The commit message casper-network#12 will be skipped: # Add flag to engine config to return error # The commit message casper-network#13 will be skipped: # Add flag to chainspec.toml # The commit message casper-network#14 will be skipped: # Address CI issues # The commit message casper-network#15 will be skipped: # Add contract runtime tests # The commit message casper-network#16 will be skipped: # rebasing with darthsiroftardis/change-package-version-calls # The commit message casper-network#17 will be skipped: # fmt fix # The commit message casper-network#18 will be skipped: # fmt fix # The commit message casper-network#19 will be skipped: # fmt fix
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Jun 16, 2025
# This is the 1st commit message: Initial wip # The commit message #2 will be skipped: # Basic case working. Pre-fixture tests # The commit message #3 will be skipped: # Initial fixture tests passing # The commit message #4 will be skipped: # Test case passing for disabled versions # The commit message #5 will be skipped: # EE tests passing # The commit message #6 will be skipped: # Additional fixture tests and PR prep # The commit message #7 will be skipped: # Run make format # The commit message #8 will be skipped: # X # The commit message #9 will be skipped: # X # The commit message casper-network#10 will be skipped: # X # The commit message casper-network#11 will be skipped: # X # The commit message casper-network#12 will be skipped: # Add flag to engine config to return error # The commit message casper-network#13 will be skipped: # Add flag to chainspec.toml # The commit message casper-network#14 will be skipped: # Address CI issues # The commit message casper-network#15 will be skipped: # Add contract runtime tests # The commit message casper-network#16 will be skipped: # rebasing with darthsiroftardis/change-package-version-calls # The commit message casper-network#17 will be skipped: # fmt fix # The commit message casper-network#18 will be skipped: # fmt fix # The commit message casper-network#19 will be skipped: # fmt fix # The commit message casper-network#20 will be skipped: # refactoring put_key contract # The commit message casper-network#21 will be skipped: # refactoring put_key contract # The commit message casper-network#22 will be skipped: # X
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Oct 13, 2025
# This is the 1st commit message: rebasing # The commit message #2 will be skipped: # WIP # The commit message #3 will be skipped: # WIP # The commit message #4 will be skipped: # wip # The commit message #5 will be skipped: # wip # The commit message #6 will be skipped: # wip # The commit message #7 will be skipped: # wip # The commit message #8 will be skipped: # wip # The commit message #9 will be skipped: # wip # The commit message casper-network#10 will be skipped: # wip # The commit message casper-network#11 will be skipped: # wip # The commit message casper-network#12 will be skipped: # wip # The commit message casper-network#13 will be skipped: # rebasing # The commit message casper-network#14 will be skipped: # wip # The commit message casper-network#15 will be skipped: # wip # The commit message casper-network#16 will be skipped: # wip # The commit message casper-network#17 will be skipped: # wip # The commit message casper-network#18 will be skipped: # wip # The commit message casper-network#19 will be skipped: # wip
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Oct 13, 2025
# This is the 1st commit message: rebasing # The commit message #2 will be skipped: # WIP # The commit message #3 will be skipped: # WIP # The commit message #4 will be skipped: # wip # The commit message #5 will be skipped: # wip # The commit message #6 will be skipped: # wip # The commit message #7 will be skipped: # wip # The commit message #8 will be skipped: # wip # The commit message #9 will be skipped: # wip # The commit message casper-network#10 will be skipped: # wip # The commit message casper-network#11 will be skipped: # wip # The commit message casper-network#12 will be skipped: # wip # The commit message casper-network#13 will be skipped: # rebasing # The commit message casper-network#14 will be skipped: # wip # The commit message casper-network#15 will be skipped: # wip # The commit message casper-network#16 will be skipped: # wip # The commit message casper-network#17 will be skipped: # wip # The commit message casper-network#18 will be skipped: # wip # The commit message casper-network#19 will be skipped: # wip # The commit message casper-network#20 will be skipped: # rebasing # The commit message casper-network#21 will be skipped: # wip # The commit message casper-network#22 will be skipped: # wip # The commit message casper-network#23 will be skipped: # wip
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Oct 13, 2025
# This is the 1st commit message: rebasing # The commit message #2 will be skipped: # WIP # The commit message #3 will be skipped: # WIP # The commit message #4 will be skipped: # wip # The commit message #5 will be skipped: # wip # The commit message #6 will be skipped: # wip # The commit message #7 will be skipped: # wip # The commit message #8 will be skipped: # wip # The commit message #9 will be skipped: # wip # The commit message casper-network#10 will be skipped: # wip # The commit message casper-network#11 will be skipped: # wip # The commit message casper-network#12 will be skipped: # wip # The commit message casper-network#13 will be skipped: # rebasing # The commit message casper-network#14 will be skipped: # wip # The commit message casper-network#15 will be skipped: # wip # The commit message casper-network#16 will be skipped: # wip # The commit message casper-network#17 will be skipped: # wip # The commit message casper-network#18 will be skipped: # wip # The commit message casper-network#19 will be skipped: # wip # The commit message casper-network#20 will be skipped: # rebasing # The commit message casper-network#21 will be skipped: # wip # The commit message casper-network#22 will be skipped: # wip # The commit message casper-network#23 will be skipped: # wip # The commit message casper-network#24 will be skipped: # wip # The commit message casper-network#25 will be skipped: # wip # The commit message casper-network#26 will be skipped: # wip # The commit message casper-network#27 will be skipped: # wip # The commit message casper-network#28 will be skipped: # wip # The commit message casper-network#29 will be skipped: # wip
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Oct 13, 2025
# This is the 1st commit message: rebasing # The commit message #2 will be skipped: # WIP # The commit message #3 will be skipped: # WIP # The commit message #4 will be skipped: # wip # The commit message #5 will be skipped: # wip # The commit message #6 will be skipped: # wip # The commit message #7 will be skipped: # wip # The commit message #8 will be skipped: # wip # The commit message #9 will be skipped: # wip # The commit message casper-network#10 will be skipped: # wip # The commit message casper-network#11 will be skipped: # wip # The commit message casper-network#12 will be skipped: # wip # The commit message casper-network#13 will be skipped: # rebasing # The commit message casper-network#14 will be skipped: # wip # The commit message casper-network#15 will be skipped: # wip # The commit message casper-network#16 will be skipped: # wip # The commit message casper-network#17 will be skipped: # wip # The commit message casper-network#18 will be skipped: # wip # The commit message casper-network#19 will be skipped: # wip # The commit message casper-network#20 will be skipped: # rebasing # The commit message casper-network#21 will be skipped: # wip # The commit message casper-network#22 will be skipped: # wip # The commit message casper-network#23 will be skipped: # wip # The commit message casper-network#24 will be skipped: # wip # The commit message casper-network#25 will be skipped: # wip # The commit message casper-network#26 will be skipped: # wip # The commit message casper-network#27 will be skipped: # wip # The commit message casper-network#28 will be skipped: # wip # The commit message casper-network#29 will be skipped: # wip # The commit message casper-network#30 will be skipped: # wip # The commit message casper-network#31 will be skipped: # wip # The commit message casper-network#32 will be skipped: # wip
zajko
added a commit
to zajko/casper-node
that referenced
this pull request
Oct 13, 2025
# This is the 1st commit message: rebasing # The commit message #2 will be skipped: # WIP # The commit message #3 will be skipped: # WIP # The commit message #4 will be skipped: # wip # The commit message #5 will be skipped: # wip # The commit message #6 will be skipped: # wip # The commit message #7 will be skipped: # wip # The commit message #8 will be skipped: # wip # The commit message #9 will be skipped: # wip # The commit message casper-network#10 will be skipped: # wip # The commit message casper-network#11 will be skipped: # wip # The commit message casper-network#12 will be skipped: # wip # The commit message casper-network#13 will be skipped: # rebasing # The commit message casper-network#14 will be skipped: # wip # The commit message casper-network#15 will be skipped: # wip # The commit message casper-network#16 will be skipped: # wip # The commit message casper-network#17 will be skipped: # wip # The commit message casper-network#18 will be skipped: # wip # The commit message casper-network#19 will be skipped: # wip # The commit message casper-network#20 will be skipped: # rebasing # The commit message casper-network#21 will be skipped: # wip # The commit message casper-network#22 will be skipped: # wip # The commit message casper-network#23 will be skipped: # wip # The commit message casper-network#24 will be skipped: # wip # The commit message casper-network#25 will be skipped: # wip # The commit message casper-network#26 will be skipped: # wip # The commit message casper-network#27 will be skipped: # wip # The commit message casper-network#28 will be skipped: # wip # The commit message casper-network#29 will be skipped: # wip # The commit message casper-network#30 will be skipped: # wip # The commit message casper-network#31 will be skipped: # wip # The commit message casper-network#32 will be skipped: # wip # The commit message casper-network#33 will be skipped: # wip # The commit message casper-network#34 will be skipped: # wip # The commit message casper-network#35 will be skipped: # wip # The commit message casper-network#36 will be skipped: # wip # The commit message casper-network#37 will be skipped: # wip # The commit message casper-network#38 will be skipped: # wip # The commit message casper-network#39 will be skipped: # wip # The commit message casper-network#40 will be skipped: # rebasing
This file contains hidden or 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
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.
This addresses some of the review comments by @marc-casperlabs on #16.