Giter Club home page Giter Club logo

Comments (9)

TheBojda avatar TheBojda commented on June 12, 2024

Can you send me the full stack trace? Which method throws this error?

from zk-merkle-tree.

emmanbol avatar emmanbol commented on June 12, 2024

I noticed the error when I click on "send to blockchain" on the Vote Page. After some Seconds, the console view on browser shows the error, nothing happens on the page itself. My metamask extension on browser is triggers the error.

Is it possible to abandon event and just use the commitment and nullifer logic alone to process whatever. Seem event is big overhead and causes huge gas fees. Just thinking aloud.

Note: I used bsc testnet, it may not be issue with ETH testnet or mainnet, but it is a issue.

from zk-merkle-tree.

TheBojda avatar TheBojda commented on June 12, 2024

I think, it is a restriction of the provider. Check this answer on STO: https://ethereum.stackexchange.com/questions/107590/contract-queryfilterfilter-giving-me-errors-in-ethers-js

from zk-merkle-tree.

emmanbol avatar emmanbol commented on June 12, 2024

from zk-merkle-tree.

emmanbol avatar emmanbol commented on June 12, 2024

Hello, see what I was thinking.

I will Start another code, where what event is needed for will be stored on the contract. Then offchain, I can get this data, compute what is needed, then complete onchain. This way, I will bypass event and some of it's limitations.

As it is, it seem to me, for each vote transaction, it gathers all the events from block 0 to latest block. That is a very big data. I may be wrong though. Educate me.

How can I use your present code, to do the above stated, because it seem your code depends solely on event. Even when I comment out the section, it still showed the event error.

We can talk via telegram for easy communication.

https://t.me/Defi_Solutions

from zk-merkle-tree.

TheBojda avatar TheBojda commented on June 12, 2024

Hi!

The events are used to build the Merkle tree locally to calculate the Merkle proof. The code is in the calculateMerkleRootAndPathFromEvents method. It queries only the Commit events, and I think providers like Infura index these events, so I don't think that in this case, the provider reads all of the events from block 0. Btw, TC does the same thing with Deposit events (https://github.com/tornadocash/tornado-core/blob/master/src/cli.js). So, I think it should work in a production environment (by using Infura or other providers).

from zk-merkle-tree.

emmanbol avatar emmanbol commented on June 12, 2024

If I use infura for example, does it mean I will have to pay for the service if the free tier for example finishes. I have been doing blockchain apps without necessarily using custom providers.

Also noticed, it is slow to pop the metamask app because of heavy computation.

I changed to polygon test on metamask using alchemy api free tier, and it worked.

But it delays before pop up, I think due to heavy computation.

from zk-merkle-tree.

TheBojda avatar TheBojda commented on June 12, 2024

Yep, building the tree and calculating the zkproof can be CPU intensive.

from zk-merkle-tree.

emmanbol avatar emmanbol commented on June 12, 2024

I agree with you 100%.

Can you think of a cheaper solution? I have fully understood the project, but the second part of securely validating and completing the interaction is the issue for me. I am thinking of a cheaper, cooler solution. Cos this is damn complex but it works though.

It must have taken you some energy to come up with this cool tutorial and library.

Haha.

from zk-merkle-tree.

Related Issues (7)

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.