Commit graph

399 commits

Author SHA1 Message Date
hinto.janai
f998f61d26
Merge branch 'main' into criterion 2024-11-28 15:38:10 -05: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
f15f08be45
1.83 clippy fix 2024-11-28 09:56:51 -05:00
hinto.janai
7e005012ed
cargo.toml fixes 2024-11-28 09:41:31 -05:00
hinto.janai
7b31745db3
Merge branch 'blockchain-benches' into criterion 2024-11-28 09:06:35 -05:00
hinto.janai
867ef3fe80
Merge branch 'rpc-types-benches' into criterion 2024-11-28 09:06:03 -05:00
hinto.janai
fe4f4ee46f
Merge branch 'cryptonight-bench' into criterion 2024-11-28 09:05:30 -05:00
hinto.janai
3f2fc0eb22
Merge branch 'db-bench' into criterion 2024-11-28 09:05:09 -05:00
hinto.janai
9ba17f8c7f
Merge branch 'main' into helper-bench
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-28 08:59:45 -05:00
hinto-janai
01150ab84c
rpc/types: fix epee deserialization for GetBlocksResponse (#345)
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
Deny / audit (push) Waiting to run
Architecture mdBook / build (push) Has been cancelled
* 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)
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
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
c54bb0c8b2
P2P: Change ClientPool to PeerSet (#337)
* 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
hinto-janai
e8598a082d
books/architecture: add Monero oddities (#343)
* add `oddities/`

* swap `Expected`, `Why`
2024-11-18 15:21:52 +00:00
241088e273
Wire: fix IPv4 Endianness (#342)
* 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
Deny / audit (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
cargo.toml: move comma
2024-11-13 11:01:15 +00:00
5a5f88cb13
types: fix pruned BlockCompleteEntry (#338)
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
fix pruned `BlockCompleteEntry`
2024-11-11 23:16:08 +00:00
525e20e841
Fix ci and loosen version requirements (#335)
* 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)
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)
Some checks failed
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (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
* 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
44981f2b24
CI: add cargo hack (#170)
* add workflow

* fix errors

* fix workflow

* install dependencies

* fix more errors

* Update CONTRIBUTING.md

* Update CONTRIBUTING.md

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

* fix hack + enable it for cuprate-database

* move hack to main CI

* fix docs

* fix ci formatting

* fix txpool tests

* fix CONTRIBUTING.md formatting

* service -> tower::Service

* review fixes

* review fixes

* fix CI

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-11-01 20:22:14 +00:00
hinto.janai
f65ff1bb0e
fix alt_block height 2024-10-31 19:53:36 -04:00
hinto.janai
1cf86ed5c0
alt_block 2024-10-31 19:44:09 -04:00
hinto.janai
e5db01a2e3
fmt 2024-10-31 17:09:41 -04:00
hinto.janai
059d0e6105
add benches/criterion/cuprate-blockchain 2024-10-31 17:06:28 -04:00
b57ee2f4cf
cuprated: txpool (#312)
Some checks failed
Audit / audit (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
* 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

* add function to start the pool

* add cross network address

* pre-review changes

* fix CI

* review fixes

* review fixes

* abort on DB error

* fix clippy
2024-10-29 15:30:51 +00:00
hinto.janai
705cd7e2db
clippy 2024-10-25 20:40:39 -04:00
hinto.janai
c8c1c2ef36
Merge branch 'benches' into helper-bench
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-25 20:35:14 -04:00
hinto.janai
9ea41c3a05
Merge branch 'main' into helper-bench 2024-10-25 20:35:09 -04:00
hinto.janai
bacda5f02a
Merge branch 'benches' into db-bench
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-25 20:35:01 -04:00
hinto.janai
0c2b3382e4
Merge branch 'benches' into cryptonight-bench
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-25 20:34:49 -04:00
hinto.janai
e6f55f0e7c
Merge branch 'benches' into rpc-types-benches 2024-10-25 20:34:33 -04:00
hinto.janai
636e48529b
add to typos.toml 2024-10-25 20:26:34 -04:00
hinto.janai
54354f7e9b
Merge branch 'main' into benches
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-25 20:25:44 -04:00
hinto.janai
725b532de9
fix json 2024-10-25 20:23:28 -04:00
hinto.janai
d2b30c1cbd
add benches 2024-10-25 20:03:30 -04:00
hinto.janai
a5ba54422f
add benches/criterion/cuprate-rpc-types 2024-10-25 19:45:34 -04:00
hinto.janai
615cef90ee
storage: remove todo println!() 2024-10-24 19:50:20 -04:00
hinto.janai
d89840e53f
add benches/criterion/cuprate-cryptonight 2024-10-24 19:31:37 -04:00
SyntheticBird
63216aecae
workspace: Defines cuprate members as workspace dependencies (#326)
Some checks failed
Deny / audit (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
Audit / audit (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
Defines cuprate members as workspace dependencies

- Defines cuprate members as workspace dependencies
- Changed all `path` import into `workspace = true`

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-24 23:12:30 +01:00
SyntheticBird
b8e2d00af4
storage: Add common amounts commitment lookup table (#323)
Add common ammounts commitment lookup table

- Implements `compute_zero_commitment` function in `cuprate-helper::crypto` module.
- Added test that compare the function output with the correct calculation.
- Use of a constant-time algorithm for the lookup table.
- Added according documentation
2024-10-24 22:10:33 +01:00
hinto.janai
8ae208b9f0
fix benches
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-22 20:36:14 -04:00
hinto.janai
0aa5f77c5e
fix cargo 2024-10-22 17:08:28 -04:00
hinto.janai
da3417f71f
changes 2024-10-22 17:08:16 -04:00
hinto-janai
4b350e897d
consensus-context: enable workspace lints (#321)
enable lints, fix 1.82 clippy
2024-10-22 17:35:54 +01:00
hinto.janai
1cada331f0
fix cargo b failing
this `cfg()` existing makes a regular workspace `cargo b` fail
2024-10-21 20:12:22 -04:00
hinto.janai
7a94952e14
copy #98 2024-10-21 17:01:11 -04:00
hinto.janai
e1a6f82e92
add benches/criterion/cuprate-helper 2024-10-18 20:11:47 -04:00
SyntheticBird
978d72b6c1
Move consensus context service into a subcrate. (#318)
Some checks failed
Architecture mdBook / build (push) Has been cancelled
Audit / audit (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
CI / fmt (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-17 00:17:58 +01:00