Commit graph

369 commits

Author SHA1 Message Date
hinto.janai
bf62755e70
Merge branch 'main' into rpc-handler-json 2024-09-20 20:27:02 -04:00
hinto-janai
57af45e01d
epee-encoding: enable workspace lints (#294)
Some checks are pending
Audit / audit (push) Waiting to run
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
* epee-encoding: enable workspace lints

* fmt

* fixes

* fixes

* fmt
2024-09-20 15:13:55 +01:00
hinto-janai
5588671501
levin: enable workspace lints (#292)
* levin: enable workspace lints

* use `drop()`

* dep fixes
2024-09-20 15:11:27 +01:00
hinto-janai
19150df355
p2p/dandelion-tower: enable workspace lints (#287)
* dandelion-tower: add/fix workspace lints

* fmt

* fixes

* todos

* fixes

* fixes

* expect reason
2024-09-20 14:36:34 +01:00
Asurar
e7c6bba63d
Database: Split BlockBlobs table + Miscellaneous fixes (#290)
Some checks are pending
Audit / audit (push) Waiting to run
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
* Split `BlockBlobs` database table + misc fixes

- Split the `BlockBlobs` database table into two new tables: `BlockHeaderBlobs` and `BlockTxsHashes`.
- `add_block`, `pop_block` and `get_block_extended_header` have been edited consequently.
- `VerifiedBlockInformation` now have a `mining_tx_index: u64` field.
- Made `cuprate-helper`'s `thread` feature a dependency of the `service` feature
- Edited service test mapping of output. It is now a full iterator.

* fix fmt

* Update storage/blockchain/src/types.rs

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

* Update storage/blockchain/src/ops/block.rs

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

* fix warning

---------

Co-authored-by: Boog900 <boog900@tutanota.com>
2024-09-19 20:05:41 +01:00
4169c45c58
Blockchain: add alt-block handling (#260)
Some checks are pending
Audit / audit (push) Waiting to run
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 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

* fix fee

* Apply suggestions from code review

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

* remove default features from `cuprate-helper`

* review fixes

* fix find_block

* add a test and fix some issues in chain history

* fix clippy

* fmt

* Apply suggestions from code review

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

* add dev dep

* cargo update

* move `flush_alt_blocks`

* review fixes

* more review fixes

* fix clippy

* remove INVARIANT comments

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-09-19 16:55:28 +01:00
hinto-janai
e3a918bca5
wire: enable workspace lints (#291)
Some checks are pending
Audit / audit (push) Waiting to run
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
* wire: enable workspace lints

* revert match arm formatting
2024-09-18 23:19:32 +01:00
hinto-janai
a1267619ef
p2p/address-book: enable workspace lints (#286)
* address-book: enable workspace lints

* fix

* fixes
2024-09-18 23:18:31 +01:00
hinto-janai
2afc0e8373
test-utils: enable workspace lints (#283)
* test-utils: enable workspace lints + fix

* `allow` -> `expect`

* fixes
2024-09-18 23:14:31 +01:00
hinto-janai
b9842fcb18
fixed-bytes: enable workspace lints (#293) 2024-09-18 23:12:35 +01:00
hinto-janai
8b4b403c5c
pruning: enable workspace lints (#284)
pruning: enable/fix workspace lints
2024-09-18 22:44:23 +01:00
hinto-janai
6502729d8c
lints: replace allow with expect (#285)
* cargo.toml: add `allow_attributes` lint

* fix lints

* fixes

* fmt

* fix docs

* fix docs

* fix expect msg
2024-09-18 21:31:08 +01:00
Asurar
2291a96795
P2P: Add latest clearnet mainnet seed nodes. (#281)
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
Add Monerod latest clearnet mainnet seed nodes
2024-09-14 14:01:43 +01:00
hinto.janai
82c56b99c0
current_hard_fork 2024-09-13 17:26:24 -04:00
hinto.janai
35065b7866
add statics.rs 2024-09-12 20:38:50 -04:00
hinto.janai
726a9f244b
DB messages, map header using (Block, ExtendedBlockHeader) 2024-09-12 18:00:20 -04:00
hinto.janai
0d0a544e68
add CumulativeBlockWeightLimit, submit_block 2024-09-11 20:29:58 -04:00
hinto.janai
6dc85c606f
bin: get_blocks_by_height, get_hashes 2024-09-11 18:42:40 -04:00
hinto.janai
4f738eef38
handler: add write handlers, impl Clone 2024-09-11 16:58:33 -04:00
hinto.janai
e15b7d42c0
pop_blocks 2024-09-10 21:00:05 -04:00
hinto.janai
2ac2b7e2a5
add BlockchainResponse::PopBlocks 2024-09-10 20:53:19 -04:00
hinto.janai
3b36c10231
unsupported requests, get_outs 2024-09-10 20:47:33 -04:00
90027143f0
consensus: misc fixes (#276)
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 decoy checks + fee calculation

* fmt
2024-09-10 01:18:26 +01:00
49d1344aa1
Storage: use saturating_add for cumulative_generated_coins (#275)
* use `saturating_add` for `cumulative_generated_coins`

* cargo fmt
2024-09-10 01:15:04 +01:00
hinto.janai
0ab7fe1c46
key_image_spent 2024-09-09 18:19:00 -04:00
Asurar
967537fae1
P2P: Implement incoming ping request handling over maximum inbound limit (#277)
Implement incoming ping request handling over maximum inbound limit

- If the maximum inbound connection semaphore reach its limit, `inbound_server` fn will
open a tokio task to check if the node wanted to ping us. If it is the case we respond, otherwise
drop the connection.
- Added some documentation to the `inbound_server` fn.
2024-09-09 23:12:06 +01:00
hinto.janai
1aca03d319
blockchain: add KeyImageSpent request 2024-09-09 18:10:29 -04:00
hinto.janai
b6e8b3a08e
cuprated: version constants 2024-09-09 17:50:11 -04:00
hinto.janai
6dc38a401d
add todo!() returns 2024-09-09 17:37:01 -04:00
hinto.janai
f41e6aa99e
add monerod code link docs 2024-09-09 17:31:22 -04:00
hinto.janai
b93d2275f8
get_last_block_header 2024-09-09 17:13:44 -04:00
hinto.janai
136e9b70a6
split blockchain/helper functions 2024-09-08 20:48:31 -04:00
hinto.janai
06b583e97d
use helpers, get_block, add return struct todos 2024-09-08 20:33:16 -04:00
hinto.janai
f86baa2eef
add helper.rs 2024-09-08 20:32:52 -04:00
hinto.janai
f1dea834b0
get_block_headers_range 2024-09-08 18:33:30 -04:00
hinto.janai
0cd1cdef9c
Merge branch 'main' into rpc-handler-json 2024-09-08 18:08:33 -04:00
hinto.janai
ca13b40e71
temporary allows 2024-09-08 18:06:01 -04:00
hinto.janai
2d52c26bdc
get_block_header_by_height, use anyhow!() 2024-09-08 18:03:47 -04:00
hinto-janai
01625535fa
book/architecture: add resource index (#268)
Some checks failed
Architecture mdBook / build (push) Has been cancelled
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
Deny / audit (push) Has been cancelled
Doc / build (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
* resource index

* index

* cap

* cleanup
2024-09-08 18:31:58 +01:00
hinto-janai
92800810d9
cuprated: initial RPC module skeleton (#262)
* readme

* cuprated: add all workspace deps

* cuprated: add lints

* !!

* add state, fn signatures

* fixes

* error signatures

* interface: handle json-rpc concepts

* split rpc calls into 3 `Service`s

* interface: extract out to `RpcService`

* fix merge

* remove crate lints

* use `BoxFuture`

* rpc/interface: impl `thiserror::Error`

* split state from main handler struct

* cleanup

* fix imports

* replace `RpcError` with `anyhow::Error`

* interface: update error

* cuprated: update error type
2024-09-08 15:52:17 +01:00
hinto.janai
6c7b5be94e
cuprated: use From when mapping types 2024-09-06 20:59:14 -04:00
hinto.janai
d1cff90660
rpc/types: add from module 2024-09-06 20:58:50 -04:00
hinto.janai
b8656961f3
add BlockchainReadRequest::Block[ByHash] 2024-09-06 20:45:25 -04:00
hinto.janai
81d8d2baa6
Merge branch 'rpc-handler' into rpc-handler-json 2024-09-06 20:18:09 -04:00
hinto.janai
6b16fb5688
cuprated: update error type 2024-09-06 20:09:42 -04:00
hinto.janai
aac1a31bed
interface: update error 2024-09-06 20:09:21 -04:00
hinto.janai
7e4015a381
replace RpcError with anyhow::Error 2024-09-06 18:06:50 -04:00
hinto.janai
98eb2f642b
get_block_count, on_get_block_hash, get_block_header_by_hash todo 2024-09-06 17:58:40 -04:00
hinto.janai
ae074d6f57
rpc handler constants 2024-09-06 17:58:20 -04:00
hinto.janai
51fd017c5b
blockchain: add BlockchainReadRequest::BlockExtendedHeaderByHash 2024-09-06 17:16:13 -04:00