Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Cannot Bid On A Card #50

Closed
anilhelvaci opened this issue Mar 9, 2022 · 10 comments · Fixed by #51
Closed

Cannot Bid On A Card #50

anilhelvaci opened this issue Mar 9, 2022 · 10 comments · Fixed by #51
Assignees
Labels
bug Something isn't working ui

Comments

@anilhelvaci
Copy link
Collaborator

anilhelvaci commented Mar 9, 2022

Describe the bug

I have been trying to run the demo following the steps on the README.md. Everything was okay until I try to bid on a card. When I click on a card and the details view opens, then I set the bid amount and clieck "Bid" button, the issue shows itself. The button gets stuck at the clicked state and stays that way until it times out.

To Reproduce

Steps to reproduce the behavior:

  1. Start the local chain on the 5000 port.

    export PORT=5000
    agoric start --reset --verbose
  2. Open the wallet using port 5000

    agoric open --hostport 127.0.0.1:5000 --repl
  3. Deploy Api and the Contract

    export API_URL=http://127.0.0.1:5000
    agoric deploy --hostport 127.0.0.1:5000  contract/deploy.js api/deploy.js
  4. Start UI

    cd ui && yarn start
  5. Add wallet bridge to https://local.agoric.com/
    agoric-wallet-bridge

  6. Enable DApp from the wallet

  7. Go to UI

  8. Click on a Card

  9. See details view

  10. Set a bid amount

  11. Click "Bid"

  12. See the text on the button turn into "Submitting" in a clicked state

  13. Gets stuck

Expected behavior

To see the minted card nft in my wallet

Platform Environment

  • OS: Windows 10 Pro, WSL2, Ubuntu 20.04
  • Node: v14.19.0
  • Yarn: 1.22.17
  • Agoric: 0.14.1

Nothing special about the environment, this is the same environment that I run my Hyperledger Fabric apps and demos

Additional context

Below are the stack traces for both backend and frontend

Frontend

{
   "type": "CTP_CALL",
   "epoch": 0,
   "questionID": "Card Store#18",
   "target": "o-12",
   "method": {
      "body": "[\"makeBidInvitationForKey\",[\"Todd Bonzalez\"]]",
      "slots": []
   }
}
{
  "answerID": "Card Store#18",
  "epoch": null,
  "exception": {
    "body": "{\"@qclass\":\"error\",\"errorId\":\"error:captp:http://127.0.0.1:5000#20001\",\"message\":\"A \\\"promise\\\" cannot be a key\",\"name\":\"Error\"}",
    "slots": []
  },
  "type": "CTP_RETURN"
}

Backend

