Commit Graph

397 Commits

Author SHA1 Message Date
hinto-janai
95aca1d4a5 ci: fix release.yml (#434)
gen config
2025-04-09 16:01:19 +01:00
hinto-janai
b169557ff2 ci: fix deny (#430)
`cargo update -p tokio`
2025-04-09 15:07:37 +01:00
hinto-janai
56d3459782 cuprated: v0.0.2 version + changelog (#413)
* update

* !!

* update

* version
2025-04-09 15:05:45 +01:00
hinto-janai
159016f10e cuprated: update killswitch timestamp for v0.0.2 (#403)
* update

* Update binaries/cuprated/src/killswitch.rs

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

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2025-04-09 15:03:56 +01:00
hinto-janai
51b56b0a8b cuprated/database: fix error mappings + msg (#419)
* add

* dbi

* err

* log and panic
2025-04-09 01:18:01 +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
3ef6a96d04 ci: fix clippy (#428)
* cargo clippy

* fix

* remove `needless_continue`

* readd `continue`
2025-04-08 20:13:11 +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
hinto-janai
8292da4e06 cuprated: fast_sync_hashes.bin -> 3384832 (#427)
3384832
2025-04-08 16:19:00 +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
hinto-janai
57cd96ed6c storage: replace println with tracing (#417)
* replace `println` with `tracing`

* fix

* remove feature

* !
2025-04-02 16:08:28 +01:00
hinto-janai
3c86c5ed76 cuprated: disable STDIN if not terminal (#415)
* check terminal

* await ctrl_c

* add exit msg

* rm
2025-03-23 00:57:28 +00:00
hinto-janai
f60aa82420 ci: fix deny (#414)
update
2025-03-21 20:57:52 +00:00
Boog900
b97bbab593 Cuprated: Fix reorgs (#408)
* fix reorgs

* fix off by 1 and add a test

* commit file

* docs

* remove unneeded fn

* fix tests
2025-03-21 17:52:10 +00:00
Boog900
c5cbe51300 fast-sync: add tests (#410)
fast sync tests
2025-03-19 15:52:05 +00: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
fcbf260747 workspace: initial release cycle files (#370)
* initial files

* hashes

* ci: more targets

* release.yml

* moves

* remove commit list

* typo

* add linux arm to `monerod-download`

* update

* fast sync

* remove `cuprated.service`

* update

* changes

* move contributing
2025-03-11 23:15:53 +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
hinto-janai
97e3c07b23 cuprated: update killswitch timestamp (#391)
* update killswitch timestamp

* update sanity ts

* update

* update
2025-03-11 21:19:58 +00:00
hinto-janai
7d18098b4c clippy: add doc-valid-idents (#378)
apply
2025-03-08 18:48:47 +00:00
hinto-janai
d5dd70a47b readme: Documentation -> Books & Crates (#380)
* apply

* fix links
2025-03-08 18:47:54 +00:00
Boog900
1549a88618 cuprated: Add fast sync (#389)
* add specific method for context

* add new statemachine for tx verification

* fix consensus crates build

* working builds

* fix CI

* add docs

* fix CI

* fix docs

* fix clippy

* cleanup

* add docs to `blockchain_context`

* fix doc tests

* add output cache

* new monero-serai

* todo

* todo

* Revert "new monero-serai"

This reverts commit fe3f6acc676fe59e794d5f92f07f76445db35199.

* use indexmap to request outputs

* clean up

* fix typos

* fix CI

* fix cargo hack

* fix reorgs

* check if a block is already present before adding it to the alt block cache

* fmt

* update to new monero oxide API

* fmt & fix cache

* update config values

* fix tests

* add fast sync

* fix start_height check

* disable kill switch for now

* add fast sync config options

* add docs

* wait for all blocks to download before starting the syncer again.

* fix permit

* typo

* fix import order

* fmt

* add docs + order imports

* fix clippy

* review fixes

* rename top -> stop
2025-03-08 01:54:34 +00:00
Boog900
5c2b56c78e Update to experimental monero oxide api (#386)
* add specific method for context

* add new statemachine for tx verification

* fix consensus crates build

* working builds

* fix CI

* add docs

* fix CI

* fix docs

* fix clippy

* cleanup

* add docs to `blockchain_context`

* fix doc tests

* add output cache

* new monero-serai

* todo

* todo

* Revert "new monero-serai"

This reverts commit fe3f6acc676fe59e794d5f92f07f76445db35199.

* use indexmap to request outputs

* clean up

* fix typos

* fix CI

* fix cargo hack

* fix reorgs

* check if a block is already present before adding it to the alt block cache

* fmt

* update to new monero oxide API

* fmt & fix cache

* update config values

* fix tests

* fix no-std builds
2025-03-06 19:03:25 +00:00
Boog900
2dc258e4c8 Consensus: Fix reorgs (#384)
* add specific method for context

* add new statemachine for tx verification

* fix consensus crates build

* working builds

* fix CI

* add docs

* fix CI

* fix docs

* fix clippy

* cleanup

* add docs to `blockchain_context`

* fix doc tests

* add output cache

* new monero-serai

* todo

* todo

* Revert "new monero-serai"

This reverts commit fe3f6acc676fe59e794d5f92f07f76445db35199.

* use indexmap to request outputs

* clean up

* fix typos

* fix CI

* fix cargo hack

* fix reorgs

* check if a block is already present before adding it to the alt block cache

* fmt
2025-03-06 16:40:52 +00:00
Boog900
6a9356b552 consensus: Batch get outputs (#382)
* add specific method for context

* add new statemachine for tx verification

* fix consensus crates build

* working builds

* fix CI

* add docs

* fix CI

* fix docs

* fix clippy

* cleanup

* add docs to `blockchain_context`

* fix doc tests

* add output cache

* new monero-serai

* todo

* todo

* Revert "new monero-serai"

This reverts commit fe3f6acc676fe59e794d5f92f07f76445db35199.

* use indexmap to request outputs

* clean up

* fix typos

* fix CI

* fix cargo hack

* update doc comment

* fix non-rct miner tx error

* Apply suggestions from code review

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

* Update storage/database/src/backend/redb/env.rs

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

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2025-03-06 16:17:09 +00:00
Boog900
ba708a78d5 cuprated: add startup delay if config is missing (#393)
* add startup delay if config is missing

* clean up

* fix typos

* fix imports + add small comment

* fmt
2025-03-06 03:52:03 +00:00
hinto-janai
f554be73b9 cuprated: config versioning + backwards compat test (#394)
* apply

* typo

* fix path
2025-03-06 01:35:14 +00:00
hinto-janai
d795b51e4d ci: remove dependency installs, set OS versions (#392)
* remove boost deps

* fix

* readd some windows deps

* windows-2019

* update OSs, `randomx-rs` commit

* !!

* ubuntu-22.04
2025-03-05 03:23:38 +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
Yichi Zhang
4f3d11be1d Modify wrong code (#387)
Modify_inconsistency
2025-02-27 15:19:12 +00:00
hinto-janai
7e8e62135c database: SyncMode changes (#377)
apply
2025-01-29 14:41:30 +00:00
Boog900
d8d1e34266 Consensus: Improve API (#366)
* add specific method for context

* add new statemachine for tx verification

* fix consensus crates build

* working builds

* fix CI

* add docs

* fix CI

* fix docs

* fix clippy

* cleanup

* add docs to `blockchain_context`

* fix doc tests

* review fixes

* fix cargo doc
2025-01-28 22:25:20 +00:00
hinto-janai
9842535e86 cuprated: killswitch and version module (#365)
* add cuprated skeleton

* fmt and add deny exception

* add main chain batch handler

* add blockchain init

* very rough block manager

* misc changes

* move more config values

* add new tables & types

* add function to fully add an alt block

* resolve current todo!s

* add new requests

* WIP: starting re-orgs

* add last service request

* commit Cargo.lock

* add test

* more docs + cleanup + alt blocks request

* clippy + fmt

* document types

* move tx_fee to helper

* more doc updates

* fmt

* fix imports

* remove config files

* fix merge errors

* fix generated coins

* handle more p2p requests + alt blocks

* clean up handler code

* add function for incoming blocks

* add docs to handler functions

* broadcast new blocks + add commands

* add fluffy block handler

* fix new block handling

* small cleanup

* increase outbound peer count

* fix merge

* clean up the blockchain manger

* add more docs + cleanup imports

* fix typo

* fix doc

* remove unrelated changes

* add `get_objects` handler

* add `get_chain` handler

* add `fluffy_missing_txs` handler

* add `new_fluffy_block` handler

* improve interface globals

* manger -> manager

* enums instead of bools

* move chain service to separate file

* more review fixes

* sort imports + docs

* init config

* init dandelion integration

* add dandelion start function

* finish incoming tx handler

* Add tx blob hash table

* Add missing txpool requests

* handle duplicate stem txs

* check txpool on incoming block

* add request to remove tx in new blocks from the pool

* tell the txpool about incoming blocks

* fix merge

* typos

* remove blockchain height from txpool

* fix merge

* fix merge

* handle incoming txs in p2p request handler

* split sections

* finish initial config.

* fix clap

* misc changes

* fix doc

* fix test & clippy

* fix test 2

* try fix windows

* testing

* testing 2

* fix windows test

* fix windows: the remix.

* Allow `IncomingTxHandler` to be given later

* add p2p clearnet init

* fix build

* misc changes

* review comments

* fix imports

* rename & fix default config file

* fix cargo hack

* enable serde on `cuprate-helper`

* changes from matrix chats

* fix ci

* fix doc

* fix doc test

* doc updates

* more doc updates

* sort imports

* add startup code

* d -> h

* add file logging

* fix stem peer service

* todo

* remove `get_range`

* change usages of `get_range`

* clippy

* cargo update

* fix test + update comment

* manually set numb threads for each pool

* fix address book saves

* add more data to status

* fix config

* cleanup main + logging

* add more info to output when changing log level

* cleanup commands

* fix small issue in block downloader  more misc clean up

* cross block bp(+) batch verification

* add message when syncing is done

* Revert "cross block bp(+) batch verification"

This reverts commit 764c4663a09e8b0f96778b9b0798b5940584e5f7.

* fix fmt & clippy

* move `io_loop` to commands

* cuprated: killswitch module

* use `const` for major version

* `|| -> !`

* spacing

* fixes

* fixes

* fixes

---------

Co-authored-by: Boog900 <54e72d8a-345f-4599-bd90-c6b9bc7d0ec5@aleeas.com>
Co-authored-by: Boog900 <boog900@tutanota.com>
2025-01-21 19:02:10 +00:00
hinto-janai
4f14452c77 Remove /benches (#354)
* rm -rf benches

* update architecture book

* lint fix
2025-01-17 20:34:36 +00:00
Boog900
503ef11514 cuprated: Init (#344)
* add cuprated skeleton

* fmt and add deny exception

* add main chain batch handler

* add blockchain init

* very rough block manager

* misc changes

* move more config values

* add new tables & types

* add function to fully add an alt block

* resolve current todo!s

* add new requests

* WIP: starting re-orgs

* add last service request

* commit Cargo.lock

* add test

* more docs + cleanup + alt blocks request

* clippy + fmt

* document types

* move tx_fee to helper

* more doc updates

* fmt

* fix imports

* remove config files

* fix merge errors

* fix generated coins

* handle more p2p requests + alt blocks

* clean up handler code

* add function for incoming blocks

* add docs to handler functions

* broadcast new blocks + add commands

* add fluffy block handler

* fix new block handling

* small cleanup

* increase outbound peer count

* fix merge

* clean up the blockchain manger

* add more docs + cleanup imports

* fix typo

* fix doc

* remove unrelated changes

* add `get_objects` handler

* add `get_chain` handler

* add `fluffy_missing_txs` handler

* add `new_fluffy_block` handler

* improve interface globals

* manger -> manager

* enums instead of bools

* move chain service to separate file

* more review fixes

* sort imports + docs

* init config

* init dandelion integration

* add dandelion start function

* finish incoming tx handler

* Add tx blob hash table

* Add missing txpool requests

* handle duplicate stem txs

* check txpool on incoming block

* add request to remove tx in new blocks from the pool

* tell the txpool about incoming blocks

* fix merge

* typos

* remove blockchain height from txpool

* fix merge

* fix merge

* handle incoming txs in p2p request handler

* split sections

* finish initial config.

* fix clap

* misc changes

* fix doc

* fix test & clippy

* fix test 2

* try fix windows

* testing

* testing 2

* fix windows test

* fix windows: the remix.

* Allow `IncomingTxHandler` to be given later

* add p2p clearnet init

* fix build

* misc changes

* review comments

* fix imports

* rename & fix default config file

* fix cargo hack

* enable serde on `cuprate-helper`

* changes from matrix chats

* fix ci

* fix doc

* fix doc test

* doc updates

* more doc updates

* sort imports

* add startup code

* d -> h

* add file logging

* fix stem peer service

* todo

* remove `get_range`

* change usages of `get_range`

* clippy

* cargo update

* fix test + update comment

* manually set numb threads for each pool

* fix address book saves

* add more data to status

* fix config

* cleanup main + logging

* add more info to output when changing log level

* cleanup commands

* fix small issue in block downloader  more misc clean up

* cross block bp(+) batch verification

* add message when syncing is done

* Revert "cross block bp(+) batch verification"

This reverts commit 764c4663a09e8b0f96778b9b0798b5940584e5f7.

* fix fmt & clippy

* move `io_loop` to commands

* review fixes

* fix clippy

* review fixes
2025-01-17 20:24:24 +00:00
hinto-janai
6320411f60 ci: stable Rust for deny, remove boost dep for docs (#364)
* doc.yml: remove boost dep

* deny.yml: install stable rust
2025-01-16 16:31:55 +00:00
hinto-janai
c817c3b889 workspace: Rust 1.84 (#363)
* apply

* ci: use stable rust for rustfmt
2025-01-16 15:43:42 +00:00
SyntheticBird
cebb71d7dc misc: Update SyntheticBird PGP key (#362)
Update SyntheticBird PGP key

I changed my email very recently (and hopefully stay on it).
This key is also used to sign my future commits.
2025-01-14 01:38:14 +00:00
Boog900
79e4789e6a rpc/types 32 bit support (#334)
* rpc/types 32 bit support

* fix docs

* add 32 bit check to CI

* remove `cuprate-types`

* add comments to CI

* Apply suggestions from code review

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

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2025-01-08 03:49:59 +00:00
Boog900
10000b4b34 rpc/types: add missing defaults to fields (#361)
* add defaults to fields

* Update rpc/types/src/bin.rs

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

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2025-01-08 01:58:43 +00:00
Boog900
80369b82d2 Storage: remove get_range (#359)
* remove `get_range`

* change usages of `get_range`

* clippy

* cargo update

* fix test + update comment
2024-12-19 21:58:54 +00:00
Boog900
7b8756fa80 cuprated: P2P protocol request handler (#303)
* add cuprated skeleton

* fmt and add deny exception

* add main chain batch handler

* add blockchain init

* very rough block manager

* misc changes

* move more config values

* add new tables & types

* add function to fully add an alt block

* resolve current todo!s

* add new requests

* WIP: starting re-orgs

* add last service request

* commit Cargo.lock

* add test

* more docs + cleanup + alt blocks request

* clippy + fmt

* document types

* move tx_fee to helper

* more doc updates

* fmt

* fix imports

* remove config files

* fix merge errors

* fix generated coins

* handle more p2p requests + alt blocks

* clean up handler code

* add function for incoming blocks

* add docs to handler functions

* broadcast new blocks + add commands

* add fluffy block handler

* fix new block handling

* small cleanup

* increase outbound peer count

* fix merge

* clean up the blockchain manger

* add more docs + cleanup imports

* fix typo

* fix doc

* remove unrelated changes

* add `get_objects` handler

* add `get_chain` handler

* add `fluffy_missing_txs` handler

* add `new_fluffy_block` handler

* improve interface globals

* manger -> manager

* enums instead of bools

* move chain service to separate file

* more review fixes

* sort imports + docs

* init dandelion integration

* add dandelion start function

* finish incoming tx handler

* Add tx blob hash table

* Add missing txpool requests

* handle duplicate stem txs

* check txpool on incoming block

* add request to remove tx in new blocks from the pool

* tell the txpool about incoming blocks

* fix merge

* typos

* remove blockchain height from txpool

* fix merge

* fix merge

* handle incoming txs in p2p request handler

* Allow `IncomingTxHandler` to be given later

* add p2p clearnet init

* fix build

* misc changes

* doc updates

* more doc updates

* sort imports

* review changes

* Result -> DbResult

* use `NonZero`

* review fixes

* remove `rust-2024-compatibility` lint
2024-12-03 20:21:05 +00:00
Boog900
ecd077b402 cuprated: config & args (#304)
* init config

* split sections

* finish initial config.

* fix clap

* misc changes

* fix doc

* fix test & clippy

* fix test 2

* try fix windows

* testing

* testing 2

* fix windows test

* fix windows: the remix.

* review comments

* fix imports

* rename & fix default config file

* fix cargo hack

* enable serde on `cuprate-helper`

* changes from matrix chats

* fix ci

* fix doc

* fix doc test

* move Cuprated.toml

* remove default.rs

* `size` -> `bytes`

* `addressbook_path` -> `address_book_path`

* fix config output

* fix ci

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

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

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-12-03 15:17:21 +00:00
hinto-janai
38541dbfda workspace: add/fix 1.83 lints (#353)
* 1.83 `cargo clippy --fix`

* fix type complexity, add `DbResult`

* clippy fix

* redb fix

* Update consensus/context/src/difficulty.rs

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

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-11-28 19:53:59 +00:00
hinto-janai
01150ab84c rpc/types: fix epee deserialization for GetBlocksResponse (#345)
* header + flatten

* fix optional values

* `fn error() -> String` -> `error!() -> &'static str`

* extract out `PoolInfo`

* fix cargo hack
2024-11-27 23:04:58 +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
hinto-janai
f3c1a5c2aa Fix #346 (#347)
fixes
2024-11-21 22:32:48 +00:00
Dmitry Holodov
4b925b8c78 ZMQ PUB/SUB JSON Types (#330) 2024-11-21 01:08:24 +00:00