Skip to content

Commit fc49988

Browse files
committed
initial commit
0 parents  commit fc49988

Some content is hidden

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

55 files changed

+6135
-0
lines changed

.gitignore

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Dependencies
2+
/node_modules
3+
/.pnp
4+
.pnp.js
5+
6+
# Testing
7+
/coverage
8+
9+
# Next.js
10+
/.next/
11+
/out/
12+
13+
# Production
14+
/build
15+
16+
# Misc
17+
.DS_Store
18+
*.pem
19+
20+
# Debug
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# Local env files
26+
.env*.local
27+
28+
# Vercel
29+
.vercel
30+
31+
# TypeScript
32+
*.tsbuildinfo
33+
next-env.d.ts
34+
35+
# IDEs and editors
36+
/.idea
37+
.project
38+
.classpath
39+
.c9/
40+
*.launch
41+
.settings/
42+
*.sublime-workspace
43+
44+
# VS Code
45+
.vscode/*
46+
!.vscode/settings.json
47+
!.vscode/tasks.json
48+
!.vscode/launch.json
49+
!.vscode/extensions.json
50+
51+
# Logs
52+
logs
53+
*.log
54+
55+
# OS generated files
56+
.DS_Store
57+
.DS_Store?
58+
._*
59+
.Spotlight-V100
60+
.Trashes
61+
ehthumbs.db
62+
Thumbs.db
63+
64+
# Nextra specific
65+
.nextra

next.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const withNextra = require('nextra')({
2+
theme: 'nextra-theme-docs',
3+
themeConfig: './theme.config.jsx'
4+
})
5+
6+
module.exports = withNextra()
7+
8+
// If you have other Next.js configurations, you can pass them as the parameter:
9+
// module.exports = withNextra({ /* other next.js config */ })

package.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "penumbra-guide",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"dev": "next dev",
8+
"build": "next build",
9+
"start": "next start"
10+
},
11+
"keywords": [],
12+
"author": "",
13+
"license": "MIT",
14+
"dependencies": {
15+
"next": "^14.2.5",
16+
"nextra": "^2.13.4",
17+
"nextra-theme-docs": "^2.13.4",
18+
"react": "^18.3.1",
19+
"react-dom": "^18.3.1"
20+
}
21+
}

pages/SUMMARY.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[Penumbra Guide](./README.md)
2+
- [Using Penumbra on the web](./web.md)
3+
- [Using Penumbra from the command line](./pcli.md)
4+
- [Installing `pcli`](./pcli/install.md)
5+
- [Generating a Wallet](./pcli/wallet.md)
6+
- [Software Custody Backend](./pcli/wallet/softkms.md)
7+
- [Threshold Custody Backend](./pcli/wallet/threshold.md)
8+
- [Updating to the latest testnet](./pcli/update.md)
9+
- [Viewing Balances](./pcli/balance.md)
10+
- [Sending Transactions](./pcli/transaction.md)
11+
- [Using Governance](./pcli/governance.md)
12+
- [Running a node](./node.md)
13+
- [Full node: `pd`](./node/pd.md)
14+
- [Requirements](./node/pd/requirements.md)
15+
- [Installing `pd`](./node/pd/install.md)
16+
- [Joining a network](./node/pd/join-network.md)
17+
- [Becoming a validator](./node/pd/validator.md)
18+
- [Performing a chain upgrade](./node/pd/chain-upgrade.md)
19+
- [Indexing ABCI events](./node/pd/indexing-events.md)
20+
- [Debugging](./node/pd/debugging.md)
21+
- [Ultralight node: `pclientd`](./node/pclientd.md)
22+
- [Configuring `pclientd`](./node/pclientd/configure.md)
23+
- [Making RPC requests](./node/pclientd/rpc.md)
24+
- [Building Transactions](./node/pclientd/build_transaction.md)
25+
- [Development](./dev.md)
26+
- [Compiling from source](./dev/build.md)
27+
- [Devnet Quickstart](./dev/devnet-quickstart.md)
28+
- [Working with SQLite](./dev/sql.md)
29+
- [Building documentation](./dev/docs.md)
30+
- [Building protobuf](./dev/protobuf.md)
31+
- [Metrics](./dev/metrics.md)
32+
- [Zero Knowledge Proofs](./dev/parameter_setup.md)
33+
- [RPC access](./dev/rpc.md)
34+
- [Testing IBC](./dev/ibc.md)
35+
- [Resources](./resources.md)
36+
- [Tutorials](./tutorials.md)
37+
- [Running a fullnode](./tutorials/running-node.md)
38+
- [Running a frontend](./tutorials/running-frontend.md)

pages/_meta.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"index": "Penumbra Guide",
3+
"web": "Using Penumbra on the web",
4+
"pcli": "Using Penumbra from the command line",
5+
"node": "Running a node",
6+
"dev": "Development",
7+
"resources": "Resources",
8+
"tutorials": "Tutorials"
9+
}

pages/cometbft_version.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v0.37.9

pages/dev.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Development
2+
3+
This section is for developers working on Penumbra source code.

