Giter Club home page Giter Club logo

Comments (3)

warner avatar warner commented on May 27, 2024

Oh, one gotcha to look out for. The current way that events are processed means that everything is an "eventual send" (e.g. when an event is processed, any events it emits are appended to the end of a queue, and the main execute() loop pulls events from the front of this queue), so the following sequence of events would violate the order of delivery that Order is supposed to provide:

  • Order gets non-PAKE message: queues it, emits nothing
  • Order gets PAKE message: emits Key.got_pake, emits Receive.got_message (for queued message)
  • action queue is now: [Key.got_pake, Receive.got_message]
  • Key.got_pake computes shared key, emits Receive.got_key
  • action queue is now: [Receive.got_message, Receive.got_key]
  • Key.got_message runs, breaks because it hasn't gotten the key yet

I'm not yet sure what a clean solution would be. Maybe change the way execute works to do more of a depth-first traversal of the action queue (push the emitted events onto the front of the queue, rather than the back).

from magic-wormhole.rs.

vu3rdd avatar vu3rdd commented on May 27, 2024

I think most of it is implemented. When I get to the receive parts, I will revisit Order state machine.

from magic-wormhole.rs.

warner avatar warner commented on May 27, 2024

This is done now, however that eventual-send issue might still be a problem. I'll open a separate ticket for it.

from magic-wormhole.rs.

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.