Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
d170b46
import diffs
hinto-janai Oct 10, 2024
02e950b
small fixes, hardfork changes
hinto-janai Oct 10, 2024
c18ba6e
lints
hinto-janai Oct 10, 2024
93be3be
hard_fork
hinto-janai Oct 11, 2024
c590bbb
apply diffs
hinto-janai Oct 11, 2024
cec746b
review fixes
hinto-janai Oct 11, 2024
e57c887
Merge branch 'hf' into json
hinto-janai Oct 11, 2024
ac6360a
Merge branch 'main' into json
hinto-janai Oct 11, 2024
2522bb8
binaries/cuprated/src/rpc/request: `pub(super)` -> `pub(crate)`
hinto-janai Oct 11, 2024
fd136b2
add `BlockChainContextService`, `on_get_block_hash`
hinto-janai Oct 11, 2024
9459d59
Merge branch 'main' into json
hinto-janai Oct 12, 2024
b82ff27
map `tower::BoxError` to `anyhow::Error`
hinto-janai Oct 12, 2024
8a3229b
get_block
hinto-janai Oct 12, 2024
9422c07
connection_info
hinto-janai Oct 14, 2024
50bd576
hard_fork_info
hinto-janai Oct 14, 2024
f677b1a
set_bans
hinto-janai Oct 14, 2024
37bcbb5
get_bans
hinto-janai Oct 14, 2024
c7ae795
banned
hinto-janai Oct 14, 2024
6af977f
flush_transaction_pool
hinto-janai Oct 14, 2024
1a76934
get_output_histogram
hinto-janai Oct 14, 2024
1d435cc
get_coinbase_tx_sum
hinto-janai Oct 15, 2024
d7fef15
get_version
hinto-janai Oct 15, 2024
1e0ab56
get_fee_estimate
hinto-janai Oct 15, 2024
294df3f
get_alternate_chains
hinto-janai Oct 15, 2024
08b5ff2
relay_tx
hinto-janai Oct 15, 2024
2daf255
response_base: `fn` -> `const`
hinto-janai Oct 15, 2024
a10ed59
get_transaction_pool_backlog
hinto-janai Oct 15, 2024
d7d8b35
prune
hinto-janai Oct 15, 2024
5926f24
calc_pow
hinto-janai Oct 15, 2024
7148ba1
add_aux_pow
hinto-janai Oct 15, 2024
d56477c
get_tx_ids_loose
hinto-janai Oct 15, 2024
548639b
generate_blocks
hinto-janai Oct 16, 2024
e2f25bd
get_info
hinto-janai Oct 16, 2024
4b1d7bc
sync_info
hinto-janai Oct 16, 2024
bd3a844
get_miner_data
hinto-janai Oct 16, 2024
bf07f2c
`BlockchainManagerRequest` docs
hinto-janai Oct 17, 2024
98dfaa4
docs, `ConnectionInfo`, `AddressType`
hinto-janai Oct 17, 2024
13eedc6
sig docs, remove `HardForks` request
hinto-janai Oct 17, 2024
79b03e3
Merge branch 'main' into json
hinto-janai Nov 2, 2024
544287d
Merge branch 'main' into json
hinto-janai Nov 13, 2024
0cb6a76
clean imports
hinto-janai Nov 13, 2024
e30eeb8
fix `on_get_block_hash`, `generate_blocks`, `get_block_headers_range`
hinto-janai Nov 13, 2024
228a718
fix `get_info`, `banned`
hinto-janai Nov 13, 2024
9374d08
fix `sync_info`
hinto-janai Nov 13, 2024
fd84940
fix `get_miner_data`
hinto-janai Nov 13, 2024
46bf198
initial `add_aux_pow` impl
hinto-janai Nov 14, 2024
1f3b5ed
fix `calculate_pow`
hinto-janai Nov 14, 2024
e975c42
add_aux_pow
hinto-janai Nov 15, 2024
d634bea
`get_output_distribution`
hinto-janai Nov 15, 2024
854b175
checkup
hinto-janai Nov 16, 2024
2d2d493
`find_nonce()` + `add_aux_pow` async wrapper
hinto-janai Nov 16, 2024
86f2dd1
fixes
hinto-janai Nov 18, 2024
de7abfc
`helper::block_header`
hinto-janai Nov 26, 2024
1ffa86c
review fixes
hinto-janai Nov 27, 2024
916d593
fixes
hinto-janai Nov 27, 2024
ff48fb4
doc fix
hinto-janai Nov 27, 2024
8d5f779
p2p: remove tmp `AddressBookRequest::NextNeededPruningSeed`
hinto-janai Nov 27, 2024
1a079c8
lint/todo fixes
hinto-janai Nov 27, 2024
a3fa638
fix bans
hinto-janai Nov 27, 2024
edaf627
Merge branch 'main' into json
hinto-janai Dec 5, 2024
0b50091
merge diffs from https://github.com/Cuprate/cuprate/pull/272
hinto-janai Dec 5, 2024
2104bb0
`cuprate_types::rpc`, `from` module for `cuprate_rpc_types`
hinto-janai Dec 5, 2024
568a276
`rpc-types` -> `types` pt. 2
hinto-janai Dec 6, 2024
20e599f
type fixes, move fn to `-helper`
hinto-janai Dec 6, 2024
a1903f3
clippy fix
hinto-janai Dec 6, 2024
d1c1025
rpc: move json-rpc types away from macros
hinto-janai Dec 6, 2024
5b8cacd
!!
hinto-janai Dec 6, 2024
f2e7af7
move types, fix orphan impl + cyclic dependency
hinto-janai Dec 7, 2024
3c25374
architecture book
hinto-janai Dec 7, 2024
2de9a01
fix json-rpc handlers
hinto-janai Dec 7, 2024
bf5e863
remove `::<N>`
hinto-janai Dec 7, 2024
89191ce
fix clippy
hinto-janai Dec 8, 2024
3a79921
fix type defaults, use `Hex`
hinto-janai Dec 11, 2024
1719d7d
return defaults, hex test
hinto-janai Dec 11, 2024
b402c82
json_rpc: get_block_template
hinto-janai Dec 11, 2024
c3bc9b2
`/get_transactions`
hinto-janai Dec 12, 2024
a359eed
`/is_key_image_spent`
hinto-janai Dec 12, 2024
ab4822c
!!
hinto-janai Dec 13, 2024
c38daa4
`/get_transactions` hex
hinto-janai Dec 13, 2024
d4b3033
most of `/send_raw_transaction`
hinto-janai Dec 13, 2024
b3314d4
`/send_raw_transaction`, `/save_bc`, response_base
hinto-janai Dec 14, 2024
c924f24
`/peerlist`
hinto-janai Dec 14, 2024
c5abf9b
`/get_transaction_pool`
hinto-janai Dec 14, 2024
805f475
`/get_transaction_pool_stats`
hinto-janai Dec 14, 2024
0b3ee2d
finish other draft
hinto-janai Dec 16, 2024
541302e
get_blocks_by_height, shared::get_outs
hinto-janai Dec 17, 2024
8cd319c
`/get_o_indexes.bin`
hinto-janai Dec 17, 2024
3664e2f
`/get_output_distribution.bin`
hinto-janai Dec 17, 2024
f7f9063
clippy
hinto-janai Dec 17, 2024
04cdc72
`/get_blocks.bin`
hinto-janai Dec 17, 2024
3763dc9
rpc-interface: add restricted invariant comments
hinto-janai Dec 17, 2024
ce6838b
restricted json-rpc error
hinto-janai Dec 17, 2024
aca2855
get_output_distribution
hinto-janai Dec 18, 2024
21e42c1
module cleanup
hinto-janai Dec 19, 2024
ed8de29
txpool: all_hashes
hinto-janai Dec 19, 2024
cb6fdb7
`HexVec`
hinto-janai Dec 19, 2024
dff77e8
fix `get_txid` for `/get_outs`
hinto-janai Dec 19, 2024
d47f8ec
fix doc tests
hinto-janai Dec 19, 2024
114a5db
fix conflict
hinto-janai Dec 19, 2024
b2b7e93
json-rpc fixes
hinto-janai Dec 20, 2024
d41014b
`get_transaction_pool_hashes` fix
hinto-janai Dec 20, 2024
ecf5d66
rpc/interface: fix cargo hack
hinto-janai Dec 20, 2024
85ebc67
review fixes
hinto-janai Dec 21, 2024
04ade52
Merge branch 'main' into other
hinto-janai Dec 25, 2024
c56ecd3
cargo hack fix
hinto-janai Dec 25, 2024
1c3f1b1
Merge branch 'main' into other
hinto-janai Jan 16, 2025
13f5ed9
Merge branch 'main' into other
hinto-janai Jan 16, 2025
1d3c807
use `monero_address`
hinto-janai Jan 17, 2025
bc6fc0a
Update binaries/cuprated/src/rpc/handlers/json_rpc.rs
hinto-janai Jan 17, 2025
c7443c9
Update binaries/cuprated/src/rpc/handlers/json_rpc.rs
hinto-janai Jan 17, 2025
4118af2
Merge branch 'other' of github.com:hinto-janai/cuprate into other
hinto-janai Jan 17, 2025
0b3ff4e
review fixes
hinto-janai Jan 17, 2025
78b3ff1
fix `get_hashes`
hinto-janai Jan 17, 2025
95ab976
fix `is_key_image_spent`
hinto-janai Jan 17, 2025
416efcb
fix key image types
hinto-janai Jan 17, 2025
2c32e02
fixes
hinto-janai Jan 17, 2025
405db20
Merge branch 'main' into other
hinto-janai Jan 17, 2025
783ca05
Merge branch 'main' into other
hinto-janai Jan 17, 2025
384ac54
fix book
hinto-janai Jan 17, 2025
ecc21d2
Merge branch 'main' into other
hinto-janai Jan 29, 2025
e6efdbb
output timelock fix + `blockchain_context()`
hinto-janai Jan 29, 2025
366c4a3
Merge branch 'main' into other
hinto-janai Mar 25, 2025
d8f12ef
fix
hinto-janai Mar 25, 2025
d18a9da
fix
hinto-janai Mar 25, 2025
986c5c4
fix
hinto-janai Mar 26, 2025
babd82e
fix getblocks.bin
hinto-janai Mar 26, 2025
9009fa1
`cuprate_types` doc
hinto-janai Mar 26, 2025
373c890
output fix
hinto-janai Mar 27, 2025
9131e91
fixme
hinto-janai Mar 27, 2025
daa6f63
rct output fix
hinto-janai Mar 27, 2025
b87bddf
fix cast
hinto-janai Mar 27, 2025
8ac347d
clippy
hinto-janai Mar 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions Cargo.lock

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

