-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
201 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,12 +10,210 @@ | |
| ------ | ----------- | -------- | ---- |----------------- | | ||
| **0a.** | License |<ul><li>[x] </li></ul>| [LICENSE](https://github.com/7flash/galaxy-polkadot/blob/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9/LICENSE) | | | ||
| **0b.** | Documentation |<ul><li>[ ] </li></ul>| [README](https://github.com/7flash/galaxy-polkadot/blob/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9/README.md) | Not fully evaluated Yet. | | ||
| **0c.** | Testing and Testing Guide |<ul><li>[ ] </li></ul>| [Galaxy.test.js](https://github.com/7flash/galaxy-polkadot/blob/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9/tests/Galaxy.test.js) | Not fully evaluated Yet. | | ||
| **0c.** | Testing and Testing Guide |<ul><li>[x] </li></ul>| [Galaxy.test.js](https://github.com/7flash/galaxy-polkadot/blob/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9/tests/Galaxy.test.js) | | | ||
| **0d.** | Docker |<ul><li>[ ] </li></ul>| [Dockerfile](https://github.com/7flash/galaxy-polkadot/blob/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9/Dockerfile) | Not fully evaluated Yet. | | ||
| 0e. | Article |<ul><li>[ ] </li></ul>| [Telegraph](https://telegra.ph/Galaxy-Browser-v111-09-28) | Not fully evaluated Yet. | | ||
| 0e. | Video |<ul><li>[ ] </li></ul>| [Youtube](https://www.youtube.com/watch?v=U1TshR00K8Q) | Not fully evaluated Yet. | | ||
| 0e. | Video |<ul><li>[x] </li></ul>| [Youtube](https://www.youtube.com/watch?v=U1TshR00K8Q) | | | ||
| 1. | Galaxy Browser |<ul><li>[ ] </li></ul>| [Main Repository](https://github.com/7flash/galaxy-polkadot/tree/f97d5e2e5eab3322782f72d3b469d11cbf7e94a9) | Not fully evaluated Yet. | | ||
| 2. | Smart contract |<ul><li>[ ] </li></ul>| [Smart Contract Submodule](https://github.com/7flash/galaxy-polkadot-contract/tree/74b38eafc673a9f1b5d8541a4f43b31cd644db01) | Not fully evaluated Yet. | | ||
| 2. | Smart contract |<ul><li>[x] </li></ul>| [Smart Contract Submodule](https://github.com/7flash/galaxy-polkadot-contract/tree/74b38eafc673a9f1b5d8541a4f43b31cd644db01) | | | ||
|
||
## Evaluation V2 | ||
|
||
### Docker | ||
|
||
I tried to run the Docker, but I had some problems. | ||
|
||
<details> | ||
|
||
``` | ||
user@localhost:~/Documents/galaxy/galaxy-polkadot$ docker build -t galaxy:latest . | ||
[+] Building 11.5s (11/13) | ||
=> [internal] load .dockerignore 0.0s | ||
=> => transferring context: 2B 0.0s | ||
=> [internal] load build definition from Dockerfile 0.0s | ||
=> => transferring dockerfile: 226B 0.0s | ||
=> [internal] load metadata for docker.io/library/nginx:stable-alpine 1.2s | ||
=> [internal] load metadata for docker.io/library/node:18 1.2s | ||
=> CACHED [production 1/2] FROM docker.io/library/nginx:stable-alpine@sha256:76ca7f6bfe01c3e22e3af85fd37c30149ece3ac2a444973687cab1765abca115 0.0s | ||
=> [build 1/6] FROM docker.io/library/node:18@sha256:ee0a21d64211d92d4340b225c556e9ef1a8bce1d5b03b49f5f07bf1dbbaa5626 0.0s | ||
=> [internal] load build context 2.0s | ||
=> => transferring context: 9.37MB 1.9s | ||
=> CACHED [build 2/6] WORKDIR /app 0.0s | ||
=> CACHED [build 3/6] COPY package.json ./ 0.0s | ||
=> CACHED [build 4/6] RUN yarn install 0.0s | ||
=> ERROR [build 5/6] COPY . . 8.3s | ||
------ | ||
> [build 5/6] COPY . .: | ||
------ | ||
Dockerfile:5 | ||
-------------------- | ||
3 | COPY package.json ./ | ||
4 | RUN yarn install | ||
5 | >>> COPY . . | ||
6 | RUN yarn build | ||
7 | | ||
-------------------- | ||
ERROR: failed to solve: cannot replace to directory /var/lib/docker/overlay2/b6476nn9qlvrj61jimm7lhold/merged/app/node_modules/@babel/preset-env with file | ||
``` | ||
|
||
</details> | ||
|
||
Adding the `node_modules` to `.dockerignore` or excluding the folder solved this problem. You can add the `.dockerignore` for this. However, after doing this change, I had this other the problem. | ||
|
||
``` | ||
=> ERROR [build 6/6] RUN yarn build 0.5s | ||
------ | ||
> [build 6/6] RUN yarn build: | ||
#0 0.431 yarn run v1.22.19 | ||
#0 0.468 error Command "build" not found. | ||
#0 0.468 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. | ||
------ | ||
Dockerfile:6 | ||
-------------------- | ||
4 | RUN yarn install | ||
5 | COPY . . | ||
6 | >>> RUN yarn build | ||
7 | | ||
8 | FROM nginx:stable-alpine AS production | ||
-------------------- | ||
ERROR: failed to solve: process "/bin/sh -c yarn build" did not complete successfully: exit code: 1 | ||
``` | ||
|
||
### Manual Test | ||
|
||
I built and deployed the contract without a problem. I changed the contract address. The documentation is missing the instructions to change [this line of code](https://github.com/7flash/galaxy-polkadot/blob/milestone2/src/GalaxyAPI.ts#L43) to change the contract. | ||
|
||
This time, I was able to add more than one of the same shape, publish the frame, and load all shapes. | ||
|
||
*image* | ||
|
||
The commands `pnpm dev-deno` and pnpm `dev-desktop` still have the problem with the file `./webui/dist/webui-2.dylib`. | ||
|
||
``` | ||
user@localhost:~/Documents/galaxy/galaxy-polkadot$ pnpm dev-deno | ||
> [email protected] dev-deno /home/user/Documents/galaxy/galaxy-polkadot | ||
> cd desktop && DEV=true deno run --allow-all --unstable main.ts | ||
DEBUG Checking for Deno configurations... | ||
error: Uncaught (in promise) Error: File not found "./webui/dist/webui-2.dylib" | ||
throw new WebUIError(`File not found "${options.libPath}"`); | ||
^ | ||
at new WebUI (file:///home/user/Documents/galaxy/galaxy-polkadot/desktop/deno-webui/src/webui.ts:51:13) | ||
at file:///home/user/Documents/galaxy/galaxy-polkadot/desktop/main.ts:6:21 | ||
at eventLoopTick (ext:core/01_core.js:183:11) | ||
ELIFECYCLE Command failed with exit code 1. | ||
``` | ||
|
||
And the command `dev-desktop` overwrite the folder `dist` and generate a new one without the `excalidraw-assets`. | ||
|
||
<details> | ||
|
||
``` | ||
user@localhost:~/Documents/galaxy/galaxy-polkadot$ pnpm dev-desktop | ||
> [email protected] dev-desktop /home/user/Documents/galaxy/galaxy-polkadot | ||
> vite build && cd desktop && DEV=true deno run --allow-all --unstable main.ts | ||
▲ [WARNING] Duplicate key "skipLibCheck" in object literal [duplicate-object-key] | ||
tsconfig.json:22:2: | ||
22 │ "skipLibCheck": true, | ||
╵ ~~~~~~~~~~~~~~ | ||
The original key "skipLibCheck" is here: | ||
tsconfig.json:6:4: | ||
6 │ "skipLibCheck": true, | ||
╵ ~~~~~~~~~~~~~~ | ||
▲ [WARNING] Duplicate key "noUnusedLocals" in object literal [duplicate-object-key] | ||
tsconfig.json:23:2: | ||
23 │ "noUnusedLocals": false, | ||
╵ ~~~~~~~~~~~~~~~~ | ||
The original key "noUnusedLocals" is here: | ||
tsconfig.json:18:4: | ||
18 │ "noUnusedLocals": true, | ||
╵ ~~~~~~~~~~~~~~~~ | ||
▲ [WARNING] Duplicate key "noUnusedParameters" in object literal [duplicate-object-key] | ||
tsconfig.json:24:2: | ||
24 │ "noUnusedParameters": false | ||
╵ ~~~~~~~~~~~~~~~~~~~~ | ||
The original key "noUnusedParameters" is here: | ||
tsconfig.json:19:4: | ||
19 │ "noUnusedParameters": true, | ||
╵ ~~~~~~~~~~~~~~~~~~~~ | ||
vite v4.3.0 building for production... | ||
<script src="/webui.js"> in "/index.html" can't be bundled without type="module" attribute | ||
transforming (32) node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/useink/dist/chunk-CFOEQQMR.mjs[plugin:vite:resolve] Module "util" has been externalized for browser compatibility, imported by "/home/user/Documents/galaxy/galaxy-polkadot/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/useink/dist/chunk-CFOEQQMR.mjs". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. | ||
[plugin:vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/user/Documents/galaxy/galaxy-polkadot/node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/useink/dist/chunk-CFOEQQMR.mjs". See http://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details. | ||
transforming (764) node_modules/.pnpm/@[email protected]/node_modules/@polkadot/networks/defaults/ledger.jsnode_modules/.pnpm/@[email protected]/node_modules/@protobufjs/inquire/index.js (12:18) Use of eval in "node_modules/.pnpm/@[email protected]/node_modules/@protobufjs/inquire/index.js" is strongly discouraged as it poses security risks and may cause issues with minification. | ||
node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/useink/dist/chunk-CFOEQQMR.mjs (15570:69) "webcrypto" is not exported by "__vite-browser-external", imported by "node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/useink/dist/chunk-CFOEQQMR.mjs". | ||
✓ 787 modules transformed. | ||
dist/index.html 0.49 kB │ gzip: 0.31 kB | ||
dist/assets/index-0aca65c4.css 2.65 kB │ gzip: 0.93 kB | ||
dist/assets/index-e9f786d2.js 289.17 kB │ gzip: 194.27 kB | ||
dist/assets/index-e6f0b75e.js 2,701.49 kB │ gzip: 829.95 kB | ||
(!) Some chunks are larger than 500 kBs after minification. Consider: | ||
- Using dynamic import() to code-split the application | ||
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks | ||
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit. | ||
✓ built in 8.21s | ||
DEBUG Checking for Deno configurations... | ||
[User] webui_new_window()... | ||
[Core] WebUI v2.4.0 | ||
[Core] _webui_init()... | ||
[Core] _webui_get_current_path()... | ||
[Core] _webui_malloc([4096])... | ||
[Core] _webui_ptr_add(0x0x55ee4c4a1bb0) -> Allocate 8192 bytes | ||
[Core] _webui_malloc([4096])... | ||
[Core] _webui_ptr_add(0x0x55ee4c4a5940) -> Allocate 8192 bytes | ||
[User] webui_get_new_window_id()... | ||
[Core] _webui_malloc([4288])... | ||
[Core] _webui_ptr_add(0x0x55ee4c4a7950) -> Allocate 8192 bytes | ||
[Core] _webui_malloc([4096])... | ||
[Core] _webui_ptr_add(0x0x55ee4c4a9960) -> Allocate 8192 bytes | ||
[Core] _webui_malloc([4096])... | ||
[Core] _webui_ptr_add(0x0x55ee4c4ab970) -> Allocate 8192 bytes | ||
[Core] _webui_is_empty()... | ||
[User] webui_new_window() -> New window #1 @ 0x0x55ee4c4a7950 | ||
[User] webui_set_profile([], [])... | ||
[Core] _webui_strlen()... | ||
[Core] _webui_is_empty()... | ||
[Core] _webui_malloc([0])... | ||
[Core] _webui_ptr_add(0x0x55ee4c480200) -> Allocate 4 bytes | ||
[Core] _webui_strlen()... | ||
[Core] _webui_is_empty()... | ||
[Core] _webui_malloc([0])... | ||
[Core] _webui_ptr_add(0x0x55ee4c480220) -> Allocate 4 bytes | ||
Last download date from metadata: 2023-09-28T12:02:27.244Z | ||
Debug mode: Loading local files only... | ||
.git 29 | ||
vite.svg 1497 | ||
index.html 492 | ||
index-e6f0b75e.js 2702776 | ||
index-0aca65c4.css 2653 | ||
index-e9f786d2.js 289172 | ||
error: Uncaught (in promise) NotFound: No such file or directory (os error 2): readdir '../dist/excalidraw-assets' | ||
for await (const entry of Deno.readDir(path)) { | ||
^ | ||
at async Object.[Symbol.asyncIterator] (ext:deno_fs/30_fs.js:161:19) | ||
at async loadFilesAsync (file:///home/user/Documents/galaxy/galaxy-polkadot/desktop/main.ts:126:22) | ||
at async getFiles (file:///home/user/Documents/galaxy/galaxy-polkadot/desktop/main.ts:158:14) | ||
at async file:///home/user/Documents/galaxy/galaxy-polkadot/desktop/main.ts:180:17 | ||
ELIFECYCLE Command failed with exit code 1. | ||
``` | ||
|
||
</details> | ||
|
||
## Evaluation V1 | ||
|
||
|