Commit graph

67 commits

Author SHA1 Message Date
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
Some checks are pending
Deny / audit (push) Waiting to run
2024-12-05 09:29:33 -05:00
hinto.janai
edaf6275da
Merge branch 'main' into json 2024-12-04 20:43:10 -05:00
7b8756fa80
cuprated: P2P protocol request handler (#303)
Some checks failed
CI / typo (push) Has been cancelled
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
CI / fmt (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

* 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 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

* Allow `IncomingTxHandler` to be given later

* add p2p clearnet init

* fix build

* misc changes

* doc updates

* more doc updates

* sort imports

* review changes

* Result -> DbResult

* use `NonZero`

* review fixes

* remove `rust-2024-compatibility` lint
2024-12-03 20:21:05 +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)
Some checks failed
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
a3fa638d91
fix bans
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-26 21:05:57 -05:00
hinto.janai
1a079c856e
lint/todo fixes 2024-11-26 20:48:53 -05:00
hinto.janai
916d593024
fixes 2024-11-26 19:37:35 -05:00
hinto.janai
1ffa86c5ae
review fixes 2024-11-26 19:23:33 -05:00
hinto.janai
de7abfc3f0
helper::block_header 2024-11-25 20:52:18 -05:00
c54bb0c8b2
P2P: Change ClientPool to PeerSet (#337)
* add WeakClient

* todo

* client pool -> peer set

* more peer set changes

* fix cuprated builds

* add docs

* more docs + better disconnect handling

* more docs

* fix imports

* review fixes
2024-11-20 01:37:52 +00:00
hinto.janai
86f2dd1586
fixes 2024-11-17 21:00:27 -05:00
hinto.janai
2d2d4931f8
find_nonce() + add_aux_pow async wrapper 2024-11-15 20:48:34 -05:00
hinto.janai
854b1752b1
checkup 2024-11-15 20:11:56 -05:00
hinto.janai
d634bea297
get_output_distribution 2024-11-15 16:11:16 -05:00
hinto.janai
e975c420d9
add_aux_pow 2024-11-14 19:58:24 -05:00
hinto.janai
1f3b5ed127
fix calculate_pow 2024-11-14 17:44:08 -05:00
hinto.janai
46bf19861a
initial add_aux_pow impl 2024-11-14 17:03:15 -05:00
hinto.janai
fd84940ee6
fix get_miner_data
Some checks failed
Deny / audit (push) Has been cancelled
2024-11-13 18:01:30 -05:00
hinto.janai
9374d08a07
fix sync_info 2024-11-13 17:44:45 -05:00
hinto.janai
228a718e04
fix get_info, banned 2024-11-13 17:35:35 -05:00
hinto.janai
e30eeb8a35
fix on_get_block_hash, generate_blocks, get_block_headers_range 2024-11-13 16:53:28 -05:00
hinto.janai
0cb6a76fc2
clean imports 2024-11-12 20:06:13 -05:00
hinto.janai
79b03e386a
Merge branch 'main' into json
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-11-01 20:18:25 -04:00
hinto-janai
372cab24d7
cuprated: internal signatures required for RPC pt. 2 (#320)
Some checks failed
CI / ci (macos-latest, stable, bash) (push) Has been cancelled
Audit / audit (push) Has been cancelled
CI / fmt (push) Has been cancelled
CI / typo (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
* 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)
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
* 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)
Some checks failed
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
Audit / audit (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
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
13eedc6d80
sig docs, remove HardForks request
Some checks failed
Audit / audit (push) Has been cancelled
Deny / audit (push) Has been cancelled
2024-10-17 18:32:47 -04:00
hinto.janai
98dfaa4870
docs, ConnectionInfo, AddressType 2024-10-17 17:13:37 -04:00
hinto.janai
bf07f2c84c
BlockchainManagerRequest docs 2024-10-16 20:47:39 -04:00
SyntheticBird
978d72b6c1
Move consensus context service into a subcrate. (#318)
Some checks failed
Architecture mdBook / build (push) Has been cancelled
Audit / audit (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
CI / fmt (push) Has been cancelled
Doc / build (push) Has been cancelled
Doc / deploy (push) Has been cancelled
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-17 00:17:58 +01:00
hinto.janai
bd3a844cc5
get_miner_data 2024-10-16 16:57:48 -04:00
hinto.janai
4b1d7bc897
sync_info 2024-10-16 16:46:13 -04:00
hinto.janai
e2f25bd52d
get_info 2024-10-15 20:58:44 -04:00
hinto.janai
548639b2f6
generate_blocks 2024-10-15 20:14:15 -04:00
hinto.janai
d56477cd61
get_tx_ids_loose 2024-10-15 16:58:14 -04:00
hinto.janai
7148ba1668
add_aux_pow 2024-10-15 16:45:54 -04:00
hinto.janai
5926f24d22
calc_pow 2024-10-15 16:19:35 -04:00
hinto.janai
d7d8b3509e
prune 2024-10-14 20:48:47 -04:00
hinto.janai
a10ed59201
get_transaction_pool_backlog 2024-10-14 20:43:24 -04:00
hinto.janai
2daf2555bb
response_base: fn -> const 2024-10-14 20:40:03 -04:00
hinto.janai
08b5ff2f05
relay_tx 2024-10-14 20:31:33 -04:00
hinto.janai
294df3f163
get_alternate_chains 2024-10-14 20:27:27 -04:00
hinto.janai
1e0ab56a5e
get_fee_estimate 2024-10-14 20:15:51 -04:00
hinto.janai
d7fef15cd6
get_version 2024-10-14 20:13:21 -04:00
hinto.janai
1d435cc1f8
get_coinbase_tx_sum 2024-10-14 20:01:14 -04:00
hinto.janai
1a76934aac
get_output_histogram 2024-10-14 18:05:59 -04:00
hinto.janai
6af977f0a5
flush_transaction_pool 2024-10-14 18:01:16 -04:00