Skip to content

Commit

Permalink
Merge branch 'develop' into eth-cons-updates-wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mappum committed Oct 27, 2024
2 parents 0235846 + 5ba8b66 commit 9e6d473
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 99 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
override: true
- name: Cache
uses: actions/cache@v4
Expand All @@ -38,32 +38,32 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --no-default-features --features=full,feat-ibc,testnet
args: --verbose --no-default-features --features=full

test-all-features:
test-testnet:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
override: true
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo
./target
key: ${{ runner.os }}-test-all-features-${{ hashFiles('Cargo.lock') }}
key: ${{ runner.os }}-test-testnet-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-test-all-features-
${{ runner.os }}-test-testnet-
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features
args: --verbose --no-default-features --features=full,testnet

test-bitcoin:
runs-on: ubuntu-latest
Expand All @@ -73,24 +73,24 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
override: true
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo
./target
key: ${{ runner.os }}-test-all-features-${{ hashFiles('Cargo.lock') }}
key: ${{ runner.os }}-test-testnet-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-test-all-features-
${{ runner.os }}-test-testnet-
- name: Test
env:
RUST_LOG: info
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose --all-features bitcoin -- --ignored
args: --verbose --features=devnet bitcoin -- --ignored

check-rest:
runs-on: ubuntu-latest
Expand All @@ -100,7 +100,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
override: true
- name: Check Rest
uses: actions-rs/cargo@v1
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
override: true
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
Expand All @@ -132,7 +132,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
components: llvm-tools-preview
override: true
- name: Cache
Expand All @@ -155,7 +155,7 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: llvm-cov
args: --no-cfg-coverage-nightly --no-default-features --features=full,feat-ibc,testnet --workspace --lcov --output-path lcov.info
args: --no-cfg-coverage-nightly --workspace --lcov --output-path lcov.info
- name: Upload to codecov.io
uses: codecov/codecov-action@v1
with:
Expand All @@ -171,7 +171,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
components: rustfmt
override: true
- name: Check
Expand All @@ -188,7 +188,7 @@ jobs:
- name: Use Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2024-04-25
toolchain: nightly-2024-07-21
components: clippy
override: true
- name: Cache
Expand All @@ -204,4 +204,4 @@ jobs:
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --features=full,feat-ibc,testnet -- -D warnings
args: -- -D warnings
6 changes: 3 additions & 3 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ lazy_static = "1.4.0"
prost = "0.13.3"
cosmrs = "0.14.0"
ripemd = "0.1.3"
frost-secp256k1-tr = { git = "https://github.com/ZcashFoundation/frost", rev = "20c2c98a931c564655e2a03719e19ba916e11545", features = [
frost-secp256k1-tr = { git = "https://github.com/ZcashFoundation/frost", rev = "51fa7d09f3742563a35d065afcff6ad486430dac", features = [
"nightly",
], optional = true }
bitcoin = { version = "0.29.2", features = ["serde", "rand"] }
Expand Down Expand Up @@ -154,6 +154,9 @@ babylon = ["frost"]
[profile.release]
overflow-checks = true

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }

[[bin]]
name = "nomic"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

![CI](https://github.com/nomic-io/nomic/actions/workflows/ci.yml/badge.svg)

Nomic is a blockchain which offers a decentralized custody solution for Bitcoin. Built on Turbofish’s [Orga](https://github.com/turbofish-org/orga), a custom high-performance blockchain application framework. Nomic mints nBTC, a token backed 1:1 with BTC, using [IBC](https://www.ibcprotocol.dev/) for secure and efficient bridging.
Nomic is a blockchain that offers a decentralized custody solution for Bitcoin. Built on Turbofish’s [Orga](https://github.com/turbofish-org/orga), a custom high-performance blockchain application framework. Nomic mints nBTC, a token backed 1:1 with BTC, using [IBC](https://www.ibcprotocol.dev/) for secure and efficient bridging.


## Running a Node
Expand All @@ -36,7 +36,7 @@ Nomic is an open-source project spearheaded by contributors. Anyone is able to c

Nomic is currently undergoing security audits.

Vulnerabilities should not be reported through public channels, including GitHub Issues. You can report a vunerability via GitHub's Private Vunerability Reporting or via the Nomic DAO Foundation at `[email protected]`.
Vulnerabilities should not be reported through public channels, including GitHub Issues. You can report a vulnerability via GitHub's Private Vulnerability Reporting or via the Nomic DAO Foundation at `[email protected]`.

[Report a Vulnerability](https://github.com/nomic-io/nomic/security/advisories/new)

Expand Down
11 changes: 4 additions & 7 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ const IBC_FEE_USATS: u64 = 1_000_000;
/// The fixed amount of nBTC fee required to make any application call, in
/// micro-satoshis.
const CALL_FEE_USATS: u64 = 100_000_000;

/// The fixed amount of nBTC fee required to create a new Ethereum connection,
/// in micro-satoshis.
#[cfg(feature = "ethereum")]
const ETH_CREATE_CONNECTION_FEE_USATS: u64 = 10_000_000_000;

const OSMOSIS_CHANNEL_ID: &str = "channel-1";
Expand Down Expand Up @@ -2023,9 +2025,10 @@ impl Default for Dest {
}
}

#[derive(Encode, Decode, Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq)]
#[derive(Encode, Decode, Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
#[serde(tag = "type", rename_all = "camelCase")]
pub enum Identity {
#[default]
None,
NativeAccount {
address: Address,
Expand Down Expand Up @@ -2103,12 +2106,6 @@ impl Describe for Identity {
}
}

impl Default for Identity {
fn default() -> Self {
Identity::None
}
}

pub fn ibc_fee(amount: Amount) -> Result<Amount> {
let fee_rate: orga::coins::Decimal = "0.005".parse().unwrap();
(amount * fee_rate)?.amount()
Expand Down
12 changes: 6 additions & 6 deletions src/bin/nomic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ use alloy_signer_local::LocalSigner;
use bitcoin::consensus::{Decodable, Encodable};
#[cfg(feature = "ethereum")]
use bitcoin::secp256k1::Message;
use bitcoin::secp256k1::{self, SecretKey};
use bitcoin::secp256k1::{self};

use bitcoin::util::bip32::ExtendedPubKey;
use bitcoincore_rpc_async::RpcApi;
use bitcoincore_rpc_async::{Auth, Client as BtcClient};
use clap::Parser;
use nomic::app::Dest;
use nomic::app::IbcDest;
use nomic::app::InnerApp;
use nomic::app::Nom;
use nomic::app::{Dest, Identity};
#[cfg(feature = "babylon")]
use nomic::babylon;
use nomic::bitcoin::adapter::Adapter;
Expand Down Expand Up @@ -325,7 +325,7 @@ pub struct StartCmd {
/// home directory when initializing.
#[clap(long)]
pub validator_key: Option<String>,
/// Copies the P2P privaete key at the specified path to the node's home
/// Copies the P2P private key at the specified path to the node's home
/// directory when initializing.
#[clap(long)]
pub node_key: Option<String>,
Expand Down Expand Up @@ -2265,7 +2265,7 @@ impl SigningStatusCmd {
}

/// Attempts to recover a deposit which has not yet been processed by the
/// Nomic network by relaying a proof of its confirmation on the Bitcoin
/// Nomic network by relaying proof of its confirmation on the Bitcoin
/// network.
///
/// This command is useful when a deposit has been made to the network and
Expand Down Expand Up @@ -2306,7 +2306,7 @@ pub struct RecoverDepositCmd {
/// The Nomic bech32 wallet address associated with the deposit.
#[clap(long)]
nomic_addr: Address,
/// The Bitcoin address the deposit was made to.
/// The Bitcoin address to the deposit was made to.
#[clap(long)]
deposit_addr: bitcoin::Address,
/// The Bitcoin block hash the deposit transaction was confirmed in.
Expand All @@ -2320,7 +2320,7 @@ pub struct RecoverDepositCmd {
#[clap(long)]
vout: u32,

/// The path to a file containig the indexes and reserve scripts of
/// The path to a file containing the indexes and reserve scripts of
/// signatories to search. This can be generated with the
/// `get-reserve-scripts` binary.
#[clap(long)]
Expand Down
Loading

0 comments on commit 9e6d473

Please sign in to comment.