Category Archives: XRP

Building and running rippled on Ubuntu.

I successfully build and run rippled 1.1.2 on Ubuntu 18.04 with the following commands:

sudo apt-get -y install git cmake pkg-config protobuf-compiler libprotobuf-dev libssl-dev wget
cd ~Downloads/
wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz
cd ..
mkdir lib
cd lib/
tar xvzf ~/Downloads/boost_1_67_0.tar.gz
./bootstrap.sh
./b2 -j1
export BOOST_ROOT=/home/user/lib/boost_1_67_0
cd ~/repos/
git clone https://github.com/ripple/rippled.git
cd rippled
git tag
git show --summary 1.1.2
git reset --hard 1.1.2
mkdir build
cd build/
cmake ..
cmake --build .
./rippled -u
284.6s, 171 suites, 1049 cases, 379760 tests total, 0 failures

configured it and started:

cd ~
mkdir -p ~/.config/ripple
cd ~/repos/rippled/
cp cfg/rippled-example.cfg ~/.config/ripple/rippled.cfg
sudo mkdir -p /var/log/rippled/
sudo chgrp user /var/log/rippled/
sudo chmod g+w /var/log/rippled/
cd ~
mkdir /ripple-data
nano ~/.config/ripple/rippled.cfg
#set path in [node_db] to /home/user/ripple-data/node
#set [database_path] to /home/user/ripple-data/db
cp cfg/validators-example.txt ~/.config/ripple/validators.txt
cd ~/repos/rippled/build
./rippled

and got something close to what is expected:

