Skip to content

Commit 5e034dd

Browse files
Initial commit
0 parents  commit 5e034dd

File tree

1,063 files changed

+138786
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,063 files changed

+138786
-0
lines changed

.assets/libra.png

14.2 KB
Loading

.circleci/config.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: 2
2+
jobs:
3+
build:
4+
docker:
5+
- image: circleci/rust:stretch
6+
resource_class: xlarge
7+
steps:
8+
- checkout
9+
- run:
10+
name: Version Information
11+
command: rustc --version; cargo --version; rustup --version
12+
- run:
13+
name: Install Dependencies
14+
command: |
15+
sudo sh -c 'echo "deb http://deb.debian.org/debian stretch-backports main" > /etc/apt/sources.list.d/backports.list'
16+
sudo apt-get update
17+
sudo apt-get install -y protobuf-compiler/stretch-backports cmake golang curl
18+
sudo apt-get clean
19+
sudo rm -r /var/lib/apt/lists/*
20+
rustup component add clippy rustfmt
21+
- run:
22+
name: Setup Env
23+
command: |
24+
echo 'export TAG=0.1.${CIRCLE_BUILD_NUM}' >> $BASH_ENV
25+
echo 'export IMAGE_NAME=myapp' >> $BASH_ENV
26+
- run:
27+
name: Linting
28+
command: |
29+
./scripts/clippy.sh
30+
cargo fmt -- --check
31+
- run:
32+
name: Build All Targets
33+
command: RUST_BACKTRACE=1 cargo build -j 16 --all --all-targets
34+
- run:
35+
name: Run All Unit Tests
36+
command: cargo test --all --exclude testsuite
37+
- run:
38+
name: Run All End to End Tests
39+
command: RUST_TEST_THREADS=2 cargo test --package testsuite

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.git/
2+
**/.terraform/
3+
target/

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Ensure that text files that any contributor introduces to the repository
2+
# have their line endings normalized to LF
3+
* text=auto
4+
5+
# All known text filetypes
6+
*.md text
7+
*.proto text
8+
*.rs text
9+
*.sh text eol=lf
10+
*.toml text
11+
*.txt text
12+
*.yml text

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: "\U0001F41B Bug report"
3+
about: Create a bug report to help improve Libra Core
4+
title: "[Bug]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
# 🐛 Bug
11+
12+
<!-- A clear and concise description of what the bug is.
13+
14+
To report a security issue, please email [email protected]. -->
15+
16+
## To reproduce
17+
18+
** Code snippet to reproduce **
19+
```rust
20+
# Your code goes here
21+
# Please make sure it does not require any external dependencies
22+
```
23+
24+
** Stack trace/error message **
25+
```
26+
// Paste the output here
27+
```
28+
29+
## Expected Behavior
30+
31+
<!-- A clear and concise description of what you expected to happen. -->
32+
33+
## System information
34+
35+
**Please complete the following information:**
36+
- <!-- Libra Version -->
37+
- <!-- Rust Version -->
38+
- <!-- Computer OS -->
39+
40+
41+
## Additional context
42+
43+
Add any other context about the problem here.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: "\U0001F680 Feature request"
3+
about: Suggest a new feature in Libra Core
4+
title: "[Feature Request]"
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
# 🚀 Feature Request
11+
12+
<!-- A clear and concise description of the feature you are requesting -->
13+
14+
## Motivation
15+
16+
**Is your feature request related to a problem? Please describe.**
17+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
18+
<!-- Please link to any relevant issues or other PRs! -->
19+
20+
## Pitch
21+
22+
**Describe the solution you'd like**
23+
<!-- A clear and concise description of what you want to happen. -->
24+
25+
**Describe alternatives you've considered**
26+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
27+
28+
**Are you willing to open a pull request?** (See [CONTRIBUTING](../CONTRIBUTING.md))
29+
30+
## Additional context
31+
32+
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/questions.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: ❓ Questions/Help
3+
about: If you have questions, please check Discourse
4+
---
5+
6+
## ❓ Questions and Help
7+
8+
### Please note that this issue tracker is not a help form and this issue will be closed.
9+
10+
Please contact the development team on [Discourse](https://community.libra.org)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!--
2+
Thank you for sending a PR. We appreciate you spending time to help improve the Libra project.
3+
4+
The project is undergoing daily changes. Pull Requests will be reviewed and responded to as time permits.
5+
-->
6+
7+
## Motivation
8+
9+
(Write your motivation for proposed changes here.)
10+
11+
### Have you read the [Contributing Guidelines on pull requests](https://github.com/libra/libra/master/CONTRIBUTING.md#pull-requests)?
12+
13+
(Write your answer here.)
14+
15+
## Test Plan
16+
17+
(Share your test plan here. If you changed code, please provide us with clear instrutions for verifying that your changes work.)
18+
19+
## Related PRs
20+
21+
(If this PR adds or changes functionality, please take some time to update the docs at https://github.com/libra/website, and link to your PR here.)

.gitignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Rust specific ignores
2+
/target
3+
**/*.rs.bk
4+
# Cargo.lock is needed for deterministic testing and repeatable builds.
5+
#
6+
# Having it in the repo slows down development cycle.
7+
#
8+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
9+
Cargo.lock
10+
11+
# Ignore generated files in proto folders
12+
**/proto/*.rs
13+
!**/proto/mod.rs
14+
!**/proto/converter.rs
15+
**/proto/*/*.rs
16+
!**/proto/*/mod.rs
17+
!**/proto/*/converter.rs
18+
19+
# IDE
20+
.idea
21+
.idea/*
22+
*.iml
23+
.vscode
24+
25+
# Ignore wallet mnemonic files used for deterministic key derivation
26+
*.mnemonic
27+
28+
# Generated Parser File by LALRPOP
29+
language/compiler/src/parser/syntax.rs
30+
language/move_ir/
31+
32+
# GDB related
33+
**/.gdb_history

CODE_OF_CONDUCT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
The Libra Core project has adopted a Code of Conduct that we expect project participants to adhere to. Please [read the full text](https://developers.libra.org/docs/policies/code-of-conduct) so that you can and understand what actions will and will not be tolerated.

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing to Libra
2+
3+
Our goal is to make contributing to the Libra project easy and transparent.
4+
5+
> **Note**: As the Libra Core project is currently an early-stage prototype, it is undergoing rapid development. While we welcome contributions, before making substantial contributions be sure to discuss them in the Discourse forum to ensure that they fit into the project roadmap.
6+
7+
## On Contributing
8+
9+
10+
### Libra Core
11+
12+
To contribute to the Libra Core implementation, first start with the proper development copy.
13+
14+
To get the development installation with all the necessary dependencies for linting, testing, and building the documentation, run the following:
15+
```bash
16+
git clone https://github.com/libra/libra.git
17+
cd libra
18+
./scripts/dev_setup.sh
19+
cargo build
20+
cargo test
21+
```
22+
23+
## Our Development Process
24+
25+
#### Code Style, Hints, and Testing
26+
27+
Refer to our [Coding Guidelines](https://developers.libra.org/docs/coding-guidelines) for detailed guidance about how to contribute to the project.
28+
29+
#### Documentation
30+
31+
Libra's website is also open source (the
32+
code can be found in this [repository](https://github.com/libra/website/)).
33+
It is built using [Docusaurus](https://docusaurus.io/):
34+
35+
If you know Markdown, you can already contribute! This lives in the the [website repo](https://github.com/libra/website).
36+
37+
## Pull Requests
38+
During the initial phase of heavy development, we plan to only audit and review pull requests. As the codebase stabilizes, we will be better able to accept pull requests from the community.
39+
40+
1. Fork the repo and create your branch from `master`.
41+
2. If you have added code that should be tested, add unit tests.
42+
3. If you have changed APIs, update the documentation. Make sure the
43+
documentation builds.
44+
4. Ensure the test suite passes.
45+
5. Make sure your code passes both linters.
46+
6. If you haven't already, complete the Contributor License Agreement (CLA).
47+
7. Submit your pull request.
48+
49+
## Contributor License Agreement
50+
51+
For pull request to be accepted by any Libra projects, a CLA must be signed. You will only need to do this once to work on any of Libra's open source projects. Individuals contributing on their own behalf can sign the [Individual CLA](https://github.com/libra/libra/blob/master/contributing/individual-cla.pdf). If you are contributing on behalf of your employer, please ask them to sign the [Corporate CLA](https://github.com/libra/libra/blob/master/contributing/corporate-cla.pdf).
52+
53+
## Issues
54+
55+
Libra uses [GitHub issues](https://github.com/libra/libra/issues) to track bugs. Please include necessary information and instructions to reproduce your issue.

Cargo.toml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[workspace]
2+
3+
members = [
4+
"admission_control/admission_control_service",
5+
"admission_control/admission_control_proto",
6+
"client",
7+
"client/libra_wallet",
8+
"common/canonical_serialization",
9+
"common/crash_handler",
10+
"common/debug_interface",
11+
"common/executable_helpers",
12+
"common/failure_ext",
13+
"common/grpcio-client",
14+
"common/jemalloc",
15+
"common/logger",
16+
"common/metrics",
17+
"common/proptest_helpers",
18+
"common/proto_conv",
19+
"config",
20+
"config/config_builder",
21+
"config/generate_keypair",
22+
"consensus",
23+
"crypto/legacy_crypto",
24+
"crypto/nextgen_crypto",
25+
"crypto/secret_service",
26+
"execution/execution_client",
27+
"execution/execution_proto",
28+
"execution/execution_service",
29+
"execution/executor",
30+
"language/bytecode_verifier",
31+
"language/bytecode_verifier/invalid_mutations",
32+
"language/functional_tests",
33+
"language/compiler",
34+
"language/stdlib/natives",
35+
"language/vm",
36+
"language/vm/vm_runtime",
37+
"language/vm/cost_synthesis",
38+
"language/vm/vm_runtime/vm_cache_map",
39+
"language/vm/vm_genesis",
40+
"language/vm/vm_runtime/vm_runtime_tests",
41+
"libra_node",
42+
"libra_swarm",
43+
"network",
44+
"network/memsocket",
45+
"network/netcore",
46+
"network/noise",
47+
"mempool",
48+
"storage/accumulator",
49+
"storage/libradb",
50+
"storage/schemadb",
51+
"storage/scratchpad",
52+
"storage/sparse_merkle",
53+
"storage/storage_client",
54+
"storage/state_view",
55+
"storage/storage_proto",
56+
"storage/storage_service",
57+
"testsuite",
58+
"testsuite/libra_fuzzer",
59+
"types",
60+
"vm_validator",
61+
]
62+
63+
[profile.release]
64+
debug = true
65+
66+
[profile.bench]
67+
debug = true

0 commit comments

Comments
 (0)