hinto-janai
d3b7ca3e65
cuprated: RPC handlers ( #355 )
...
* import diffs
* small fixes, hardfork changes
* lints
* hard_fork
* apply diffs
* review fixes
* binaries/cuprated/src/rpc/request: `pub(super)` -> `pub(crate)`
* add `BlockChainContextService`, `on_get_block_hash`
* map `tower::BoxError` to `anyhow::Error`
* get_block
* connection_info
* hard_fork_info
* set_bans
* get_bans
* banned
* flush_transaction_pool
* get_output_histogram
* get_coinbase_tx_sum
* get_version
* get_fee_estimate
* get_alternate_chains
* relay_tx
* response_base: `fn` -> `const`
* get_transaction_pool_backlog
* prune
* calc_pow
* add_aux_pow
* get_tx_ids_loose
* generate_blocks
* get_info
* sync_info
* get_miner_data
* `BlockchainManagerRequest` docs
* docs, `ConnectionInfo`, `AddressType`
* sig docs, remove `HardForks` request
* clean imports
* fix `on_get_block_hash`, `generate_blocks`, `get_block_headers_range`
* fix `get_info`, `banned`
* fix `sync_info`
* fix `get_miner_data`
* initial `add_aux_pow` impl
* fix `calculate_pow`
* add_aux_pow
* `get_output_distribution`
* checkup
* `find_nonce()` + `add_aux_pow` async wrapper
* fixes
* `helper::block_header`
* review fixes
* fixes
* doc fix
* p2p: remove tmp `AddressBookRequest::NextNeededPruningSeed`
* lint/todo fixes
* fix bans
* merge diffs from https://github.com/Cuprate/cuprate/pull/272
* `cuprate_types::rpc`, `from` module for `cuprate_rpc_types`
* `rpc-types` -> `types` pt. 2
* type fixes, move fn to `-helper`
* clippy fix
* rpc: move json-rpc types away from macros
* !!
* move types, fix orphan impl + cyclic dependency
* architecture book
* fix json-rpc handlers
* remove `::<N>`
* fix clippy
* fix type defaults, use `Hex`
* return defaults, hex test
* json_rpc: get_block_template
* `/get_transactions`
* `/is_key_image_spent`
* !!
* `/get_transactions` hex
* most of `/send_raw_transaction`
* `/send_raw_transaction`, `/save_bc`, response_base
* `/peerlist`
* `/get_transaction_pool`
* `/get_transaction_pool_stats`
* finish other draft
* get_blocks_by_height, shared::get_outs
* `/get_o_indexes.bin`
* `/get_output_distribution.bin`
* clippy
* `/get_blocks.bin`
* rpc-interface: add restricted invariant comments
* restricted json-rpc error
* get_output_distribution
* module cleanup
* txpool: all_hashes
* `HexVec`
* fix `get_txid` for `/get_outs`
miner transaction was not accounted for
* fix doc tests
* fix conflict
* json-rpc fixes
* `get_transaction_pool_hashes` fix
* rpc/interface: fix cargo hack
* review fixes
* cargo hack fix
* use `monero_address`
* Update binaries/cuprated/src/rpc/handlers/json_rpc.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
* Update binaries/cuprated/src/rpc/handlers/json_rpc.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
* review fixes
* fix `get_hashes`
* fix `is_key_image_spent`
* fix key image types
* fixes
* fix book
* output timelock fix + `blockchain_context()`
* fix
* fix
* fix
* fix getblocks.bin
* `cuprate_types` doc
* output fix
* fixme
* rct output fix
* fix cast
* clippy
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2025-04-08 17:09:43 +01:00
5c2b56c78e
Update to experimental monero oxide api ( #386 )
...
* add specific method for context
* add new statemachine for tx verification
* fix consensus crates build
* working builds
* fix CI
* add docs
* fix CI
* fix docs
* fix clippy
* cleanup
* add docs to `blockchain_context`
* fix doc tests
* add output cache
* new monero-serai
* todo
* todo
* Revert "new monero-serai"
This reverts commit fe3f6acc676fe59e794d5f92f07f76445db35199.
* use indexmap to request outputs
* clean up
* fix typos
* fix CI
* fix cargo hack
* fix reorgs
* check if a block is already present before adding it to the alt block cache
* fmt
* update to new monero oxide API
* fmt & fix cache
* update config values
* fix tests
* fix no-std builds
2025-03-06 19:03:25 +00:00
d8d1e34266
Consensus: Improve API ( #366 )
...
* add specific method for context
* add new statemachine for tx verification
* fix consensus crates build
* working builds
* fix CI
* add docs
* fix CI
* fix docs
* fix clippy
* cleanup
* add docs to `blockchain_context`
* fix doc tests
* review fixes
* fix cargo doc
2025-01-28 22:25:20 +00:00
503ef11514
cuprated: Init ( #344 )
...
* add cuprated skeleton
* fmt and add deny exception
* add main chain batch handler
* add blockchain init
* very rough block manager
* misc changes
* move more config values
* 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
* remove config files
* fix merge errors
* fix generated coins
* handle more p2p requests + alt blocks
* clean up handler code
* add function for incoming blocks
* add docs to handler functions
* broadcast new blocks + add commands
* add fluffy block handler
* fix new block handling
* small cleanup
* increase outbound peer count
* fix merge
* clean up the blockchain manger
* add more docs + cleanup imports
* fix typo
* fix doc
* remove unrelated changes
* add `get_objects` handler
* add `get_chain` handler
* add `fluffy_missing_txs` handler
* add `new_fluffy_block` handler
* improve interface globals
* manger -> manager
* enums instead of bools
* move chain service to separate file
* more review fixes
* sort imports + docs
* init config
* 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
* fix merge
* fix merge
* handle incoming txs in p2p request handler
* split sections
* finish initial config.
* fix clap
* misc changes
* fix doc
* fix test & clippy
* fix test 2
* try fix windows
* testing
* testing 2
* fix windows test
* fix windows: the remix.
* Allow `IncomingTxHandler` to be given later
* add p2p clearnet init
* fix build
* misc changes
* review comments
* fix imports
* rename & fix default config file
* fix cargo hack
* enable serde on `cuprate-helper`
* changes from matrix chats
* fix ci
* fix doc
* fix doc test
* doc updates
* more doc updates
* sort imports
* add startup code
* d -> h
* add file logging
* fix stem peer service
* todo
* remove `get_range`
* change usages of `get_range`
* clippy
* cargo update
* fix test + update comment
* manually set numb threads for each pool
* fix address book saves
* add more data to status
* fix config
* cleanup main + logging
* add more info to output when changing log level
* cleanup commands
* fix small issue in block downloader more misc clean up
* cross block bp(+) batch verification
* add message when syncing is done
* Revert "cross block bp(+) batch verification"
This reverts commit 764c4663a0
.
* fix fmt & clippy
* move `io_loop` to commands
* review fixes
* fix clippy
* review fixes
2025-01-17 20:24:24 +00:00
ecd077b402
cuprated: config & args ( #304 )
...
* init config
* split sections
* finish initial config.
* fix clap
* misc changes
* fix doc
* fix test & clippy
* fix test 2
* try fix windows
* testing
* testing 2
* fix windows test
* fix windows: the remix.
* review comments
* fix imports
* rename & fix default config file
* fix cargo hack
* enable serde on `cuprate-helper`
* changes from matrix chats
* fix ci
* fix doc
* fix doc test
* move Cuprated.toml
* remove default.rs
* `size` -> `bytes`
* `addressbook_path` -> `address_book_path`
* fix config output
* fix ci
* Update binaries/cuprated/src/config/args.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-12-03 15:17:21 +00:00
hinto-janai
38541dbfda
workspace: add/fix 1.83 lints ( #353 )
...
* 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
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
b57ee2f4cf
cuprated: txpool ( #312 )
...
* 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
SyntheticBird
63216aecae
workspace: Defines cuprate members as workspace dependencies ( #326 )
...
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
9923d8d69d
cuprated: internal signatures required for RPC ( #297 )
...
* add request methods
* add p2p messages
* add txpool msgs
* add blockchain_context msgs
* add blockchain msgs
* fmt
* blockchain_manager msgs
* blockchain manager msg types
* add DB fn signatures
* add statics module
* p2p msg changes, docs
* txpool docs/types
* blockchain docs/types
* `AlternateChains`, docs
* fixes
* remove blockchain write handle, fix docs
* remove `BlockchainReadRequest::Difficulty`
* remove `BlockchainReadRequest::MinerData`
* fix p2p ban types
* `CurrentRxVm` -> `CurrentRxVms`
* storage: remove `Clone` off write handle
* Update p2p/p2p-core/src/ban.rs
Co-authored-by: Boog900 <boog900@tutanota.com>
* fix merge
---------
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-08 22:57:09 +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
fdd1689665
Storage: tx-pool database ( #238 )
...
* 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
hinto-janai
4b93dbec4c
workspace: enforce crate/directory naming scheme ( #164 )
...
* 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