WietseWind / docker-rippled

Run XRP Ledger (rippled) node in a Docker container
https://hub.docker.com/r/xrpllabsofficial/xrpld
MIT License
60 stars 34 forks source link

"validated": false?? #23

Closed junghyun0783 closed 10 months ago

junghyun0783 commented 10 months ago

hello! I want to enable “destination Tag”. I want to make "requireDestinationTag": true. I followed it by referring to (https://xrpl.org/require-destination-tags.html).

I created and sent a tx... "requireDestinationTag": does not change to true. result

{{ "accepted": true, "account_sequence_available": 43891710, "account_sequence_next": 43891710, "applied": true, "broadcast": true, "engine_result": "tesSUCCESS", "engine_result_code": 0, "result_message": "The transaction was applied. Only final in a validated ledger.", "kept": true, "open_ledger_cost": "10", "queued": false, "status": "success", "tx_blob": "", "tx_json": { "Account": "rGG9k2shfmrYsuoonsDLjUgNUugfL72Ps6", "Fee": "12", "Flags": 2147483648, "LastLedgerSequence": 43893466, "Memos": [ { "Memo": { "MemoData": "7B2270617468 223A222F726571756972652D64657374696E6174696F6E2D746167732E68746D6C222C22627574746F6E223A2273656E642D6163636F756E74736574222C2 273746570223A332C22746F74616C7374657073223A367D ", "MemoFormat": "6170706C69636174696F6E2F6A736F6E", "MemoType": "68747470733A2F2F6769746875622E636F6D2F5852504C462F7872706C2D6465762D706F7 274616C2F626C6F622F6D61737465722F746F6F6C2F494E5445524143544956455F5455544F5249414C535F524541444D452E6D64" } } ], "Sequence": 43891709 , "SetFlag": 1, "SigningPubKey": "ED0003A38942BDBE5F18F6EFD762DFDD6E69D86B25C69677F5E54D1B5876E47CAD", "TransactionType": "AccountSet", " TxnSignature": "B6DF28E3089A19CB8C6E16AA82C00797E0C3A5B991ABCCA52B92F3B1A4155E312842E2E1C6D39CB5FE671447899DC29B767710F0AFC5C4C36159D22D5A0BC9 00", "hash": "97925FDDABAA10632A1D5CEA2507F14C7927198BBEF9402609E07B80F95B3F65" }, "validated_ledger_index": 43893465}}

It comes out like this... One thing I guess is that when I looked up the hash, it was “validated”: false. What can I do to solve this problem? I need help. Maybe I did something wrong in the config file?

[server]
port_rpc_admin_local
port_ws_public
port_peer

[port_rpc_admin_local]
port = 5005
ip = 0.0.0.0
admin = 127.0.0.1
protocol = http

[port_ws_public]
port = 80
ip = 0.0.0.0
protocol = ws

[port_peer]
port = 51235
ip = 0.0.0.0
protocol = peer

[node_db]
type=NuDB
path=/var/lib/rippled/db/nudb

[ledger_history]
full

[database_path]
/var/lib/rippled/db

[signing_support]
true

[debug_logfile]
/var/log/rippled/debug.log

[sntp_servers]
time.windows.com
time.apple.com
time.nist.gov
pool.ntp.org

[ips]
s.altnet.rippletest.net 51235

[ips_fixed]
169.55.164.20 51235
50.22.123.215 51235

[import_db]
type=NuDB
path=/tmp/full_history_dump/

[validators_file]
validators.txt

[rpc_startup]
{
    "command": "log_level",
    "severity": "info",
}

[rpc_admin]
admin = 0.0.0.0

[ssl_verify]
1
WietseWind commented 10 months ago

Validated = false makes sense,

When you submit a tx the immediate response is that it was accepted, but not yet validated.

If you query the same TX four seconds later after ledger close, it will be validated true and included in a ledger.

Regarding setting the flag: if I look at your account @ Testnet (based on sequence I figure this is testnet), I don't see the transaction you're referring to.

https://test.bithomp.com/explorer/rGG9k2shfmrYsuoonsDLjUgNUugfL72Ps6

Which makes me assume you're actually not yet synced to the network.

What does a rippled server_info (executed in/by the docker container running rippled) call return? Do you show active syncedd ledgers?

junghyun0783 commented 10 months ago

@WietseWind If you look at server_info

{
     "result": {
         "info": {
             "build_version": "1.12.0",
             "complete_ledgers": "42857704-43909700",
             "fetch_pack": 7817,
             "hostid": "SAIL",
             "initial_sync_duration_us": "239270282",
             "io_latency_ms": 1,
             "jq_trans_overflow": "0",
             "last_close": {
                 "converge_time_s": 3.004,
                 "proposers": 6
             },
             "load_factor": 1,
             "peer_disconnects": "813",
             "peer_disconnects_resources": "0",
             "peers": 10,
             "ports": [
                 {
                     "port": "80",
                     "protocol": [
                         "ws"
                     ]
                 },
                 {
                     "port": "51235",
                     "protocol": [
                         "peer"
                     ]
                 }
             ],
             "pubkey_node": "n9KQfTM79SiAarNjEm8MAK9Ew7zwrZnABVy4zVFsvsAV14b8pEKJ",
             "server_state": "full",
             "server_state_duration_us": "56679646278",
             "state_accounting": {
                 "connected": {
                     "duration_us": "104119220",
                     "transitions": "2"
                 },
                 "disconnected": {
                     "duration_us": "129142832",
                     "transitions": "2"
                 },
                 "full": {
                     "duration_us": "56679646278",
                     "transitions": "1"
                 },
                 "syncing": {
                     "duration_us": "6008213",
                     "transitions": "1"
                 },
                 "tracking": {
                     "duration_us": "14",
                     "transitions": "1"
                 }
             },
             "time": "2023-Dec-22 00:28:47.349388 UTC",
             "uptime": 56918,
             "validated_ledger": {
                 "age": 4,
                 "base_fee_xrp": 1e-05,
                 "hash": "9991AE12641E91D4E5514CCBC832C626A49B7835D57EE620866041AB5568B047",
                 "reserve_base_xrp": 10,
                 "reserve_inc_xrp": 2,
                 "seq": 43909700
             },
             "validation_quorum": 5
         },
         "status": "success"
     }
}

It is output like this. Maybe it's not synchronized yet?

WietseWind commented 10 months ago

It is fully connected; "server_state": "full",

Meaning something else isn't right with your transaction or signing.

Try skipping LastLedgerSequence (not needed in this case, could be too tight)

Try to strip down the TX to the bare minimum, e.g. drop the Memos, etc.

Looking at hour account Sequence on testnet, it could also be your Sequence already passed or was taken by another Tx.

junghyun0783 commented 10 months ago

@WietseWind Thank you so much!! Solved. It works right away when I remove the memos.... However, there are memos on the xrp official website... Why is "requireDestinationTag: true" even without memos? As far as I know, the role of memos is to set "requireDestinationTag: true". gpt told me...^^

WietseWind commented 10 months ago

Memos are just to add notes / invoice IDs / trace codes to transactions.

It will work with a Memo, just as long as it's correctly formatted and contains nothing other than valid Hexadecimal values (potentially decoding to UTF8 values)