hinto.janai
d47f8ec7dc
fix doc tests
2024-12-19 18:38:08 -05:00
hinto.janai
dff77e8bed
fix get_txid
for /get_outs
...
miner transaction was not accounted for
2024-12-19 18:11:00 -05:00
hinto.janai
cb6fdb76e4
HexVec
2024-12-19 17:22:35 -05:00
hinto.janai
541302ea07
get_blocks_by_height, shared::get_outs
2024-12-16 20:21:00 -05:00
hinto.janai
c5abf9bb98
/get_transaction_pool
2024-12-13 20:14:16 -05:00
hinto.janai
d4b30333bb
most of /send_raw_transaction
2024-12-13 16:43:39 -05:00
hinto.janai
a359eed8be
/is_key_image_spent
2024-12-11 20:52:40 -05:00
hinto.janai
c3bc9b26ec
/get_transactions
2024-12-11 19:16:34 -05:00
hinto.janai
b402c82557
json_rpc: get_block_template
2024-12-11 16:30:37 -05:00
hinto.janai
1719d7db84
return defaults, hex test
2024-12-10 20:49:39 -05:00
hinto.janai
3a799219b8
fix type defaults, use Hex
2024-12-10 20:09:33 -05:00
hinto.janai
bf5e863f18
remove ::<N>
2024-12-06 20:10:56 -05:00
hinto.janai
2de9a019c6
fix json-rpc handlers
2024-12-06 19:59:38 -05:00
hinto.janai
3c25374b03
architecture book
2024-12-06 19:30:17 -05:00
hinto.janai
f2e7af779f
move types, fix orphan impl + cyclic dependency
2024-12-06 19:19:14 -05:00
hinto.janai
5b8cacd6b3
!!
2024-12-06 18:02:05 -05:00
hinto.janai
d1c1025238
rpc: move json-rpc types away from macros
2024-12-06 11:29:55 -05:00
hinto.janai
a1903f33b0
clippy fix
2024-12-06 09:26:20 -05:00
hinto.janai
20e599fc72
type fixes, move fn to -helper
2024-12-06 09:23:45 -05:00
hinto.janai
568a276b7f
rpc-types
-> types
pt. 2
2024-12-05 20:45:27 -05:00
hinto.janai
2104bb0e17
cuprate_types::rpc
, from
module for cuprate_rpc_types
2024-12-05 16:05:22 -05:00
hinto.janai
0b50091b5d
merge diffs from https://github.com/Cuprate/cuprate/pull/272
2024-12-05 09:29:33 -05:00
hinto-janai
38541dbfda
workspace: add/fix 1.83 lints ( #353 )
...
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 )
...
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
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
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
SyntheticBird
63216aecae
workspace: Defines cuprate members as workspace dependencies ( #326 )
...
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
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (push) Has been cancelled
Deny / audit (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
hinto-janai
d43f12ea3f
rpc-types: fix HardForkInfoRequest
( #310 )
...
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
* apply diffs
* fix tests
2024-10-11 18:51:16 +01:00
hinto-janai
80bfe0a34c
types: JSON representation types ( #300 )
...
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
* add `cuprate_types::json`
* docs
* `Option` -> flattened enums + prefix structs
* output enum
* docs
* todo!() epee impl
* cuprate-rpc-types: add comments
* cuprate-rpc-types: common `TxEntry` fields into prefix struct
* remove epee
* docs
* add `hex` module
* `From` serai types
* cleanup
* proofs
* tx from impls
* fix tx timelock
* add block value tests
* add ringct types
* add tx_v1, tx_rct_3 test
* clsag bulletproofs tx test
* clsag bulletproofs plus tx test
* docs
* fix hex bytes
* typo
* docs
2024-10-05 01:47:44 +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
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
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
bd375eae40
rpc-types: add traits and enum
requests/responses ( #241 )
...
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
2024-08-01 22:04:22 +01:00
hinto-janai
a2bca1b889
rpc: add JSON doc-tests ( #232 )
...
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
* fixed-bytes: add `serde`, document feature flags
* fixed-bytes: add derives
* rpc: add `as _` syntax to macro
* rpc: use `ByteArrayVec` and `ContainerAsBlob` for binary types
* fixed-bytes: re-add derives
* rpc-types: dedup default value within macro
* readme: fixed bytes section
* types: custom epee - `BlockCompleteEntry`
* types: custom epee - `KeyImageSpentStatus`
* types: custom epee - `PoolInfoExtent`
* types: add `Status::Other(String)` variant
* types: custom epee - `TxEntry`, add `read_epee_field` macro
* bin: custom epee - `GetBlocks`
* types: add `serde.rs`
* misc: make `TxEntry` an `enum`, impl serde
* misc: `unimplemented!()` for `TxEntry`'s epee
* types: add `BlockCompleteEntry`
* rpc: replace `BlockCompleteEntry` with `cuprate-types`
* types: document `BlockCompleteEntry`
* bin: fix `number_of_fields` for `GetBlocksResponse`
* misc: add `Distribution`
* distribution: add todo
* misc fixes
* readme: add `(De)serialization invariants`
* distribution: compress variants
* types: add `block_complete_entry.rs`
* net: fix imports
* p2p: fix imports
* turn off default-features
* p2p: fix imports
* misc fixes
* Update net/wire/Cargo.toml
Co-authored-by: Boog900 <boog900@tutanota.com>
* distribution: module doc
* wire: re-export types
* test-utils: add `crate::rpc::types` module
* test-utils: conditional json doc-tests
* bin: use enum for `GetBlocksResponse`
* misc: use lowercase for stringify
* json: add test data, fix macro doc tests
* json: add all data
* other: add all data
* bin: add skeleton
* docs
* move type to correct file
* remove duplicated fields for custom epee
* rpc: `client/{client,constants}.rs` -> `client.rs`
* lib.rs: remove `clippy::module_inception`
* macros: add json doc test macro
* json: add some tests
* json: add doc-test for all types
* add all other JSON doc-tests
* move doc-test macros to files
* base: add doc-tests
* json: TODO distribution test
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-07-28 21:43:16 +01:00
hinto-janai
929d19c450
rpc: custom epee for misc/bin types ( #229 )
...
* fixed-bytes: add `serde`, document feature flags
* fixed-bytes: add derives
* rpc: add `as _` syntax to macro
* rpc: use `ByteArrayVec` and `ContainerAsBlob` for binary types
* fixed-bytes: re-add derives
* rpc-types: dedup default value within macro
* readme: fixed bytes section
* types: custom epee - `BlockCompleteEntry`
* types: custom epee - `KeyImageSpentStatus`
* types: custom epee - `PoolInfoExtent`
* types: add `Status::Other(String)` variant
* types: custom epee - `TxEntry`, add `read_epee_field` macro
* bin: custom epee - `GetBlocks`
* types: add `serde.rs`
* misc: make `TxEntry` an `enum`, impl serde
* misc: `unimplemented!()` for `TxEntry`'s epee
* types: add `BlockCompleteEntry`
* rpc: replace `BlockCompleteEntry` with `cuprate-types`
* types: document `BlockCompleteEntry`
* bin: fix `number_of_fields` for `GetBlocksResponse`
* misc: add `Distribution`
* distribution: add todo
* misc fixes
* readme: add `(De)serialization invariants`
* distribution: compress variants
* types: add `block_complete_entry.rs`
* net: fix imports
* p2p: fix imports
* turn off default-features
* p2p: fix imports
* misc fixes
* Update net/wire/Cargo.toml
Co-authored-by: Boog900 <boog900@tutanota.com>
* distribution: module doc
* wire: re-export types
* bin: use enum for `GetBlocksResponse`
* misc: use lowercase for stringify
* remove duplicated fields for custom epee
* types: remove `should_write()` for custom epee
* bin: split `GetBlocksResponse` variant fields into structs
* misc: split `Distribution` variant fields into structs
* small fixes
* put all fields in `read_epee_field!`
* distribution: (de)compress during epee/serde (de)serialization
* distribution: leave (de)compression functions as `todo!()`
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-07-25 16:46:41 +01:00
hinto-janai
0910c0a231
rpc: use ByteArrayVec
and ContainerAsBlob
( #227 )
...
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
* fixed-bytes: add `serde`, document feature flags
* fixed-bytes: add derives
* rpc: add `as _` syntax to macro
* rpc: use `ByteArrayVec` and `ContainerAsBlob` for binary types
* fixed-bytes: re-add derives
* rpc-types: dedup default value within macro
* readme: fixed bytes section
2024-07-13 01:26:11 +01:00
hinto-janai
5aeb8af4b4
rpc: implement other JSON types ( #221 )
...
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
* `serde/epee` feature flags
* modify type generator macros
* add `defaults.rs`
* add `free.rs`
* add `misc` module
* modify `base.rs`, `contants.rs`
* remove `binary_string.rs`, `status.rs`
* fix macro usage
* impl `other.rs`
* base: re-add `AccessRequestBase`
* fix default functions
* tx_entry: fix link
* other: fix default functions
* Update rpc/types/src/other.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
* Update rpc/types/src/other.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-07-10 22:31:56 +01:00
hinto-janai
303c165df7
rpc: implement .bin
types ( #220 )
...
* `serde/epee` feature flags
* modify type generator macros
* add `defaults.rs`
* add `free.rs`
* add `misc` module
* modify `base.rs`, `contants.rs`
* remove `binary_string.rs`, `status.rs`
* fix macro usage
* impl `bin.rs`
* base: re-add `AccessRequestBase`
* fix default functions
* tx_entry: fix link
* bin: fix default functions
2024-07-10 21:19:19 +01:00
hinto-janai
ecbb5ad3dc
rpc: implement /json_rpc
types ( #219 )
...
* `serde/epee` feature flags
* modify type generator macros
* add `defaults.rs`
* add `free.rs`
* add `misc` module
* modify `base.rs`, `contants.rs`
* remove `binary_string.rs`, `status.rs`
* fix macro usage
* impl `json.rs`
* base: re-add `AccessRequestBase`
* fix default functions
* tx_entry: fix link
* json: fix default functions
* json: fix `on_get_block_hash`, `submit_block`
* json: `status` -> `block_id`
* json: fix `SubmitBlockRequest`
* json: fix `OnGetBlockHashResponse`
The serialized `result` field will come from our `json-rpc` crate,
so the inner type should be a `transparent` string.
* json: `Response` -> `ResponseBase` for `SubmitBlock`
* Update rpc/types/src/json.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
* json: fix `SubmitBlockRequest` doc test
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-07-10 21:12:40 +01:00
hinto-janai
136abf7edd
rpc: feature flags, macro changes, misc setup ( #218 )
...
* `serde/epee` feature flags
* modify type generator macros
* add `defaults.rs`
* add `free.rs`
* add `misc` module
* modify `base.rs`, `contants.rs`
* remove `binary_string.rs`, `status.rs`
* fix macro usage
* base: re-add `AccessRequestBase`
* fix default functions
* tx_entry: fix link
2024-07-09 22:58:02 +01:00
hinto-janai
e405786a73
rpc: start cuprate-rpc-types
( #147 )
...
* rpc: add `monero-rpc-types`
* lib.rs: add lints
* add base files, deps
* fix macro generation, doc test
* add `strum`, add `misc` module
* document struct generation macro
* add `GetHeight`
* lib.rs: create re-export macro
* macro changes, add few more types
* docs
* `monero-rpc-types` -> `cuprate-rpc-types`
* fix modules
* specify commit in macro, add () type aliases
* macro docs, fixes
* add `Status::Other(String)`
* add TODO for `strum`
* Update rpc/types/Cargo.toml
Co-authored-by: Boog900 <boog900@tutanota.com>
* add `BinaryString`
* add `ResponseBase`
* add `CORE_RPC_*` constants
* fix status; use `CORE_RPC_*` constants
* cargo.toml: add `epee_encoding`
* rpc: add epee_encoding impl for `Status`
* macro: add epee_encoding for every type
* remove `strum`
* add response bases
* add `CORE_RPC_STATUS_UNKNOWN`
* add response/request bases for epee
* create `base` module
* use different type for macro example
* move base / root types around
* docs, status serde test
* status: use `Status::Unknown` for `epee_default_value`
* json: add missing fields to `GetBlockTemplateRequest`
not sure I missed these
cc73fe7116/src/rpc/core_rpc_server_commands_defs.h (L947-L950)
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-06-26 22:24:05 +01:00