Giter VIP home page Giter VIP logo

hermez-node's People

Contributors

albertoelias avatar arnaubennassar avatar arnaucube avatar arr552 avatar ed255 avatar eduadiez avatar invocamanman avatar jbaylina avatar jeffprestes avatar jleebee avatar krlosmata avatar laisolizq avatar marioidival avatar mfcastellani avatar mikelle avatar obrezhniev avatar pantani avatar pedrovsg avatar stunndard avatar tclemos avatar toniramirezm 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

Watchers

 avatar  avatar  avatar  avatar  avatar

hermez-node's Issues

Remove GHA test with go 1.13?

Right now we have GHA tests for go 1.13 and go.14

Considering that we are not writing a library but a server software, I think we can force a dependency of a particular go version. For that reason I think the tests for go 1.13 can be removed (this way there's less noise in the PR test results).

Implement API in each module vs module with all the APIs

In the last changes of the API server spec, we remarked the importance of having endpoints consuming only a single DB to ensure the feasibility of a micro service architecture.

I think that with this in mind, each (DB) module should have it's endpoints, instead of having a module with all of them.

Implement a 'mock' ethClient

Implement a 'mock' ethClient, ideally would allow:

  • to pre-define the blocks & transactions in each block
  • call the methods from ethClient, but returning the predefined blocks & transactions

In this way, we will not depend on the blockchain to do part of the tests, and we will be able to tweak and force edge cases in the tests.

Change TxType strings

Some of the strings start with TxType... and others don't. This looks ugly and inconsistent and makes me sad

API boilerplate

Add the endpoint handlers following the spec of the API. This will be prety much useless until there is a DB implemented, at least the interfaces

Proof Generator - Shared mem witness

Current process is : Snarkjs computes a witness for a given circuit, writes it to file. The prover reads this file and computes the proof.

If the number of constraints is large, the reading and writing the witness may take several 10s of seconds. It would be better to have the witness generator and the prover share the witness via shared memory.

Update common structs

Revisit common structs to ensure consistency with last DB changes. In particular common.Batch should update:

	OldStateRoot     Hash
	NewStateRoot     Hash
	OldNumAccounts   int
	NewNumAccounts   int

but it's possible that other structs are outdated as well.

Edit: Other outdated structs:

  • Coordinator

Add AuxToIdx and AuxFromIdx

Probably it will make sense to add a AuxToIdx in PoolL2Tx, and a AuxFromIdx in L1Tx.
When the tx-selector processes an L1Tx with FromIdx == 0, it will set AuxFromIdx.
When the tx-selector processes a PoolL2Tx with ToIdx == 0, it will set AuxToIdx.
In the batchbuilder, when L1Tx with FromIdx == 0, it uses AuxFromIdx to create the account
In the batchbuilder, when PoolL2Tx with ToIdx == 0,, it uses AuxToIdx to do the transfer

benchmark db types: byte vs char

We have lots of columns that natively are bytes arrays of fixed length (hashes, ethereum addresses). It would be nice to know what performs better on Postgres:

  • Bytea
  • Char

In particular, the relevant metrics would be:

  • Read speed for queries of one element
  • Read speed for queries of many element
  • Write speed for inserts of one element
  • Write speed for inserts of many element
  • Effective used disk space

Define DB interfaces

Should we start defining the DB interfaces?

Although this was scheduled for later, I think it's a good idea to have a first iteration to facilitate the development of modules that are more advanced in terms of specification and that are already being developed.

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.