Loading: "/home/user/.config/ripple/rippled.cfg"
Watchdog: Launching child 1
2019-Jan-17 15:42:38.701970571 JobQueue:NFO Auto-tuning to 3 validation/transaction/proposal threads.
2019-Jan-17 15:42:39.203725985 Amendments:DBG Amendment 4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373 is supported.
2019-Jan-17 15:42:39.203866283 Amendments:DBG Amendment 6781F8368C4771B83E8B821D88F580202BCB4228075297B19E4FDC5233F1EFDC is supported.
2019-Jan-17 15:42:39.203909683 Amendments:DBG Amendment 42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE is supported.
2019-Jan-17 15:42:39.203946982 Amendments:DBG Amendment 08DE7D96082187F6E6578530258C77FAABABE4C20474BDB82F04B021F1A68647 is supported.
2019-Jan-17 15:42:39.203982682 Amendments:DBG Amendment 740352F2412A9909880C23A559FCECEDA3BE2126FED62FC7660D628A06927F11 is supported.
2019-Jan-17 15:42:39.204022581 Amendments:DBG Amendment 1562511F573A19AE9BD103B5D6B9E01B3B46805AEC5D3C4805C902B514399146 is supported.
2019-Jan-17 15:42:39.204061081 Amendments:DBG Amendment 532651B4FD58DF8922A49BA101AB3E996E5BFBF95A913B3E392504863E63B164 is supported.
2019-Jan-17 15:42:39.204097281 Amendments:DBG Amendment E2E6F2866106419B88C50045ACE96368558C345566AC8F2BDF5A5B5587F0E6FA is supported.
2019-Jan-17 15:42:39.204132780 Amendments:DBG Amendment 07D43DCE529B15A10827E5E04943B496762F9A88E3268269D69C44BE49E21104 is supported.
2019-Jan-17 15:42:39.204539475 Amendments:DBG Amendment 86E83A7D2ECE3AD5FA87AB2195AE015C950469ABF0B72EAACED318F74886AE90 is supported.
2019-Jan-17 15:42:39.204832272 Amendments:DBG Amendment 42EEA5E28A97824821D4EF97081FE36A54E9593C6E4F20CBAE098C69D2E072DC is supported.
2019-Jan-17 15:42:39.204876671 Amendments:DBG Amendment DC9CA96AEA1DCF83E527D1AFC916EFAF5D27388ECA4060A88817C1238CAEE0BF is supported.
2019-Jan-17 15:42:39.204913671 Amendments:DBG Amendment 3012E8230864E95A58C60FD61430D7E1B4D3353195F2981DC12B0C7C0950FFAC is supported.
2019-Jan-17 15:42:39.204949071 Amendments:DBG Amendment CC5ABAE4F3EC92E94A59B1908C2BE82D2228B6485C00AFF8F22DF930D89C194E is supported.
2019-Jan-17 15:42:39.204984270 Amendments:DBG Amendment B4D44CC3111ADD964E846FC57760C8B50FFCD5A82C86A72756F6B058DDDF96AD is supported.
2019-Jan-17 15:42:39.205024670 Amendments:DBG Amendment 6C92211186613F9647A89DFFBAB8F94C99D4C7E956D495270789128569177DA1 is supported.
2019-Jan-17 15:42:39.205061969 Amendments:DBG Amendment 67A34F2CF55BFC0F93AACD5B281413176FEE195269FA6D95219A2DF738671172 is supported.
2019-Jan-17 15:42:39.205107869 Amendments:DBG Amendment B9E739B8296B4A1BB29BE990B17D66E21B62A300A909F25AC55C22D6C72E1F9D is supported.
2019-Jan-17 15:42:39.205522664 Amendments:DBG Amendment 1D3463A5891F9E589C5AE839FFAC4A917CE96197098A1EF22304E1BC5B98A454 is supported.
2019-Jan-17 15:42:39.205617963 Amendments:DBG Amendment F64E1EABBE79D55B3BB82020516CEC2C582A98A6BFE20FBE9BB6A0D233418064 is supported.
2019-Jan-17 15:42:39.205756461 Amendments:DBG Amendment 157D2D480E006395B76F948E3E07A45A05FE10230D88A7993C71F97AE4B1F2D1 is supported.
2019-Jan-17 15:42:39.205801361 Amendments:DBG Amendment 7117E2EC2DBF119CA55181D69819F1999ECEE1A0225A7FD2B9ED47940968479C is supported.
2019-Jan-17 15:42:39.205839160 Amendments:DBG Amendment CA7C02118BA27599528543DFE77BA6838D1B0F43B447D4D7F53523CE6A0E9AC2 is supported.
2019-Jan-17 15:42:39.205874560 Amendments:DBG Amendment 58BE9B5968C4DA7C59BA900961828B113E5490699B21877DEF9A31E9D0FE5D5F is supported.
2019-Jan-17 15:42:39.205909759 Amendments:DBG Amendment 3CBC5C4E630A1B82380295CDA84B32B49DD066602E74E39B85EF64137FA65194 is supported.
2019-Jan-17 15:42:39.205944759 Amendments:DBG Amendment 5D08145F0A4983F23AFFFF514E83FAD355C5ABFBB6CAB76FB5BC8519FF5F33BE is supported.
2019-Jan-17 15:42:39.207952835 OrderBookDB:DBG Advancing from 0 to 3
2019-Jan-17 15:42:39.208033934 OrderBookDB:DBG OrderBookDB::update>
2019-Jan-17 15:42:39.208246032 OrderBookDB:DBG OrderBookDB::update< 0 books found
2019-Jan-17 15:42:39.403812138 ValidatorList:DBG Loading configured trusted validator list publisher keys
2019-Jan-17 15:42:39.403927336 ValidatorList:DBG Loaded 1 keys
2019-Jan-17 15:42:39.403967136 ValidatorList:DBG Loading configured validator keys
2019-Jan-17 15:42:39.404002936 ValidatorList:DBG Loaded 0 entries
2019-Jan-17 15:42:39.404039435 ValidatorSite:DBG Loading configured validator list sites
2019-Jan-17 15:42:39.404118534 ValidatorSite:DBG Loaded 1 sites
2019-Jan-17 15:42:39.404713927 NodeObject:DBG NodeStore.main target size set to 131072
2019-Jan-17 15:42:39.404771827 NodeObject:DBG NodeStore.main target age set to 120000000000
2019-Jan-17 15:42:39.404811926 TaggedCache:DBG LedgerCache target size set to 256
2019-Jan-17 15:42:39.404847926 TaggedCache:DBG LedgerCache target age set to 180000000000
2019-Jan-17 15:42:39.406504406 TaggedCache:DBG TreeNodeCache target size set to 512000
2019-Jan-17 15:42:39.406564905 TaggedCache:DBG TreeNodeCache target age set to 90000000000
2019-Jan-17 15:42:39.464171930 NetworkOPs:NFO Consensus time for #3 with LCL EB39BE60EFC9FF7E6923CCC19FAD550B1219D22A2B2DC3BB448BC3FEA34E349C
2019-Jan-17 15:42:39.464299528 ValidatorList:DBG 0  of 0 listed validators eligible for inclusion in the trusted set
2019-Jan-17 15:42:39.464340428 ValidatorList:DBG Using quorum of 18446744073709551615 for new set of 0 trusted validators (0 added, 0 removed)
2019-Jan-17 15:42:39.464377027 ValidatorList:WRN New quorum of 18446744073709551615 exceeds the number of trusted validators (0)
2019-Jan-17 15:42:39.464413927 LedgerConsensus:NFO Entering consensus process, watching, synced=no
2019-Jan-17 15:42:39.464455526 LedgerConsensus:NFO Consensus mode change before=observing, after=observing
2019-Jan-17 15:42:39.464494426 NetworkOPs:DBG Initiating consensus engine
2019-Jan-17 15:42:39.548974635 Server:NFO Opened 'port_rpc_admin_local' (ip=127.0.0.1:5005, admin IPs:127.0.0.1, http)
2019-Jan-17 15:42:39.549160133 Server:NFO Opened 'port_peer' (ip=0.0.0.0:51235, peer)
2019-Jan-17 15:42:39.549243032 Server:NFO Opened 'port_ws_admin_local' (ip=127.0.0.1:6006, admin IPs:127.0.0.1, ws)
2019-Jan-17 15:42:39.549323631 Application:FTL Startup RPC:
{
        "command" : "log_level",
        "severity" : "warning"
}

