Skip to content

Commit a058058

Browse files
committed
v0.6.0-alpha with realtime collaboration improvements
1 parent baa7144 commit a058058

File tree

10 files changed

+66
-23
lines changed

10 files changed

+66
-23
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ jobs:
9494
env:
9595
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9696
run: |
97-
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/Acorn-0.5.9-alpha.AppImage" --clobber
97+
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/Acorn-0.6.0-alpha.AppImage" --clobber
9898
- name: upload binary (macos only)
9999
if: ${{ runner.os == 'macOs' }}
100100
env:
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102102
run: |
103-
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/Acorn-0.5.9-alpha.dmg" --clobber
103+
gh release upload "${GITHUB_REF#refs/tags/}" "electron/out/Acorn-0.6.0-alpha.dmg" --clobber
104104
- name: upload binary (Windows only)
105105
if: ${{ runner.os == 'Windows' }}
106106
env:
107107
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108108
run: |
109-
gh release upload "$($env:GITHUB_REF -replace "refs/tags/")" "electron/out/Acorn.Setup.0.5.9-alpha.exe" --clobber
109+
gh release upload "$($env:GITHUB_REF -replace "refs/tags/")" "electron/out/Acorn.Setup.0.6.0-alpha.exe" --clobber

DEVELOPERS.md

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,52 @@ To build:
5959

6060
- `npm run build`
6161

62-
> Macos: You will need to have set
63-
> APPLE_ID_EMAIL
64-
> and
65-
> APPLE_ID_PASSWORD
66-
> as environment variables, in addition to having a certificate for the Apple Developer
67-
> account installed on the system you are building on.
62+
The packaged executables can be found in `frontend/electron/out`.
6863