pages/dev/_meta.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"build": "Compiling from source",
3+
"devnet-quickstart": "Devnet Quickstart",
4+
"sql": "Working with SQLite",
5+
"docs": "Building documentation",
6+
"protobuf": "Building protobuf",
7+
"metrics": "Metrics",
8+
"parameter_setup": "Zero Knowledge Proofs",
9+
"rpc": "RPC access",
10+
"ibc": "Testing IBC"
11+
}

pages/dev/build.md

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Compiling from source
2+
3+
Penumbra is written in Rust. To build it, you will need a recent
4+
stable version of Rust, as well as a few OS-level dependencies.
5+
We don't support building on Windows. If you need to use Windows,
6+
consider using [WSL] instead.
7+
8+
### Installing the Rust toolchain
9+
10+
This requires that you install a recent (>= 1.75) stable version
11+
of the Rust compiler, installation instructions for which you can find
12+
[here](https://www.rust-lang.org/learn/get-started). Don't forget to reload your shell so that
13+
`cargo` is available in your `$PATH`!
14+
15+
You can verify the rust compiler version by running `rustc --version` which should indicate version 1.75 or later.
16+
The project uses a `rust-toolchain.toml` file, which will ensure that your version of rust stays current enough
17+
to build the project from source.
18+
19+
### Installing build prerequisites
20+
21+
#### Linux
22+
23+
You may need to install some additional packages in order to build `pcli`,
24+
depending on your distribution. For a bare-bones Ubuntu installation, you can
25+
run:
26+
27+
```bash
28+
sudo apt-get install build-essential pkg-config libssl-dev clang git-lfs
29+
```
30+
31+
For a minimal Fedora/CentOS/RHEL image, you can run:
32+
33+
```bash
34+
sudo dnf install openssl-devel clang git cargo rustfmt git-lfs
35+
```
36+
37+
#### macOS
38+
39+
You may need to install the command-line developer tools if you have never done
40+
so:
41+
```bash
42+
xcode-select --install
43+
```
44+
45+
You'll also need to install Git LFS, which you can do [via Homebrew](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage?platform=mac):
46+
47+
```bash
48+
brew install git-lfs
49+
```
50+
51+
### Making sure that `git-lfs` is installed
52+
53+
Running `git lfs install` will make sure that git-lfs is correctly installed on your machine.
54+
55+
### Cloning the repository
56+
57+
Once you have installed the above packages, you can clone the repository:
58+
59+
```bash
60+
git clone https://github.com/penumbra-zone/penumbra
61+
```
62+
63+
To build the versions of `pcli`, `pd`, etc. compatible with the current testnet,
64+
navigate to the `penumbra/` folder, fetch the latest from the repository, and check out the
65+
latest tag for the current
66+
[testnet](https://github.com/penumbra-zone/penumbra/releases):
67+
68+
```bash
69+
cd penumbra && git fetch && git checkout {{ #include ../penumbra_version.md }}
70+
```
71+
72+
If you want to build the most recent version compatible with the "preview" environment,
73+
then run `git checkout main` instead.
74+
75+
### Building the binaries
76+
77+
Then, build all the project binaries using `cargo`:
78+
79+
```bash
80+
cargo build --release
81+
```
82+
83+
### Linking Against RocksDB (Optional)
84+
85+
Development builds can avoid the cost of recompiling RocksDB for storage libraries in the Cargo
86+
workspace. This manifests as a `librocksdb-sys(build)` message when building or testing crates
87+
in the monorepo.
88+
89+
#### Building `librocksdb.a` from source
90+
91+
First, clone the rocksdb repository:
92+
93+
```sh
94+
# Clone the repository, and enter that directory.
95+
git clone [email protected]:facebook/rocksdb.git && cd rocksdb
96+
97+
# Checkout the version of rocksdb used in `librocksdb-sys`.
98+
git checkout 6a43615
99+
100+
# Add an environment variable pointing to this repository:
101+
ROCKSDB_LIB_DIR=`pwd`
102+
103+
# Compile the static `librocksdb.a` library to link against:
104+
make static_lib
105+
```
106+
107+
#### Building `libsnappy.a` from source
108+
109+
next, clone the snappy repository and follow the
110+
[instructions][snappy-build] to build it:
111+
112+
```
113+
# Clone the repository, and enter that directory.
114+
git clone [email protected]:google/snappy.git && cd snappy
115+
116+
# Checkout the version of snappy used in `librocksdb-sys`.
117+
git checkout 2b63814
118+
119+
# Initialize the submodules.
120+
git submodule update --init
121+
122+
# Build snappy using cmake.
123+
mkdir build
124+
cd build && cmake .. && make
125+
126+
# Add an environment variable pointing to the build/ directory.
127+
SNAPPY_LIB_DIR=`pwd`
128+
```
129+
130+
### Building Penumbra
131+
132+
Once you've built rocksdb and set the environment variable, the `librocksdb-sys` crate will search
133+
in that directory for the compiled `librocksdb.a` static library when it is rebuilt.
134+
135+
[snappy-build]: https://github.com/google/snappy?tab=readme-ov-file#building
136+
[protoc-install]: https://grpc.io/docs/protoc-installation/
137+
[WSL]: https://learn.microsoft.com/en-us/windows/wsl/install

0 commit comments

Comments
 (0)