Commit graph

44 commits

Author SHA1 Message Date
hinto.janai
fa1e5cafaf
doc fixes
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-07-08 17:08:21 -04:00
hinto.janai
0ce957389b
separate misc module 2024-07-08 16:49:29 -04:00
hinto.janai
45b51dd51a
macros: add type-wide attributes 2024-07-08 15:31:55 -04:00
hinto.janai
8bc3fe522e
other: add UNDOCUMENTED_ENDPOINTs 2024-07-08 15:25:48 -04:00
hinto.janai
04ecd4f72d
other: GetNetStats, GetOuts, PopBlocks, Update, PopBlocks 2024-07-08 15:13:08 -04:00
hinto.janai
9c27ff8311
other: GetLimit, SetLimit, OutPeers, InPeers 2024-07-08 14:25:14 -04:00
hinto.janai
fd9cde1e51
other: StopDaemon 2024-07-07 20:47:02 -04:00
hinto.janai
06265877cf
other: GetTransactionPoolStats 2024-07-07 20:42:31 -04:00
hinto.janai
416e2c4928
bin: GetTransactionPoolHashes 2024-07-07 20:37:36 -04:00
hinto.janai
5b765ed796
other: SetLogCategories, SetBootstrapDaemon, GetTransactionPool 2024-07-07 20:32:35 -04:00
hinto.janai
e6d5709963
other: StartMining, StopMining, MiningStatus, GetPeerList, SetLogHashRate, SetLogLevel 2024-07-07 20:22:26 -04:00
hinto.janai
d826c4f15b
other: IsKeyImageSpent, SendRawTransaction 2024-07-07 18:24:37 -04:00
hinto.janai
113c27b8d3
other: GetTransactions 2024-07-07 18:06:56 -04:00
hinto.janai
a694ac5667
bin: GetOuts 2024-07-07 16:54:11 -04:00
hinto.janai
e60afa53fb
bin: GetBlocks, GetBlocksByHeight, GetHashes, GetOutputIndexes 2024-07-07 16:44:11 -04:00
hinto.janai
3557ee63bf
add misc module, start bin and other 2024-07-07 16:29:24 -04:00
hinto.janai
57e9bd1efa
document private items 2024-07-05 20:35:52 -04:00
hinto.janai
a3da860e5d
fix docs 2024-07-05 19:36:03 -04:00
hinto.janai
57a98e58a0
json: add FlushCache, AddAuxPow 2024-07-04 20:52:42 -04:00
hinto.janai
6f1289507f
json: add GetMinerData, PruneBlockchain, CalcPow 2024-07-04 20:41:06 -04:00
hinto.janai
e19dfb40ee
json: add GetTransactionPoolBacklog, GetOutputDistribution 2024-07-04 17:33:03 -04:00
hinto.janai
32730272ea
json: add SyncInfo 2024-07-03 20:34:45 -04:00
hinto.janai
255c5540aa
json: add GetFeeEstimate, GetAlternateChains, RelayTx 2024-07-03 20:28:43 -04:00
hinto.janai
b592ee0bf8
json: add GetVersion, GetCoinbaseTxSum, GetOutputHistogram, FlushTransactionPool, Banned 2024-07-03 20:13:26 -04:00
hinto.janai
ea7f6fb2a5
json: define GetInfo, define ban types 2024-07-03 19:45:52 -04:00
hinto.janai
4bad15965e
add more defaults 2024-07-03 17:43:39 -04:00
hinto.janai
352ab2015a
add struct ConnectionInfo, add macro for misc types 2024-07-03 17:23:37 -04:00
hinto.janai
e5c833c996
json: add get_block, get_block_headers_range 2024-07-03 16:58:19 -04:00
hinto.janai
d0981da311
support serde/epee default values 2024-07-03 16:40:21 -04:00
hinto.janai
72bd1673d6
add misc.rs for root misc types 2024-07-03 15:57:04 -04:00
hinto.janai
e1dcd8e724
rpc: fix macro usage 2024-07-02 21:21:53 -04:00
hinto.janai
0227c1b793
base: remove unneeded base types 2024-07-02 21:21:47 -04:00
hinto.janai
2d54d2a19a
macros: split type generator macro up 2024-07-02 21:21:33 -04:00
hinto.janai
9a90d5be40
fix clippy 2024-07-01 21:04:24 -04:00
hinto.janai
c7ec8c7d9b
rpc: fix doc links 2024-07-01 20:58:15 -04:00
hinto.janai
1a90c75f42
rpc: use feature flags in misc types 2024-07-01 20:53:16 -04:00
hinto.janai
a85d4b845a
rpc: use feature flags in type generator macro 2024-07-01 20:53:06 -04:00
hinto.janai
161eeb7be9
rpc: add/doc feature flags 2024-07-01 20:52:57 -04: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
hinto-janai
4b93dbec4c
workspace: enforce crate/directory naming scheme (#164)
Some checks failed
Audit / audit (push) Has been cancelled
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
* rename all directories and crates

* fix all `use`

* fix doc link

* `dandelion/` -> `dandelion-tower/`

* fix epee-encoding test

* fix `json-rpc`

* fix pruning

* crate import fixes

* fix leftover merge conflicts

* fix `epee-encoding`
2024-06-24 02:30:47 +01:00
acd5380256
Fix clippy & Cargo update (#161)
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
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
* fix clippy

* run cargo update

* fix cargo deny

* remove duplicate `#[test]`
2024-06-13 19:08:34 +01:00
hinto-janai
a3e34c3ba8
rpc: implement json-rpc crate (#148)
* rpc: add `json-rpc` from https://github.com/Cuprate/cuprate/pull/43

Maintains all the changes made in that branch

* workspace: add `rpc/json-rpc`

* json-rpc: fix cargo.toml

* add todo

* satisfy clippy

* `method/params` -> `body` switch, adjust input types

* add test helpers, test tagged enums and flatten structs

* fix id type `None` <-> `Some(Id::Null)` difference

* lib.rs: add docs

* impl `Version`

* impl `Id`

* impl `Request`

* impl `Response`

* impl `ErrorCode`

* impl `ErrorObject`

* fixes

* add monero jsonrpc tests

* response: add id test

* add display docs to `ErrorObject`

* remove `#[inline]`

* add id null test

* cleanup

* code: clarify Monero's error code usage in docs

* id: fix macro indentation

* readme: fix `Response` -> `Request`

* request: add `lowercase` test

* tests: formatting, more string tests

* readme: add `Serialization changes`

* code: ugly `match` -> `if`

* response: manual deserialization impl

- lowercase keys only
- enforce either `result/error` but not both

* remove unneeded clone bounds

* readme: add implementation comparison tests

* request/response: more tests

* readme: formatting, assert error messages are expected

* request: add unknown field test

* request/response: add unknown field and unicode test
2024-06-12 02:12:31 +01:00
hinto-janai
6df67bb9d3
rpc: add initial crates (#146)
* add `rpc/` crates

* rpc: fix `monero-rpc-server` -> `monero-rpc-types`

* rpc: add skeleton `rpc/json-rpc`

* remove `cuprate-rpc-server`, add `json-rpc`
2024-06-05 15:35:08 +01:00
hinto-janai
4876e159e7
repo: add skeleton directories, fix labels (#139)
* `database/` -> `storage/`, create skeleton `storage/` crates

* add skeleton root directories

* books: add skeleton

* ci: fix labeler.yml

* fix CONTRIBUTING.md

* fix workspace Cargo.toml

* fix `storage/`

* rename helper fs fn, `cuprate_database` -> `cuprate_blockchain`

* fix Cargo.toml

* cuprate-blockchain: revert find-and-replace

Since it has to be ported to the book anyway, there's not much
reason to update this and create review diffs.

* labeler.yml: remove `A-docs` from `books/` changes

Although books are documentation,
the `A-books` label already exists for this
2024-05-29 02:18:30 +01:00