Commit graph

122 commits

Author SHA1 Message Date
hinto.janai
f2f4fe7157
config: unsafe { .get_unchecked() } -> get_or_init()
only 0.13% faster over 1 billion accesses, not worth it
2023-12-11 20:04:45 -05:00
hinto.janai
2853e8ed5f
constants: dedup CUPRATE_* 2023-12-11 20:04:31 -05:00
hinto.janai
6a48806e4b
add rough config.rs 2023-12-07 21:21:18 -05:00
hinto.janai
7fdd1b71eb
add build.rs for COMMIT environment variable 2023-12-07 21:15:41 -05:00
hinto.janai
76549cf519
config: add v0.0.1.toml 2023-12-07 21:15:23 -05:00
hinto.janai
8ca663535d
match main.rs to cli.rs 2023-12-07 20:41:38 -05:00
hinto.janai
313c649808
cli.rs: basic parsing/handling/mapping 2023-12-07 19:43:23 -05:00
hinto.janai
6f6e282ccf
add config/ 2023-12-06 21:44:12 -05:00
hinto.janai
e87981eb7e
add macros.rs 2023-12-06 21:42:43 -05:00
hinto.janai
03c8baf5ed
add cert.rs 2023-12-06 21:39:47 -05:00
hinto.janai
3ebd9522b9
add docs.rs 2023-12-06 21:39:25 -05:00
hinto.janai
d7abde20ff
add constants.rs 2023-12-06 21:36:52 -05:00
hinto.janai
5b7558f07e
add main.rs 2023-12-06 21:36:49 -05:00
hinto.janai
8f73182ceb
edit & add to cuprate and workspace Cargo.toml 2023-12-06 13:49:54 -05:00
hinto.janai
a0435f8ff4
workspace: add cuprate to Cargo.toml 2023-12-05 19:42:42 -05:00
hinto.janai
0c60a9c75b
cargo init cuprate 2023-12-05 19:42:11 -05:00
hinto.janai
bf8dde30f2
rm -rf cuprate/ 2023-12-05 19:41:19 -05: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
hinto-janai
10b7400b17
Update workspace Cargo.toml (#36)
* add dependencies to workspace

* add workspace build profiles

* add potential dependencies
2023-11-16 01:10:46 +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
Boog900
34bb293f95
keep track of blockchain context validity internally. 2023-10-31 02:59:31 +00:00
Boog900
e1eaaf80d9
fix CI: Install dependencies (#33)
install boost, remove all targets except ubuntu
2023-10-29 01:11:55 +00:00
Boog900
7f5035ece2
Merge Add CI Actions (#31) 2023-10-29 00:42:37 +00:00
Boog900
7559532408
fix cryptonight builds with -O3 or -Ofast
taken from: https://github.com/monero-project/monero/pull/9042
2023-10-29 01:02:12 +01:00
Boog900
3a52b346e1
add tests to context sub-services + fix issues in other tests
+ fmt + clippy.
2023-10-29 00:39:58 +01:00
Boog900
2440ccbd8d
remove randomX lib 2023-10-29 00:08:37 +01:00
Boog900
216bedaf06
stop batching transactions across blocks when a hard-fork happens..
in the batch.
2023-10-27 00:55:08 +01:00
Boog900
d0bd17c560
use BufWritter to save the cache 2023-10-27 00:55:05 +01:00
Boog900
65378b0523
Merge pull request #30 from hinto-janai/main
add `hinto-janai.asc`
2023-10-26 12:07:13 +00:00
Boog900
0cac022605
batch the retrieval of outputs 2023-10-26 03:16:03 +01:00
hinto.janai
39b029f3e7
add CI actions 2023-10-25 21:07:13 -04:00
hinto.janai
049cec184f
add hinto-janai.asc 2023-10-25 20:39:57 -04:00
Boog900
cb7d8b7b5e
fix cumulative diff calculations + sort timestamps before getting median
we were not accounting for the genesis blocks difficulty of 1.
2023-10-24 23:35:24 +01:00
Boog900
2033a2d16c
add rules for blocks
TODO: the tests need re-ordering they are just all chucked in at the moment.
2023-10-24 23:02:19 +01:00
Boog900
b727062e97
finish rules for v1 txs - clean up is needed 2023-10-24 20:18:46 +01:00
Boog900
9b7f778f60
fix getting the median timestamp
we were excluding the genesis block
2023-10-24 15:34:41 +01:00
Boog900
edccf83481
add saving cache to disk. 2023-10-24 02:25:11 +01:00
Boog900
6bfc4da4e4
cache more blockchain data to reduce number of RPC calls 2023-10-23 22:24:02 +01:00
Boog900
eeefe49d63
add block/ tx verifier svc 2023-10-23 19:14:40 +01:00
Boog900
50f9458528
move hardforks, weights and pow cache to single context with unified API 2023-10-22 17:27:37 +01:00
Boog900
387278b821
add more consensus rules. 2023-10-20 01:04:26 +01:00
Boog900
ac87f9998e
add error handling to cryptonight.
Also remove the variant enum for separate functions.
2023-10-18 12:52:43 +01:00
Boog900
21f1448343
add more config options for the verifier 2023-10-15 20:35:33 +01:00