Git Product home page Git Product logo

Comments (6)

djrtwo avatar djrtwo commented on July 18, 2024

@naterush More details need to be fleshed out. Just wanted to get this up before you dive into memoization tonight.

from cbc-casper.

naterush avatar naterush commented on July 18, 2024

Thanks for adding this. I've started work here and should be able to get up a WIP branch tomorrow.

Not sure what the best trade-off is here. Seems to me the best option might actually be having the validators keep a list of edges between other validators per estimate (or every 10 blocks). If we make them directed, I think we can translate freely between any type or lower-bound-side-effects-free-oracle we want (aversary, turans, clique, etc). Will give a bit of a more formal argument for this tomorrow, too.

I'll keep banging away at it tomorrow - should have a good couple hours to get a preliminary WIP up so we can discuss :)

from cbc-casper.

naterush avatar naterush commented on July 18, 2024

Here's how I'm approaching it as of now:

  1. When a validator checks estimate safety on some estimate for the first time, we create the directed edges in the view and store them. It is also possible we could store the messages themselves that make these edges valid - and this might be the more future proof solution - but I don't think it's necessary as of now.
  2. If there are fewer edges than could possibly exist for a node to meet their safety threshold, then we don't check safety at all.
  3. Whenever new messages are received, we update the edges for all estimates for which we are currently storing edges for.
  4. As soon as there are enough edges that we can possibly detect safety, we check safety (they have to "poke" the estimate safety check again - but maybe this isn't the best). If they detect estimate safety on that estimate, we delete the edges that we have for that estimate + any estimates that are implicitly finalized and/or "anti-finalized" by that estimate.

Things might be a bit more complicated than is worthwhile - but I think if we decide to simplify most of the logic for updating edges (or storing the viewables) can be re-used.

from cbc-casper.

djrtwo avatar djrtwo commented on July 18, 2024

This looks good. A couple of questions:

  • Should the view be responsible for creating/maintaining edges or should the Oracle? I like the idea of the oracle maintaining the cache relevant to it and the view being dumb, but I could be persuaded otherwise.
  • 1: Should we only store edges related to an estimate once we check estimate safety on it or should we start storing edges once we see a new estimate?
  • As for 2, I think the Oracle should be responsible for this quick check. So the validator would ask the oracle if safe on that estimate, and the oracle can use the Turan shortcut. Rather than the validator/view needing to know about the Turan shortcut.

Sweet! super cool stuff

from cbc-casper.

djrtwo avatar djrtwo commented on July 18, 2024

from cbc-casper.

naterush avatar naterush commented on July 18, 2024

https://github.com/karlfloersch/cbc-casper/tree/feat/oracle_cache work begun here.

from cbc-casper.

Related Issues (20)

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.