2019-Jan-17 15:42:39.549505629 Application:FTL Result: {}

2019-Jan-17 15:43:25.496585827 Peer:WRN [021] onReadMessage: Connection reset by peer
2019-Jan-17 15:43:32.555149723 NetworkOPs:WRN We are not running on the consensus ledger
2019-Jan-17 15:43:32.555897415 LedgerConsensus:WRN Need consensus ledger 13DA374D11825AB417E311C1C97E45BFE0B72F7EB01F54D39BFB86D87AF3BF74
2019-Jan-17 15:43:34.555687055 LedgerConsensus:WRN View of consensus changed during establish status=establish,  mode=wrongLedger
2019-Jan-17 15:43:34.555829453 LedgerConsensus:WRN 13DA374D11825AB417E311C1C97E45BFE0B72F7EB01F54D39BFB86D87AF3BF74 to 730A2036165DD9DA2DD9CCA3B07B93

A separate user for rippled:

sudo useradd -d /home/xrp -m --uid 10001 --shell "/bin/bash" xrp

Starting the service:

[Unit]
Description=Ripple

[Service]
Type=simple
User=xrp
Restart=always
WorkingDirectory=/home/xrp
ExecStart=/home/xrp/rippled

[Install]
WantedBy=default.target
sudo nano /etc/systemd/system/ripple.service
sudo systemctl daemon-reload
sudo systemctl enable ripple.service
sudo service ripple start
journalctl -u ripple.service | tail -n 100
and "pubkey_validator" matched the validator public key.
./rippled wallet_propose
./rippled account_info r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59 true
Loading: "/home/xrp/.config/ripple/rippled.cfg"
2019-Feb-16 17:59:49.796154106 HTTPClient:NFO Connecting to 127.0.0.1:5005

