525e20e841
Fix ci and loosen version requirements ( #335 )
...
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 deny exception + loosen version requirements
* add a comment
* remove `expect`
2024-11-04 15:22:43 +00:00
SyntheticBird
978d72b6c1
Move consensus context service into a subcrate. ( #318 )
...
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
Doc / deploy (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
Co-authored-by: Boog900 <boog900@tutanota.com>
2024-10-17 00:17:58 +01:00
hinto-janai
9923d8d69d
cuprated: internal signatures required for RPC ( #297 )
...
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
* 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
8be369846e
cuprated: Blockchain Manager ( #274 )
...
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
Audit / audit (push) Has been cancelled
Deny / audit (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
* improve interface globals
* manger -> manager
* enums instead of bools
* move chain service to separate file
* more review fixes
* add link to issue
* fix syncer + update comment
* fmt
2024-10-08 18:26:07 +01:00
hinto-janai
c840053854
consensus: enable workspace lints ( #295 )
...
* consensus: enable workspace lints
* rules/fast-sync: enable workspace lints
* typos
* fixes
* `PoW` -> proof-of-work
2024-09-21 01:32:03 +01:00
90027143f0
consensus: misc fixes ( #276 )
...
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
* fix decoy checks + fee calculation
* fmt
2024-09-10 01:18:26 +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
fdd1689665
Storage: tx-pool database ( #238 )
...
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
be2f3f2672
Consensus: move more types to types
( #250 )
...
* move `HardFork` to `types`
* fmt
* fix tests & doc
* fmt
* fix clippy
* move transaction verification data
* misc fixes
* doc fixes
* update README.md
* review fixes
2024-08-09 00:56:13 +01:00
8227c28604
update monero-serai ( #201 )
...
* update monero-serai
* update monero-serai + change height to `usize`
* fix merge
* fix merge
* fix doc
* fix clippy take 2
* misc changes
* move RPC imports to dev deps
* handle miner txs when calculating fee
* Update consensus/rules/src/blocks.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* Update consensus/rules/src/transactions.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* Update storage/blockchain/src/ops/tx.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* Update test-utils/src/data/free.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* fixes
* fix clippy
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-08-07 00:48:53 +01:00
1a178381dd
Storage: split the DB service abstraction ( #237 )
...
* split the DB service abstraction
* fix ci
* misc changes
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* review fixes
* Update storage/service/Cargo.toml
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* Update storage/service/Cargo.toml
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* fix clippy
* fix doc
* `bc` -> `blockchain`
* doc fixes
* Update storage/service/README.md
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* cargo fmt
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-08-05 21:47:30 +01:00
b44c6b045b
Consensus: add alt-chain handling ( #214 )
...
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 `pop_blocks` to the difficulty cache
* add a rolling median struct
* use RollingMedian in weight cache
* add pop_blocks to weight cache
* add alt context cache
* add getting alt RX vms
* rework alt cache
* add alt block verify function
* keep alt caches around
* add alt checked alt blocks to the cache
* check the alt blocks timestamp
* add docs + cleanup code
* add popping blocks from the context cache
* finish popping blocks + fix tests
* fix doc
* add a test popping blocks from HF cache
* add a request to clear alt caches
* add back lint
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* review fixes
* small changes
* change panic doc
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-07-29 01:13:08 +01:00
5c08d1a0e2
Consensus: fix Rx VM initialization ( #190 )
...
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
* fix Rx VM initialization
* fix imports
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* use checked_sub
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-06-25 01:55:04 +01:00
0e5555d4d4
Consensus: block batch prepper ( #151 )
...
* add block batch prepper
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* review comments
* review comments
* fix doc
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-06-07 21:23:48 +01:00
07f61bdb9c
Consensus: fix panic in batch verifier ( #152 )
...
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 panic in batch verifier
* docs
* review comments
* Update consensus/rules/src/batch_verifier.rs
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-06-07 13:34:53 +01:00
0622237d19
Consensus: use cuprate-types
types ( #145 )
...
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
* move consensus database to /types
* fix `storage` builds
* unify `VerifiedBlockInformation`
* fix docs
* change `Database` trait wording
* order imports
* service -> blockchain
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
* fix typo
* fix key_images_spent
* add back todo
* fix tests
* service -> blockchain 2
* update docs
* update docs 2
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
2024-06-04 18:19:35 +01:00
889e15738b
Cleanup & Document consensus ( #65 )
...
* change monero-consensus to cuprate-consensus-rules
* document the context service
* remove the mutex on blockchain context
* comment the context caches
* add back tokio
* document block checks
* typo
* keep tha amount of outputs with a certain amount in the output cache
* typo
* nuke cross-block batch verification
* remove RPC scanner
* change how contextual data is got.
* fmt & clippy fixes
* typo
* cargo update
* restore Cargo.lock
* add a verify tx test.
+ fixes an issue with verifying signatures after BPs
* clippy
* remove bad test
* add mores tests and fix a couple bugs
* typos
* move tests and add some more
* typo
* remove scan_chain docs
* fix check for duplicate txs when duplicates are not sequential
* add a proptest for dup txs
* cache tx verification state
* doc updates + move `Vec` to `Arc<[]>`
* clippy
* misc changes
* Apply suggestions from code review
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
Co-authored-by: SyntheticBird <118022351+SyntheticBird45@users.noreply.github.com>
* fix fmt
* review changes
---------
Co-authored-by: hinto-janai <hinto.janai@protonmail.com>
Co-authored-by: SyntheticBird <118022351+SyntheticBird45@users.noreply.github.com>
2024-05-31 01:52:12 +01:00
hinto-janai
354ac9c2f6
Add typos
+ cargo doc
CI ( #32 )
...
* ci: add separate `typo` job
* add `typos.toml` for false positives
* fix all typos
* ci: add `cargo doc` step
* fix doc errors
* contributing.md: update passing CI steps
* fix more typos, add exception to `cryptonight/`
* ci: move `cargo doc` step within `ci` job
It needs dependencies.
* ci: add https://github.com/Cuprate/cuprate/pull/63
* test-utils: fix typo
* ci: switch `rustup update` and switch order
* ci: only update rust on unix
* ci: set `RUSTDOCFLAGS` env earlier
* ci: only run `cargo doc` on linux
* ci: remove `bash` on `cargo doc`
* ci: remove `--all-targets`
We now have the target OS's in CI, no need to compile for each.
* contributing.md: update ci steps
* ci: add `--all-targets` back to clippy, build
* update contributing.md
2024-02-15 16:03:04 +00:00
b7df133175
consensus: fix batch handling when we don't have a full list of outputs. ( #54 )
...
* consensus: fix batch handling when we don't have a full list of outputs.
* change `scan_chain` to new API
* clippy
* add a test for calculating multiple difficulties
* fmt
* rx_seed -> rx_vms
* consensus-rules: ring members younger than current block.
* only create rx vms when required.
* fix rx initiation when syncing
* add single block verification (no batch)
* update serai
2024-02-13 00:51:11 +00:00
hinto-janai
0d8f71b4c7
Fix link errors in cargo doc
( #55 )
...
fix `cargo doc` - links not using `<>`
2024-02-10 00:08:39 +00:00
Boog900
83b59c557c
net: use epee_encoding instead of monero-epee-bin-serde
...
This gives us more control than what serde provides. This
PR also moves to use `Bytes` where possible to allow
zero-copy parsing of network messages.
2024-01-30 16:09:54 +00:00
Boog900
81eec5cbbb
consensus: add more difficulty tests
2024-01-22 18:17:34 +00:00
Boog900
ed598e374e
remove empty cuprate bin and common
2024-01-22 01:56:34 +00:00
Boog900
b9334b6a90
clean up dependencies
2024-01-21 14:46:03 +00:00
Boog900
d10b9d3f8b
fmt
2024-01-19 23:56:06 +00:00
Boog900
78244a9d16
use static for big const arrays
2024-01-19 23:52:03 +00:00
Boog900
0f2ec54c02
consensus: add some more ltw tests
2024-01-19 23:46:24 +00:00
Boog900
bb2292289f
consensus: organize tests
2024-01-19 00:35:22 +00:00
Boog900
d6495cdb01
fix rx seed initialization from previous commit
2024-01-10 23:55:17 +00:00
Boog900
1afe3e4dc8
fix builds on certain archs
2024-01-10 01:49:35 +00:00
Boog900
7cf7ea1693
Make RX VM an option for calculate_pow_hash
...
This means we don't have to init the dataset
if it's not needed
2024-01-09 22:39:29 +00:00
Boog900
730bc8fb42
link transaction rules to monero-book
2024-01-08 01:26:44 +00:00
Boog900
13957a5e7f
link rules to monero-book.
...
need to do transactions.
2024-01-07 01:15:33 +00:00
Boog900
40e64cc9c3
integrate RandomX, plus some other misc changes.
2024-01-05 22:36:57 +00:00
Boog900
5d6fb3f6b9
integrate ringCT rules into the RPC scanner.
2023-12-27 23:50:18 +00:00
Boog900
84343a8297
move RPC scanning cache to borsh
2023-12-18 14:36:22 +00:00
Boog900
e264a40feb
remove InstaFuture
for Ready
...
Also renames some functions so it's clear as to what they do https://github.com/Cuprate/cuprate/pull/45#issuecomment-1859054439
2023-12-17 14:50:08 +00:00
Boog900
376a41deb2
fmt + clippy + fix tests
2023-12-17 14:27:07 +00:00
Boog900
b0588fad2b
change cuprate-consensus to use monero-consensus
2023-12-17 14:27:06 +00:00
Boog900
92652b26a2
add cli args to RPC scanning binary
2023-12-08 15:36:45 +00:00
Boog900
34dd105a0c
make CI more strict
2023-12-03 00:29:12 +00:00
Boog900
f3d96ca2ce
move more tasks to rayon and change some returned
...
futures to be explicit instead of Boxed
2023-12-02 22:57:34 +00:00
8557073c15
p2p changes ( #38 )
...
* start re-working p2p to work with change monero-wire
* start re-working p2p to work with change monero-wire
adds back some changes from #22
* change the peer module to use the new API + fix a couple bugs
* remove peer set for now
* add try_from/from conversion between `Message` and
`Request`/`Response`
* Allow specifying other parameters in levin-cuprate
* add new `LevinCommand` enum and clean up monero-wire message de/encoding
* fix issues with merge
* start splitting up p2p crate into smaller crates.
* add monerod action from serai to test network code
* remove tracing in tests
2023-11-30 18:09:05 +00:00
Boog900
343e979e82
Use a connection task for RPC connections.
2023-11-18 14:00:33 +00:00
Boog900
484b418faf
add batch preparing for blocks.
2023-11-11 01:55:15 +00:00
Boog900
f025513950
cache sorted long and short term block weights
2023-11-08 00:28:15 +00:00
Boog900
9471ca5d6a
consensus: use a custom spawn function when using rayon in async code.
...
Before we were using tokio's `spawn_blocking`, which wasn't ideal as this put tasks in a queue to be put on rayon's pool.
Instead, now we create an oneshot and use rayon::spawn.
2023-11-07 23:52:56 +00:00
Boog900
b49878ac6b
fix doc comment
2023-11-06 02:19:49 +00:00
Boog900
fc7b676f7b
consensus: add a tx pool trait.
...
This means we don't have to rely on people giving the verifier the correct txs for a block.
Also allows some speedup as we can put the fetching of outputs on a different task.
2023-11-05 18:44:41 +00:00