Commit graph

483 commits

Author SHA1 Message Date
Boog900
ed822eb165
cleanup main + logging 2024-12-21 03:34:04 +00:00
Boog900
17a8065286
fix config 2024-12-21 01:44:17 +00:00
Boog900
5c10d35581
add more data to status 2024-12-18 23:30:49 +00:00
Boog900
864380b15c
fix address book saves
Some checks failed
Deny / audit (push) Has been cancelled
2024-12-18 23:14:40 +00:00
Boog900
e3a2877882
manually set numb threads for each pool 2024-12-18 23:08:33 +00:00
Boog900
108e58a9d1
Merge branch 'get-range-fix' into init 2024-12-18 22:36:29 +00:00
Boog900
2d1880a569
fix test + update comment
Some checks failed
Deny / audit (push) Has been cancelled
2024-12-18 22:20:29 +00:00
Boog900
cab3eccfda
cargo update 2024-12-18 22:18:46 +00:00
Boog900
a916b00758
clippy 2024-12-18 22:14:39 +00:00
Boog900
9475f3f541
change usages of get_range 2024-12-18 16:55:16 +00:00
Boog900
72c9db39db
Merge branch 'main' into get-range-fix 2024-12-18 16:52:42 +00:00
Boog900
7200dc08ba
remove get_range 2024-12-18 16:41:57 +00:00
Boog900
8ad5983e98
todo 2024-12-04 18:58:50 +00:00
Boog900
3c751a6406
Merge branch 'main' into init
Some checks failed
Deny / audit (push) Has been cancelled
2024-12-04 00:03:09 +00:00
7b8756fa80
cuprated: P2P protocol request handler (#303)
Some checks failed
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
* 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
ecd077b402
cuprated: config & args (#304)
Some checks are pending
CI / fmt (push) Waiting to run
CI / typo (push) Waiting to run
CI / ci (macos-latest, stable, bash) (push) Waiting to run
CI / ci (ubuntu-latest, stable, bash) (push) Waiting to run
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Waiting to run
Deny / audit (push) Waiting to run
Doc / build (push) Waiting to run
Doc / deploy (push) Blocked by required conditions
* 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)
Some checks failed
Deny / audit (push) Has been cancelled
Doc / build (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Doc / deploy (push) Has been cancelled
* 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)
Some checks are pending
CI / ci (macos-latest, stable, bash) (push) Waiting to run
CI / fmt (push) Waiting to run
CI / typo (push) Waiting to run
CI / ci (ubuntu-latest, stable, bash) (push) Waiting to run
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Waiting to run
Doc / build (push) Waiting to run
Doc / deploy (push) Blocked by required conditions
* 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)
Some checks failed
Architecture mdBook / build (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
* 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
Boog900
92438dc7e1
fix stem peer service 2024-11-22 19:23:44 +00:00
hinto-janai
f3c1a5c2aa
Fix #346 (#347)
Some checks failed
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
fixes
2024-11-21 22:32:48 +00:00
Dmitry Holodov
4b925b8c78
ZMQ PUB/SUB JSON Types (#330)
Some checks failed
CI / fmt (push) Waiting to run
CI / typo (push) Waiting to run
CI / ci (macos-latest, stable, bash) (push) Waiting to run
CI / ci (ubuntu-latest, stable, bash) (push) Waiting to run
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Waiting to run
Doc / build (push) Waiting to run
Doc / deploy (push) Blocked by required conditions
Architecture mdBook / build (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-11-21 01:08:24 +00:00
Boog900
720b7afcd1
Merge branch 'main' into init
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-20 19:29:24 +00:00
Boog900
fd4a1746b1
add file logging
Some checks are pending
Deny / audit (push) Waiting to run
2024-11-20 16:06:31 +00:00
c54bb0c8b2
P2P: Change ClientPool to PeerSet (#337)
Some checks are pending
CI / fmt (push) Waiting to run
CI / typo (push) Waiting to run
CI / ci (macos-latest, stable, bash) (push) Waiting to run
CI / ci (ubuntu-latest, stable, bash) (push) Waiting to run
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Waiting to run
Deny / audit (push) Waiting to run
Doc / build (push) Waiting to run
Doc / deploy (push) Blocked by required conditions
* add WeakClient

* todo

* client pool -> peer set

* more peer set changes

* fix cuprated builds

* add docs

* more docs + better disconnect handling

* more docs

* fix imports

* review fixes
2024-11-20 01:37:52 +00:00
Boog900
86bbf55954
d -> h 2024-11-19 02:15:27 +00:00
Boog900
cde5294bf9
add startup code 2024-11-19 02:11:02 +00:00
Boog900
11468dc3b7
Merge branch 'p2p-request-handler' into init 2024-11-18 16:46:56 +00:00
Boog900
bbf83b27a8
Merge branch 'cuprated-config' into init 2024-11-18 16:46:37 +00:00
Boog900
e11568357a
sort imports
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-18 16:39:29 +00:00
Boog900
1fc7c0a577
more doc updates 2024-11-18 16:23:43 +00:00
Boog900
49db43180f
doc updates 2024-11-18 16:04:10 +00:00
Boog900
efa092572a
Merge branch 'main' into p2p-request-handler 2024-11-18 15:27:04 +00:00
hinto-janai
e8598a082d
books/architecture: add Monero oddities (#343)
Some checks failed
Architecture mdBook / build (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
* add `oddities/`

* swap `Expected`, `Why`
2024-11-18 15:21:52 +00:00
241088e273
Wire: fix IPv4 Endianness (#342)
Some checks are pending
CI / fmt (push) Waiting to run
CI / typo (push) Waiting to run
CI / ci (macos-latest, stable, bash) (push) Waiting to run
CI / ci (ubuntu-latest, stable, bash) (push) Waiting to run
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Waiting to run
Doc / build (push) Waiting to run
Doc / deploy (push) Blocked by required conditions
* fix IPv4 Endianness

* fix import order
2024-11-17 20:32:41 +00:00
hinto-janai
0f1ad6db1b
Cargo.toml: move commas (#340)
Some checks failed
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
cargo.toml: move comma
2024-11-13 11:01:15 +00:00
5a5f88cb13
types: fix pruned BlockCompleteEntry (#338)
Some checks failed
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
fix pruned `BlockCompleteEntry`
2024-11-11 23:16:08 +00:00
Boog900
318cf946ef
fix doc test
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-10 21:53:14 +00:00
Boog900
668095433d
fix doc 2024-11-10 21:28:51 +00:00
Boog900
7c5fa6db20
fix ci 2024-11-10 21:20:52 +00:00
Boog900
e652c189e5
changes from matrix chats
Some checks are pending
Deny / audit (push) Waiting to run
2024-11-10 20:56:43 +00:00
Boog900
21f6287288
enable serde on cuprate-helper
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-05 16:53:59 +00:00
Boog900
623ba49bb1
fix cargo hack
Some checks are pending
Deny / audit (push) Waiting to run
2024-11-05 02:21:38 +00:00
Boog900
3664eb1b08
rename & fix default config file 2024-11-05 01:37:51 +00:00
5a5f4d1c7c
Merge branch 'main' into cuprated-config 2024-11-05 01:29:38 +00:00
Boog900
352dac694f
fix imports 2024-11-05 01:17:32 +00:00
Boog900
26653d428d
review comments 2024-11-05 01:14:36 +00:00
525e20e841
Fix ci and loosen version requirements (#335)
Some checks failed
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
* add deny exception + loosen version requirements

* add a comment

* remove `expect`
2024-11-04 15:22:43 +00:00
SyntheticBird
b6c4adc83a
p2p: Implement P2P Bucket data structure (#329)
Some checks failed
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
Architecture mdBook / build (push) Has been cancelled
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / ci (ubuntu-latest, stable, bash) (push) Has been cancelled
CI / ci (windows-latest, stable-x86_64-pc-windows-gnu, msys2 {0}) (push) Has been cancelled
Deny / audit (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
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
hinto-janai
372cab24d7
cuprated: internal signatures required for RPC pt. 2 (#320)
* apply diffs

* clippy

* fix tests

* rpc: fix tests

* remove `BlockchainManagerRequest::Overview`

* cuprated/p2p: fix `ConnectionInfo`

* move `CalculatePow`

* remove `AddAuxPow`

* move `Spans` and `NextNeededPruningSeed`

* factor types into `cuprate-types`

* scope cargo features

* fix/doc type serde

* Update binaries/cuprated/src/rpc/request/address_book.rs

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

* Update binaries/cuprated/src/rpc/request/blockchain_context.rs

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

* Update binaries/cuprated/src/rpc/request/blockchain_manager.rs

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

* fmt

* txpool: collapse `TxEntry`

* `ConnectionId`

* fix import

* fix bin

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-11-01 22:25:55 +00:00