Skip to content
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

[Backport] merge several fixes into 118 for next rc release #4616

Closed
wants to merge 45 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
6be1671
Fix the possible cycling attack in RBF
chenyukang Jul 31, 2024
158cfa9
code refactor
chenyukang Jul 31, 2024
db66275
cleanup and add assertion for process_rbf
chenyukang Aug 1, 2024
2c2b1f1
add verify log for monitor
chenyukang Aug 20, 2024
fbe63f4
Integration Test: wait find unverified blocks finish for all specs
eval-exec Aug 22, 2024
47dc5ed
add ignore item in deny.toml.
EthanYuan Aug 22, 2024
83ac99f
Merge pull request #4605 from eval-exec/exec/fix-ci-2
eval-exec Aug 22, 2024
2c057db
Fix SendLargeCyclesTxToRelay on slow machine
chenyukang Aug 22, 2024
0ceb6f8
Merge pull request #4606 from chenyukang/yukang-fix-relay-ci-issue
chenyukang Aug 22, 2024
3bd5fed
Merge pull request #4600 from chenyukang/yukang-add-verify-log
chenyukang Aug 23, 2024
7bfc1e1
add clear verify queue rpc
chenyukang Aug 23, 2024
ce41807
verify worker exit when signal_exit is_cancelled
chenyukang Aug 24, 2024
dc20e94
Make sure the uncle block timestamp is different from the next block …
chenyukang Aug 25, 2024
76ebab4
Merge pull request #4611 from chenyukang/yukang-debug-chain-fork-spec
chenyukang Aug 25, 2024
8744829
Merge pull request #4612 from chenyukang/yukang-fix-verify-queue-exit
chenyukang Aug 25, 2024
6ee85c3
Merge pull request #4609 from chenyukang/yukang-clear-verify-queue
chenyukang Aug 26, 2024
e48f664
Do not start BlockDownload thread if ckb has received exit signal
eval-exec Aug 26, 2024
7304ea7
Merge pull request #4615 from eval-exec/exec/exit-blockdownload-if-Bl…
chenyukang Aug 27, 2024
47f92ff
Early return init_load_unverified thread when no unverified blocks fo…
eval-exec Aug 27, 2024
d28bde6
Integration Test: add more log for SyncChurn
eval-exec Aug 27, 2024
3675433
Merge pull request #4617 from eval-exec/exec/early-return-init-load-u…
driftluo Aug 27, 2024
48c09c2
Integration Test: kill_gracefully on RandomlyKill
eval-exec Aug 28, 2024
50b74a2
Merge pull request #4622 from eval-exec/exec/kill-gracefully-on-integ…
eval-exec Aug 28, 2024
3a40e37
Do not kill gracefully on windows
eval-exec Aug 29, 2024
f9c3c70
Merge pull request #4624 from eval-exec/exec/fix/widnows-ci
eval-exec Aug 29, 2024
258676a
fix: fix atomic ordering in multi-thread
driftluo Aug 28, 2024
114a11f
test
eval-exec Aug 29, 2024
7749bcb
Merge pull request #4625 from eval-exec/exec/ci/windows
eval-exec Aug 30, 2024
2fb17ab
Merge pull request #4623 from driftluo/fix-atomic-ordering
eval-exec Aug 30, 2024
c789b83
Rename ckb_chain::consume_unverified to ckb_chain::verify
eval-exec Aug 30, 2024
b86e176
test: add check relax ordering on ci
driftluo Aug 30, 2024
b30e378
Merge branch 'develop' into yukang-fix-cycling-attack-rbf
chenyukang Aug 30, 2024
3d78da8
chore: remove all relax order
driftluo Aug 30, 2024
a73b7f4
Merge pull request #4561 from chenyukang/yukang-fix-cycling-attack-rbf
quake Sep 2, 2024
6332b10
add retry for git clone in cli_test
chenyukang Sep 2, 2024
9d8e976
CI: windows integration use windows-latest
eval-exec Sep 2, 2024
ea3651f
Merge branch 'develop' into ci-check-relaxed
chenyukang Sep 2, 2024
4919219
Merge pull request #4626 from eval-exec/exec/rename-consume-unverifie…
eval-exec Sep 2, 2024
6fa274e
Merge pull request #4631 from eval-exec/exec/ci/windows-2022
eval-exec Sep 2, 2024
0e99a2a
Merge pull request #4627 from driftluo/ci-check-relaxed
eval-exec Sep 2, 2024
72b735c
Merge pull request #4630 from chenyukang/yukang-add-retry-for-ci
chenyukang Sep 2, 2024
d398e5a
Fix script test error
chenyukang Aug 12, 2024
cf78552
enlarge spec wait time
chenyukang Aug 13, 2024
2e100d8
add logs for script test
chenyukang Aug 13, 2024
0274984
Merge pull request #4581 from chenyukang/yukang-fix-script-test
eval-exec Sep 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: fix atomic ordering in multi-thread
driftluo committed Aug 29, 2024
commit 258676a15f4e50bc8560e5e28957ffe461563dfb
4 changes: 2 additions & 2 deletions shared/src/shared.rs
Original file line number Diff line number Diff line change
@@ -378,14 +378,14 @@ impl Shared {
/// Return whether chain is in initial block download
pub fn is_initial_block_download(&self) -> bool {
// Once this function has returned false, it must remain false.
if self.ibd_finished.load(Ordering::Relaxed) {
if self.ibd_finished.load(Ordering::Acquire) {
false
} else if unix_time_as_millis().saturating_sub(self.snapshot().tip_header().timestamp())
> MAX_TIP_AGE
{
true
} else {
self.ibd_finished.store(true, Ordering::Relaxed);
self.ibd_finished.store(true, Ordering::Release);
false
}
}
4 changes: 2 additions & 2 deletions shared/src/types/header_map/kernel_lru.rs
Original file line number Diff line number Diff line change
@@ -157,7 +157,7 @@ where
self.stats().tick_primary_delete();
}
// If IBD is not finished, don't shrink memory map
let allow_shrink_to_fit = self.ibd_finished.load(Ordering::Relaxed);
let allow_shrink_to_fit = self.ibd_finished.load(Ordering::Acquire);
self.memory.remove(hash, allow_shrink_to_fit);
if self.backend.is_empty() {
return;
@@ -175,7 +175,7 @@ where
});

// If IBD is not finished, don't shrink memory map
let allow_shrink_to_fit = self.ibd_finished.load(Ordering::Relaxed);
let allow_shrink_to_fit = self.ibd_finished.load(Ordering::Acquire);
self.memory
.remove_batch(values.iter().map(|value| value.hash()), allow_shrink_to_fit);
}
6 changes: 3 additions & 3 deletions tx-pool/src/service.rs
Original file line number Diff line number Diff line change
@@ -177,13 +177,13 @@ macro_rules! send_notify {
impl TxPoolController {
/// Return whether tx-pool service is started
pub fn service_started(&self) -> bool {
self.started.load(Ordering::Relaxed)
self.started.load(Ordering::Acquire)
}

/// Set tx-pool service started, should only used for test
#[cfg(feature = "internal")]
pub fn set_service_started(&self, v: bool) {
self.started.store(v, Ordering::Relaxed);
self.started.store(v, Ordering::Release);
}

/// Return reference of tokio runtime handle
@@ -658,7 +658,7 @@ impl TxPoolServiceBuilder {
}
}
});
self.started.store(true, Ordering::Relaxed);
self.started.store(true, Ordering::Release);
if let Err(err) = self.tx_pool_controller.load_persisted_data(txs) {
error!("Failed to import persistent txs, cause: {}", err);
}