{
   "result" : {
      "error" : "lgrNotFound",
      "error_code" : 21,
      "error_message" : "ledgerNotFound",
      "request" : {
         "account" : "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59",
         "command" : "account_info",
         "ledger_index" : 0
      },
      "status" : "error"
   }
}
./rippled server_state
{
   "result" : {
      "state" : {
         "build_version" : "1.1.2",
         "complete_ledgers" : "45098585-45098627,45098730-45098750,45098854-45098864,45099036-45099061",
         "io_latency_ms" : 1,
         "jq_trans_overflow" : "6060",
         "last_close" : {
            "converge_time" : 2550,
            "proposers" : 0
         },
         "load" : {
            "job_types" : [
               {
                  "in_progress" : 2,
                  "job_type" : "ledgerData",
                  "waiting" : 120
               },
               {
                  "avg_time" : 1728,
                  "in_progress" : 1,
                  "job_type" : "clientCommand",
                  "over_target" : true,
                  "peak_time" : 5881,
                  "waiting" : 5
               },
               {
                  "avg_time" : 376,
                  "job_type" : "advanceLedger",
                  "peak_time" : 1060,
                  "per_second" : 42
               },
               {
                  "avg_time" : 531,
                  "job_type" : "trustedValidation",
                  "over_target" : true,
                  "peak_time" : 1785,
                  "per_second" : 14
               },
               {
                  "avg_time" : 14,
                  "job_type" : "writeObjects",
                  "peak_time" : 360,
                  "per_second" : 14
               },
               {
                  "avg_time" : 125,
                  "job_type" : "trustedProposal",
                  "over_target" : true,
                  "peak_time" : 672,
                  "per_second" : 8
               },
               {
                  "in_progress" : 1,
                  "job_type" : "sweep"
               },
               {
                  "avg_time" : 45,
                  "job_type" : "clusterReport",
                  "peak_time" : 177
               },
               {
                  "job_type" : "peerCommand",
                  "peak_time" : 10,
                  "per_second" : 445
               },
               {
                  "avg_time" : 8,
                  "job_type" : "diskAccess",
                  "peak_time" : 349,
                  "per_second" : 14
               },
               {
                  "job_type" : "AsyncReadNode",
                  "peak_time" : 1245,
                  "per_second" : 1015
               },
               {
                  "job_type" : "WriteNode",
                  "peak_time" : 2,
                  "per_second" : 1
               }
            ],
            "threads" : 4
         },
         "load_base" : 256,
         "load_factor" : 435808,
         "load_factor_fee_escalation" : 256,
         "load_factor_fee_queue" : 256,
         "load_factor_fee_reference" : 256,
         "load_factor_server" : 435808,
         "peer_disconnects" : "345",
         "peer_disconnects_resources" : "0",
         "peers" : 10,
         "pubkey_node" : "n9MFoaCijf1BTGUAxuCD1zpWVdyD7ftc1kfUZbvEnAqEfs6BrVoE",
         "pubkey_validator" : "nHUEWySUmYrL52815TvtL525TRbnN6nypzwwyNmxqVZms7aspdGn",
         "published_ledger" : 45099061,
         "server_state" : "proposing",
         "state_accounting" : {
            "connected" : {
               "duration_us" : "1958992936",
               "transitions" : 1
            },
            "disconnected" : {
               "duration_us" : "1915654",
               "transitions" : 1
            },
            "full" : {
               "duration_us" : "291340373403",
               "transitions" : 1
            },
            "syncing" : {
               "duration_us" : "17327221",
               "transitions" : 1
            },
            "tracking" : {
               "duration_us" : "1",
               "transitions" : 1
            }
         },
         "time" : "2019-Feb-16 18:01:31.207774",
         "uptime" : 293319,
         "validated_ledger" : {
            "base_fee" : 10,
            "close_time" : 603365681,
            "hash" : "E6011BD2C078374782B61CEE633CAB0FEE2E4147C5D4DB8CD69C9A5717B86CF3",
            "reserve_base" : 20000000,
            "reserve_inc" : 5000000,
            "seq" : 45099073
         },
         "validation_quorum" : 22,
         "validator_list_expires" : 603936000
      },
      "status" : "success"
   }
}

To enable the validation I built validator-keys-tool:

cd ~/repos
git clone --recursive https://github.com/ripple/validator-keys-tool.git
cd validator-keys-tool/
git submodule update --init --recursive
mkdir build
cd build/
export BOOST_ROOT=/home/user/lib/boost_1_67_0
cmake ..
cmake --build .
./validator-keys -u

Then I generated the keys:

./validator-keys create_keys
./validator-keys create_token --keyfile /home/user/.ripple/validator-keys.json

added [validator_token] section to /home/xrp/.config/ripple/rippled.cfg and “pubkey_validator” matched the validator public key.

