diff --git a/content/rippled-setup.md b/content/rippled-setup.md index 8a8034de13..329ee36507 100644 --- a/content/rippled-setup.md +++ b/content/rippled-setup.md @@ -106,21 +106,15 @@ This document assumes that you are using Ubuntu 14.04. [port_rpc] port = 51234 ip = 0.0.0.0 - admin = allow + admin = 127.0.0.1 protocol = http [port_ws] port = 51233 ip = 0.0.0.0 - admin = allow + admin = 127.0.0.1 protocol = ws - [peer_private] - 1 - - [ledger_history] - full - [ssl_verify] 0 @@ -130,29 +124,66 @@ This document assumes that you are using Ubuntu 14.04. time.nist.gov pool.ntp.org - [rpc_allow_remote] - 1 - [node_db] type=nudb - path=/mnt/rippled/db/nudb + path=/var/lib/rippled/db/nudb [database_path] - /mnt/rippled/db + /var/lib/rippled/db + + [debug_logfile] + /var/log/rippled/debug.log [rpc_startup] {"command": "log_level", "severity": "warning"} See [the rippled GitHub repository](https://github.com/ripple/rippled/blob/develop/doc/rippled-example.cfg) for additional configuration options. -4. Give rippled permission to mount: +4. (Optional) If connecting to a [parallel network](#parallel-networks), add IP addresses of parallel network nodes to `rippled.cfg`: - $ sudo mkdir /mnt/rippled - $ sudo chown rippled:rippled -R /mnt/rippled + For example the following IP addresses are the current [Ripple Test Net](#parallel-networks) validators: -5. Start the rippled service: + [ips] + 52.16.66.76 51235 + 52.11.28.194 51235 + 54.94.245.104 51235 + 52.11.181.30 51235 + 52.68.19.29 51235 + 41.79.78.42 51235 - $ sudo service rippled start +5. Add trusted validation public keys to `rippled.cfg`: + + The default configuration includes validators operated by Ripple Labs for the production Ripple Network: + + [validators] + n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7 RL1 + n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj RL2 + n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C RL3 + n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS RL4 + n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA RL5 + + If you want to connect to the [Ripple Test Net](#parallel-networks), you could add the validation public keys of the Ripple Labs validators on that network instead: + + [validators] + n9LYyd8eUVd54NQQWPAJRFPM1bghJjaf1rkdji2haF4zVjeAPjT2 + n9KcuH7Y4q4SD3KoS5uXLhcDVvexpnYkwciCbcX131ehM5ek2BB6 + n9LeE7e1c35m96BfFbUu1HKyJfqwiPvwNk6YxT5ewuZYsvwZqprp + n9Kk6U5nSF8EggfmTpMdna96UuXWAVwSsDSXRkXeZ5vLcAFk77tr + n9LXZBs2aBiNsgBkhVJJjDX4xA4DoEBLycF6q8zRhXD1Zu3Kwbe4 + n9MnXUt5Qcx3BuBYKJfS4fqSohgkT79NGjXnZeD9joKvP3A5RNGm + +6. Adjust the validation quorum value in `rippled.cfg`: + + This sets the minimum of trusted validations a ledger must have before the server considers it fully validated. Note that if you are validating, your validation counts. + + For example, a validation quorum for a new [Ripple Test Net](#parallel-networks) validator could be set as follows: + + [validation_quorum] + 4 + +7. Restart rippled: + + $ sudo service rippled restart It can take several minutes for `rippled` to sync with the rest of the network, during which time it outputs warnings about missing ledgers. After that, you have a fully functional stock `rippled` node that you can use for local signing and API access to the Ripple Network. @@ -185,50 +216,8 @@ Becoming a validator that participates in the network involves several steps. In [validation_seed] ssdecohJMDPFuUPDkmG1w4objZyp4 - -5. (Optional) If connecting to a [parallel network](#parallel-networks), add core validator IP addresses of parallel network to `rippled.cfg`: - For example the following IP addresses are the current [Ripple Test Net](#parallel-networks) core validators: - - [ips_fixed] - 52.16.66.76 51235 - 52.11.28.194 51235 - 54.94.245.104 51235 - 52.11.181.30 51235 - 52.68.19.29 51235 - 41.79.78.42 51235 - -6. Add core validator validation public keys to `rippled.cfg`: - - The default configuration includes core validators operated by Ripple Labs for the production Ripple Network: - - [validators] - n949f75evCHwgyP4fPVgaHqNHxUVN15PsJEZ3B3HnXPcPjcZAoy7 RL1 - n9MD5h24qrQqiyBC8aeqqCWvpiBiYQ3jxSr91uiDvmrkyHRdYLUj RL2 - n9L81uNCaPgtUJfaHh89gmdvXKAmSt5Gdsw2g1iPWaPkAHW5Nm4C RL3 - n9KiYM9CgngLvtRCQHZwgC2gjpdaZcCcbt3VboxiNFcKuwFVujzS RL4 - n9LdgEtkmGB9E2h3K4Vp7iGUaKuq23Zr32ehxiU8FWY7xoxbWTSA RL5 - - If you want to connect to the [Ripple Test Net](#parallel-networks), you would add the validation public keys of the core validators on that network instead: - - [validators] - n9LYyd8eUVd54NQQWPAJRFPM1bghJjaf1rkdji2haF4zVjeAPjT2 - n9KcuH7Y4q4SD3KoS5uXLhcDVvexpnYkwciCbcX131ehM5ek2BB6 - n9LeE7e1c35m96BfFbUu1HKyJfqwiPvwNk6YxT5ewuZYsvwZqprp - n9Kk6U5nSF8EggfmTpMdna96UuXWAVwSsDSXRkXeZ5vLcAFk77tr - n9LXZBs2aBiNsgBkhVJJjDX4xA4DoEBLycF6q8zRhXD1Zu3Kwbe4 - n9MnXUt5Qcx3BuBYKJfS4fqSohgkT79NGjXnZeD9joKvP3A5RNGm - -7. Adjust the validation quorum value in `rippled.cfg`: - - This sets the minimum of trusted validations a ledger must have before the server considers it fully validated. Note that if you are validating, your validation counts. - - For example, a validation quorum for a new [Ripple Test Net](#parallel-networks) validator could be set as follows: - - [validation_quorum] - 4 - -8. Restart `rippled` validator +5. Restart `rippled` validator $ sudo service rippled restart diff --git a/content/tx_format.md b/content/tx_format.md index e9080fafdc..19a18a8179 100644 --- a/content/tx_format.md +++ b/content/tx_format.md @@ -219,7 +219,7 @@ The `Fee` field specifies an amount, in [drops of XRP](rippled-apis.html#specify Each rippled server decides on the minimum fee to require, which is at least the global base transaction fee, and increases based on the individual server's current load. If a transaction's fee is not high enough, then the server does not relay the transaction to other servers. (*Exception:* If you send a transaction to your own server over an admin connection, it relays the transaction even under high load, so long as the fee meets the global base.) -Even if some servers have too much load to propagate a transaction, the transaction can still make it into a validated ledger as long as a large enough percentage of validating servers receive it, so the global base fee is generally enough to submit a transaction. If many servers in the network are under high load all at once (for example, due to a DDoS or a global event of some sort) then you must either set the fee higher or wait for the load to decrease. +Even if some servers have too much load to propagate a transaction, the transaction can still make it into a validated ledger as long as a large enough percentage of validating servers receive it, so the global base fee is generally enough to submit a transaction. If many servers in the network are under high load all at once (for example, due to a DDoS or a global event of some sort) then you must either set the `Fee` value higher or wait for the load to decrease. For more information, see the [Transaction Fee wiki article](https://wiki.ripple.com/Transaction_Fee). @@ -329,7 +329,7 @@ Example payment: | DestinationTag | Unsigned Integer | UInt32 | (Optional) Arbitrary tag that identifies the reason for the payment to the destination, or the hosted wallet to make a payment to. | | InvoiceID | String | Hash256 | (Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this payment. | | Paths | Array of path arrays | PathSet | (Optional, auto-fillable) Array of [payment paths](https://ripple.com/wiki/Payment_paths) to be used for this transaction. Must be omitted for XRP-to-XRP transactions. | -| SendMax | String/Object | Amount | (Optional) Highest amount of source currency this transaction is allowed to cost, including fees, exchanges, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). (See [Specifying Currency Amounts](rippled-apis.html#specifying-currency-amounts)) Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. | +| SendMax | String/Object | Amount | (Optional) Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchanges, and [slippage](http://en.wikipedia.org/wiki/Slippage_%28finance%29). Does not include the [XRP `Fee` for submitting the transaction](#transaction-fees). (Also see [Specifying Currency Amounts](rippled-apis.html#specifying-currency-amounts)) Must be supplied for cross-currency/cross-issue payments. Must be omitted for XRP-to-XRP payments. | ### Special issuer Values for SendMax and Amount ### diff --git a/js/apitool-methods-ripplerest.js b/js/apitool-methods-ripplerest.js index 5267ee5cca..520ab488a7 100644 --- a/js/apitool-methods-ripplerest.js +++ b/js/apitool-methods-ripplerest.js @@ -283,6 +283,35 @@ Request("Get Server Status", { Request("UTILITIES"); +Request("Sign Transaction", { + method: POST, + path: "/v1/transaction/sign", + description: "Sign a Ripple transaction in preparation for submission", + link: "#sign-transaction", + body: { + "secret": DEFAULT_SECRET, + "tx_json": { + "Flags": 0, + "TransactionType": "AccountSet", + "Account": DEFAULT_ADDRESS_1, + "Domain": "726970706C652E636F6D", + "LastLedgerSequence": 8820052, + "Fee": "12", + "Sequence": 2938 + } + } +}); + +Request("Submit Transaction", { + method: POST, + path: "/v1/transaction/submit", + description: "Submit a signed transaction to the Ripple network", + link: "#submit-transaction", + body: { + "tx_blob": "12000322000000002400000B7A201B0086961168400000000000000C732102F89EAEC7667B30F33D0687BBA86C3FE2A08CCA40A9186C5BDE2DAA6FA97A37D87446304402207660BDEF67105CE1EBA9AD35DC7156BAB43FF1D47633199EE257D70B6B9AAFBF0220723E54B026DF8C6FF19DC7CBEB6AB458C7D367B2BE42827E91CBA934143F2729770A726970706C652E636F6D81144FBFF73DA4ECF9B701940F27341FA8020C313443" + } +}); + Request("Retrieve Ripple Transaction", { method: GET, path: "/v1/transactions/{:id}", diff --git a/js/apitool-websocket.js b/js/apitool-websocket.js index 2ff32fdebe..46ae633426 100644 --- a/js/apitool-websocket.js +++ b/js/apitool-websocket.js @@ -23,7 +23,7 @@ local_fee: false, servers: [ { - host: 's1.ripple.com', + host: 's2.ripple.com', port: 443, secure: true } @@ -87,22 +87,23 @@ }; var sample_address = 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59'; + var sample_address_2 = 'ra5nK24KXen9AHvsdFTKHSANinZseWnPcX'; var sample_tx = 'E08D6E9754025BA2534A78707605E0601F03ACE063687A0CA1BDDACFCD1698C7'; /* ---- ---- */ Request('server_info', { - _description: 'Returns information about the state of the server for human consumption. Results are subject to change without notice.', + _description: 'Get information about the state of the server for human consumption. Results are subject to change without notice.', _link: 'rippled-apis.html#server-info' }); Request('server_state', { - _description: 'Returns information about the state of the server for machine consumption.', + _description: 'Get information about the state of the server for machine consumption.', _link: 'rippled-apis.html#server-state' }); Request('ping', { - _description: 'This command is used to check connectivity for clients. Websocket clients can use this to determine turn around time and actively discover loss of connectivity to a server.', + _description: 'Check connectivity to the server.', _link: 'rippled-apis.html#ping' }); @@ -142,17 +143,17 @@ account_root: sample_address, ledger_index: 'validated', ledger_hash: void(0), - _description: 'Returns a ledger entry. For untrusted servers, the index option provides raw access to ledger entries and proof.', + _description: 'Get a single node from the ledger', _link: 'rippled-apis.html#ledger-entry' }); Request('ledger_closed', { - _description: 'Returns the most recent closed ledger index. If a validation list has been provided, then validations should be available.', + _description: 'Get the most recent closed ledger index.', _link: 'rippled-apis.html#ledger-closed' }); Request('ledger_current', { - _description: 'Returns the current proposed ledger index. Proof is not possible for the current ledger. This command is primarily useful for testing.', + _description: 'Get the current in-progress ledger index.', _link: 'rippled-apis.html#ledger-current' }); @@ -160,7 +161,7 @@ Request('account_info', { account: sample_address, - _description: 'Returns information about the specified account.', + _description: 'Get information about the specified account.', _link: 'rippled-apis.html#account-info' }); @@ -168,7 +169,7 @@ account: sample_address, account_index: void(0), ledger: 'current', - _description: 'Returns information about the ripple credit lines for the specified account.', + _description: "Get a list of trust lines connected to an account.", _link: 'rippled-apis.html#account-lines' }); @@ -176,7 +177,7 @@ account: sample_address, account_index: void(0), ledger: 'current', - _description: 'Returns the outstanding offers for a specified account.', + _description: 'Get a list of offers created by an account.', _link: 'rippled-apis.html#account-offers' }); @@ -189,7 +190,7 @@ limit: 10, forward: false, marker: void(0), - _description: 'Returns a list of transactions that applied to a specified account.', + _description: 'Get a list of transactions that applied to a specified account.', _link: 'rippled-apis.html#account-tx' }); @@ -208,7 +209,7 @@ tx_hash: sample_tx, ledger_index: 348734, ledger_hash: void(0), - _description: 'Returns information about a specified transaction.', + _description: 'Get information about a specified transaction.', _link: 'rippled-apis.html#transaction-entry' }); @@ -243,8 +244,12 @@ Request('path_find', { subcommand: 'create', source_account: sample_address, - destination_account: 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', - destination_amount: ripple.Amount.from_json('0.001/USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B').to_json(), + destination_account: sample_address_2, + destination_amount: { + "currency": "USD", + "value": "0.01", + "issuer": sample_address_2 + }, _description: 'Start or stop searching for payment paths between specified accounts.', _link: 'rippled-apis.html#path-find', _stream: true @@ -255,8 +260,12 @@ ledger_index : void(0), source_account : sample_address, source_currencies : [ { currency : 'USD' } ], - destination_account : 'r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59', - destination_amount : ripple.Amount.from_json('0.001/USD/rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B').to_json(), + destination_account : sample_address_2, + destination_amount : { + "currency": "USD", + "value": "0.01", + "issuer": sample_address_2 + }, _description: 'Find a path between specified accounts once. For repeated usage, call path_find instead.', _link: 'rippled-apis.html#ripple-path-find' });