Commit graph

337 commits

Author SHA1 Message Date
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
hinto.janai
1b94435952
fix imports 2024-09-06 16:54:28 -04:00
hinto.janai
9f8f2c7edf
cleanup 2024-09-05 18:23:39 -04:00
hinto.janai
d443cfb9b7
split state from main handler struct 2024-09-05 18:11:27 -04:00
hinto.janai
d268c50246
rpc/interface: impl thiserror::Error 2024-09-05 18:06:22 -04:00
hinto.janai
7406afb910
use BoxFuture 2024-09-05 18:06:07 -04:00
hinto.janai
29afe237d5
remove crate lints 2024-09-05 17:38:57 -04:00
hinto.janai
4118f488bf
fix merge 2024-09-05 17:19:57 -04:00
hinto.janai
3965349f71
Merge branch 'main' into rpc-handler 2024-09-05 17:11:03 -04:00
hinto-janai
4653ac5884
rpc/interface: separate RpcHandler into 3 tower::Services (#266)
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
* apply diff

* cleanup

* fix test
2024-09-05 16:53:16 +01:00
hinto.janai
7487aa4779
interface: extract out to RpcService 2024-09-02 20:34:02 -04:00
hinto.janai
68ba5f4781
split rpc calls into 3 Services 2024-09-02 20:15:12 -04:00
hinto.janai
c57020d805
interface: handle json-rpc concepts 2024-09-02 19:58:38 -04:00
hinto.janai
5f37771729
error signatures 2024-09-02 18:08:52 -04:00
hinto.janai
57677a5e90
Merge branch 'main' into rpc-handler 2024-09-02 17:48:04 -04:00
hinto.janai
f89e29eeba
fixes 2024-09-02 17:47:23 -04:00
hinto-janai
0941f68efc
helper: fix clippy (#265)
Some checks failed
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
Deny / audit (push) Has been cancelled
Doc / build (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
* helper: fix lints

* fix tests
2024-09-02 22:46:11 +01:00
hinto.janai
abfc3c503c
add state, fn signatures 2024-09-02 17:37:18 -04:00
hinto.janai
29587d9bb4
Merge branch 'main' into rpc-handler 2024-09-02 16:50:49 -04:00
hinto-janai
eead49beb0
lints: opt in manual lint crates (#263)
* cargo.toml: transfer existing lints

* rpc/interface: lints

* rpc/json-rpc: lints

* rpc/types: lints

* storage/blockchain: lints

* rpc/types: fix lints

* cargo.toml: fix lint group priority

* storage/blockchain: fix lints

* fix misc lints

* storage/database: fixes

* storage/txpool: opt in lints + fixes

* types: opt in + fixes

* helper: opt in + fixes

* types: remove borsh

* rpc/interface: fix test

* test fixes

* database: fix lints

* fix lint

* tabs -> spaces

* blockchain: `config/` -> `config.rs`
2024-09-02 18:12:54 +01:00
hinto-janai
b837d350a4
workspace: add naming convention lints (#261)
* add lint to {Cargo,clippy}.toml

* `RandomXVM` -> `RandomXVm`

* epee: `TT` -> `T2`
2024-09-02 18:10:45 +01:00
hinto-janai
bec8cc0aa4
helper: add and use cast module (#264)
* helper: add `cast` module

* fix crates

* spacing
2024-09-02 18:09:52 +01:00
hinto.janai
5b0e56f711
!! 2024-09-01 16:59:33 -04:00
hinto.janai
d83a93fc31
cuprated: add lints 2024-09-01 16:38:17 -04:00
hinto.janai
ac1815a8c9
cuprated: add all workspace deps 2024-09-01 16:38:02 -04:00
hinto.janai
b28c52a8c0
readme 2024-09-01 16:33:23 -04:00
fdd1689665
Storage: tx-pool database (#238)
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
* split the DB service abstraction

* fix ci

* misc changes

* init tx-pool DBs

* add some comments

* move more types to `/types`

* add some ops

* add config & more ops functions & open function

* add read & write svcs

* add more docs

* add write functions + docs

* fix merge

* fix test

* fix ci

* move `TxPoolWriteError`

* add more docs

* fix toml formatting

* fix some docs

* fix clippy

* review fixes

* update docs

* fix merge

* fix docs

* fix tests

* fix tests

* add back lints

* Update storage/txpool/README.md

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

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-08-22 02:09:07 +01:00
8655a3f5e5
dandelion-tower: improve API (#257)
* init

* reduce the jobs handled by the dandelion pool

* fix docs

* resolve todo

* review changes

* Update p2p/dandelion-tower/src/pool/incoming_tx.rs

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

* Update p2p/dandelion-tower/src/pool/incoming_tx.rs

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

* `PId` -> `PeerId`

---------

Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-08-22 01:18:44 +01:00
SyntheticBird
ccff75057e
Update Zed in ENVIRONMENT-ADVICE.md (#259)
Update ENVIRONMENT-ADVICE.md

Updated information on Zed editor
2024-08-22 00:33:21 +01:00
7207fbd17b
Binaries: add cuprated skeleton (#258)
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
* add cuprated skeleton

* fmt and add deny exception
2024-08-20 23:56:18 +01:00
hinto-janai
5648bf0da0
rpc: remove temporary lints (#255)
* rpc: remove temporary lints for types

* rpc: remove temporary lints for json-rpc

* rpc: remove temporary lints for interface

* cfgs `1 tab` -> `4 spaces`
2024-08-20 23:50:31 +01:00
hinto-janai
aeb070ae8d
Replace OnceLock + fn with LazyLock (#256)
* `consensus/`

* `helper/`

* `test-utils/`

* `storage/`

* fix docs + tests + lints

* decomposed_amount: remove `LazyLock`

* clippy
2024-08-20 22:53:32 +01:00
hinto-janai
59adf6dcf8
std::mem::{size,align}_of -> {size,align}_of (#254)
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
2024-08-10 00:09:25 +01:00