Git Product home page Git Product logo

ethereumjs-lib's People

Contributors

ebuchman avatar ethers avatar greenkeeperio-bot avatar hexopensource avatar holgerd77 avatar jwasinger avatar kenany avatar kmaschta avatar kumavis avatar manan19 avatar philosoralphter avatar prashantpawar avatar taye avatar toomim avatar vbuterin avatar wanderer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ethereumjs-lib's Issues

mod and bignums

review utils fromSigned and toUnsigned and replace bignum mod with mod()

replace parseInt with bignum, eg

  •    acctData.code = utils.intToBuffer(parseInt(acctData.code, 16));
    
    | + acctData.code = bignum(acctData.code.slice(2), 16).toBuffer();

update docs

We should wait until POC8 is started to do this

getPeers is wrong

getPeers should only send peers wich the recieving peer doesn't konw about

check blooms

the bloom filters need tobe checked after a block is ran in runBlock.

JUMPs, PC to bignum

current assumption is prog counter is an int and uses utils.bufferToInt. should probably convert to bignum.

eg jumpi2 test sets the pc to larger than int

Exception severity uniform: PoC-7

All "unintended" exceptions (including INVALID and stack underflow and bad jump destination) work like OOG, returning with 0 gas remaining

Key point: accessing a PC outside of the code is an implicit '\x00' with is STOP, not INVALID, so returns []

Missing test data

Did someone add to the tests and forget to add the data?

Cannot find module './jsonData/genesishashestest.json'

Full stack trace, after running:

$ npm test

is:

> [email protected] test /Users/username/eth/ethos/lib/ethereumjs-lib
> ./script/jshint.sh && istanbul test ./node_modules/.bin/_mocha -- --reporter list test/*.js test/**/*.js


module.js:340
    throw err;
    ^
Error: Cannot find module './jsonData/genesishashestest.json'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/username/eth/ethos/lib/ethereumjs-lib/test/block.test.js:8:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/mocha/lib/mocha.js:152:27
    at Array.forEach (native)
    at Mocha.loadFiles (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/mocha/lib/mocha.js:149:14)
    at Mocha.run (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/mocha/lib/mocha.js:305:31)
    at Object.<anonymous> (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/mocha/bin/_mocha:327:7)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at runFn (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/command/common/run-with-cover.js:86:16)
    at Object.run (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/command/common/run-with-cover.js:184:9)
    at TestCommand.Command.mix.run (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/command/test.js:27:22)
    at runCommand (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/cli.js:59:19)
    at runToCompletion (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/cli.js:63:5)
    at Object.<anonymous> (/Users/username/eth/ethos/lib/ethereumjs-lib/node_modules/istanbul/lib/cli.js:68:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
npm ERR! Test failed.  See above for more details.
npm ERR! not ok code 0

SSTORE refunds

at the end of a non-OOG execution, an account is refunded min(GASREFUND, floor(gas_used / 2))

How does this project differ from ethereum-lib-node

It seems to be a lot of overlap between the to projects. Is this the case? Is one official or not? is one more feature complete etc etc.

Sorry if an issue is not the right way to interact with the project :)

CallEcrecover2 and ORIGIN

after progcounter 91 Opcode: ORIGIN
AZ pushes 0x29d33c02a200937995e632c4597b4dca8e503978 on the stack

But JS pushes:
a94f5374fce5edbc8e2a8697c15331677e6ebf0b

It doesn't affect the outcome of the test, but should eventually be looked into.

Add Blooms

like so

txLogsBloom(tx):
let B := 0
for each log in [log0, log1, ..., logN]:
let [address, [topic0, topic1, ..., topicN], data] := log
let S := [ sha3(address), sha3(topic0), sha3(topic1), ..., sha3(topicN) ]
for each s in S:
B |= bloom9(s)
return B
logsBloom(b):
let B := bloom9(sha3(coinbase))
for each tx in [tx0, tx1, ..., txN]:
B |= txLogsBloom(tx)
return B
bloom9(s):
R := 0
for i in { 0, 2, 4 }:
R |= 1 << (s[i + 1] + 256 * (s[i] & 1)) // where S[X] is the Xth byte of S
return R

Transaction strictness

Transactions are INVALID if:

v < 27
v > 28
r >= secp256k1n = 115792089237316195423570985008687907852837564279074904382605163141518161494337
s >= secp256k1p = 2256 - 232 - 977

Also applies to proc ecrecover

Fix SIGNEXTEND Maximum call stack size exceeded

  1. [Common]: vmArithmeticTest signextendInvalidByteNumber run code:
    Maximum call stack size exceeded

  2. [Common]: vmArithmeticTest signextend_BigBytePlus1_2 run code:
    Maximum call stack size exceeded

  3. [Common]: vmArithmeticTest signextend_bigBytePlus1 run code:
    Maximum call stack size exceeded

reorg opcode set

this is in the op-reorg branch

runCode.js needs to be updated after the tests repo has been updated

poc7 - JUMP reform

(i) Cannot jump onto a jump
(ii) If a jump is preceded by a push, no jumpdest required;
(iii) jump must be directly onto JUMPDEST
(iv) no destinations into the middle of PUSH

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.