Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] HTTP RPC System Refactor #3987

Merged
merged 115 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
e5ab7e9
refactor: put PeerHost and PeerAddress into stacks-common
jcnelson Oct 2, 2023
e3f61b8
chore: expose net module
jcnelson Oct 2, 2023
ab329b6
feat: get_chunk_size() helper
jcnelson Oct 2, 2023
a10bf55
chore: fix compiler warning
jcnelson Oct 2, 2023
5e68d0d
fix: 'hex' not 'sha256d' for hex error message
jcnelson Oct 2, 2023
d953408
fix: compiler warning: use to_owned()
jcnelson Oct 2, 2023
a658650
fix: compiler warning: use to_owned()
jcnelson Oct 2, 2023
5b4ca58
refactor: remove all streaming code, since we don't need it anymore
jcnelson Oct 2, 2023
8750d46
refactor: put ExtendedStacksHeader into Stacks chainstate module hier…
jcnelson Oct 2, 2023
ac0187e
feat: destruct a MARF into its Sqlite connection (i.e. for purposes o…
jcnelson Oct 2, 2023
ba30d82
feat: destruct TrieFileStorage into its inner connection (i.e. for pu…
jcnelson Oct 2, 2023
9edec34
feat: helper to create a test microblock with a given number of txs
jcnelson Oct 2, 2023
f9b3f01
fix: use to_owned()
jcnelson Oct 2, 2023
2bd674f
fix: use to_owned()
jcnelson Oct 2, 2023
6c98cd6
refactor: put MemPoolSyncData into the mempool module, and remove tra…
jcnelson Oct 2, 2023
fcd364e
refactor: remove dead unit tests
jcnelson Oct 2, 2023
cd716fe
chore: API sync
jcnelson Oct 2, 2023
0a97fac
chore: API sync
jcnelson Oct 2, 2023
6ac7ae4
chore: remove dead import
jcnelson Oct 2, 2023
49b4594
chore: cargo fmt
jcnelson Oct 2, 2023
07cf314
refactor: use new StacksHttpRequest HTTP request constructors
jcnelson Oct 2, 2023
898aeba
refactor: put Atlas HTTP response types into the Atlas system
jcnelson Oct 2, 2023
046d386
refactor: use new StacksHttpRequest and StacksHttpResposne types
jcnelson Oct 2, 2023
e663ebd
chore: clean up compiler warnings
jcnelson Oct 2, 2023
4efec5d
refactor: MemPoolSyncData codec lives in the mempool modules
jcnelson Oct 2, 2023
760eb25
feat: add the ability to flush data to a reply handle's pipe's read e…
jcnelson Oct 2, 2023
8bf6c58
refactor: expose getter for peer stackerdbs
jcnelson Oct 2, 2023
1bcc75d
chore: API sync
jcnelson Oct 2, 2023
0273bbd
refactor: use new StacksHttpRequest and StacksHttpResponse types for …
jcnelson Oct 2, 2023
4e41c23
refactor: bye-byte http.rs!
jcnelson Oct 2, 2023
cfda6a9
chore: API sync
jcnelson Oct 2, 2023
bf3348b
refactor: add StacksNodeState to capture DB handles to various parts …
jcnelson Oct 2, 2023
e3fc7da
chore: API sync
jcnelson Oct 2, 2023
415d9f4
chore: fix compiler warnings with to_owned()
jcnelson Oct 2, 2023
23012fd
refactor: use new StacksHttpRequest and StacksHttpResponse types for …
jcnelson Oct 2, 2023
e580819
feat: use getsockname(2) on a bound port to get the kernel-reported a…
jcnelson Oct 2, 2023
88f6998
chore: update all tests to use StacksHttpRequest and StacksHttpRespon…
jcnelson Oct 2, 2023
17f93f2
refactor: put all RPC handlers into separate files, and let this file…
jcnelson Oct 2, 2023
02d4dd3
refactor: use StacksHttpRequest and StacksHttpResponse types for HTTP…
jcnelson Oct 2, 2023
6f368a1
chore: API sync
jcnelson Oct 2, 2023
57d2f44
chore: API sync
jcnelson Oct 2, 2023
5f255dd
refactor: no more stream tests (dead code)
jcnelson Oct 2, 2023
ef94177
refactor: bye-bye StreamCursor and all of its associated types!
jcnelson Oct 2, 2023
37c3ad2
refactor: capture all common HTTP request and response transport logi…
jcnelson Oct 2, 2023
e65a3b2
refactor: HTTP response types for all HTTP error types
jcnelson Oct 2, 2023
4bc02a8
refactor: common HTTP request preamble and response types, which capt…
jcnelson Oct 2, 2023
adfafee
refactor: capture all common transport logic for HTTP headers and bod…
jcnelson Oct 2, 2023
da3c1cd
refactor: capture all HTTP streaming data in one place, for sending c…
jcnelson Oct 2, 2023
a21eb11
refactor: capture all HTTP transport tests in one place
jcnelson Oct 2, 2023
5850525
refactor: introducing the net::http crate, which contains all HTTP tr…
jcnelson Oct 2, 2023
c200a9c
refactor: bind net::http with Stacks node state to create the StacksH…
jcnelson Oct 2, 2023
c6d4823
refactor: consolidate all testing for application-level concerns for …
jcnelson Oct 2, 2023
254b5a1
refactor: put call-read-only RPC endpoint into its own file
jcnelson Oct 2, 2023
7acdfb8
refactor: put get-account RPC handler into its own file
jcnelson Oct 2, 2023
2da1bc9
refactor: put get-attachment RPC handler into its own file
jcnelson Oct 2, 2023
5c0c7cc
refactor: put get-attachments-inventory RPC handler into its own file
jcnelson Oct 2, 2023
0c302fe
refactor: put get-block RPC handler into its own file
jcnelson Oct 2, 2023
765960a
refactor: put get-constant-value RPC handler into its own file
jcnelson Oct 2, 2023
3d1cbbc
refactor: put get-contract-abi RPC handler into its own file
jcnelson Oct 2, 2023
e9b07c4
chore: put get-contract-source RPC handler into its own file
jcnelson Oct 2, 2023
92f47fd
refactor: put get-data-var RPC handler into its own file
jcnelson Oct 2, 2023
d0229d9
refactor: put get-headers RPC endpoint into its own file
jcnelson Oct 2, 2023
568de36
refactor: put get-node-info RPC handler into its own file
jcnelson Oct 2, 2023
3056aa3
refactor: put get-is-trait-implemented RPC handler into its own file
jcnelson Oct 2, 2023
4c74435
refactor: put get-map-entry RPC handler into its own file
jcnelson Oct 2, 2023
34c5af5
refactor: put get-confirmed-microblocks RPC handler into its own file
jcnelson Oct 2, 2023
7ad3b28
refactor: put get-indexed-microblocks handler into its own file
jcnelson Oct 2, 2023
7ad39eb
refactor: put get-unconfirmed-microblocks RPC handler into its own file
jcnelson Oct 2, 2023
36b91c9
refactor: put get-neighbors RPC handler into its own file
jcnelson Oct 2, 2023
1c5b0e4
refactor: put get-pox-info RPC handler into its own file
jcnelson Oct 2, 2023
490866e
refactor: put get-stackerdb-chunk RPC handler into its own file
jcnelson Oct 2, 2023
90242db
refactor: put get-stackerdb-metadata RPC handler into its own file
jcnelson Oct 2, 2023
863901d
refactor: put get-stx-transfer-cost RPC handler into its own file
jcnelson Oct 2, 2023
74ae694
refactor: put get-transaction-unconfirmed RPC handler into its own file
jcnelson Oct 2, 2023
3a7f82a
refactor: put post-blcok RPC handler into its own file
jcnelson Oct 2, 2023
213f141
refactor: put fee-rate estimator RPC handler into its own file
jcnelson Oct 2, 2023
6d3604b
refactor: put mempool query RPC handler into its own file
jcnelson Oct 2, 2023
2a8ee3d
refactor: put post-microblock RPC handler into its own file
jcnelson Oct 2, 2023
c8682f7
refactor: put post-stackerdb-chunk RPC handler into its own file
jcnelson Oct 2, 2023
e0a0857
refactor: put post-transaction RPC handler into its own file
jcnelson Oct 2, 2023
63ab815
refactor: put _all_ RPC handlers into their own files, and refactor t…
jcnelson Oct 2, 2023
03be8c7
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Oct 3, 2023
6ccfd11
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Oct 3, 2023
7fe72fc
fix: set higher default execution cost so callreadonly test passes
jcnelson Oct 4, 2023
bc1992c
Merge branch 'feat/http-rpc-refactor' of https://github.com/stacks-ne…
jcnelson Oct 4, 2023
5775c38
chore: remove sha256d
jcnelson Oct 4, 2023
c627eed
fix: "pages_indexes" is correct
jcnelson Oct 4, 2023
f26de63
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Oct 4, 2023
cdeb631
chore: fix regression in NetworkReplyHandle<P: ProtocolFamily>::try_f…
jcnelson Oct 4, 2023
8e880e7
fix: count the number of txs sent
jcnelson Oct 5, 2023
5b3edef
refactor: remove unneeded function args
jcnelson Oct 5, 2023
1177e64
refactor: remove unneeded function args
jcnelson Oct 5, 2023
8eb1e98
feat: allow connection opts to set the send/recv socket buffer size (…
jcnelson Oct 5, 2023
50f9715
refactor: remove unneeded function args
jcnelson Oct 5, 2023
d3fd9b1
refactor: remove unneeded function args
jcnelson Oct 5, 2023
4c3e6e9
chore: remove unneeded function args
jcnelson Oct 5, 2023
4a550bd
feat: when connecting to an address, allow the caller to set the sock…
jcnelson Oct 5, 2023
c87c59d
fix: ensure that the reply handle's inner PipeWrite has at least $SOC…
jcnelson Oct 5, 2023
b3a8b45
refactor: remove unneeded function args
jcnelson Oct 5, 2023
1c3c28d
chore: API sync
jcnelson Oct 5, 2023
062bb2d
feat: PipeWrite can return the number of bytes pending
jcnelson Oct 5, 2023
80398da
Merge branch 'feat/http-rpc-refactor' of https://github.com/stacks-ne…
jcnelson Oct 5, 2023
9919e10
fix: failure to find a request route is a 404, not a 400
jcnelson Oct 5, 2023
5a41eaa
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Oct 6, 2023
a6af378
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Oct 21, 2023
915ac56
fix: use .request_path()
jcnelson Oct 21, 2023
33114c1
fix: revert localized cargo.toml changes
jcnelson Oct 21, 2023
f346067
chore: replace `.len() == 0` with `.is_empty()`
jcnelson Oct 21, 2023
eaa8de9
chore: run DKG test as part of integration test
jcnelson Oct 26, 2023
a3f6cca
fix: forward stackerdb chunks to relayer
jcnelson Oct 26, 2023
dcfba38
chore: address PR feedback
jcnelson Oct 26, 2023
6d22cc6
chore: add InvalidState error variant instead of unreachable!()
jcnelson Oct 26, 2023
5ff0b21
fix: use 100 signers and 4000 keys. This test runs only on release CI…
jcnelson Oct 26, 2023
167a8a7
Merge branch 'develop' into feat/http-rpc-refactor
jcnelson Nov 1, 2023
3b37332
chore: make fmt
jcnelson Nov 1, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/bitcoin-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
- tests::neon_integrations::bad_microblock_pubkey
- tests::epoch_24::fix_to_pox_contract
- tests::epoch_24::verify_auto_unlock_behavior
- tests::signer::test_stackerdb_dkg
- tests::stackerdb::test_stackerdb_load_store
- tests::stackerdb::test_stackerdb_event_observer
steps:
Expand Down
114 changes: 0 additions & 114 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ opt-level = 3

[profile.release]
debug = true

1 change: 1 addition & 0 deletions stacks-common/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use crate::util::hash::Hash160;
use crate::util::secp256k1::{MessageSignature, Secp256k1PublicKey};

pub mod chainstate;
pub mod net;

/// A container for public keys (compressed secp256k1 public keys)
pub struct StacksPublicKeyBuffer(pub [u8; 33]);
Expand Down