Giter Site home page Giter Site logo

Comments (9)

michaelfig avatar michaelfig commented on August 30, 2024 1

I think this issue can be closed... I'm getting much further... now the kernel state is being saved!

from agoric-sdk.

warner avatar warner commented on August 30, 2024

Also, why the heck did ErrorOutOfGas cause a coredump?

from agoric-sdk.

michaelfig avatar michaelfig commented on August 30, 2024

That's some missing recover() handling in the storageHandler. I'll fix that, similarly to how other parts of the SDK do it. Expect a PR in the next hour.

At that point, it will just complain via the storage interface that there's not enough gas. You'll still need to set the transaction so that it has enough to run.

from agoric-sdk.

michaelfig avatar michaelfig commented on August 30, 2024

Oh, I see. The storage keeper is running in the context of the inbound transaction's gas. I think what I may need to do is create a new context that doesn't have gas limits, so that the ag-chain-cosmos do as many storage updates as necessary.

Does that seem right, or do we actually need some gas limits on the storage interface?

from agoric-sdk.

michaelfig avatar michaelfig commented on August 30, 2024

I can't yet follow your instructions to reproduce. I get:

received [[1,"{\"target\":{\"type\":\"your-egress\",\"id\":1},\"methodName\":\"doREPL\",\"args\":[{\"histnum\":0,\"s\":\"E(home.chain).getBalance()\"}],\"slots\":[]}"]]
deliverInbound [ [ 1,
    '{"target":{"type":"your-egress","id":1},"methodName":"doREPL","args":[{"histnum":0,"s":"E(home.chain).getBalance()"}],"slots":[]}' ] ] 0
(node:62458) UnhandledPromiseRejectionWarning: Error: error in inboundCallback: TypeError: Cannot read property 'deliverInboundMessages' of undefined Cannot read property 'deliverInboundMessages' of undefined
    at Object.deliverInbound (/Users/michael/agoric/cosmic-swingset/node_modules/@agoric/swingset-vat/src/devices/mailbox.js:165:13)
    at deliverInbound (/Users/michael/agoric/cosmic-swingset/lib/ag-solo/start.js:59:12)
    at inbound (/Users/michael/agoric/cosmic-swingset/lib/ag-solo/start.js:77:5)
    at WebSocket.ws.on.message (/Users/michael/agoric/cosmic-swingset/lib/ag-solo/web.js:71:9)
    at WebSocket.emit (events.js:189:13)
    at WebSocket.EventEmitter.emit (domain.js:441:20)
    at Receiver.receiverOnMessage (/Users/michael/agoric/cosmic-swingset/node_modules/ws/lib/websocket.js:796:20)
    at Receiver.emit (events.js:189:13)
    at Receiver.EventEmitter.emit (domain.js:441:20)
    at Receiver.dataMessage (/Users/michael/agoric/cosmic-swingset/node_modules/ws/lib/receiver.js:422:14)
(node:62458) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
new block on f7f574fec9c76ac7198a345bf4af0d08bb423d64a9310ccba2d92a50e0c15198, fetching mailbox
 helper said: {"value":"[[], 0]"}

from agoric-sdk.

warner avatar warner commented on August 30, 2024

Hm.. yeah, go ahead with the "storage is free" plan. When we activate gas, the actual costs will be coming from some Meter that we manage on the swingset side. I'm still unclear on how gas is currently working in our code, I assumed that the 'tendermint init' defaults were to allow unlimited consumption, and that our handlers/keepers aren't deducting gas at all. Does the storage API automatically deduct some number from the current context? (i.e. why did this start happening now.. is it the new larger number of kvstore calls?)

I'll look at that crash and see if I can figure out what's happening. It sounds like a peer isn't getting recognized, something wasn't registered at the right place.

from agoric-sdk.

michaelfig avatar michaelfig commented on August 30, 2024

Does the storage API automatically deduct some number from the current context? (i.e. why did this start happening now.. is it the new larger number of kvstore calls?)

Yes, and yes. The keeper API deducts from the passed-in context.

I will replace the GasMeter for the duration of a storage call from Node.

from agoric-sdk.

warner avatar warner commented on August 30, 2024

Ok that error looks like the solo process got a message (from the WebSocket) and delivered it into the swingset (by calling mailbox.deliverInbound) before the swingset process had a chance to register the handler. That registration is the first thing that happens when the kernel is launched, and ought to happen well before a browser client connects and sends a message. Take a look at your logs, the bootstrap() called in lib/ag-solo/vats/bootstrap.js line 16 should be printed, then the registerInboundHandler should happen, then the swingset running in ag-solo/start.js line 98 should be printed, and only after that would any websocket messages arrive. Did your run make it past the swingset running step? If that crashed before the handler was registered, but the websocket was still running and you connected a browser and sent a message, that could explain the error.

(we might consider reversing the order of construction, and make the swingset before we build the IO channels, which would make this particular failure mode easier to see, possibly at the expense of some other failure mode)

from agoric-sdk.

warner avatar warner commented on August 30, 2024

in the old repo. this was cosmic-swingset issue 4

from agoric-sdk.

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.