15 changes: 10 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ members = [

# Net
"net/epee-encoding",
"net/fixed-bytes",
"net/levin",
"net/wire",

Expand All @@ -30,6 +29,11 @@ members = [
"storage/txpool",
"storage/database",

# Types
"types/types",
"types/hex",
"types/fixed-bytes",

# RPC
"rpc/json-rpc",
"rpc/types",
Expand All @@ -44,7 +48,6 @@ members = [
"helper",
"pruning",
"test-utils",
"types",
]

[profile.release]
Expand Down Expand Up @@ -77,22 +80,23 @@ cuprate-consensus-context = { path = "consensus/context", default-featur
cuprate-cryptonight = { path = "cryptonight", default-features = false }
cuprate-helper = { path = "helper", default-features = false }
cuprate-epee-encoding = { path = "net/epee-encoding", default-features = false }
cuprate-fixed-bytes = { path = "net/fixed-bytes", default-features = false }
cuprate-levin = { path = "net/levin", default-features = false }
cuprate-wire = { path = "net/wire", default-features = false }
cuprate-async-buffer = { path = "p2p/async-buffer", default-features = false }
cuprate-p2p = { path = "p2p/p2p", default-features = false }
cuprate-p2p-core = { path = "p2p/p2p-core", default-features = false }
cuprate-p2p-bucket = { path = "p2p/p2p-bucket", default-features = false }
cuprate-dandelion-tower = { path = "p2p/dandelion-tower", default-features = false }
cuprate-async-buffer = { path = "p2p/async-buffer", default-features = false }
cuprate-address-book = { path = "p2p/address-book", default-features = false }
cuprate-blockchain = { path = "storage/blockchain", default-features = false }
cuprate-database = { path = "storage/database", default-features = false }
cuprate-database-service = { path = "storage/service", default-features = false }
cuprate-txpool = { path = "storage/txpool", default-features = false }
cuprate-pruning = { path = "pruning", default-features = false }
cuprate-test-utils = { path = "test-utils", default-features = false }
cuprate-types = { path = "types", default-features = false }
cuprate-types = { path = "types/types", default-features = false }
cuprate-hex = { path = "types/hex", default-features = false }
cuprate-fixed-bytes = { path = "types/fixed-bytes", default-features = false }
cuprate-json-rpc = { path = "rpc/json-rpc", default-features = false }
cuprate-rpc-types = { path = "rpc/types", default-features = false }
cuprate-rpc-interface = { path = "rpc/interface", default-features = false }
Expand Down Expand Up @@ -121,6 +125,7 @@ futures = { version = "0.3", default-features = false }
hex = { version = "0.4", default-features = false }
hex-literal = { version = "0.4", default-features = false }
indexmap = { version = "2", default-features = false }
monero-address = { git = "https://github.com/Cuprate/serai.git", rev = "e6ae8c2", default-features = false }
monero-serai = { git = "https://github.com/Cuprate/serai.git", rev = "e6ae8c2", default-features = false }
nu-ansi-term = { version = "0.46", default-features = false }
paste = { version = "1", default-features = false }
Expand Down
38 changes: 21 additions & 17 deletions binaries/cuprated/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,34 @@ repository = "https://github.com/Cuprate/cuprate/tree/main/binaries/cuprated"

[dependencies]
# TODO: after v1.0.0, remove unneeded dependencies.
cuprate-constants = { workspace = true, features = ["build"] }
cuprate-consensus = { workspace = true }
cuprate-fast-sync = { workspace = true }
cuprate-address-book = { workspace = true }
cuprate-async-buffer = { workspace = true }
cuprate-blockchain = { workspace = true }
cuprate-consensus-context = { workspace = true }
cuprate-consensus-rules = { workspace = true }
cuprate-consensus = { workspace = true }
cuprate-constants = { workspace = true, features = ["build", "rpc"] }
cuprate-cryptonight = { workspace = true }
cuprate-helper = { workspace = true, features = ["std", "serde", "time"] }
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
cuprate-database-service = { workspace = true, features = ["serde"] }
cuprate-database = { workspace = true, features = ["serde"] }
cuprate-epee-encoding = { workspace = true }
cuprate-fast-sync = { workspace = true }
cuprate-fixed-bytes = { workspace = true }
cuprate-helper = { workspace = true, features = ["std", "serde", "time"] }
cuprate-hex = { workspace = true }
cuprate-json-rpc = { workspace = true }
cuprate-levin = { workspace = true }
cuprate-wire = { workspace = true }
cuprate-p2p = { workspace = true }
cuprate-p2p-core = { workspace = true }
cuprate-dandelion-tower = { workspace = true, features = ["txpool"] }
cuprate-async-buffer = { workspace = true }
cuprate-address-book = { workspace = true }
cuprate-blockchain = { workspace = true }
cuprate-database-service = { workspace = true, features = ["serde"] }
cuprate-txpool = { workspace = true }
cuprate-database = { workspace = true, features = ["serde"] }
cuprate-p2p = { workspace = true }
cuprate-pruning = { workspace = true }
cuprate-test-utils = { workspace = true }
cuprate-types = { workspace = true }
cuprate-json-rpc = { workspace = true }
cuprate-rpc-interface = { workspace = true }
cuprate-rpc-types = { workspace = true }
cuprate-rpc-types = { workspace = true, features = ["from"] }
cuprate-test-utils = { workspace = true }
cuprate-txpool = { workspace = true }
cuprate-types = { workspace = true, features = ["json"] }
cuprate-wire = { workspace = true }


# TODO: after v1.0.0, remove unneeded dependencies.
anyhow = { workspace = true }
Expand All @@ -56,6 +58,7 @@ futures = { workspace = true }
hex = { workspace = true }
hex-literal = { workspace = true }
indexmap = { workspace = true }
monero-address = { workspace = true }
monero-serai = { workspace = true }
nu-ansi-term = { workspace = true }
paste = { workspace = true }
Expand All @@ -67,6 +70,7 @@ rayon = { workspace = true }
serde_bytes = { workspace = true }
serde_json = { workspace = true }
serde = { workspace = true }
strum = { workspace = true }
thiserror = { workspace = true }
thread_local = { workspace = true }
tokio-util = { workspace = true, features = ["rt"] }
Expand Down
10 changes: 4 additions & 6 deletions binaries/cuprated/src/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
//!
//! Will contain the code to initiate the RPC and a request handler.

mod bin;
mod constants;
mod handler;
mod json;
mod other;
mod request;
mod handlers;
mod rpc_handler;
mod service;

pub use handler::CupratedRpcHandler;
pub use rpc_handler::CupratedRpcHandler;
85 changes: 0 additions & 85 deletions binaries/cuprated/src/rpc/bin.rs

This file was deleted.

3 changes: 3 additions & 0 deletions binaries/cuprated/src/rpc/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
/// The string message used in RPC response fields for when
/// `cuprated` does not support a field that `monerod` has.
pub(super) const FIELD_NOT_SUPPORTED: &str = "`cuprated` does not support this field.";

/// The error message returned when an unsupported RPC call is requested.
pub(super) const UNSUPPORTED_RPC_CALL: &str = "This RPC call is not supported by Cuprate.";
18 changes: 18 additions & 0 deletions binaries/cuprated/src/rpc/handlers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//! RPC handler functions.
//!
//! These are the glue (async) functions that connect all the
//! internal `cuprated` functions and fulfill the request.
//!
//! - JSON-RPC handlers are in [`json_rpc`]
//! - Other JSON endpoint handlers are in [`other_json`]
//! - Other binary endpoint handlers are in [`bin`]
//!
//! - [`helper`] contains helper functions used by many handlers
//! - [`shared`] contains shared functions used by multiple handlers

pub(super) mod bin;
pub(super) mod json_rpc;
pub(super) mod other_json;

mod helper;
mod shared;
Loading
Loading