XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.48k stars 1.45k forks source link

rippled error (Version: 1.6.0) #3660

Closed ghost closed 5 months ago

ghost commented 3 years ago

Issue Description

I'm running a Rippled node for a exchange service. I created new account and I attempted to get info from new account. But it occurs Error : Account not found.

Steps to Reproduce

I created new account by using ripple-lib API : api.generateAddress() Result is like that : { "xAddress": "X7u2KCKEogy378o4ce8AoVWXKWKe7aiti4yzfrxko8w4FJj", "secret": "ssaSa7JPQM9itJj3M7pRUVHSSjuW6", "classicAddress": "r3zEUKWcNqK6w1aFVhNr8Pf8iRuJZaLkA7", "address": "r3zEUKWcNqK6w1aFVhNr8Pf8iRuJZaLkA7" } Then I implement this API api.getAccountInfo( )

Expected Result

general result is like that : { "sequence": 1406, "xrpBalance": "13315.612685", "ownerCount": 17, "previousAffectingTransactionID": "D2FA1C28EF87E53029327AA832C378674B3ACA0551CF9EA1F65BB8CA34913FAB", "previousAffectingTransactionLedgerVersion": 55180009 }

Actual Result

But my side it returns follow error data : { "name": "RippledError", "data": { "account": "rQNiyZJcwRedEyJPn45iJejDvVAP8L15MN", "error": "actNotFound", "error_code": 19, "error_message": "Account not found.", "id": 41, "ledger_hash": "96CA53BBD23D6527A35D6621CB265C83F5EC53E070C6ED873DEF28A9D9E01EC9", "ledger_index": 59506222, "request": { "account": "rQNiyZJcwRedEyJPn45iJejDvVAP8L15MN", "command": "account_info", "id": 41, "ledger_index": "validated" }, "status": "error", "type": "response", "validated": true } }

Supporting Files

server info is like that :

{ "buildVersion": "1.6.0", "completeLedgers": "58202879-59506257", "ioLatencyMs": 1, "jqTransOverflow": "0", "lastClose": { "convergeTimeS": 3.003, "proposers": 38 }, "loadFactor": 1, "peerDisconnects": "198934", "peerDisconnectsResources": "7175", "peers": 169, "pubkeyNode": "n9MPjx9wEEidR7ysZUkfsaqCrLVn8uAMgRwXAQToqQXFsE3x16Ke", "serverState": "full", "serverStateDurationUs": "7319598897265", "stateAccounting": { "connected": { "durationUs": "241188800", "transitions": 1 }, "disconnected": { "durationUs": "2135406", "transitions": 1 }, "full": { "durationUs": "7319598897265", "transitions": 1 }, "syncing": { "durationUs": "3231803", "transitions": 1 }, "tracking": { "durationUs": "16", "transitions": 1 } }, "time": "2020-Nov-12 19:00:11.639723 UTC", "uptime": 7319845, "validatedLedger": { "age": 1, "hash": "AD767C0E4910FADF3CC04CDB3FE6BEC5416513F8A3AEA98BE09287FB78D9F23D", "baseFeeXRP": "0.00001", "reserveBaseXRP": "20", "reserveIncrementXRP": "5", "ledgerVersion": 59506257 }, "validationQuorum": 31, "hostID": "TED" }

intelliot commented 3 years ago

@wc-codebase api.generateAddress() generates a new address that does not yet exist on the ledger. To actually create the account, you need to fund the account by sending at least 20 XRP to it.

(20 XRP is the current base reserve.)

Does that help?

MarkusTeufelberger commented 3 years ago

(Also please NEVER use that account you just posted outside the Test Net, since its secret is now no longer secret)

ghost commented 3 years ago

@wc-codebase api.generateAddress() generates a new address that does not yet exist on the ledger. To actually create the account, you need to fund the account by sending at least 20 XRP to it.

(20 XRP is the current base reserve.)

Does that help?

@intelliot Thanks for the reply. By the way, to fund first charge, I need XRP address and tag. How can I get tag ? And when I create new account, it provides 2 types of addresses - typical address and X-address. Can I use X-address for funding ?

mDuo13 commented 3 years ago

By the way, to fund first charge, I need XRP address and tag. How can I get tag ?

A destination tag is just a number; it has no special meaning unless the owner of the address uses it to do something. It's kind of like an apartment number or a phone extension number. So if you're using an interface or something that requires you to input a destination tag when sending to an address you fully control, you can just input 0. If the address belongs to an exchange or some other multi-user thing, then you need to know what your own destination tag is.

And when I create new account, it provides 2 types of addresses - typical address and X-address. Can I use X-address for funding ?

That depends on the interface you are using. An X-address is actually just a combination of a classic address and a destination tag rolled into one thing. The XRP Ledger protocol doesn't natively understand X-addresses, but there are several wallets and tools that do, so you can use X-addresses if your tool understands them, and if not you'll have to use the classic address and destination tag as a pair.