Commit Graph

52 Commits

Author SHA1 Message Date
Nathan Nichols
f16a05ae7a cleanup websocket sessions that are subscribed to books or accounts (#146) 2022-06-03 12:46:45 -05:00
Nathan Nichols
458fac776c move version specifier to Build.h 2022-06-02 16:37:43 -07:00
Nathan Nichols
af575b1bcf dont report error.what() when returning rpcINTERNAL (#163) 2022-06-02 16:41:09 -05:00
Nathan Nichols
ee615a290b report transactions as validated in account_tx (#165) 2022-06-02 16:21:55 -05:00
Nathan Nichols
31cc06d4f4 handle string ledger_index values in doAccountTx (#162)
* handle string ledger_index values in doAccountTx

* return ledgerInfo when ledger_hash is specified
2022-06-02 15:53:12 -05:00
Devon White
9939f6e6f4 Add NFT RPC infrastructure 2022-05-18 15:41:56 -04:00
CJ Cobb
8bf44c978e Log cleanup (#150)
* log duration of rpc requests and request itself
* clean up book_offers logging
2022-05-11 12:46:40 -05:00
Nathan Nichols
cdabdec620 return entryNotFound instead of ledgerNotFound (#149) 2022-05-03 17:24:56 -05:00
Nathan Nichols
d4dc827ad1 fix validated_ledger location in server_info (#144)
* put validated_ledger in "info"
* return internal error if db reads fail
* reorganize doServerInfo()
* forward load_factor and quorum correctly
2022-04-26 19:49:51 -05:00
Michael Legleux
b2c1731bcd Fix header and function call (#138)
* RippledState.h --> TrustLine.h

* fix getAffectedAccounts() calls
2022-04-11 13:43:21 -04:00
Nathan Nichols
d6ec0f2aae round age to zero when negative (#137) 2022-03-30 13:02:59 -05:00
Nathan Nichols
9b1de77110 use 64 bit counters (#136)
* use 64 bit counters
2022-03-30 13:01:56 -05:00
Nathan Nichols
e526083456 Hotfix for account_info, ledger_data and ip() (#134)
* remove option to create account from seed

* catch errors in derived().ip()

* checks keys.size() before accessing
2022-03-25 16:57:32 -04:00
Nathan Nichols
1d5c482d9c Make Clio RPCs more consistent with rippled (#110)
* parse ledger_index as number

* allow websocket to use "command" or "method"

* mark all non-forwarded responses as validated

* dont mark forwarded errors as successful

* reduce forwarding Websocket expiration 30->3 seconds

* fix merge conflict in test.py

* adds ledger_current and ledger_closed

* deserialize `taker_gets_funded` into amount json

* limit account RPCs by number of objects traversed

* assign result correctly
2022-03-21 18:28:03 -05:00
CJ Cobb
b1add848f4 add etl info to server_info response 2022-03-21 13:57:35 -07:00
CJ Cobb
f8437b9ba4 proper handling of deleted objects 2022-03-21 13:57:35 -07:00
CJ Cobb
f41bfa3715 only return non-deleted object 2022-03-21 13:57:35 -07:00
CJ Cobb
7c6979ae57 optimized ledger_data 2022-03-21 13:57:35 -07:00
CJ Cobb
16e3c87dcc don't create strands for cache download. output cache info in server_info 2022-03-21 13:57:35 -07:00
CJ Cobb
b332c388d2 Load cache from our own database 2022-03-07 15:55:42 -05:00
Nathan Nichols
738577309d specify CMAKE_CXX_STANDARD (#102)
* specify CMAKE_CXX_STANDARD

* add reference to range based for loop
2022-02-22 17:18:31 -06:00
undertome
c03b72ad51 Advance DOSGuard (#96)
* Add C++20 features
* Make whitelist const
2022-02-18 17:43:02 -05:00
natenichols
d016253264 Make database reads async
* yield on db read using asio
* PostgresBackend fetches multiple transactions or objects in parallel
2022-02-16 09:36:51 -05:00
CJ Cobb
da96608feb add diff flag to ledger command 2022-01-25 12:11:05 -05:00
Michael Legleux
bdfd07f154 clang-format (#86)
* clang-format

* ignore clang-format commit; run clang-format in github actions
2022-01-24 15:26:53 -05:00
Nathan Nichols
c3c248734f Unwrap result when forwarding (#78)
* fix error formatting for forwarded responses

* unwrap result when forwarding successful responses
2022-01-05 15:06:47 -05:00
CJ Cobb
49c7c9989f Forward client IP to rippled when proxying (#77) 2022-01-05 14:51:00 -05:00
Nathan Nichols
41e412302b Report RPC counts in server_info (#72) 2022-01-05 12:58:17 -05:00
Nathan Nichols
9c93e948f5 refactor account_tx (#70)
Revert compound partition key to avoid large rows.
2022-01-03 15:47:56 -05:00
CJ Cobb
c7e31aff56 Add state data cache and successor table. Remove keys table
* Adds a cache for the most recently validated ledger state
* Replaces the keys table with successor table
* Adds support for ledger diffs in the database
* Removes BackendIndexer
2021-12-20 14:40:23 -05:00
Nathan Nichols
e930ff04df Refactors subscription manager (#52)
* Replaces mutexes with asio strands
2021-12-14 11:24:10 -05:00
Nathan Nichols
a449b7de54 Handle case where params is null (#65)
* if request does not have parameters, set params to empty [{}]
2021-12-08 15:51:00 -08:00
Wietse Wind
a9edd2e2c1 Remove ledger range spaces (server_info, complete_ledgers)
For native rippled compatibility
2021-12-07 17:01:55 -05:00
CJ Cobb
2cb74ae706 fix recursion issue with fetchLedgerPage 2021-10-05 18:30:11 -04:00
CJ Cobb
96c72eec49 remove rippled license 2021-09-24 12:13:11 -04:00
CJ Cobb
6b3091a456 Add server_info. Make forwardToRippled return optional 2021-09-21 12:15:10 -04:00
CJ Cobb
3d580784d1 add random and ping 2021-09-17 15:30:36 -04:00
CJ Cobb
9ef54da0ef Implement transaction_entry 2021-09-14 12:10:36 -04:00
CJ Cobb
7d13090d0b add support for transaction_entry 2021-09-14 12:10:36 -04:00
CJ Cobb
8e877ac87c implement noripple_check 2021-09-14 12:10:36 -04:00
CJ Cobb
f18c8f67e2 add gateway_balances. fix bug with account_currencies 2021-09-14 12:10:31 -04:00
CJ Cobb
01aed9f6e8 Add date to transactions table.
* Add date to account_tx response
* Add support for signer_lists to account_info
* Add support for converting seeds to accounts
* Add urlgravatar to account_info
2021-09-09 15:25:54 -04:00
CJ Cobb
553be19882 add date field to tx response 2021-09-07 10:25:11 -04:00
CJ Cobb
fcb6355c67 don't zero frozen funds when publishing txns 2021-09-01 16:48:16 -04:00
CJ Cobb
b591c71053 add delivered_amount and owner_funds to streams 2021-08-30 17:10:58 -04:00
CJ Cobb
ce9a2af33c refactor to make WsSession thread safe 2021-08-30 14:21:16 -04:00
CJ Cobb
a81ad20049 Order book refactor
* Add support for snapshot to books stream
* Add helper function for processing order book after db fetch
* Fix bug in isFrozen
2021-08-26 11:10:58 -04:00
CJ Cobb
f4b7a88d95 clean up subscriptions code
* change the way sessions are removed from SubscriptionManager
* make the locking more fine grained
* add a mutex to WsSession to protect concurrent access to the websocket
2021-08-24 17:48:04 -04:00
CJ Cobb
d65bbfc841 first half of support for books stream 2021-08-23 14:44:46 -04:00
CJ Cobb
79ac95ae8e fix transaction on db restart bug 2021-08-19 10:28:14 -04:00