2022-03-09T08:54:17.500Z outbound: invoking deliverator; 1 new messages for sim-chain
2022-03-09T08:54:18.503Z fake-chain: delivering to sim-chain (trips=144)
2022-03-09T08:54:32.901Z SwingSet: ls: v6: Logging sent error stack (Error#17)
2022-03-09T08:54:32.902Z SwingSet: ls: v6: Error#17: A promise cannot be a key
2022-03-09T08:54:32.902Z SwingSet: ls: v6: Error: A "promise" cannot be a key
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at makeError (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1764)
 at fail (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1892)
 at baseAssert (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1910)
 at assertChecker (.../marshal/src/helpers/passStyle-helpers.js:51)
 at checkKey (.../store/src/keys/checkKey.js:162)
 at every ()
 at checkKey (.../store/src/keys/checkKey.js:162)
 at every ()
 at checkKey (.../store/src/keys/checkKey.js:162)
 at assertKey (.../store/src/keys/checkKey.js:195)
 at doCoerce (.../ertp/src/mathHelpers/setMathHelpers.js:36)
 at make (.../ertp/src/amountMath.js:395)
 at makeInvitation (.../zoe/src/zoeService/makeInvitation.js:65)
 at makeInvitation ()
 at apply ()
 at apply ()
 at dispatchToHandler (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10975)
 at (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10613)
 at win (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11318)
 at ()

2022-03-09T08:54:32.902Z SwingSet: ls: v6: Error#17 ERROR_NOTE: Rejection from: (Error#18) : 672 . 0
2022-03-09T08:54:32.902Z SwingSet: ls: v6: Error#17 ERROR_NOTE: Sent as error:liveSlots:v6#70009
2022-03-09T08:54:32.903Z SwingSet: ls: v6: Error#18: Event: 671.1
2022-03-09T08:54:32.903Z SwingSet: ls: v6: Error: Event: 671.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at deliver (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16142)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16477)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:32.999Z SwingSet: ls: v37: Logging sent error stack (RemoteError(error:liveSlots:v6#70009)#1)
2022-03-09T08:54:32.999Z SwingSet: ls: v37: RemoteError(error:liveSlots:v6#70009)#1: A "promise" cannot be a key
2022-03-09T08:54:33.000Z SwingSet: ls: v37: Error: A "promise" cannot be a key
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at makeError (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1764)
 at fullRevive (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5783)
 at unserialize (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5866)
 at notifyOnePromise (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16219)
 at notify (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16232)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16482)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:33.000Z SwingSet: ls: v37: RemoteError(error:liveSlots:v6#70009)#1 ERROR_NOTE: Rejection from: (Error#2) : 7 . 0
2022-03-09T08:54:33.000Z SwingSet: ls: v37: RemoteError(error:liveSlots:v6#70009)#1 ERROR_NOTE: Rejection from: (Error#3) : 6 . 1
2022-03-09T08:54:33.001Z SwingSet: ls: v37: RemoteError(error:liveSlots:v6#70009)#1 ERROR_NOTE: Sent as error:liveSlots:v37#70001
2022-03-09T08:54:33.001Z SwingSet: ls: v37: Error#2: Event: 6.1
2022-03-09T08:54:33.001Z SwingSet: ls: v37: Error: Event: 6.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at (.../eventual-send/src/E.js:51)
 at makeInvitation (.../zoe/src/contractFacet/zcfZygote.js:270)
 at apply ()
 at apply ()
 at dispatchToHandler (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10975)
 at (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10613)
 at win (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11318)
 at ()

2022-03-09T08:54:33.002Z SwingSet: ls: v37: Error#2 ERROR_NOTE: Caused by: (Error#3)
2022-03-09T08:54:33.002Z SwingSet: ls: v37: Error#3: Event: 5.1
2022-03-09T08:54:33.003Z SwingSet: ls: v37: Error: Event: 5.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at deliver (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16142)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16477)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:33.059Z SwingSet: ls: v30: Logging sent error stack (RemoteError(error:liveSlots:v37#70001)#25)
2022-03-09T08:54:33.060Z SwingSet: ls: v30: RemoteError(error:liveSlots:v37#70001)#25: A "promise" cannot be a key
2022-03-09T08:54:33.060Z SwingSet: ls: v30: Error: A "promise" cannot be a key
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at makeError (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1764)
 at fullRevive (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5783)
 at unserialize (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5866)
 at notifyOnePromise (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16219)
 at notify (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16232)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16482)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:33.060Z SwingSet: ls: v30: RemoteError(error:liveSlots:v37#70001)#25 ERROR_NOTE: Rejection from: (Error#26) : 162 . 0
2022-03-09T08:54:33.061Z SwingSet: ls: v30: RemoteError(error:liveSlots:v37#70001)#25 ERROR_NOTE: Rejection from: (Error#27) : 146 . 1
2022-03-09T08:54:33.061Z SwingSet: ls: v30: RemoteError(error:liveSlots:v37#70001)#25 ERROR_NOTE: Sent as error:liveSlots:v30#70009
2022-03-09T08:54:33.062Z SwingSet: ls: v30: Error#26: Event: 161.1
2022-03-09T08:54:33.062Z SwingSet: ls: v30: Error: Event: 161.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at ()
 at ()

2022-03-09T08:54:33.062Z SwingSet: ls: v30: Error#27: Event: 145.1
2022-03-09T08:54:33.062Z SwingSet: ls: v30: Error: Event: 145.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at deliver (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16142)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16477)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:33.253Z SwingSet: vat: v2: Temporary logging of sent error (RemoteError(error:liveSlots:v30#70009)#52)
2022-03-09T08:54:33.253Z SwingSet: vat: v2: RemoteError(error:liveSlots:v30#70009)#52: A "promise" cannot be a key
2022-03-09T08:54:33.254Z SwingSet: vat: v2: Error: A "promise" cannot be a key
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at makeError (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:1764)
 at fullRevive (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5783)
 at unserialize (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:5866)
 at notifyOnePromise (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16219)
 at notify (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16232)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16482)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

2022-03-09T08:54:33.254Z SwingSet: vat: v2: RemoteError(error:liveSlots:v30#70009)#52 ERROR_NOTE: Rejection from: (Error#53) : 1165 . 0
2022-03-09T08:54:33.255Z SwingSet: vat: v2: RemoteError(error:liveSlots:v30#70009)#52 ERROR_NOTE: Sent as error:captp:http://127.0.0.1:5000#20003
2022-03-09T08:54:33.255Z SwingSet: vat: v2: Error#53: Event: 1164.1
2022-03-09T08:54:33.255Z SwingSet: vat: v2: Error: Event: 1164.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at CTP_CALL (.../captp/src/captp.js:432)
 at CTP_CALL ()
 at dispatch (.../captp/src/captp.js:573)
 at onMessage (.../solo/src/captp.js:74)
 at onMessage ()
 at apply ()
 at apply ()
 at dispatchToHandler (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10975)
 at (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10613)
 at win (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11318)
 at ()

2022-03-09T08:54:33.255Z SwingSet: vat: v2: Error#53 ERROR_NOTE: Caused by: (Error#54)
2022-03-09T08:54:33.256Z SwingSet: vat: v2: Error#54: Event: 1163.1
2022-03-09T08:54:33.256Z SwingSet: vat: v2: Error: Event: 1163.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at (.../eventual-send/src/E.js:51)
 at inbound (.../solo/src/vat-http.js:201)
 at inbound ()
 at apply ()
 at apply ()
 at dispatchToHandler (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10975)
 at (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10613)
 at win (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11318)
 at ()

2022-03-09T08:54:33.256Z SwingSet: vat: v2: Error#54 ERROR_NOTE: Caused by: (Error#55)
2022-03-09T08:54:33.257Z SwingSet: vat: v2: Error#55: Event: 1162.1
2022-03-09T08:54:33.257Z SwingSet: vat: v2: Error: Event: 1162.1
 at construct ()
 at Error (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:7619)
 at trackTurns (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:10597)
 at handle (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/lockdown-subprocess-xsnap.js:11309)
 at deliver (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16142)
 at dispatchToUserspace (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16477)
 at runWithoutMetering (/home/anil/agoric-samples/agoric-sdk/packages/SwingSet/src/supervisors/subprocess-xsnap/supervisor-subprocess-xsnap.js:16995)
 at ()

Screenshots

Below is the screenshot of the stuck state

card-dapp-big-small

@samsiegart samsiegart self-assigned this Mar 10, 2022
@samsiegart samsiegart added bug Something isn't working ui labels Mar 10, 2022
@Tartuffo
Copy link

@erights If you could look at this and advise, as it seems to be dying in Zoe.

@erights
Copy link
Member

erights commented Mar 22, 2022

It looks like something called makeInvitation(invitationHandle, description, customProperties) where either invitationHandle was a promise or (more likely) there was a promise somewhere in customProperties. Do you know what call to makeInvitation caused this? If not, could you help me reproduce?

@samsiegart
Copy link
Contributor

Do you know what call to makeInvitation caused this? If not, could you help me reproduce?

I just narrowed it down to this line in the contract: session.makeBidInvitation()

Which invokes the zoe auction contact

And the actual error being thrown in makeInvitation seems to happen on this line when I run it locally: https://github.com/Agoric/agoric-sdk/blob/master/packages/zoe/src/zoeService/makeInvitation.js#L53

Which points to some installation being a promise. However, I'm checking all the "installation" references in the contract and deploy scripts, and they all seem to be resolved before being passed to zoe.

@samsiegart
Copy link
Contributor

@erights I determined that it was the timeAuthority in customProperties which was being passed as a promise. I got it working in Agoric/agoric-sdk#4899, but not sure if this is the best approach.

@samsiegart samsiegart added this to the Mainnet: Phase 1 - Treasury Launch milestone Mar 23, 2022
@samsiegart
Copy link
Contributor

The root cause is that home.chainTimerService is returning a promise, so the deploy script is instantiating the contract with a promise. This change also fixes the bug: #51

But I'm not sure if that's better than the above. Perhaps we should even be fixing the fact that home.chainTimerService is a promise to begin with.

@dckc
Copy link
Member

dckc commented Mar 23, 2022

This call to allValues is intended to result in home.chainTimerService being a TimerService, not a Promise<TimerService>:

        getChainBundle: () =>
          bundleReady.promise.then(_ => Collect.allValues(clientHome)),

https://github.com/Agoric/agoric-sdk/blob/ba5efd9ec459c236015c7513352f0bfc544290cd/packages/vats/src/core/chain-behaviors.js#L217-L218

I don't understand why it doesn't work:

command[1] isPromise = x => x === Promise.resolve(x)
command[5] isPromise(home.chainTimerService)
history[5] true

@michaelfig didn't we fix that?

@michaelfig
Copy link
Member

This call to allValues is intended to result in home.chainTimerService being a TimerService, not a Promise<TimerService>:

@michaelfig didn't we fix that?

I had fixed it with a deeplyResolved(homeObjects) or somesuch. I don't think that stuck around though.

@erights
Copy link
Member

erights commented Mar 23, 2022

Btw, it is named deeplyFulfilled. It is a nice abstraction. Recommended when it fits.

@michaelfig
Copy link
Member

@dckc, the path to the client now goes through makeUpdatedConfiguration which does not call Collect.allValues. It probably should.

@samsiegart
Copy link
Contributor

This should be fixed now from #51. However, it seems like there's work we want to on the chain in addition. Perhaps we should create a separate issue under agoric-sdk for that?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working ui
Projects
None yet
6 participants