Git Product home page Git Product logo

Comments (5)

prestwich avatar prestwich commented on September 11, 2024 1
setup map with key being the old root 

loop {
  let (home_up, rep_up) = join ( 
    poll home for updates,
    poll replica for updates,
  }
  for both {
      check if already exists in map
      if exists { 
        if new_root_in_map != new_root_in_update { submit double update } 
      } else { store in map }
  }   
}

from optics-monorepo.

prestwich avatar prestwich commented on September 11, 2024 1

future goal: persist the update map to disk using SQLite or Sled or leveldb. load from disk on bootup

from optics-monorepo.

prestwich avatar prestwich commented on September 11, 2024 1

we have to guard against the case where a fraudulent updater submits a fraudulent update to just 1 replica, and an honest update to the home chain

from optics-monorepo.

luketchang avatar luketchang commented on September 11, 2024

This sound like a reasonable approach or will there be too many updates to story in memory?


Store list of all updates in hashmap (filter through all Update events and check for fraud as you fill map)

Loop {

  • Poll (listen for) signed updates from home and store them in map (same as relayer::poll_updates but store results)

  • For each new update, check for double update using map

    • If double update detected call doubleUpdate on home + all assigned replicas

}

from optics-monorepo.

luketchang avatar luketchang commented on September 11, 2024
  let (home_up, rep_up) = join ( 
    poll home for updates,
    poll replica for updates,
  }

Don't I only need to track Home since Replica doesn't actually produce any updates? Like double update fraud will only come from something originating from Home so doesn't the watcher just observe the home and then notify home + replicas if fraud detected?

from optics-monorepo.

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.