Commit Graph

206 Commits

Author SHA1 Message Date
Jude Nelson
7fe72fcb05 fix: set higher default execution cost so callreadonly test passes 2023-10-03 21:27:40 -04:00
Jude Nelson
03be8c7290 Merge branch 'develop' into feat/http-rpc-refactor 2023-10-03 18:04:26 -04:00
Jude Nelson
63ab815f77 refactor: put _all_ RPC handlers into their own files, and refactor test_rpc() so it can take a series of requests and spit out a series of responses 2023-10-02 16:28:47 -04:00
Jude Nelson
e0a0857a6e refactor: put post-transaction RPC handler into its own file 2023-10-02 16:28:27 -04:00
Jude Nelson
c8682f711a refactor: put post-stackerdb-chunk RPC handler into its own file 2023-10-02 16:17:04 -04:00
Jude Nelson
2a8ee3d1a9 refactor: put post-microblock RPC handler into its own file 2023-10-02 16:16:41 -04:00
Jude Nelson
6d3604b275 refactor: put mempool query RPC handler into its own file 2023-10-02 16:16:24 -04:00
Jude Nelson
213f141dea refactor: put fee-rate estimator RPC handler into its own file 2023-10-02 16:15:59 -04:00
Jude Nelson
3a7f82a30a refactor: put post-blcok RPC handler into its own file 2023-10-02 16:15:41 -04:00
Jude Nelson
74ae694dfb refactor: put get-transaction-unconfirmed RPC handler into its own file 2023-10-02 16:15:19 -04:00
Jude Nelson
863901d859 refactor: put get-stx-transfer-cost RPC handler into its own file 2023-10-02 16:15:01 -04:00
Jude Nelson
90242db08f refactor: put get-stackerdb-metadata RPC handler into its own file 2023-10-02 16:14:42 -04:00
Jude Nelson
490866edbe refactor: put get-stackerdb-chunk RPC handler into its own file 2023-10-02 16:14:19 -04:00
Jude Nelson
1c5b0e43a2 refactor: put get-pox-info RPC handler into its own file 2023-10-02 16:13:59 -04:00
Jude Nelson
36b91c9089 refactor: put get-neighbors RPC handler into its own file 2023-10-02 16:13:43 -04:00
Jude Nelson
7ad39eb03e refactor: put get-unconfirmed-microblocks RPC handler into its own file 2023-10-02 16:13:25 -04:00
Jude Nelson
7ad3b28276 refactor: put get-indexed-microblocks handler into its own file 2023-10-02 16:12:54 -04:00
Jude Nelson
34c5af5943 refactor: put get-confirmed-microblocks RPC handler into its own file 2023-10-02 16:12:33 -04:00
Jude Nelson
4c744356de refactor: put get-map-entry RPC handler into its own file 2023-10-02 16:12:15 -04:00
Jude Nelson
3056aa3c37 refactor: put get-is-trait-implemented RPC handler into its own file 2023-10-02 16:11:57 -04:00
Jude Nelson
568de364c4 refactor: put get-node-info RPC handler into its own file 2023-10-02 16:11:32 -04:00
Jude Nelson
d0229d9474 refactor: put get-headers RPC endpoint into its own file 2023-10-02 16:11:04 -04:00
Jude Nelson
92f47fde94 refactor: put get-data-var RPC handler into its own file 2023-10-02 16:10:46 -04:00
Jude Nelson
e9b07c4f11 chore: put get-contract-source RPC handler into its own file 2023-10-02 16:10:26 -04:00
Jude Nelson
3d1cbbc667 refactor: put get-contract-abi RPC handler into its own file 2023-10-02 16:10:01 -04:00
Jude Nelson
765960a9fd refactor: put get-constant-value RPC handler into its own file 2023-10-02 16:09:40 -04:00
Jude Nelson
0c302fe599 refactor: put get-block RPC handler into its own file 2023-10-02 16:09:17 -04:00
Jude Nelson
5c0c7cc1ea refactor: put get-attachments-inventory RPC handler into its own file 2023-10-02 16:08:55 -04:00
Jude Nelson
2da1bc9f7b refactor: put get-attachment RPC handler into its own file 2023-10-02 16:08:30 -04:00
Jude Nelson
7acdfb849b refactor: put get-account RPC handler into its own file 2023-10-02 16:08:02 -04:00
Jude Nelson
254b5a1bff refactor: put call-read-only RPC endpoint into its own file 2023-10-02 16:07:41 -04:00
Jude Nelson
c6d4823367 refactor: consolidate all testing for application-level concerns for Stacks HTTP support in one place 2023-10-02 16:06:54 -04:00
Jude Nelson
c200a9c734 refactor: bind net::http with Stacks node state to create the StacksHttp state machine, along with its associated StacksHttpRequest and StacksHttpResponse wrappers. This new system includes a plug-and-play RPC request handler, whereby one only needs to implement an RPC handler trait to add support for a new request route. 2023-10-02 16:05:29 -04:00
Jude Nelson
5850525ae1 refactor: introducing the net::http crate, which contains all HTTP transport logic and unit tests 2023-10-02 16:05:05 -04:00
Jude Nelson
a21eb1191b refactor: capture all HTTP transport tests in one place 2023-10-02 16:04:46 -04:00
Jude Nelson
da3c1cd05f refactor: capture all HTTP streaming data in one place, for sending chunked transfer-encoded data 2023-10-02 16:04:13 -04:00
Jude Nelson
adfafeef1d refactor: capture all common transport logic for HTTP headers and body responses in one place 2023-10-02 16:03:51 -04:00
Jude Nelson
4bc02a80fe refactor: common HTTP request preamble and response types, which capture all control- and data-plane data in an HTTP request. Also, add HttpRequest trait for different request implementations 2023-10-02 16:03:11 -04:00
Jude Nelson
e65a3b2559 refactor: HTTP response types for all HTTP error types 2023-10-02 16:02:55 -04:00
Jude Nelson
37c3ad2eff refactor: capture all common HTTP request and response transport logic into one file 2023-10-02 16:02:36 -04:00
Jude Nelson
ef94177f72 refactor: bye-bye StreamCursor and all of its associated types! 2023-10-02 16:02:06 -04:00
Jude Nelson
5f255dd8ee refactor: no more stream tests (dead code) 2023-10-02 16:01:50 -04:00
Jude Nelson
57d2f44060 chore: API sync 2023-10-02 16:01:41 -04:00
Jude Nelson
6f368a16d0 chore: API sync 2023-10-02 16:01:28 -04:00
Jude Nelson
02d4dd3e7a refactor: use StacksHttpRequest and StacksHttpResponse types for HTTP comms 2023-10-02 16:01:01 -04:00
Jude Nelson
17f93f274b refactor: put all RPC handlers into separate files, and let this file serve to implement the ConversationHttp wrapper to manage the host-to-host HTTP connection lifecycle 2023-10-02 16:00:21 -04:00
Jude Nelson
88f69981ae chore: update all tests to use StacksHttpRequest and StacksHttpResponse code, as well as the new net::http create 2023-10-02 15:59:52 -04:00
Jude Nelson
e580819619 feat: use getsockname(2) on a bound port to get the kernel-reported address for a bound server, so the caller will learn the true address and port (which may be kernel-supplied). Also, update all unit tests to make use of this feature. 2023-10-02 15:59:00 -04:00
Jude Nelson
23012fd560 refactor: use new StacksHttpRequest and StacksHttpResponse types for mempool sync 2023-10-02 15:57:56 -04:00
Jude Nelson
415d9f4a32 chore: fix compiler warnings with to_owned() 2023-10-02 15:57:35 -04:00