Skip to content

Commit

Permalink
docs: local build steps
Browse files Browse the repository at this point in the history
Capturing recent dev env setup, as explained by @TalDerei.
See related discussion in historical PR [0]. Used these steps to test
locally against the testnet, which is running an alpha version of LQT
support [1]. I believe this docs update is sufficient to close [2].

[0] penumbra-zone/web#1884 (comment)
[1] penumbra-zone/penumbra#5010
[2] #149
  • Loading branch information
conorsch committed Feb 13, 2025
1 parent 5f85aaa commit 6d57391
Show file tree
Hide file tree
Showing 3 changed files with 345 additions and 236 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Penumbra Web
# Prax Wallet

The [Prax Wallet](https://praxwallet.com/) monorepo for all things Prax.

Expand Down Expand Up @@ -62,6 +62,19 @@ content scripts. For worker script changes, you may need to manually reload the
extension. For content script changes, you must also manually reload pages
hosting the injected scripts.

#### Building against feature branches

When testing Prax locally, you may want to depend on as-yet unreleased
software changes, e.g. in the [web repo]. To do so:

1. In the [web repo], run `pnpm install && pnpm build && pnpm dev:pack`
2. In the [web repo], run `pnpm dev` (in a separate terminal)
3. In the [prax repo], run `pnpm -w add:tgz ~/PATH_TO_WEB_REPO/web/packages/*/penumbra-zone-*.tgz && pnpm -w syncpack fix-mismatches && pnpm dev`

Provided you configured `CHROMIUM_PROFILE`, you should see a browser launch,
running the local builds. You must also ensure that the desired feature branches
are checked out in the local git repos.

#### Manually loading your unbundled build of Prax into Chrome

If you don't want to use the profile tool, you must manually load the extension.
Expand All @@ -75,23 +88,11 @@ If you don't want to use the profile tool, you must manually load the extension.
- You may set a blank password.
- You can pin the Prax extension button to your toolbar for quick access.

#### Using local tarball packages

If you're working on packages in another repository that you'd like to include
in your development cycle, tooling exists here to support use of local `*.tgz`
packages with `pnpm dev` for a fast watch-edit-rebuild cycle

```sh
pnpm add:tgz ../path/to/somewhere/specific.tgz ../path/to/some/repo/packages/*/some-filename-*.tgz`
```

Your other workspace is responsible for rebuilding and repacking the tarballs.

This script also handles peer dependency conflict issues that can arise from use
of local tarball packages.

## Security

If you believe you've found a security-related issue with Penumbra,
please disclose responsibly by contacting the Penumbra Labs team at
security@penumbralabs.xyz.

[web repo]: https://github.com/penumbra-zone/web
[prax repo]: https://github.com/prax-wallet/prax
77 changes: 77 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,82 @@
"typescript": "^5.5.4",
"typescript-eslint": "^8.16.0",
"vitest": "1.x"
},
"pnpm": {
"overrides": {
"@penumbra-zone/bech32m": "file:///home/conor/src/pl/pl-web/packages/bech32m/penumbra-zone-bech32m-13.0.0.tgz",
"@penumbra-zone/client": "file:///home/conor/src/pl/pl-web/packages/client/penumbra-zone-client-24.0.0.tgz",
"@penumbra-zone/crypto-web": "file:///home/conor/src/pl/pl-web/packages/crypto/penumbra-zone-crypto-web-36.0.0.tgz",
"@penumbra-zone/getters": "file:///home/conor/src/pl/pl-web/packages/getters/penumbra-zone-getters-23.0.0.tgz",
"@penumbra-zone/keys": "file:///home/conor/src/pl/pl-web/packages/keys/penumbra-zone-keys-4.2.1.tgz",
"@penumbra-zone/perspective": "file:///home/conor/src/pl/pl-web/packages/perspective/penumbra-zone-perspective-47.0.0.tgz",
"@penumbra-zone/protobuf": "file:///home/conor/src/pl/pl-web/packages/protobuf/penumbra-zone-protobuf-7.2.0.tgz",
"@penumbra-zone/services": "file:///home/conor/src/pl/pl-web/packages/services/penumbra-zone-services-53.0.1.tgz",
"@penumbra-zone/storage": "file:///home/conor/src/pl/pl-web/packages/storage/penumbra-zone-storage-47.0.1.tgz",
"@penumbra-zone/transport-chrome": "file:///home/conor/src/pl/pl-web/packages/transport-chrome/penumbra-zone-transport-chrome-8.0.1.tgz",
"@penumbra-zone/transport-dom": "file:///home/conor/src/pl/pl-web/packages/transport-dom/penumbra-zone-transport-dom-7.5.0.tgz",
"@penumbra-zone/types": "file:///home/conor/src/pl/pl-web/packages/types/penumbra-zone-types-29.1.0.tgz",
"@penumbra-zone/ui-deprecated": "file:///home/conor/src/pl/pl-web/packages/ui-deprecated/penumbra-zone-ui-deprecated-15.0.1.tgz",
"@penumbra-zone/wasm": "file:///home/conor/src/pl/pl-web/packages/wasm/penumbra-zone-wasm-40.0.0.tgz"
},
"peerDependencyRules": {
"allowAny": [
"@penumbra-zone/bech32m",
"@penumbra-zone/client",
"@penumbra-zone/crypto-web",
"@penumbra-zone/getters",
"@penumbra-zone/keys",
"@penumbra-zone/perspective",
"@penumbra-zone/protobuf",
"@penumbra-zone/services",
"@penumbra-zone/storage",
"@penumbra-zone/transport-chrome",
"@penumbra-zone/transport-dom",
"@penumbra-zone/types",
"@penumbra-zone/ui-deprecated",
"@penumbra-zone/wasm",
"@penumbra-zone/bech32m",
"@penumbra-zone/client",
"@penumbra-zone/crypto-web",
"@penumbra-zone/getters",
"@penumbra-zone/keys",
"@penumbra-zone/perspective",
"@penumbra-zone/protobuf",
"@penumbra-zone/services",
"@penumbra-zone/storage",
"@penumbra-zone/transport-chrome",
"@penumbra-zone/transport-dom",
"@penumbra-zone/types",
"@penumbra-zone/ui-deprecated",
"@penumbra-zone/wasm",
"@penumbra-zone/bech32m",
"@penumbra-zone/client",
"@penumbra-zone/crypto-web",
"@penumbra-zone/getters",
"@penumbra-zone/keys",
"@penumbra-zone/perspective",
"@penumbra-zone/protobuf",
"@penumbra-zone/services",
"@penumbra-zone/storage",
"@penumbra-zone/transport-chrome",
"@penumbra-zone/transport-dom",
"@penumbra-zone/types",
"@penumbra-zone/wasm",
"@penumbra-zone/bech32m",
"@penumbra-zone/client",
"@penumbra-zone/crypto-web",
"@penumbra-zone/getters",
"@penumbra-zone/keys",
"@penumbra-zone/perspective",
"@penumbra-zone/protobuf",
"@penumbra-zone/services",
"@penumbra-zone/storage",
"@penumbra-zone/transport-chrome",
"@penumbra-zone/transport-dom",
"@penumbra-zone/types",
"@penumbra-zone/ui-deprecated",
"@penumbra-zone/wasm"
]
}
}
}
Loading

0 comments on commit 6d57391

Please sign in to comment.