XRPL-Labs / xrpld-hooks

ISC License
94 stars 28 forks source link

rippled Aborted: account_objects on hook account #18

Closed technotip closed 1 year ago

technotip commented 3 years ago

Issue Description

rippled gets aborted when tried to fetch account_objects information from the ledger for the account which has hooks installed. It works fine for accounts which does not have hooks installed.

Steps to Reproduce

./rippled account_objects rGuTzjM71We1fCN6pkjx868eVdhjG4wgLC

Make sure rGuTzjM71We1fCN6pkjx868eVdhjG4wgLC has some hooks installed before running above command.

UTC HTTPClient:NFO Connecting to 127.0.0.1:5009

{
   "error" : "internal",
   "error_code" : 73,
   "error_message" : "Internal error.",
   "error_what" : "no response from server"
}

there is "no response from server" as the server gets aborted because of running above command (account_objects) on hook account.

Result (server log)

2021-Jun-28 11:46:21.882630760 UTC Server:DBG Query: account_objects
{
    "account" : "rGuTzjM71We1fCN6pkjx868eVdhjG4wgLC",
    "api_version" : 1
}

2021-Jun-28 11:46:21.882668421 UTC Server:TRC doRpcCommand:account_objects:
{
    "account" : "rGuTzjM71We1fCN6pkjx868eVdhjG4wgLC",
    "api_version" : 1,
    "command" : "account_objects"
}

2021-Jun-28 11:46:21.882702314 UTC Server:TRC COMMAND:account_objects
2021-Jun-28 11:46:21.882730597 UTC Server:TRC REQUEST:
{
    "account" : "rGuTzjM71We1fCN6pkjx868eVdhjG4wgLC",
    "api_version" : 1,
    "command" : "account_objects"
}

rippled: /root/rippled/src/ripple/protocol/impl/Keylet.cpp:34: bool ripple::Keylet::check(const SLE&) const: Assertion `sle.getType() != ltDIR_NODE' failed.
Aborted (core dumped)

Environment

Rippled version:

./rippled --version

rippled version 1.6.0-hooks

Supporting Files

dangell7 commented 2 years ago

I tried this and received the same error. When I connected thought the web socket it works though. The response error I get is:

raise JSONDecodeError("Expecting value", s, err.value) from None

WietseWind commented 2 years ago

Thanks for the report @dangell7!

Looping in @RichardAH

ravinsp commented 2 years ago

This does seem to work. We have been using this to query account objects on a hooks enabled account for a while now. However there's no possibility to get Rippled to filter by "HookState" objects which I've mentioned in #31.

The following works:

// Using ripple-lib 1.9.x
api.getAccountObjects("<address>", { type: "state" })
RichardAH commented 1 year ago

This appears to have been fixed for a while. If you can still reproduce then please reopen