Git Product home page Git Product logo

sputnikvm-dev's Introduction

SputnikVM Developer Environment

Build Status Build status

Development environment based on SputnikVM and etcommon.

Usage

You can either download svmdev from the release page, or build it by yourself by installing Rust, and run cargo run. We currently support Linux and MacOS, and Windows.

USAGE:
    svmdev [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --accounts <ACCOUNTS>      Additional accounts to be generated, default to 9.
    -b, --balance <BALANCE>        Balance in Wei for the account to be generated, default is 0x10000000000000000000000000000.
    -l, --listen <LISTEN>          Listen address and port for the RPC, e.g. 127.0.0.1:8545.
    -k, --private <PRIVATE_KEY>    Private key for the account to be generated, if not provided, a random private key will be generated.

After started, svmdev will print out the address and private key with balance for testing. It will then generate new blocks every ten seconds, and include all pending transactions that yet to be confirmed. You can then use the RPC endpoints below to test your blockchain application.

Supported RPC Endpoints

Below is a list of all the supported RPC endpoints by sputnikvm-dev.

Supported Debug Endpoints

  • debug_dumpBlock
  • debug_getBlockRlp
  • debug_traceBlock
  • debug_traceBlockByNumber
  • debug_traceBlockByHash
  • debug_traceBlockFromFile
  • debug_traceTransaction

sputnikvm-dev's People

Contributors

gagarin55 avatar sorpaas avatar splix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sputnikvm-dev's Issues

Declarative account state

Idea from @pyskell

Allow declarative specify the account state in genesis block. After that, in block 1, also allow declarative executing transactions with the given account state in genesis block.

As all blocks for sputnikvm-dev is stored in memory and is not likely to be very long, create a new set of RPC endpoints that allows to modify account state starting from genesis block. This modification will spread through all blocks and transactions that have already been appended.

eth_getBlockByNumber returns Invalid request

The request

{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending",true],"id":6}

Returns

{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid request"},"id":6}

eth_call: from should be optional

The following parameters for eth_call cause error:

{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x085fb4f24031eaedbc2b611aa528f22343eb52db","data":"0x70a08231000000000000000000000000255573e004be419bd9f9eb481276092423415fa9"},"latest"],"id":18}

Result:

{"jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params: missing field `from`."},"id":18}

Spec says that from field is optional - https://github.com/ethereumproject/wiki/wiki/JSON-RPC#eth_call

Janus build

Allows uploading nightly builds to build.etcdevteam.com

  • Update Appveyor releases deployment access token from @splix.

windows builds are behind

image
i use some really old builds. theres no windows build for v0.2.0-36, im using 26 to support windows for now.

Crashes on eth_estimateGas

Following code with web3.js causes sputnikvm-dev panic:

const callData = {
    from: "0x0000000000000000000000000000000000000000",
    gasPrice: "0x04a817c800",
    gas: "0x5208",
    to: "0x0000000000000000000000000000000000000000",
    value: "0x0de0b6b3a7640000",
    data: "",
  }
  let gas = web3.eth.estimateGas(callData);

Result:

thread 'http.worker0' panicked at 'arithmetic operation overflow', /home/bill/.cargo/registry/src/github.com-1ecc6299db9ec823/etcommon-bigint-0.2.9/src/uint/mod.rs:1184:0
note: Run with `RUST_BACKTRACE=1` for a backtrace.
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "PoisonError { inner: .. }"', /checkout/src/libcore/result.rs:906:4

sputnikvm-dev built by cargo run from master branch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.