-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BitVM2: bump rust nightly #551
Changes from all commits
e50801a
12d5466
373d6ef
ada1347
012b807
673a524
9146439
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,5 +1,5 @@ | ||||||
#![allow(dead_code)] // TODO: remove once the bridge state `sanity_check` fn is used. | ||||||
#![feature(is_sorted)] // TODO: switch to using crate | ||||||
#![allow(stable_features)] // FIX: this is needed for sp1 toolchain. | ||||||
#![feature(is_sorted, is_none_or)] | ||||||
|
||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you add a comment as to why this one ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The problem is that this will conflict with strata/crates/state/src/lib.rs Lines 1 to 2 in 5008f3d
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay then. We can leave this as is for now. |
||||||
//! Rollup types relating to the consensus-layer state of the rollup. | ||||||
//! | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,13 +85,15 @@ impl<K: Clone + Eq + Hash, V: Clone> CacheTable<K, V> { | |
|
||
/// Gets the number of elements in the cache. | ||
// TODO replace this with an atomic we update after every op | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment about replacing this with |
||
pub async fn get_len_async(&self) -> usize { | ||
let cache = self.cache.lock().await; | ||
cache.len() | ||
} | ||
|
||
/// Gets the number of elements in the cache. | ||
// TODO replace this with an atomic we update after every op | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here too. |
||
pub fn get_len_blocking(&self) -> usize { | ||
let cache = self.cache.blocking_lock(); | ||
cache.len() | ||
|
@@ -110,13 +112,15 @@ impl<K: Clone + Eq + Hash, V: Clone> CacheTable<K, V> { | |
} | ||
|
||
/// Inserts an entry into the table, dropping the previous value. | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And here... |
||
pub async fn insert_async(&self, k: K, v: V) { | ||
let slot = Arc::new(RwLock::new(SlotState::Ready(v))); | ||
let mut cache = self.cache.lock().await; | ||
cache.put(k, slot); | ||
} | ||
|
||
/// Inserts an entry into the table, dropping the previous value. | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One more. |
||
pub fn insert_blocking(&self, k: K, v: V) { | ||
let slot = Arc::new(RwLock::new(SlotState::Ready(v))); | ||
let mut cache = self.cache.blocking_lock(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ pub use tracing::*; | |
pub type DbRecv<T> = tokio::sync::oneshot::Receiver<DbResult<T>>; | ||
|
||
/// Shim to opaquely execute the operation without being aware of the underlying impl. | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. two more. |
||
pub struct OpShim<T, R> { | ||
executor_fn: Arc<dyn Fn(T) -> DbResult<R> + Sync + Send + 'static>, | ||
} | ||
|
@@ -21,6 +22,7 @@ where | |
T: Sync + Send + 'static, | ||
R: Sync + Send + 'static, | ||
{ | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. three. |
||
pub fn wrap<F>(op: F) -> Self | ||
where | ||
F: Fn(T) -> DbResult<R> + Sync + Send + 'static, | ||
|
@@ -31,6 +33,7 @@ where | |
} | ||
|
||
/// Executes the operation on the provided thread pool and returns the result over. | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. four |
||
pub async fn exec_async(&self, pool: &threadpool::ThreadPool, arg: T) -> DbResult<R> { | ||
let (resp_tx, resp_rx) = tokio::sync::oneshot::channel(); | ||
|
||
|
@@ -50,6 +53,7 @@ where | |
} | ||
|
||
/// Executes the operation directly. | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. five... |
||
pub fn exec_blocking(&self, arg: T) -> DbResult<R> { | ||
(self.executor_fn)(arg) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ impl PendingTasks { | |
} | ||
} | ||
|
||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. six |
||
pub fn current(&self) -> usize { | ||
self.counter.load(Ordering::SeqCst) | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ use crate::helpers::proof_generator::ProofGenerator; | |
pub struct BtcBlockProofGenerator; | ||
|
||
impl BtcBlockProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. seven |
||
pub fn new() -> Self { | ||
Self | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ pub struct CheckpointProofGenerator { | |
} | ||
|
||
impl CheckpointProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eight |
||
pub fn new( | ||
l1_batch_proof_generator: L1BatchProofGenerator, | ||
l2_batch_proof_generator: L2BatchProofGenerator, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ pub struct ClProofGenerator { | |
} | ||
|
||
impl ClProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nine |
||
pub fn new(el_proof_generator: ElProofGenerator) -> Self { | ||
Self { el_proof_generator } | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ use crate::helpers::proof_generator::ProofGenerator; | |
pub struct ElProofGenerator; | ||
|
||
impl ElProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ten |
||
pub fn new() -> Self { | ||
Self | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ pub struct L1BatchProofGenerator { | |
} | ||
|
||
impl L1BatchProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. eleven |
||
pub fn new(btc_proof_generator: BtcBlockProofGenerator) -> Self { | ||
Self { | ||
btc_proof_generator, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ pub struct L2BatchProofGenerator { | |
} | ||
|
||
impl L2BatchProofGenerator { | ||
#[allow(dead_code)] // #FIXME: remove this. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. last one... |
||
pub fn new(cl_proof_generator: ClProofGenerator) -> Self { | ||
Self { cl_proof_generator } | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[toolchain] | ||
channel = "nightly-2024-07-27" | ||
channel = "nightly-2024-12-12" | ||
components = [ | ||
"cargo", | ||
"clippy", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving forward we should use
#[expect(dead_code)]
instead. And then, we don't need to rely onFIXME:
. The compiler will tell us if this can be removed.