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

inbound eviction logic / policy. #431

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e2b3ec2
eviction_logic.
D-Stacks Mar 12, 2024
4279555
Merge branch 'master' into eviction_logic
D-Stacks Mar 12, 2024
ada69ff
address point 2 and 3 of reveiw.
D-Stacks Mar 13, 2024
fb77947
rework trait, make it more general, remove unnecessary boxing
biryukovmaxim Mar 13, 2024
18a0b60
move constraints to `where` clause, rename constraints, remove unnece…
biryukovmaxim Mar 13, 2024
8f98fe9
fmt
biryukovmaxim Mar 13, 2024
ec977a1
Merge pull request #6 from biryukovmaxim/eviction_logic_enhance-trait
D-Stacks Mar 14, 2024
9da5f77
Merge branch 'master' into eviction_logic
D-Stacks Mar 14, 2024
21c930e
some clean-up, rename from_peers (as it lost context).
D-Stacks Mar 14, 2024
f9574cd
Merge branch 'master' into eviction_logic
D-Stacks Mar 21, 2024
b1cc6c9
Merge branch 'master' into eviction_logic
D-Stacks Mar 26, 2024
07c3551
Merge branch 'master' into eviction_logic
D-Stacks Apr 18, 2024
6396bcf
Merge branch 'master' into eviction_logic
D-Stacks Apr 23, 2024
ce55733
Merge branch 'master' into eviction_logic
D-Stacks May 22, 2024
575f681
Merge branch 'master' into eviction_logic
D-Stacks May 27, 2024
62f97e4
Merge branch 'master' into eviction_logic
D-Stacks Jul 1, 2024
a4e98bb
eviction_logic.
D-Stacks Mar 12, 2024
1c61322
address point 2 and 3 of reveiw.
D-Stacks Mar 13, 2024
7ffe1b6
fix cargo.lock
D-Stacks Jul 2, 2024
ade2582
add some more debug for in-the-wild testing.
D-Stacks Aug 1, 2024
f01fe1d
multiply, not div.
D-Stacks Aug 1, 2024
a5cec8a
Merge branch 'dev' of https://github.com/kaspanet/rusty-kaspa into ev…
D-Stacks Aug 28, 2024
df27b7e
Merge branch 'dev' into eviction_logic
D-Stacks Sep 1, 2024
2d3753f
Merge branch 'dev' into eviction_logic
D-Stacks Sep 2, 2024
7e12fd6
Merge branch 'dev' into eviction_logic
D-Stacks Sep 2, 2024
5c62815
Merge branch 'dev' into eviction_logic
D-Stacks Sep 10, 2024
e5eb206
Merge branch 'dev' into eviction_logic
D-Stacks Sep 11, 2024
a740d5c
Merge branch 'master' into eviction_logic
D-Stacks Sep 11, 2024
7941097
Merge branch 'master' into eviction_logic
D-Stacks Sep 12, 2024
f84cb4e
Merge branch 'master' into eviction_logic
D-Stacks Sep 15, 2024
541bfc4
Merge branch 'master' into eviction_logic
D-Stacks Sep 26, 2024
a40aeea
Merge branch 'master' into eviction_logic
D-Stacks Sep 30, 2024
58933b1
Merge branch 'master' of https://github.com/kaspanet/rusty-kaspa into…
D-Stacks Oct 7, 2024
d8f3581
Merge branch 'master' into eviction_logic
D-Stacks Oct 8, 2024
e701778
Merge branch 'master' into eviction_logic
D-Stacks Oct 15, 2024
149a1aa
Merge branch 'master' into eviction_logic
D-Stacks Oct 22, 2024
88317ce
Merge branch 'master' into eviction_logic
D-Stacks Nov 13, 2024
ec5a849
Merge branch 'master' into eviction_logic
D-Stacks Nov 19, 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
112 changes: 110 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ regex = "1.10.2"
ripemd = { version = "0.1.3", default-features = false }
rlimit = "0.10.1"
rocksdb = "0.21.0"
rv = "0.16.4"
secp256k1 = { version = "0.24.3", features = [
"global-context",
"rand-std",
Expand Down
3 changes: 1 addition & 2 deletions components/addressmanager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,7 @@ mod address_store_with_cache {
.iter()
.filter(|(addr_key, _)| !exceptions.contains(addr_key))
.map(|(_, e)| {
let count = prefix_counter.entry(e.address.prefix_bucket()).or_insert(0);
*count += 1;
*prefix_counter.entry(e.address.prefix_bucket()).or_insert(0) += 1;
(64f64.powf((MAX_CONNECTION_FAILED_COUNT + 1 - e.connection_failed_count) as f64), e.address)
})
.unzip();
Expand Down
6 changes: 5 additions & 1 deletion components/connectionmanager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ kaspa-utils.workspace = true
log.workspace = true
parking_lot.workspace = true
rand.workspace = true
tokio.workspace = true
tokio.workspace = true

[dev-dependencies]
rv.workspace = true
uuid.workspace = true
Loading
Loading