Add EventSink for External Logging #342

Merged
parabitdev merged 21 commits from parabit/record-sink into master 2026-01-27 21:52:13 +00:00
parabitdev commented 2026-01-09 20:20:53 +00:00 (Migrated from github.com)

Adds and tests the ability to write shares to a DB and/or flat file. This enables para server to work with para pool in a way that is fully compatible with our mining pool.

Adds and tests the ability to write shares to a DB and/or flat file. This enables `para server` to work with `para pool` in a way that is fully compatible with our mining pool.
parabitdev (Migrated from github.com) reviewed 2026-01-22 21:34:21 +00:00
@ -42,6 +42,7 @@ use {
},
},
parabitdev (Migrated from github.com) commented 2026-01-22 21:34:21 +00:00

Rework usages of ckpool::PoolStatus and api::PoolStatus to be named.

Rework usages of ckpool::PoolStatus and api::PoolStatus to be named.
parabitdev (Migrated from github.com) reviewed 2026-01-22 21:47:30 +00:00
@ -66,13 +69,22 @@ impl<W: Workbase> Stratifier<W> {
jobs: Jobs::new(),
parabitdev (Migrated from github.com) commented 2026-01-22 21:47:30 +00:00

Catch and log, can be mitigated by implementing batching.

Catch and log, can be mitigated by implementing batching.
parabitdev (Migrated from github.com) reviewed 2026-01-22 21:52:52 +00:00
parabitdev (Migrated from github.com) commented 2026-01-22 21:52:52 +00:00

Arc<BufWriter<File>> if we move async

`Arc<BufWriter<File>>` if we move async
parabitdev (Migrated from github.com) reviewed 2026-01-22 21:56:09 +00:00
@ -690,2 +747,4 @@
let job_height = job.workbase.height();
self.send_error(
id,
parabitdev (Migrated from github.com) commented 2026-01-22 21:56:09 +00:00

Timestamp should be populated at insert-time.

Timestamp should be populated at insert-time.
parabitdev (Migrated from github.com) reviewed 2026-01-22 21:57:51 +00:00
@ -690,2 +747,4 @@
let job_height = job.workbase.height();
self.send_error(
id,
parabitdev (Migrated from github.com) commented 2026-01-22 21:57:50 +00:00

Can we pass in top-level fields (that are wrapped in arc), and do the clone()/to_string() at write time? Exploring further.

Can we pass in top-level fields (that are wrapped in arc), and do the clone()/to_string() at write time? Exploring further.
parabitdev (Migrated from github.com) reviewed 2026-01-23 02:21:59 +00:00
@ -1,6 +1,6 @@
use {
parabitdev (Migrated from github.com) commented 2026-01-23 02:21:59 +00:00

Cleaned up and merged imports project-wide

Cleaned up and merged imports project-wide
parabitdev (Migrated from github.com) reviewed 2026-01-26 19:14:10 +00:00
@ -7,2 +7,4 @@
fn nbits(&self) -> Nbits;
fn ntime(&self) -> Ntime;
fn height(&self) -> i32;
fn coinbase_value(&self) -> Option<i64>;
parabitdev (Migrated from github.com) commented 2026-01-26 19:14:09 +00:00

PSQL BIGINT is an i64 as postgres does not have a native 8-byte unsigned number

PSQL `BIGINT` is an i64 as postgres does not have a native 8-byte _unsigned_ number
parabitdev (Migrated from github.com) reviewed 2026-01-26 19:14:14 +00:00
parabitdev (Migrated from github.com) commented 2026-01-26 19:14:14 +00:00

PSQL BIGINT is an i64 as postgres does not have a native 8-byte unsigned number

PSQL `BIGINT` is an i64 as postgres does not have a native 8-byte _unsigned_ number
parabitdev (Migrated from github.com) reviewed 2026-01-26 20:40:45 +00:00
parabitdev (Migrated from github.com) commented 2026-01-26 20:40:45 +00:00

I absolutely love Arc<Mutex<>>, it is the HashMap<> (Java) of the Rust world, it always works even if it isn't appropriate.

I absolutely love Arc<Mutex<>>, it is the HashMap<> (Java) of the Rust world, it always works even if it isn't appropriate.
Sign in to join this conversation.
No description provided.