./rippled server_info
{
   "result" : {
      "info" : {
         "build_version" : "1.1.2",
         "complete_ledgers" : "45098585-45098627,45098730-45098750,45098854-45098864,45099036-45099061",
         "fetch_pack" : 5449,
         "hostid" : "tor",
         "io_latency_ms" : 1,
         "jq_trans_overflow" : "6060",
         "last_close" : {
            "converge_time_s" : 2.579,
            "proposers" : 0
         },
         "load" : {
            "job_types" : [
               {
                  "avg_time" : 24709,
                  "job_type" : "untrustedValidation",
                  "over_target" : true,
                  "peak_time" : 58531,
                  "per_second" : 6
               },
               {
                  "avg_time" : 7318,
                  "job_type" : "ledgerRequest",
                  "peak_time" : 37512
               },
               {
                  "avg_time" : 17444,
                  "job_type" : "untrustedProposal",
                  "over_target" : true,
                  "peak_time" : 35757,
                  "per_second" : 26
               },
               {
                  "in_progress" : 2,
                  "job_type" : "ledgerData",
                  "waiting" : 135
               },
               {
                  "avg_time" : 1679,
                  "in_progress" : 1,
                  "job_type" : "clientCommand",
                  "peak_time" : 4160,
                  "per_second" : 2
               },
               {
                  "avg_time" : 328,
                  "job_type" : "advanceLedger",
                  "peak_time" : 877,
                  "per_second" : 37
               },
               {
                  "avg_time" : 1100,
                  "job_type" : "trustedValidation",
                  "over_target" : true,
                  "peak_time" : 1950,
                  "per_second" : 12
               },
               {
                  "avg_time" : 14,
                  "job_type" : "writeObjects",
                  "peak_time" : 233,
                  "per_second" : 9
               },
               {
                  "avg_time" : 215,
                  "job_type" : "acceptLedger",
                  "peak_time" : 829
               },
               {
                  "avg_time" : 431,
                  "job_type" : "trustedProposal",
                  "over_target" : true,
                  "peak_time" : 1063,
                  "per_second" : 10
               },
               {
                  "avg_time" : 286,
                  "job_type" : "heartbeat",
                  "peak_time" : 475
               },
               {
                  "job_type" : "peerCommand",
                  "peak_time" : 87,
                  "per_second" : 487
               },
               {
                  "avg_time" : 12,
                  "job_type" : "diskAccess",
                  "peak_time" : 237,
                  "per_second" : 9
               },
               {
                  "avg_time" : 5,
                  "job_type" : "AsyncReadNode",
                  "peak_time" : 852,
                  "per_second" : 154
               },
               {
                  "job_type" : "WriteNode",
                  "per_second" : 1
               }
            ],
            "threads" : 4
         },
         "load_factor" : 1008.15234375,
         "load_factor_local" : 1008.15234375,
         "peer_disconnects" : "343",
         "peer_disconnects_resources" : "0",
         "peers" : 10,
         "pubkey_node" : "n9MFoaCijf1BTGUAxuCD1zpWVdyD7ftc1kfUZbvEnAqEfs6BrVoE",
         "pubkey_validator" : "nHUEWySUmYrL52815TvtL525TRbnN6nypzwwyNmxqVZms7aspdGn",
         "published_ledger" : 45099061,
         "server_state" : "proposing",
         "state_accounting" : {
            "connected" : {
               "duration_us" : "1958992936",
               "transitions" : 1
            },
            "disconnected" : {
               "duration_us" : "1915654",
               "transitions" : 1
            },
            "full" : {
               "duration_us" : "289397629120",
               "transitions" : 1
            },
            "syncing" : {
               "duration_us" : "17327221",
               "transitions" : 1
            },
            "tracking" : {
               "duration_us" : "1",
               "transitions" : 1
            }
         },
         "time" : "2019-Feb-16 17:29:08.466689",
         "uptime" : 291376,
         "validated_ledger" : {
            "age" : 287667,
            "base_fee_xrp" : 1e-05,
            "hash" : "E6011BD2C078374782B61CEE633CAB0FEE2E4147C5D4DB8CD69C9A5717B86CF3",
            "reserve_base_xrp" : 20,
            "reserve_inc_xrp" : 5,
            "seq" : 45099073
         },
         "validation_quorum" : 22,
         "validator_list" : {
            "count" : 1,
            "expiration" : "2019-Feb-20 00:00:00.000000000",
            "status" : "active"
         }
      },
      "status" : "success"
   }
}