Skip to content

Commit

Permalink
chore: enable static linking of openssl dependency (#6708)
Browse files Browse the repository at this point in the history
Description
---
Enabled static linking of `openssl` dependencies by specifying
`vendored` feature where applicable.

Motivation and Context
---
A recent change introduced a build and runtime dependency on openssl in
Windows - this PR removes that dependency by statically linking openssl.

How Has This Been Tested?
---
System-level testing - queries to the DNS and Tari Pulse resolves.
```
2024-11-28 16:51:17.816247200 [p2p::initialization] DEBUG Found 9 peer(s) from `seeds.nextnet.tari.com` in 39ms
```
```
2024-11-28 16:51:17.861283000 [c::bn::tari_pulse] INFO  Tari Pulse Service initialized with DNS name: checkpoints-nextnet.tari.com
2024-11-28 16:51:18.087188200 [c::bn::tari_pulse] TRACE Passed checkpoints: true, DNS: (45168, 1e3c56468f464072d9879e29a70891e9916f2206116c8819637c266a8b1d2efa), Local: (45168, 1e3c56468f464072d9879e29a70891e9916f2206116c8819637c266a8b1d2efa)
```

What process can a PR reviewer use to test or verify this change?
---
Code review

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
hansieodendaal authored Dec 2, 2024
1 parent e10548d commit 5eb49e0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion applications/minotari_console_wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ log4rs = { version = "1.3.0", default-features = false, features = [
qrcode = { version = "0.12" }
rand = "0.8"
regex = "1.5.4"
reqwest = "0.11.18"
reqwest = { version = "0.11.18", features = ["native-tls-vendored"] }
rpassword = "5.0"
rustyline = "9.0"
serde = "1.0.136"
Expand Down
2 changes: 1 addition & 1 deletion applications/minotari_miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ log4rs = { version = "1.3.0", default-features = false, features = [
"size_trigger",
"fixed_window_roller",
] }
native-tls = "0.2"
native-tls = { version = "0.2", features = ["vendored"] }
num_cpus = "1.13"
rand = "0.8"
serde = { version = "1.0", default-features = false, features = ["derive"] }
Expand Down
12 changes: 11 additions & 1 deletion base_layer/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ tiny-keccak = { package = "tari-tiny-keccak", version = "2.0.2", features = [
"keccak",
] }
dirs-next = "1.0.2"
hickory-client = { version = "0.25.0-alpha.2", features = ["dns-over-rustls", "dnssec-openssl"], optional = true }
hickory-client = { version = "0.25.0-alpha.2", features = [
"dns-over-native-tls",
"dnssec-openssl"
], optional = true }
openssl = { version = "0.10.66", features = ["vendored"] }
anyhow = "1.0.53"

[dev-dependencies]
Expand Down Expand Up @@ -126,3 +130,9 @@ unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(tari_target_network_nextnet)',
'cfg(tari_target_network_testnet)',
] }

[package.metadata.cargo-machete]
openssl = [
# We need to specify extra features for openssl even though it is not used directly in this crate
"openssl",
]

0 comments on commit 5eb49e0

Please sign in to comment.