Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Handle incoming resolve messages, take 2 #530

Merged
merged 16 commits into from
Jun 29, 2023

Commits on Jun 17, 2023

  1. WIP: handle incoming resolve messages.

    Still TODO:
    
    - We need to handle disembargos with target = (importedCap = ...).
    - Testing.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    4d2274a View commit details
    Browse the repository at this point in the history
  2. cleanup: remove unnecessary declaration of importClient.

    The := below is sufficient, since this isn't actually used before that.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    a006092 View commit details
    Browse the repository at this point in the history
  3. Factor some logic out of handleDisembargo.

    Also, along the way, use the snapshot from resultsCapTable
    instead of calling .Snapshot() on the client.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    ae48235 View commit details
    Browse the repository at this point in the history
  4. Minor cleanup

    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    e96d054 View commit details
    Browse the repository at this point in the history
  5. First stab at disembargos on imports.

    Needs testing.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    872202c View commit details
    Browse the repository at this point in the history
  6. Add a test for disembargos on senderPromises.

    The test is currently failing; we're getting back an abort message
    complaining that the export entry is not a promise -- need to
    investigate.
    
    Aside from that failure, this caught a bug: we need to check if
    ClientState.Metadata is nil, which is possible if the client itself is
    null, and seems to happen to the promise after it is resolved.
    
    TODO: we should de-dup the logic between releaseExport and
    releaseExports. This is not entirely trivial though, because the
    latter is executed after we've wiped the exports table.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    c3a169d View commit details
    Browse the repository at this point in the history
  7. Add another test wrt promise resolution.

    ...also failing (hanging) for now.
    zenhack committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    78a82e2 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Configuration menu
    Copy the full SHA
    d42eb54 View commit details
    Browse the repository at this point in the history
  2. Get rid of redundant isPromise

    ...which we were forgetting to set. We can query snapshot for this
    anyway, so just get rid of it -- single source of truth and all.
    zenhack committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    dee0565 View commit details
    Browse the repository at this point in the history
  3. Fix TestDisembargoSenderPromise.

    When looking at the target of the promise, we want to look at its
    *resolution.*
    zenhack committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    eecd20f View commit details
    Browse the repository at this point in the history
  4. leak detection: skip nil snapshots.

    Otherwise we get a runtime error sometimes.
    zenhack committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    a297d2e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    849aa07 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0d80d1f View commit details
    Browse the repository at this point in the history
  7. TestPromiseOrdering: use require, not assert.

    ...the latter often just results in me staring at cascading errors,
    which is unhelpful.
    zenhack committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    f103d94 View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Clean up the way local promises work.

    Push the logic for flushing the answerqueue into the Promise type
    itself. This is much cleaner, and avoids some racy logic that I'm not
    sure was correct.
    zenhack committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    51facf7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4f8d2d8 View commit details
    Browse the repository at this point in the history