69-
You will find the packaged executables in `electron/out`.
64+
In order to get cross-platform builds, just tag your repository like `v0.0.1` and push the tag to Github. CI will automatically start running a build, under the "Release" action.
65+
66+
> Macos: You will need to have set the following environment variables as repository secrets:
67+
> - APPLE_CERTIFICATE_BASE64
68+
> - APPLE_CERTIFICATE_PASS
69+
> - APPLE_DEV_IDENTITY
70+
> - APPLE_ID_EMAIL
71+
> - APPLE_ID_PASSWORD
72+
>
73+
> The first two should be set as equivalents of `MACOS_CERTIFICATE` = `APPLE_CERTIFICATE_BASE64` and `MACOS_CERTIFICATE_PWD` = `APPLE_CERTIFICATE_PASS` as found in the following article, which also provides other instruction regarding this: https://localazy.com/blog/how-to-automatically-sign-macos-apps-using-github-actions
74+
75+
76+
### Versioning
77+
78+
Each version of the app will either change, or not change, the paths to the user data folders in use by the application.
79+
80+
The user data will be located under `mova` in the platform specific appData folder, as specified by `appData` here: https://www.electronjs.org/docs/latest/api/app#appgetpathname
81+
82+
It is then in a specific sub-folder that relates to one of two types of data:
83+
- source chain and DHT -> `databases-${DATABASES_VERSION_NUMBER}`
84+
- private keys -> `keystore-${KEYSTORE_VERSION_NUMBER}`
85+
86+
DATABASES_VERSION_NUMBER and KEYSTORE_VERSION_NUMBER are defined in `frontend/electron/src/holochain.ts` and can be modified as needed in order to jump to new versions of holochain, or a new app DNA.
87+
88+
You can tweak DATABASES_VERSION_NUMBER and KEYSTORE_VERSION_NUMBER independently.
89+
90+
DATABASES_VERSION_NUMBER should be incremented when a new DNA is in use. It will cause users to have to re-create profiles and re-instate data they've previously added.
91+
92+
KEYSTORE_VERSION_NUMBER should be incremented if the version of lair-keystore changes, and has a new key format. Or if you otherwise want users to have to switch and generate new keys.
93+
94+
95+
## Dependency Versions Information
96+
97+
This project is currently using:
98+
99+
https://github.com/holochain/holochain/releases/tag/holochain-0.0.115
100+
101+
https://github.com/Sprillow/holochain-runner/releases/tag/v0.0.30
102+
103+
Lair Keystore Revision [v0.0.9 Nov 4, 2021](https://github.com/holochain/lair/releases/tag/v0.0.9)
104+
105+
https://docs.rs/hdk/0.0.115/hdk/index.html
106+
107+
and electron version 12 [https://www.electronjs.org/](https://www.electronjs.org/)
70108

71109
## Technical Overview
72110

@@ -75,7 +113,7 @@ Acorn functions at a high level according to these patterns:
75113
- an 'electron' wrapper is responsible for
76114
- creating a 'BrowserWindow' application window through which users interact with the HTML/JS/CSS GUI of Acorn
77115
- starting up and stopping background processes for Holochain related services, including the main holochain engine, and the holochain "keystore" which handles cryptographic signing functions. It is necessary for these background processes to be running while the application is open, and for them to stop when it is closed/quit, because the GUI must talk to these components in order for it to perform any of its primary functions such as reading and writing data.
78-
- The `holochain` binary shipped by the holochain organization is **not** directly bundled, and executed. An alternative approach is taken for the needs of Acorn. This alternative approach involves the compilation of a custom binary to run the core Holochain engine, the "conductor", which is achieved by importing shared code from the `holochain` binary source code. This is found in the [conductor](./conductor) folder. It relies on a general library that was developed with Acorn in mind, the [embedded-holochain-runner](https://github.com/Sprillow/embedded-holochain-runner/). This strategy was taken to optimize performance and cut down on cross-language (js <-> rust) complexity. Due to this architecture, the electron js code does not need to call any functions of the `admin websocket` typically exposed by `holochain` to manage the Conductor state. This also improves code development simplicity, as it minimizes the surface area/complexity of the electron side code, and keeps it "thin".
116+
- The `holochain` binary shipped by the holochain organization is **not** directly bundled, and executed. An alternative approach is taken for the needs of Acorn. This alternative approach involves the compilation of a custom binary to run the core Holochain engine, the "conductor", which is achieved by importing shared code from the `holochain` binary source code. This is found in the [conductor](./conductor) folder. It relies on a general library that was developed with Acorn in mind, the [holochain-runner](https://github.com/Sprillow/holochain-runner/). This strategy was taken to optimize performance and cut down on cross-language (js <-> rust) complexity. Due to this architecture, the electron js code does not need to call any functions of the `admin websocket` typically exposed by `holochain` to manage the Conductor state. This also improves code development simplicity, as it minimizes the surface area/complexity of the electron side code, and keeps it "thin".
79117
- This custom binary also helps the GUI / electron application know about the status of the Conductor. It does this by subscribing to events emitted from the `embedded-holochain-runner`, and forwarding those events to the GUI via electron's IPC messages.
80118
- Within the application, here is how Acorn utilizes Holochain:
81119
- A new user will need a new private/public key pair to represent their unique identity within Acorn. This will be generated automatically on the first launch of Acorn. Acorn will look in the following folder on the users computer to determine whether this is the first launch or a re-launch (`-X-Y-Z` would be replaced by version numbers such as for `v0.5.1` it would be `-0-5-1`):

electron/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "acorn",
3-
"version": "0.5.9-alpha",
3+
"version": "0.6.0-alpha",
44
"description": "Create the future",
55
"main": "dist/index.js",
66
"scripts": {

electron/src/holochain.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ import * as path from 'path'
22
import { app } from 'electron'
33
import { HolochainRunnerOptions, StateSignal, PathOptions } from 'electron-holochain'
44

5+
// see the DEVELOPERS.md about incrementing
6+
// these values
7+
const DATABASES_VERSION_NUMBER = '1'
8+
const KEYSTORE_VERSION_NUMBER = '1'
9+
510
// these messages get seen on the splash page
611
export enum StateSignalText {
712
IsFirstRun = 'Welcome to Acorn...',
@@ -76,11 +81,11 @@ const devOptions: HolochainRunnerOptions = {
7681
}
7782
const prodOptions: HolochainRunnerOptions = {
7883
dnaPath: profilesDnaPath, // preload
79-
datastorePath: path.join(app.getPath('userData'), 'databases-0-5-9-alpha'),
84+
datastorePath: path.join(app.getPath('userData'), `databases-${DATABASES_VERSION_NUMBER}`),
8085
appId: MAIN_APP_ID,
8186
appWsPort: 8889,
8287
adminWsPort: 1235,
83-
keystorePath: path.join(app.getPath('userData'), 'keystore-0-5-9-alpha'),
88+
keystorePath: path.join(app.getPath('userData'), `keystore-${KEYSTORE_VERSION_NUMBER}`),
8489
proxyUrl: COMMUNITY_PROXY_URL,
8590
}
8691

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "acorn",
3-
"version": "0.5.9-alpha",
3+
"version": "0.6.0-alpha",
44
"description": "Acorn is software that helps people create the future",
55
"repository": {
66
"type": "git",

web/dist/splashscreen.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<div class="splash-content-wrapper">
1313
<div>
1414
<div class="splash-logo">acorn</div>
15-
<div class="splash-version">version 0.5.9-alpha</div>
15+
<div class="splash-version">version 0.6.0-alpha</div>
1616
</div>
1717
<div class="splash-loading-message" id="activity">
1818
Setting up Holochain...

web/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "acorn-ui",
3-
"version": "0.5.9-alpha",
3+
"version": "0.6.0-alpha",
44
"devDependencies": {
55
"@babel/core": "^7.5.5",
66
"@babel/preset-env": "7.5.5",

0 commit comments

Comments
 (0)