Coder Social home page Coder Social logo

eth-proof's Introduction

History of Ethereum Classic

This repository contains the historical data regarding Ethereum Classic.

I've decided to write a little bit about the history of ETC because right now the information is pretty scattered and you have to search for old reddit articles, youtube videos, and others resources to find the information about ETC's past. Sometimes you'll even think you know the history only to later find out there was so much more, but the resources you've read did not mention any of it.

I'm sure there are many things I don't yet know, some of the stories could be inaccurate and I've probably forgotten many things that should be mentioned. This is why I've decided to share write it as a collection of markdown files and put them in a GitHub repository to encourage others to contribute.

The story of ETC is very interesting - better than many movies I've watched - so I encourage you to read it.

I've decided to break the history down in 4 phases to make it a bit easier to grasp the high level of what was happening and through which stages the currency went.

Chapters

I hope you all learn something new. Feel free to fork and open a Pull Request and contribute to the history repository.

eth-proof's People

Contributors

belfordz avatar maxrobot avatar meowsbits avatar michaelallenwarner avatar shanejonas avatar shirikatsu avatar stevanlohja avatar zmitton 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

eth-proof's Issues

Error: the string "transaction not found" was thrown, throw an Error :)

trying to write some tests for a contact and getting this error at this line:

let proof = await eP.getTransactionProof(txHash);

 Error: the string "transaction not found" was thrown, throw an Error :)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

txHash is the hash of a previous transaction. the error seems like txHash isn't valid, but it should be.

here's where I'm generating the txHash:

    	let holdBalanceHash = await contract.holdSafeBalanceForType(10, 1, 100, {from: addressA});
        txHash = holdBalanceHash.tx;

txHash seems to be ok, so I'm not sure where this is going wrong.
any help is much appreciated!

remove ethereumjs-util's huge dependency tree

Is your feature request related to a problem? Please describe.
replace it with another utils library

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Receipt Proofs do not verify many blocks on main net

Attempting to do a simple build and verify of receipt proofs fail on blocks that seem to have too many transactions. Transaction trie proofs work completely perfectly but receipt trie proofs only work some of the time.

eP = new EP(new Web3.providers.HttpProvider("https://gmainnet.infura.io"));
web3 = new Web3(new Web3.providers.HttpProvider("https://gmainnet.infura.io"));
block = await web3.eth.getBlock(5992178);
eP.getReceiptProof(block.transactions[0]).then( (proof) => {
    verified = EP.receipt(proof.path, proof.value, proof.parentNodes, proof.header, proof.blockHash);
})

This verification fails.

I've forked the repository and added a function that returns the constructed trie root hash and have confirmed that the root node hash does not hash to the value present in the block.

This means that the trie construction must be faulty for some cases. Other blocks that contain few transactions like block 1000002 verify successfully for some reason.

Please attempt to do a receipt verification on any receipt in the block specified in the code above and see if it fails to verify or not.

web3 1.0 usability (this.provider.sendAsync is not a function)

I'm trying to build a proof using a web3 1.0 provider:

const epA = new EthProof(providerA);
const _providerB = `http://${truffleConf.developmentB.host}:${truffleConf.developmentB.port}`;
const providerB = new Web3.providers.HttpProvider(_providerB);

...

epB.getTransactionProof(depositBlock.transactions[0])
.then((proof) => {
   console.log('proof', proof);
})

Which gives me the following error:

TypeError: this.provider.sendAsync is not a function
    at RequestManager.sendAsync (/Users/alexmiller/Projects/trustless-relay/node_modules/eth-proof/node_modules/web3/lib/web3/requestmanager.js:80:19)
    at Eth.send [as getTransaction] (/Users/alexmiller/Projects/trustless-relay/node_modules/eth-proof/node_modules/web3/lib/web3/method.js:141:42)
    at Promise (/Users/alexmiller/Projects/trustless-relay/node_modules/eth-proof/buildProof.js:152:21)
    at Promise (<anonymous>)
    at BuildProof.getTransactionProof (/Users/alexmiller/Projects/trustless-relay/node_modules/eth-proof/buildProof.js:149:10)
    at Context.it (/Users/alexmiller/Projects/trustless-relay/test/relay.js:203:11)
    at callFnAsync (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runnable.js:371:21)
    at Test.Runnable.run (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runnable.js:318:7)
    at Runner.runTest (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:443:10)
    at /usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:549:12
    at next (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:361:14)
    at /usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:371:7
    at next (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:295:14)
    at Immediate.<anonymous> (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/runner.js:339:5)
    at runCallback (timers.js:781:20)
    at tryOnImmediate (timers.js:743:5)
    at processImmediate [as _immediateCallback] (timers.js:714:5)

I'm trying to figure out why this would be, but I think it's because I'm using web3 1.0. I'll try to dig into this more, but putting in this issue in case there's an incompatibility issue here.

ReferenceError: Buffer is not defined

Hey I m using this package with react-native and i am facing this problem when i import something from this package like this
import {GetProof} from 'eth-proof';
it throw error is it this package was supported for react-native

Proof of absence

The proper way to deal with proof-of-absence, is to update the merkle-patricia-tree module. This is the next step. Correct behavior of that module for get() for an key who's value is undefined should be to return <buffer > because its the buffer representation of null.

Centralized RPC Providers

edit

fixed! infura now supports this


At time of this writing neither Infura nor any RPC provider's support eth_getProof, but infura should in the very near future. ETC chain supports the call iff using multigeth, but against no service central services are known to be running it.

Implications

getting storage Proofs and Account proofs wont work unless your RPC provider supports eth_getProof. Solution is to run geth/parity-ethereum/multigeth locally for those Additionally it needs to be a full or archive node if you want to get historic proofs.

use infura instead of localhost for tests

Is your feature request related to a problem? Please describe.

All the tests that currently use the eth_getProof method will not work unless you are running a full archive node. This is because they point to localhost, and they point to localhost because infura did not support the eth_getProof method (until recently).

Describe the solution you'd like

  • change all references of localhost to https://mainnet.infura.io
  • make sure all the tests (not the commented out ones) pass.

Additional context
when you're done. make a pull request. In the PR comments mention that this "Fixes#" (x being this issue number).

Resource temporarily unavailable Issue

Hi,

I was testing eth proof library to getAccountProof with a local chain setup.

Below is my code:
epObjectWithChainData = new EP(new Web3.providers.HttpProvider("http://127.0.0.1:9546"), blockHash, chainDataPath)

chainDataPath is local running geth geth/chaindata path.
epObjectWithChainData.getAccountProof(accountAddress).then(function(proof){
console.log("\n===========accountProofWithChainData===========\n", proof);
})

While running the code, it gives below error:
"OpenError: IO error: lock geth/chaindata/LOCK: Resource temporarily unavailable"

Any suggestion how to fix it?

Thank You
Abhay

add LICENSE.md

I see in your package.json has ISC. Could you add a LICENSE.md to the repo to make it more clear on github what the license is?

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.