Giter VIP home page Giter VIP logo

conflux-doc's People

Contributors

0xfx01 avatar boqiu avatar fanlong avatar geekberry avatar kitandrew avatar lpl6338236 avatar pana avatar peilun-conflux avatar posaggen avatar resodo avatar sparkmiw avatar thegaram avatar wangdayong228 avatar wanliqun avatar yqrashawn avatar yumingyuan 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

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

conflux-doc's Issues

mining.notify format is different than in docs

Actual mining.notify:

{
"id": 316399, 
"method": "mining.notify", 
"params": 
[
"0xce93239b792b149ae5ee664883fa42ce01f94c4759d666fb096627732a309914", 
"4985137", 
"0xce93239b792b149ae5ee664883fa42ce01f94c4759d666fb096627732a309914",
"0x2641ed57a336dee002ccf83f2b4c1c0d0a7fb3f49cdefaec33d5780"
] 
}

Docs:

Parameters
JOB_ID, hex-string - the identifier of the job.
HASH, 32-bytes - the hash of the PoW problem.
BOUNDARY, U256 - the difficulty boundary of the problem. For a nonce to be valid, the resulting hash must be smaller than the BOUNDARY.
Example

// Request
'{
"jsonrpc":"2.0",
"method":"mining.notify",
"params":
[
"0x4e08db21d43a7696afa3d00ed948568210f3ab3f34673f1d17198625ec175a9c",
"0x4e08db21d43a7696afa3d00ed948568210f3ab3f34673f1d17198625ec175a9c",
"0x1a4e3422948568210f3ab3f34673f1d17198625ec175a9c"
],
"id":3}'

Please update the docs with the correct params representation

The gas price of CREATE vs CREATE2

In the current implementation, the gas price of CREATE and CREATE2 follows the same definition as in Ethereum:
CREATE costs G_create,
CREATE2 costs G_create+G_sha3word × ⌈μ [2] ÷ 32⌉,
where the additional cost of CREATE2 corresponds to hashing on the initialization code of length μ [2] bytes.

Actually, the difference in gas price in Ethereum is introduced because the resultant contract address by CREATE is simply the rightmost 160-bits of Kec(RLP(s,n)) without the hash value of initialization code where as the address by CREATE2 includes such a hash value.

In Conflux we include the hash value of initialization code in both cases of CREATE and CREATE2, so that the discrimination in gas price does not make much sense.
Therefore I think it would be better if we change the price of CREATE to the same as CREATE2.

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.