34 Commits

Author SHA1 Message Date
hinto-janai
97e539559a rpc: submit_block + /send_raw_transaction (#515)
* enable `submit_block` and `/send_raw_transaction`

* endpoint

* map

* not_relayed

* book

* log

* Update binaries/cuprated/src/rpc/service/tx_handler.rs

Co-authored-by: Boog900 <boog900@tutanota.com>

* review

* fix

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2025-07-17 00:34:33 +01:00
hinto-janai
d43e0957a2 Update repo to cuprated 0.0.5 (#501)
* apply

* ks

* update

* 515
2025-07-16 21:35:29 +01:00
hinto-janai
b6a0302c81 ci: install openssl, fix clippy (#513)
* add openssl

* typos -w

* macro

* lint

* patch

* fix
2025-07-03 14:03:14 +01:00
hinto-janai
640ac1bc1c Update repo to cuprated 0.0.4 (#462)
* apply

* update

* update

* fs

* typos -w

* update
2025-06-04 17:29:32 +01:00
hinto-janai
4c2c749a4c cuprated: CupratedRpcHandler, enable certain endpoints (#450)
* add rpc server

* add init fn

* add layers

* docs

* comments

* move

* warn

* split config

* split

* fix toml

* impl p2p port

* fix tests

* docs

* doc

* remove (de)compression

* init rpc servers with handlers

* add `rpc.md`

* typo

* sort

* revert cargo.lock diff

* 🟣

* not_available()

* `advertise`

* Update binaries/cuprated/src/config/rpc.rs

Co-authored-by: Boog900 <boog900@tutanota.com>

* update tracing

* `tracing::field::display`

* fix

* typo

* docs

* clippy

* remove comment_out

* add test for `cuprate_helper::net::ip_is_local`

* fix args

* `/get_outs`, `/get_height`

* enable methods

* apply

* block fn

* fix

* clippy

* book

* add warning

* update

* typos

* Update binaries/cuprated/src/rpc/handlers/helper.rs

Co-authored-by: Boog900 <boog900@tutanota.com>

* fmt

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2025-06-04 17:28:40 +01:00
hinto-janai
11d0272a5c Update repo to cuprated 0.0.3 (#437)
* 0.0.3

* update sanity timestamp

* case

* changes

* intro

* prs

* include 456
2025-05-07 02:10:09 +01:00
hinto-janai
fac61ccb1e Add cuprated.service (#444)
* add `binaries/cuprated/cuprated.service`

* ci

* docs
2025-04-30 16:20:51 +01:00
hinto-janai
550d8598e4 books: user-book for cuprated 0.0.2 (#402)
* title

* fixes

* add `--version` table

* add types

* config docs

* add macro docs

* fix

* case

* Update binaries/cuprated/src/config.rs

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2025-04-09 01:12:05 +01:00
hinto-janai
d3b7ca3e65 cuprated: RPC handlers (#355)
* import diffs

* small fixes, hardfork changes

* lints

* hard_fork

* apply diffs

* review fixes

* binaries/cuprated/src/rpc/request: `pub(super)` -> `pub(crate)`

* add `BlockChainContextService`, `on_get_block_hash`

* map `tower::BoxError` to `anyhow::Error`

* get_block

* connection_info

* hard_fork_info

* set_bans

* get_bans

* banned

* flush_transaction_pool

* get_output_histogram

* get_coinbase_tx_sum

* get_version

* get_fee_estimate

* get_alternate_chains

* relay_tx

* response_base: `fn` -> `const`

* get_transaction_pool_backlog

* prune

* calc_pow

* add_aux_pow

* get_tx_ids_loose

* generate_blocks

* get_info

* sync_info

* get_miner_data

* `BlockchainManagerRequest` docs

* docs, `ConnectionInfo`, `AddressType`

* sig docs, remove `HardForks` request

* clean imports

* fix `on_get_block_hash`, `generate_blocks`, `get_block_headers_range`

* fix `get_info`, `banned`

* fix `sync_info`

* fix `get_miner_data`

* initial `add_aux_pow` impl

* fix `calculate_pow`

* add_aux_pow

* `get_output_distribution`

* checkup

* `find_nonce()` + `add_aux_pow` async wrapper

* fixes

* `helper::block_header`

* review fixes

* fixes

* doc fix

* p2p: remove tmp `AddressBookRequest::NextNeededPruningSeed`

* lint/todo fixes

* fix bans

* merge diffs from https://github.com/Cuprate/cuprate/pull/272

* `cuprate_types::rpc`, `from` module for `cuprate_rpc_types`

* `rpc-types` -> `types` pt. 2

* type fixes, move fn to `-helper`

* clippy fix

* rpc: move json-rpc types away from macros

* !!

* move types, fix orphan impl + cyclic dependency

* architecture book

* fix json-rpc handlers

* remove `::<N>`

* fix clippy

* fix type defaults, use `Hex`

* return defaults, hex test

* json_rpc: get_block_template

* `/get_transactions`

* `/is_key_image_spent`

* !!

* `/get_transactions` hex

* most of `/send_raw_transaction`

* `/send_raw_transaction`, `/save_bc`, response_base

* `/peerlist`

* `/get_transaction_pool`

* `/get_transaction_pool_stats`

* finish other draft

* get_blocks_by_height, shared::get_outs

* `/get_o_indexes.bin`

* `/get_output_distribution.bin`

* clippy

* `/get_blocks.bin`

* rpc-interface: add restricted invariant comments

* restricted json-rpc error

* get_output_distribution

* module cleanup

* txpool: all_hashes

* `HexVec`

* fix `get_txid` for `/get_outs`

miner transaction was not accounted for

* fix doc tests

* fix conflict

* json-rpc fixes

* `get_transaction_pool_hashes` fix

* rpc/interface: fix cargo hack

* review fixes

* cargo hack fix

* use `monero_address`

* Update binaries/cuprated/src/rpc/handlers/json_rpc.rs

Co-authored-by: Boog900 <boog900@tutanota.com>

* Update binaries/cuprated/src/rpc/handlers/json_rpc.rs

Co-authored-by: Boog900 <boog900@tutanota.com>

* review fixes

* fix `get_hashes`

* fix `is_key_image_spent`

* fix key image types

* fixes

* fix book

* output timelock fix + `blockchain_context()`

* fix

* fix

* fix

* fix getblocks.bin

* `cuprate_types` doc

* output fix

* fixme

* rct output fix

* fix cast

* clippy

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2025-04-08 17:09:43 +01:00
Boog900
03363e393d cuprated: auto config docs (#418)
* auto config docs

* fmt & change arg

* fix clippy

* add comment_out functionality

* remove config files + gen in mdbook build

* review fixes

* Update books/user/src/config.md

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2025-04-05 15:33:56 +01:00
jermanuts
e84f5c151f Readme and user book: Fix links (#406)
* User book: https link to CCS

* Readme: fix contribution and security link

* rust link https
2025-03-13 22:11:04 +00:00
hinto-janai
21ad35d44a books: user book fixes pt. 2 (#398)
fix download links
2025-03-12 01:12:25 +00:00
hinto-janai
11d4f290c3 books: user book fixes (#397)
* typo

* summary

* update url
2025-03-11 23:46:34 +00:00
hinto-janai
bd17f615b2 books: add user-book for cuprated v0.0.1 (#165)
* apply

* add sections

* typo

* faq

* faq

* comments

* review

* update
2025-03-11 22:19:21 +00:00
Boog900
1c04634396 P2P: fix deadlock (#385)
* fix deadlock

* fix ci

* clean up + docs

* fmt

* remove extra tick

* fix typos
2025-03-04 21:36:27 +00:00
hinto-janai
4f14452c77 Remove /benches (#354)
* rm -rf benches

* update architecture book

* lint fix
2025-01-17 20:34:36 +00:00
hinto-janai
caa08d5eaa benches: initial implementation (#196)
* add readme

* readme, basic examples

* name changes, bin impl

* example, docs

* book

* add `cuprate-criterion-example`

* docs, tracing

* fix clippy

* docs

* lib readme

* json-rpc benchmarks

* add to crates.md

* add `fixme`

* fix `cargo b` failing

this `cfg()` existing makes a regular workspace `cargo b` fail

* fix cargo.toml
2024-11-25 20:10:42 +00:00
Dmitry Holodov
4b925b8c78 ZMQ PUB/SUB JSON Types (#330) 2024-11-21 01:08:24 +00:00
hinto-janai
e8598a082d books/architecture: add Monero oddities (#343)
* add `oddities/`

* swap `Expected`, `Why`
2024-11-18 15:21:52 +00:00
SyntheticBird
b6c4adc83a p2p: Implement P2P Bucket data structure (#329)
Implements P2P Bucket data structure

This commit implements a "Bucket" data structure that is a collection
of data that discriminates its items into "buckets" (vector of size N)
following a defined function.

- Implements Bucket data structure and Bucketable trait
- Implements Bucketable for Ipv4Addr
- Added the crate to the workspace dependencies
- Added arrayvec as a dependency
2024-11-02 00:45:56 +00:00
SyntheticBird
978d72b6c1 Move consensus context service into a subcrate. (#318)
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-17 00:17:58 +01:00
hinto-janai
a003e0588d Add constants/ crate (#280)
* add `constants/`

* ci: add `A-constants` labeler

* add modules, move `cuprate_helper::constants`

* add `genesis.rs`

* `rpc.rs` docs

* remove todos

* `CRYPTONOTE_MAX_BLOCK_HEIGHT`

* add genesis data for all networks

* features

* fix feature cfgs

* test fixes

* add to architecture book

* fix comment

* remove `genesis` add other constants

* fixes

* revert

* fix
2024-10-02 18:51:58 +01:00
hinto-janai
88605b081f books/architecture: port database design document (#267)
* add chapters

* add files, intro

* db abstraction

* backends

* abstraction

* syncing

* serde

* issues

* common/types

* common/ops

* common/service

* service diagram

* service/resize

* service/thread-model

* service/shutdown

* storage/blockchain

* update md files

* cleanup

* fixes

* update for https://github.com/Cuprate/cuprate/pull/290

* review fix
2024-09-24 17:23:22 +01:00
hinto-janai
01625535fa book/architecture: add resource index (#268)
* resource index

* index

* cap

* cleanup
2024-09-08 18:31:58 +01:00
Boog900
0041650fd1 books: change some definitions (#251)
update some definitions
2024-08-09 00:56:41 +01:00
hinto-janai
fafa20c20f architecture-book: fill RPC section (#243)
* books: add `rpc` skeleton

* json-rpc

* types section

* differences

* interface

* typos

* differences: add `json-formatting.md`

* rpc: small fixes

* appendix: add `cuprate-rpc-handler` to crate list

* differences: remove extra fields section, add more info

* differences: add `id:0` section
2024-08-08 00:15:22 +01:00
hinto-janai
dced4ed7ec architecture-book: add Crates section (#239)
* add `cuprate-crates.md`

* fix links

* Update books/architecture/src/appendix/crates.md

Co-authored-by: Boog900 <boog900@tutanota.com>

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-07-30 21:53:27 +01:00
Boog900
86d1f408d8 books: fix typo (#240)
fix typo
2024-07-30 20:12:09 +01:00
hinto-janai
0a88ea13fc books: architecture skeleton (#224)
* upstream https://github.com/hinto-janai/cuprate-architecture

* tab -> 4 spaces
2024-07-18 21:35:52 +01:00
Boog900
88551c800c Books: document p2p protocol (#216)
* add admin message definitions

* add block complete entry

* add protocol messages

* add most flows

* add final flows

* fix typos

* move link to epee

* review fixes
2024-07-18 21:34:56 +01:00
Boog900
519d871ccb books: move in protocol book (#169)
* add protocol bool

* update url

* fix typos

* Cuprate's protocol book -> Monero

* Apply suggestions from code review

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>

* fix typo

* POW -> PoW

* revert weird line changes

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-06-24 01:23:39 +01:00
hinto-janai
e0736d1807 books: add user-book template (#154)
* add user-book

* add `A-book-user` to labeler
2024-06-07 22:04:27 +01:00
hinto-janai
d21160868c books: add skeleton and docs (#141)
* update `books/`

* update CONTRIBUTING.md

* .gitignore: ignore built books

* add dummy `books/architecture/`

* remove some changes from CONTRIBUTING.md

out of scope, will be in another PR

* add docs/books to LICENSE

* formatting
2024-05-30 01:19:46 +01:00
hinto-janai
4876e159e7 repo: add skeleton directories, fix labels (#139)
* `database/` -> `storage/`, create skeleton `storage/` crates

* add skeleton root directories

* books: add skeleton

* ci: fix labeler.yml

* fix CONTRIBUTING.md

* fix workspace Cargo.toml

* fix `storage/`

* rename helper fs fn, `cuprate_database` -> `cuprate_blockchain`

* fix Cargo.toml

* cuprate-blockchain: revert find-and-replace

Since it has to be ported to the book anyway, there's not much
reason to update this and create review diffs.

* labeler.yml: remove `A-docs` from `books/` changes

Although books are documentation,
the `A-books` label already exists for this
2024-05-29 02:18:30 +01:00