Skip to content

Commit 8c05dfe

Browse files
committed
chore: improve readme check licenses and cargo files
1 parent d6bd251 commit 8c05dfe

File tree

12 files changed

+154
-38
lines changed

12 files changed

+154
-38
lines changed

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
## [0.1.0] - 2023-10-14
11+
12+
### Added
13+
14+
- Initial implementation of the Murmur API.
15+
16+
[unreleased]: https://github.com/ideal-lab5/murmur/compare/v0.1.0...HEAD
17+
[0.1.0]: https://github.com/ideal-lab5/murmur/releases/tag/v0.1.0

Cargo.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ resolver = "2"
88

99
[workspace.package]
1010
edition = "2021"
11-
authors = ["Ideal Labs <driemworks@idealabs.network>"]
11+
authors = ["Ideal Labs <hello@idealabs.network>"]
1212
repository = "https://github.com/ideal-lab5/murmur"
1313
homepage = "https://idealabs.network"
1414
license = "Apache-2.0"
15+
description = "Murmur crates"
1516

1617
[workspace.lints.rust]
1718
suspicious_double_ref_op = { level = "allow", priority = 2 }

README.md

+24-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
# Murmur
22

3-
Murmur is an air-gapped keyless crypto wallet protocol that runs on the [Ideal Network](). This repository contains the core implementation of the murmur protocol and a CLI to allow fully non-custodial usage of murmur wallets.
3+
Murmur is an air-gapped keyless crypto wallet protocol that runs on the [Ideal Network](https://idealabs.network). This repository contains the core implementation of the murmur protocol and a CLI to allow fully non-custodial usage of murmur wallets.
44

5-
The murmur protocol enables **keyless account abstraction** capabilities for any chain bridged to the Ideal Network (alternatively, we can do this with drand). wallet is a special pure proxy that can only be executed when presented with proof that the origin knows a correct time-based OTP code.
5+
The murmur protocol enables **keyless account abstraction** capabilities for any chain bridged to the Ideal Network (alternatively, we can do this with drand). wallet is a special pure proxy that can only be executed when presented with proof that the origin knows a correct time-based OTP code.
66

7-
It is based on the [Hours of Horus](https://eprint.iacr.org/2021/715) protocol, which leverages timelock encryption and a secure OTP code generator to construct a keyless wallet scheme. Our scheme improves on this construction in several ways.
7+
It is based on the [Hours of Horus](https://eprint.iacr.org/2021/715) protocol, which leverages timelock encryption and a secure OTP code generator to construct a keyless wallet scheme. Our scheme improves on this construction in several ways.
88

9-
- We leverage the Ideal Network to instantiate practical timelock encryption, allowing the HoH scheme to be realized in the first place.
10-
- We use a Merkle mountain range in place of a Merkle tree, allowing for arbitrary numbers of OTP codes to be generated
11-
- JIT execution: Rather than relying on a commit-reveal scheme in order to use the wallet, our scheme uses a 'just-in-time' approach leveraging the Ideal Network's on-chain randomness, which provides the decryption key (i.e. BLS signature) necessary to verify proofs.
9+
- **Practical Timelock Encryption**: We leverage the Ideal Network to instantiate practical timelock encryption, allowing the HoH scheme to be realized in the first place.
10+
- **Merkle Mountain Range**: We use a Merkle mountain range in place of a Merkle tree, allowing for arbitrary numbers of OTP codes to be generated
11+
- **Just-in-Time Execution**: Rather than relying on a commit-reveal scheme in order to use the wallet, our scheme uses a 'just-in-time' approach leveraging the Ideal Network's on-chain randomness, which provides the decryption key (i.e. BLS signature) necessary to verify proofs.
1212

1313
## Build
1414

15-
```
15+
To build the project, use the following command:
16+
17+
```shell
1618
cargo build
1719
```
1820

1921
## Testing
2022

21-
```
23+
To run the tests, use the following command:
24+
25+
```shell
2226
cargo test
2327
```
28+
29+
## Contributing
30+
31+
Contributions are welcome! Please open an issue or submit a pull request.
32+
33+
## License
34+
35+
This project is licensed under the Apache-2.0. See the [LICENSE](LICENSE) file for details.
36+
37+
## Contact
38+
39+
For any inquiries, please contact [Ideal Labs](https://idealabs.network).

core/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
name = "murmur-core"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "Murmur core"
6+
documentation = "https://docs.rs/murmur-core"
7+
readme = "README.md"
8+
keywords = ["crypto", "wallet", "keyless"]
9+
categories = ["development-tools", "cryptography"]
510
authors.workspace = true
611
license.workspace = true
12+
repository.workspace = true
13+
homepage.workspace = true
714

815
[lints]
916
workspace = true

core/README.md

+26-7
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,45 @@ This library contains the core implementation of the murmur protocol. This imple
44

55
## Build
66

7-
``` shell
7+
To build the library, use the following command:
8+
9+
```shell
810
cargo build
911
```
1012

11-
The OTP code generator is gated under the "client" feature, so build with:
12-
``` shell
13+
The OTP code generator is gated under the "client" feature. To build with this feature enabled, use:
14+
15+
```shell
1316
cargo build --features "client"
1417
```
1518

1619
## Test
1720

18-
``` shell
21+
To run the tests, use the following command:
22+
23+
```shell
1924
cargo test
2025
```
2126

2227
The OTP code generator is gated under the "client" feature, so run tests with:
23-
``` shell
28+
29+
```shell
2430
cargo test --features "client"
2531
```
2632

2733
## Future Work/Notes
28-
- There is an 'otpauth' feature that can be enabled on the totp lib. It allows for the inclusion of an issuer and account_name. We can investigate usage of this in the future. https://github.com/constantoine/totp-rs/blob/da78569b0c233adbce126dbe0c35452340fd3929/src/lib.rs#L160
29-
- Wallet Update logic: Each murmur wallet is ephemeral, since any MMR must be limited in size. We can use a zkp to prove knowledge of the seed in order to allow the wallet owner to update the wallet by providing a new MMR root.
34+
35+
- **OTPAuth Feature**: There is an 'otpauth' feature that can be enabled on the totp lib. It allows for the inclusion of an issuer and account_name. We can investigate usage of this in the future. [TOTP Library Reference](https://github.com/constantoine/totp-rs/blob/da78569b0c233adbce126dbe0c35452340fd3929/src/lib.rs#L160)
36+
- **Wallet Update logic**: Each murmur wallet is ephemeral, since any MMR must be limited in size. We can use a zkp to prove knowledge of the seed in order to allow the wallet owner to update the wallet by providing a new MMR root.
37+
38+
## Contributing
39+
40+
Contributions are welcome! Please open an issue or submit a pull request.
41+
42+
## License
43+
44+
This project is licensed under the Apache-2.0. See the [LICENSE](../LICENSE) file for details.
45+
46+
## Contact
47+
48+
For any inquiries, please contact [Ideal Labs](https://idealabs.network).

core/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
#![cfg_attr(not(feature = "std"), no_std)]
1718
//! the murmur core library
1819

lib/Cargo.toml

+7
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,15 @@
22
name = "murmur-lib"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "Murmur library"
6+
documentation = "https://docs.rs/murmur-lib"
7+
readme = "README.md"
8+
keywords = ["crypto", "wallet", "keyless"]
9+
categories = ["development-tools", "command-line-interface"]
510
authors.workspace = true
611
license.workspace = true
12+
repository.workspace = true
13+
homepage.workspace = true
714

815
[lib]
916
crate-type = [

lib/README.md

+52-15
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,88 @@
1-
# murmur-lib
1+
# Murmur Lib
22

33
An implementation of the Murmur protocol and corresponding CLI. This implements the Murmur protocol for usage with the Ideal network's randomness beacon. Specifically, it uses [TinyBLS377](https://docs.rs/w3f-bls/latest/w3f_bls/engine/type.TinyBLS377.html) and constructs basic identities which are deterministic based on block number.
44

55
## Setup
66

77
To setup a dev environment:
8-
- run a local [IDN solochain node](https://github.com/ideal-lab5/etf)
9-
- [generate chain metadata](#generate-metadata)
8+
9+
1. Run a local [IDN solochain node](https://github.com/ideal-lab5/etf)
10+
2. [Generate chain metadata](#generate-metadata)
1011

1112
### Build
1213

13-
`cargo build`
14+
To build the project, use the following command:
15+
16+
```shell
17+
cargo build
18+
```
1419

1520
### CLI Usage
1621

1722
##### Create a wallet
1823

19-
``` shell
20-
# generate a wallet valid for the next 1000 blocks
24+
To generate a wallet valid for the next 1000 blocks, use:
25+
26+
```shell
2127
./target/debug/murmur new --name test --seed my_secret_key --validity 100
2228
```
2329

2430
##### Execute a balance transfer
2531

26-
``` shell
27-
# send a balance transfer
32+
To send a balance transfer, use:
33+
34+
```shell
2835
./target/debug/murmur execute --name test --seed my_secret_key --to CuqfkE3QieYPAWPpwiygDufmyrKecDcVCF7PN1psaLEn8yr --amount 100_000_000
2936
```
3037

3138
## Test
3239

33-
`cargo test`
40+
To run the tests, use the following command:
3441

42+
```shell
43+
cargo test
44+
```
3545

3646
## Generate Metadata
3747

38-
``` shell
39-
# clone and build the node
48+
To run the tests, use the following command:
49+
50+
1. Clone and build the node:
51+
52+
```shell
4053
git clone git@github.com:ideal-lab5/etf.git
4154
cd etf
4255
cargo +stable build
43-
# run a local node
56+
```
57+
58+
2. Run a local node:
59+
60+
```shell
4461
./target/debug/node --tmp --dev --alice --unsafe-rpc-external --rpc-cors all
45-
# use subxt to prepare metadata
62+
```
63+
64+
3. Prepare metadata using `subxt`:
65+
66+
```shel
4667
cd /path/to/otp-wallet/
4768
mkdir artifacts
4869
cargo install subxt-cli
49-
# Download and save all of the metadata:
70+
```
71+
72+
4. Download and save all of the metadata:
73+
74+
```shell
5075
subxt metadata > ./artifacts/metadata.scale
51-
```
76+
```
77+
78+
## Contributing
79+
80+
Contributions are welcome! Please open an issue or submit a pull request.
81+
82+
## License
83+
84+
This project is licensed under the Apache-2.0. See the [LICENSE](../LICENSE) file for details.
85+
86+
## Contact
87+
88+
For any inquiries, please contact [Ideal Labs](https://idealabs.network).

lib/src/bin/murmur/main.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
use clap::{Parser, Subcommand};
1718
use murmur_lib::{
1819
create, etf, idn_connect, prepare_execute, BlockNumber, BoundedVec, MurmurStore, RuntimeCall,
@@ -102,12 +103,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
102103
}
103104

104105
// 2. create mmr
105-
let create_data = create(
106-
args.seed.as_bytes().to_vec(),
107-
schedule,
108-
round_pubkey_bytes,
109-
)
110-
.map_err(|_| CLIError::MurmurCreationFailed)?;
106+
let create_data = create(args.seed.as_bytes().to_vec(), schedule, round_pubkey_bytes)
107+
.map_err(|_| CLIError::MurmurCreationFailed)?;
111108

112109
// 3. add to storage
113110
write_mmr_store(create_data.mmr_store.clone(), MMR_STORE_FILEPATH);

test-utils/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "murmur-test-utils"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "Murmur test utils"
56
authors.workspace = true
67
license.workspace = true
78

test-utils/README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
11
# Murmur test utilities
22

3-
Various test utilities for murmur.
3+
Various test utilities for murmur.
4+
5+
## Contributing
6+
7+
Contributions are welcome! Please open an issue or submit a pull request.
8+
9+
## License
10+
11+
This project is licensed under the Apache-2.0. See the [LICENSE](../LICENSE) file for details.
12+
13+
## Contact
14+
15+
For any inquiries, please contact [Ideal Labs](https://idealabs.network).

test-utils/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
1617
#![no_std]
1718

1819
//! various utilities helpful for testing

0 commit comments

Comments
 (0)