| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support multiple VMs, there must be a shared execution environment for each VM,
so this pull request moved some shared component to vm.Context and
implemented the vm.ExecPack to hold the list of VM, list of VM configures,
context and some shared resources.
The adjustment includes:
* Move NoRecursion, Depth, ReadOnly, RandCallIndex, IntPool and CallGasTemp to Context.
* Adjust VM enumeration from byte to uint8, and the VMList from map to
array.
* Register VM constructor in each VM package's init function.
* Initialize all VM instance in NewExecPack.
* Remove EVMImplement, and modify EVM, such that EVM can do the same
functions with EVMImplement.
|
| |
|
|
|
| |
core: vm: sqlvm: remove underflow error
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Add `opFunc` as built-in funtions entry point.
|
|
|
|
| |
Add `opNeg` supports operand negative.
|
|
|
|
| |
Add `opConcat` supports dynamic bytes (string) concating.
|
|
|
|
|
| |
Add `opRange` which supports row range evaluation, such as `LIMIT` and
`OFFSET`.
|
|
|
|
| |
Add `opCut` which supports slice cutting.
|
|
|
|
|
| |
To reduce redundant information in template source data, we pre-process
source data and generate target information before rendering.
|
|
|
|
|
| |
Names will be mapped to references after parsing. Use references in hash
will have better performance.
|
|
|
|
|
|
|
| |
In the context of vm module, we usually access vm.StateDB interface
object instead of state.StateDB directly. Also, state.StateDB is usually
passed with pointer and used with pointer receiver. Implement the
similar behavior on Storage object.
|
|
|
|
|
| |
Sometimes we need a stream reader writer for the data on storage. For
example, RLP decode the data on storage. Implement a wrapper around it.
|
|
|
|
|
| |
Add methods for ACL control and index meta loading. These methods will
be used outside runtime, so put them on Storage.
|
| |
|
|
|
|
|
| |
The original limit values are so wrong. We fix the values, rename
parameters according to Go's limit values naming rule.
|
|
|
|
|
| |
Because decimalDecode modifies input data, we should make a copy first
to prevent side effect.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We reduce code of funtion call and nested struct initialization by
generating testcases with go template system.
Run `go run cmd/gen-op-test/main.go` first before testing instructions,
and commit generated code for fully testing on CI.
|
|
|
|
|
| |
For runtime implementation, we define opcodes and basic structs for
runtime usage and concrete implementation.
|
|
|
|
|
|
| |
* Remove STOREPK.
* Split STORE to UPDATE and INSERT.
* Remove the examples.
|
|
|
|
|
| |
To satisfy the latest spec, the data of type of address and fixed bytes will
be stored in bytes instead of decimal value.
|
|
|
|
|
|
| |
Refine behaviors:
1. Check decimal.NewFromString by type instead of string compare.
2. Use Rescale in DecimalEncode.
|
| |
|
|
|
|
| |
It is allowed to declare multiple foreign key constraints on a column.
|
|
|
|
|
| |
It will be used to store the descriptor of the object after the name is
resolved.
|
|
|
|
|
|
| |
We make the zero value invalid by design. Users must be aware of the
difference between SQL boolean and Go boolean and initialize it
explicitly.
|
|
|
|
|
|
|
|
| |
SQL uses three-valued logic which includes an unknown state. To prevent
the reader of the code from confusing the unknown value with the unknown
data type defined here, we rename 'unknown' data type to 'pending'
because it is intended to be used by nodes whose type has not been
determined.
|
|
|
|
|
| |
It is the last test function which doesn't mention what kind of data it
operates on.
|
|
|
|
|
|
| |
It is unsafe to write a map concurrently. Even if it is unlikely for us
to call it from multiple threads, it is better to avoid providing an
thread-unsafe API when it is possible.
|
|
|
|
|
|
|
|
| |
Since we have dropped DataTypeEncode in favor of GetType method of
TypeNode, rename DataTypeDecode to GetNode and make it a method.
Drop unnecessary zero checks because we don't care minor bytes when
there is only one type belong to a category.
|
|
|
|
|
|
| |
Since we have both DataType and Decimal functions in this file, we
should avoid using generic names such as TestEncode and TestDecode
without mentioning what types are going to be tested.
|
|
|
|
|
|
|
|
| |
To allow callers to provide precise error messages, return an error
message in addition to an error code from GetType of TypeNode.
Drop DataTypeEncode because it is never used by any code and it has
become a simple wrapper of GetType.
|
|
|
|
| |
We will add more methods to DataType.
|
|
|
|
| |
It is a special field which should not be accessed by any other files.
|
| |
|
|
|
|
| |
Keep them consisitent with ast/types.go.
|
|
|
|
|
| |
* If first byte is not VM enum, we should reserve it as checking VM type.
* Remove debug print.
|
|
|
|
|
| |
deciaml.IntPart() returns int64, so we have to implement a function to
convert deciaml to uint64 for reading primary id from Raw.
|
| |
|
|
|
|
|
| |
Implement some storage utility functions, including
shift slot, get dynamic byte and get primary key hash.
|
|
|
|
|
| |
Since we have to packing our data in slot, it needs to calculate each
column field's slot and byte offset.
|
|
|
|
| |
Implement load register to input operands, before each op.
|
|
|
|
| |
Move error code to errors.go, and implement Size method for column field.
|
|
|
|
|
| |
It is possible that the number to encode is produced by arithmetic
operations and has negative exponent even when it is an integer.
Properly handle this case and modify test cases to check it.
|
|
|
|
|
| |
These structs will be used in identifier nodes to store references to
objects defined in the schema or the command itself.
|
|
|
|
|
|
|
| |
In order to check foreign keys efficiently during deletion, an index
should be marked when it is referenced by foreign keys. Since we now
have flags which cannot be declared directly from the source code, two
helper functions are added to distinguish between two groups of flags.
|
|
|
|
|
| |
Reorder fields and enums according to the grammar file to make it easier
to check whether all features supported by the grammar are implemented.
|
|
|
|
|
|
|
| |
The number of tables, columns, indices are all limited to 256, so we
don't have to do much memory copying during appending. Drop pointers
from slices to save memory for storing pointers and possibly improve
locality.
|
|
|
|
|
|
| |
ORDER BY and GROUP BY options have to decide whether an expression is a
reference to the column specified in SELECT command by checking whether
it consists of only one integer literal.
|
|
|
|
|
|
|
| |
So Parse now returns a []ast.StmtNode instead of a generic []ast.Node,
which should be clearer on what the return value looks like. This also
adds a field recording the verb use to identify the statement in order
to provide better error messages.
|
|
|
|
|
|
|
|
| |
Now both position and length are both recorded in the error struct,
recording the token in the error struct no longer provides any benefit.
It is easy to find the token when position and length are known, but
requiring all error locations to fill the field is complicated because
they have to access the source code to find the token.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Provide ESCAPE grammar for specifying escape character in like pattern
matching.
|
|
|
|
|
| |
When an error corresponds to a source code token, it should be able to
report the length of the token in addition to the position.
|
|
|
|
|
| |
Since we traverse an AST by calling functions recursively, we have to
protect the parser by limiting the depth of an AST.
|
|
|
|
|
|
|
|
| |
Code generated by pigeon includes many exported symbols which should not
be used by any other code other than the parser itself. To prevent them
from being misused, we used to hide them by editing the generated code
with sed. This commit removes the unreliable sed trick by putting
generated code to internal package.
|
|
|
|
|
|
|
| |
In addition to changes required to move DataTypeEncode and
DataTypeDecode to use TypeNode interface, this commit also unifies the
meaning of 'Size' field in 'FixedBytesTypeNode'. It always counts the
length in bytes now.
|
| |
|
|
|
|
|
|
| |
These symbols are allowed in Microsoft SQL or PostgreSQL, but the SQL
standard doesn't mention them. It is still possible to use these symbols
as identifiers by putting them in double quotes.
|
|
|
|
|
| |
The size of table in db and column/index/sequence in a table is bounded
by uint8. Define types for better readability.
|
|
|
|
| |
Catch the error reported by fmt.Fprintf and report it to the caller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now all AST nodes should have position information recorded during
parsing. These fields are intended to be used to report errors and make
debugging easier. However, precise location of each token is currently
unavailable. It can be done in the future if it becomes necessary.
To make it easier to traverse an AST, GetChildren is modified to skip
nil nodes in the output. This means callers of GetChildren don't have
to check for nil in returned slices.
AST printer is modified to print the position and the corresponding
source code token. A few special handling for interfaces are removed
because reflection works better for structs.
|
|
|
|
|
|
|
| |
Since all nodes must be declared as pointers to satisfy the interface,
it is no longer meaningful to use value receivers. It should make the
code look more consistent and reduce the amount of memory copying
during function calls because these structs takes at least 8 bytes.
|
|
|
|
|
|
| |
Since our 'Node' interface includes methods which must be implemented
with pointer receivers, all AST nodes are now referenced with pointers
and the '*' pointer indicator is no longer useful.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit implements isAddress function to allow a number literal to
be considered as an address literal. Since Solidity only allows '0x' to
be written in lower case, we remove the handling of upper case '0X' to
keep the behavior in sync with Solidity.
In addition to isAddress implementation, this commit also removes
'String' methods from AST nodes to prevent them from implementing the
builtin 'Stringer' interface. Therefore, our AST printer is now able to
print struct fields of value nodes instead of only one string.
|
|
|
|
|
|
|
|
|
| |
In order to make our AST easier and safer to use, all declarations with
empty interface type are now removed.
This changes also makes it possible to traverse the AST without using
reflection or understanding what each type means because all AST nodes
have at least one common interface.
|
|
|
|
| |
Return error.Error to reveal more information about returned error.
|
|
|
|
|
| |
To cover the pitfall of decimal.fromString, we need to add leading 0 at
'^\.[0-9]+' case.
|
| |
|
|
|
|
|
| |
The data range is deterministic for specific type, `GetMinMax` is
helper function to generate min, max value for clients.
|
| |
|
| |
|
|
|
|
|
| |
Modify Tuple.Data.Value type from *big.Int to interface{}
and remove Max, Min.
|
|
|
|
|
|
|
| |
After reconstructing commits, we move shared interfaces and params as
first runtime implementation. In this commit we define OP codes, runtime
flow and entrypoint, and basic operand structs and minor helper
components.
|
|
|
|
| |
Implement schema struct and handle its rlp serialization.
|
|
|
|
|
|
|
|
| |
Add encoder/decoder to convert between decimal and bytes. Also handle
issues below.
* Signed & Unsigned
* Padding
* Floating point of fixed
|
|
|
|
|
| |
Implement encode & decode function to convert between type node and
2-bytes type described on spec.
|
|
|
|
|
| |
It is now possible to write AST dump to a writer other than stdout and
use indent string other than 2 spaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Our parser is able to process queries with invalid UTF-8, provided that
it is compatible with ASCII. Since doing so requires encoding the input
before passing to pigeon, Parse* functions generated by pigeon are
unexported because they should not be used directly.
Escape sequences in string literals and identifiers are now recognized.
In addition to escape sequences supported by solidity, we support \U
similar to the one supported by Go to allow users to specify non-BMP
Unicode code point without using multiple \x escapes.
AST printer is modified to quote non-printable characters in strings to
prevent control characters from messing up the terminal.
|
|
|
|
|
|
| |
Instead of ignoring errors, errors returned from external functions are
normalized and reported to users. Errors which should be impossible to
occur are converted to panic calls.
|
|
|
|
|
|
|
| |
There are some changes in print ast utility.
1. instead of using optional interface to get detail, use reflect
2. implement a `print` field tag for printer switching detail mode or
not
|
|
|
|
|
|
|
|
| |
In order to avoid putting too many different things in single package
and allow other projects to reuse the syntax tree and the parser, these
two components are moved to different packages and all nodes used in AST
are now exported. A lot of comments are added in this commit to pass
golint checks.
|
|
|
|
|
|
| |
This tool is good enough to format our sqlvm grammar file. It is not
guaranteed to work for all valid pigeon files, and it only process
multi-line Go code blocks.
|
|
|
|
|
|
|
|
|
| |
Add sql language parser prototyping along with
1. grammar file implemented with github.com/mna/pigeon
2. ast node struct definition
3. simple parser test which only test if error existed
4. ast printer utility for visualizing parsing result
|
| |
|
|
|
|
|
| |
Extract stateDB and contract out from core/vm/evm to core/vm,
such that other vm type can use the common modules.
|
|
|
|
|
| |
For support other vm types, this pr modified the core/vm file
structures.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Move panic call to immediate location of the error to prevent
accidententaly panic on other conditions.
|
| |
|
| |
|
|
|
|
|
|
| |
* core: vm: prevent setting owner to blackhole
* core: vm: same for transferNodeOwner
|
|
|
|
|
|
|
|
| |
* vendor: sync to latest core
* core: implmenet dkg success
* cmd: govtool: add DKGSuccess
|
|
|
|
|
| |
By storing array offset in the original DKGMasterPublicKeyProposed map,
we can locate MPK by proposer ID easily.
|
|
|
|
| |
Cache GPK so one can not slow the chain down with the ProposeCRS method
call.
|
|
|
|
|
| |
Since deserializing DKG related items are extremely slow (takes about 3
seconds for 100 items), we cache it in the governance interface.
|
|
|
|
|
| |
* core: vm: fineFailStopDKG if MPK not registered
* prevent on-chain randomness
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
A node is now quailified only if it has no pending fine and staked >=
minstake.
|
|
|
|
|
| |
* dex: rebuild connection if dkg reset
* core: vm: fix governance contract
|
|
|
|
|
|
| |
* core: vm: update set size on node info change
* fix typo
|
|
|
|
|
|
|
|
| |
* vendor: sync to latest core
* core: merge notarySet and dkgSet
* dex: optimize network traffic for finalized block
|
| |
|
|
|
|
|
|
|
|
| |
* vendor: sync to latest core
* core/vm: remove addDKG functions
* core: fix conflict
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since a qualified node might fail stopped, we need to remove them from
qualified nodes to maintain network integrity. We do this by inspect the
previous round to see if there are dead nodes. A dead node is a notary
set node that does not propose any block in the previous round. We
disqualify them by fining them so their staked value is 1 wei below
minStake. This make them unqualified for being notary set in the follow
on rounds.
|
| |
|
| |
|
|
|
|
| |
Add two maps to check the uniqueness of DKGMasterPublicKey and DKGComplaints to
prevent malicious actors from spamming it.
|
| |
|
|
|
|
|
|
| |
* vendor: sync to latest core
* core: check dkg reset
|
| |
|
|
|
|
|
|
|
|
|
| |
* dex: implement recovery mechanism
The DEXON recovery protocol allows us to use the Ethereum blockchain as a
fallback consensus chain to coordinate recovery.
* fix
|
| |
|
| |
|
|
|
|
|
| |
Since the VM might be called from different source (downloader, RPC,
etc.). We need to make the call state separate. Modify the calling
sequence so a new oracle contract instance is used on each run.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current delegation mechanism are prone to unstaking attack. i.e. a
malicious attacker could unstake a small amount from a lot of node it
staked before and make them unqualified, which leads to potential
failure of the network.
Since DEXON does not use consensus like DPoS, node is required to have
at least MinStake in order to become a node. Voting mechanism is not
required in our system since qualified node does not depends on the
number of votes. Instead of managing the delegation mechanism in
governance contract, we should let the owner manage the delegation and
reward distribution mechanism on their own.
|
| |
|
| |
|
|
|
| |
Also remove app_test.go because of the refactor bojie@ is working on.
|
|
|
|
|
|
| |
There are two keys in the system: one is the owner's key which is used
for stake / unstake. The other is the node key which is used for DKG
related operations. We need to allow them to be different so fund
renmains safe even if the the node key is lost.
|
| |
|
|
|
|
|
| |
* vendor: sync to latest core
* fix for single chain
|
|
|
|
|
|
|
|
|
|
| |
* core/vm: update abi
* core/vm: add MinGasPrice to gov
* params: Add MinGasPrice to Config
* dex: SuggestPrice from Governance
* test: add minGasPrice to genesis.json
* core: check underpriced tx
* dex: verify with gas price
|
|
|
|
|
|
| |
* change default sync_core.sh
* vendor: sync to latest core
* core: Remove K, Phi and NumChain
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* vm: Update gov abi
* vm: Add DKGResetCount to state helper
* vm: add getter
* vm: Add DKGReset event
* vm: Add resetDKG method
* vm: check resetDKG criteria
* vm: Add new CRS
* vm: add helper pop2DByteArray
* vm: emit event
* vm: Add CoreMock to GovernanceContract
* vm: bug fix
* add test for resetDKG
* vm: Add test
* fix test
* Modify mock interface
|
|
|
|
|
|
| |
* core/vm: add delegatorAddr to withdrawn event
* core/vm: update gov abi
* core/vm: add NodeRemoved event
|
| |
|
| |
|
|
|
|
| |
To prevent attacker from sending TX through a intermediate contract.
Always use the original tx sender's adddress and nonce.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original algorithm used for calculating algorithm is vulnerable to
cross context re-entry attack. Example as follows:
contract B {
event Value(uint256 value);
uint256 public value;
function call() public {
value = rand;
emit Value(value);
}
}
contract A {
function randTwice(address bAddr) public {
B b = B(bAddr);
b.call.gas(100000)();
b.call.gas(100000)();
}
}
The two `b.call` will result in the same randomness value. This commit
fix the issue by recording a called index used to store how many times
opRand is called, and use it as argument to the Keccak call.
|
|
|
|
| |
Instead of having BP to send a tx to register the round height, just
modify the state when finalizing block.
|
|
|
|
|
|
|
|
| |
(#168)
Refactor GenerateDexonChain function, move governance tx logic to
the user of GenerateDexonChain (testchain_test.go) and move fake node set
code to FakeDexcon.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add totalSupply and totalStaked in the governance contract for the
preperation of DEXON cryptoeconomics 4.0.
Also removed the unstaked variable in node info and improve tests for
delegate/undeleate.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* core/vm: Add Fined field to nodeInfo.
* core/vm: Add PayFine to Governance
* Not qualify if staked-fine < minStake()
* Add test for fine
* Update genesis hash
|
|
|
|
|
|
|
| |
Merging these commits in DEXON consensus core:
- https://github.com/dexon-foundation/dexon-consensus/commit/dce509a13ef5873b9cae3c1cabdb97e219b6fb7d
- https://github.com/dexon-foundation/dexon-consensus/commit/6d1c1aeea0d3e75d10cbb2712c68b4c422ba8ba6
- https://github.com/dexon-foundation/dexon-consensus/commit/c1ed57c4abaf1f4758e52f082bb7114ad00c8b39
|
|
|
|
|
|
| |
* core/vm: Add DKGMPKReady
* param: update GenesisHash
* vendor: sync to latest core
|
| |
|
|
|
|
|
| |
Only allow a user to withdraw funds after a certain lockup
period. This way, the fund of a bad actor could be confiscated before he
could escape.
|
| |
|
| |
|
|
|
|
|
| |
Since we use -1 to represent the offset of empty value, we should make
the return type int256 instead of uint256.
|
|
|
|
|
| |
Implement delegate/undelegate function to allow others to delegate it's
fund to stake on a node. Also added governance contract tests.
|
|
|
|
|
|
| |
Fix gas calculation in governance contract.
Correctly register round height when processing pending blocks. We
should register the mapping when we get the pending block instead of
waiting for block confirmation.
|
| |
|
|
|
|
|
| |
InsertChain() need to record the correct roundHeight mapping in order to
process snapshotRoundHeight() governance method correctly.
|
|
|
|
|
| |
* vendor: sync consensus core
* core: validate DKG set with correct nodeset in round-2
|
|
|
|
|
|
|
| |
* core: vm: add an EVM benchmark
* core: vm: optimize stack allocation and instruction for calculating 2^n
* Add DEXONBet bench
|
|
|
|
|
|
|
| |
* core: push height of round 0 in genesis block
* vm: fix governance dispatch method name mismatch with abi
also rename RoundHeightLoc to roundHeightLoc
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
DEXON has a built-in on chain random oracle that allow one to retrieve a
random variable. Add a new opcode `RAND` to load the random variable
onto the stack.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This PR adds a new fork which disables EIP-1283. Internally it's called Petersburg,
but the genesis/config field is ConstantinopleFix.
The block numbers are:
7280000 for Constantinople on Mainnet
7280000 for ConstantinopleFix on Mainnet
4939394 for ConstantinopleFix on Ropsten
9999999 for ConstantinopleFix on Rinkeby (real number decided later)
This PR also defaults to using the same ConstantinopleFix number as whatever
Constantinople is set to. That is, it will default to mainnet behaviour if ConstantinopleFix
is not set.This means that for private networks which have already transitioned
to Constantinople, this PR will break the network unless ConstantinopleFix is
explicitly set!
|
| |
|
|
|
|
| |
filesystem
|
| |
|
|\
| |
| | |
core/vm: check empty in extcodehash
|
| | |
|
|/ |
|
|
|
|
| |
This fixes the import cycle build error in core/vm tests.
There is no need to refer to core/vm for a type definition.
|
|
|
|
|
|
|
| |
This adds the global accumulated refund counter to the standard
json output as a numeric json value. Previously this was not very
interesting since it was not used much, but with the new sstore
gas changes the value is a lot more interesting from a consensus
investigation perspective.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* first impl of eth_getProof
* fixed docu
* added comments and refactored based on comments from holiman
* created structs
* handle errors correctly
* change Value to *hexutil.Big in order to have the same output as parity
* use ProofList as return type
|
| |
|
| |
|
|
|
|
|
|
| |
* core/vm : fix failing testcase
* core/vm: fix nitpick
|
|
|
|
|
|
|
|
| |
* core/vm: create2 address generation tests
* core/vm: per byte cost of CREATE2
* core/vm: fix linter issue in test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* core/vm/runtim: benchmark create/create2
* core/vm: do less hashing in CREATE2
* core/vm: avoid storing jumpdest analysis for initcode
* core/vm: avoid unneccesary lookups, remove unused fields
* core/vm: go formatting tests
* core/vm: save jumpdest analysis locally
* core/vm: use common.Hash instead of nil, fix review comments
* core/vm: removed type destinations
* core/vm: correct check for empty hash
* eth: more elegant api_tracer
* core/vm: address review concerns
|
| |
|
|\
| |
| | |
Eip1283
|
| | |
|
| | |
|
| | |
|
|/
|
|
|
| |
Interpreter initialization is left to the PRs implementing them.
Options for external interpreters are passed after a colon in the
`--vm.ewasm` and `--vm.evm` switches.
|
| |
|
|
|
|
|
| |
Makes Interface interface a bit more stateless and abstract.
Obviously this change is dictated by EVMC design. The EVMC tries to keep the responsibility for EVM features totally inside the VMs, if feasible. This makes VM "stateless" because VM does not need to pass any information between executions, all information is included in parameters of the execute function.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opcode (#17538)
This commit does a few things at once:
- Updates the tests to contain the latest data from ethereum/tests repo.
- Enables Constantinople state tests. This is needed to be able to
fuzz-test the evm with constantinople rules.
- Fixes the error in opSAR that we've known about for some time. I was
kind of saving it to see if we hit upon it with the random test
generator, but it's difficult to both enable the tests and have the
bug there -- we don't want to forget about it, so maybe it's better
to just fix it.
|
| |
|
| |
|
|
|
|
| |
antything --> anything
:P
|
|
|
|
|
|
| |
- Update benchmarks to use a pool of int pools.
Unless benchmarks are aborted with segmentation fault.
Signed-off-by: Hyung-Kyu Choi <hqueue@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
- Define an Interpreter interface
- One contract can call contracts from other interpreter types.
- Pass the interpreter to the operands instead of the evm.
This is meant to prevent type assertions in operands.
|