Skip to content

Commit

Permalink
Merge branch 'w3f:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
AshleyTuring authored Dec 8, 2023
2 parents f477eff + 60727ba commit f2360ac
Show file tree
Hide file tree
Showing 5 changed files with 329 additions and 0 deletions.
29 changes: 29 additions & 0 deletions deliveries/Plutonication_Milestone_1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Milestone Delivery :mailbox:

**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

* **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/Plutonication.md
* **Milestone Number:** 1

**Context** PlutonicationServer

An integral part of Plutonication, used for:
- Establishing reliable connection.
- Passing payloads and messages between Wallets and dApps.

**Deliverables**

| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| **0a.** | License | [PlutonicationServer](https://github.com/RostislavLitovkin/PlutonicationServer/blob/main/LICENSE) | MIT |
| **0b.** | Documentation | Docs for running all codes is in the [Readme](https://github.com/RostislavLitovkin/PlutonicationServer/#readme). [Guide for deploying to Cloud](https://plutonication-acnha.ondigitalocean.app/deploy) is here. I have also included [Low-level docs](https://plutonication-acnha.ondigitalocean.app/docs) for tinkerers. | |
| **0c.** | Testing and Testing Guide | Guide for running tests is in the [Readme](https://github.com/RostislavLitovkin/PlutonicationServer/#readme) | I have realised that I am unable to end to end test this milestone before I complete milestones 2 and 3. I have included unit tests instead, to showcase all fuctions work properly. I still plan to end to end test all of the functionalities as mentioned, when working on other milestones. |
| **0d.** | Docker | [Dockerfile](https://github.com/RostislavLitovkin/PlutonicationServer/blob/milestone-delivery/Dockerfile) | |
| 1a. | create_room | [create_room](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L39) | |
| 1b. | pubkey | [pubkey](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L51) | |
| 1c. | sign_payload | [sign_payload](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L65) | |
| 1d. | sign_raw | [sign_raw](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L77) | |
| 1e. | payload_signature | [payload_signature](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L89) | |
| 1f. | raw_signature | [raw_signature](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L109C1-L109C1) | |

**Additional Information**
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Milestone Delivery :mailbox:

**The delivery is according to the official [milestone delivery guidelines](https://github.com/w3f/Grants-Program/blob/master/docs/Support%20Docs/milestone-deliverables-guidelines.md).**

* **Application Document:** [Tesseract dApps/Wallet integration native mobile libraries](https://github.com/w3f/Grants-Program/blob/master/applications/dapp_wallet_integration_native_mobile_libraries.md)
* **Milestone Number:** 2

**Context**

The grant's goal is to implement [Tesseract](https://github.com/tesseract-one/) native mobile APIs (Swift and Kotlin). This milestone is dedicated to providing **Swift** APIs for the **Wallet** side.

**Deliverables**

| Number | Deliverable | Link | Notes |
| ------------- | ------------- | ------------- |------------- |
| **0a.** | License | [Apache 2.0](https://github.com/tesseract-one/Tesseract.swift/blob/main/LICENSE) | Apache 2.0 |
| **0b.** | Documentation | [Main repo README](https://github.com/tesseract-one/Tesseract.swift) | Please, start with the initial README.MD and follow the links. One of the most interesting parts is WALLET.MD |
| **0c.** | Testing and Testing Guide | [gdoc](https://docs.google.com/document/d/1WpMTmoAHAiXByvrWH65Z6T2L-tGhdwrnlA77Nf_9-ks) | |
| **0d.** | Docker | | Not required to run the project |
| 0e. | Article | | Will be shared in private by e-mail during the milestone evaluation |
| 1. | Wallet-side iOS library | [swift](https://github.com/tesseract-one/Tesseract.swift/tree/master/Sources/TesseractService) and [rust](https://github.com/tesseract-one/Tesseract.swift/tree/master/Rust/tesseract) | These are the main enty-points. Though, the end-user might want to import some Swift helpers from utils sibling library. |
| 2. | Wallet-side IPC wrapper for iOS | [IPCTransportIOS.swift](https://github.com/tesseract-one/Tesseract.swift/blob/master/Sources/TesseractTransportsService/iOS/IPCTransportIOS.swift) | Fully written in Swift. It's very platform specific, so it's a better option. Our Swift API allows us to write Transports in Swift and in Rust. |
| 3. | Wallet-side of the Test protocol in Swift | [TestService.swift](https://github.com/tesseract-one/Tesseract.swift/blob/master/Sources/TesseractShared/TestService.swift) | We also have async `Result`-returning service if developer prefers functional style over throws. |
| 4. | Wallet-side of the Substrate protocol in Swift | [SubstrateService.swift](https://github.com/tesseract-one/Tesseract.swift/blob/master/Sources/TesseractShared/SubstrateService.swift) | We also have async `Result`-returning service if developer prefers functional style over throws. |
| 5. | iOS demo Wallet | [dev-wallet.swift](https://github.com/tesseract-one/dev-wallet.swift/) | For the demo, we have forked the [dev-wallet](https://github.com/tesseract-one/dev-wallet) (a cross-platform tesseract wallet in Rust with native UIs) and got rid of all the Rust parts replacing them with new Swift equivalents. It can build and run without installing Rust environment at all. |

**Additional Information**

For the sake of keeping the table above as small as possible, there are only references to the public APIs. The rest of the libraries in siblings directories (both rust and swift), even though are essential, are mostly private and contain code that serve the public APIs to function. There is more details about it in the [testing guide](https://docs.google.com/document/d/1WpMTmoAHAiXByvrWH65Z6T2L-tGhdwrnlA77Nf_9-ks).
22 changes: 22 additions & 0 deletions evaluations/MeProtocol_1_keeganquigley.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Evaluation

- **Status:** In progress
- **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/MeProtocol.md
- **Milestone:** 1
- **Previously successfully merged evaluation:** All by keeganquigley

| Number | Deliverable | Accepted | Link | Notes |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| 0a | License | <ul><li>[ ] </li></ul> |[GPL v3](https://github.com/Me-Protocol/rusty-protocol-v0.1/blob/milestone-1/license.md)| ...|
| 0b | Documentation | <ul><li>[ ] </li></ul> | [Milestone 1 Documentation](https://github.com/Me-Protocol/rusty-protocol-v0.1/blob/milestone-1/README.md) | ...|
| 0c | Testing Guide | <ul><li>[ ] </li></ul> |<ul> <li> [Test Scripts](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/tests) </li> <li> [Guide for running tests](https://github.com/Me-Protocol/rusty-protocol-v0.1/blob/milestone-1/testing_guide.md) </li></ul>| ...|
| 0d | Docker | <ul><li>[ ] </li></ul> |<ul> <li>[Docker File For Tests](https://github.com/Me-Protocol/rusty-protocol-v0.1/blob/milestone-1/Dockerfile)</li><li> [Guide to Run Test With Docker File](https://github.com/Me-Protocol/rusty-protocol-v0.1/blob/milestone-1/testing_guide.md#running-the-docker-file-for-the-e2e-test)</li></ul>| ...|
| 0e | Article | <ul><li>[ ] </li></ul> | <ul> <li>https://www.loom.com/share/8ec3df74fb414049a7e1f10a7f2aa7b5</li><li>[Document](https://drive.google.com/file/d/1sHMD_ZAZE8laRbTjFTAkWKcSXmEIWnFB/view?usp=sharing)</li></ul>| ...|
| 1. | Build out the Pool Component | <ul><li>[ ] </li></ul> | <ul> <li>[Pool](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/deployables/pool)</li><li>[Pool Initiator](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/deployables/pool_initiator)</li></ul> | ...|
| 2. | Build out the rewards factory component | <ul><li>[ ] </li></ul> |<ul> <li>[Reward](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/deployables/reward)</li><li> [Reward Initiator (Factory)](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/deployables/reward_initiator) | ...|
| 3. | Build out the Rewards Periphery Component | <ul><li>[ ] </li></ul> |<ul> <li> [Treasury](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/peripherals/treasury) </li><li> [Bounty](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/peripherals/bounty)| ...|
| 4. | Build out the service payment component | <ul><li>[ ] </li></ul> |[Service Payment](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/services/payment)| ...|
| 5. | Build Out the Rewards Valuation Oracle Component | <ul><li>[ ] </li></ul> |[Valuation Oracle](https://github.com/Me-Protocol/rusty-protocol-v0.1/tree/milestone-1/contracts/modules/services/oracle)| ...|

# General Notes

198 changes: 198 additions & 0 deletions evaluations/plutonication_1_keeganquigley.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
# Evaluation

- **Status:** Accepted
- **Application Document:** https://github.com/w3f/Grants-Program/blob/master/applications/Plutonication.md
- **Milestone:** 1
- **Previously successfully merged evaluation:** All by keeganquigley

| Number | Deliverable | Accepted | Link | Notes |
| ------------- | ------------- | ------------- | ------------- | ------------- |
| **0a.** | License | <ul><li>[x] </li></ul> | [PlutonicationServer](https://github.com/RostislavLitovkin/PlutonicationServer/blob/main/LICENSE) | MIT |
| **0b.** | Documentation | <ul><li>[x] </li></ul> | Docs for running all codes is in the [Readme](https://github.com/RostislavLitovkin/PlutonicationServer/#readme). [Guide for deploying to Cloud](https://plutonication-acnha.ondigitalocean.app/deploy) is here. I have also included [Low-level docs](https://plutonication-acnha.ondigitalocean.app/docs) for tinkerers. | Ok. |
| **0c.** | Testing and Testing Guide | <ul><li>[x] </li></ul> | Guide for running tests is in the [Readme](https://github.com/RostislavLitovkin/PlutonicationServer/#readme) | Ok. |
| **0d.** | Docker | <ul><li>[x] </li></ul> | [Dockerfile](https://github.com/RostislavLitovkin/PlutonicationServer/blob/milestone-delivery/Dockerfile) | Ok. |
| 1a. | create_room | <ul><li>[x] </li></ul> | [create_room](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L39) | Ok. |
| 1b. | pubkey | <ul><li>[x] </li></ul> | [pubkey](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L51) | Ok. |
| 1c. | sign_payload | <ul><li>[x] </li></ul> | [sign_payload](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L65) | Ok. |
| 1d. | sign_raw | <ul><li>[x] </li></ul> | [sign_raw](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L77) | Ok. |
| 1e. | payload_signature | <ul><li>[x] </li></ul> | [payload_signature](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L89) | Ok. |
| 1f. | raw_signature | <ul><li>[x] </li></ul> | [raw_signature](https://github.com/RostislavLitovkin/PlutonicationServer/blob/c848a88cf5f28d47542f1be0d7cc2bdee927558f/plutonication/events.py#L109C1-L109C1) | Ok. |

# General Notes

Overall, great documentation and everything works as expected. Looking forward to seeing the next milestone where everything should come together.

## Evaluation v2

Issues have been resolved, all unit and e2e tests pass now:

```js
npx playwright test

Running 8 tests using 1 worker
[chromium] › events.spec.js:77:7 › events › create_room and pubkey
dApp connected
Wallet connected
[chromium] › stresstest.spec.js:6:7 › stress tests › limit_socketio
Connected
pong: 0
pong: 1
pong: 2
pong: 3
pong: 4
pong: 5
pong: 6
pong: 7
pong: 8
pong: 9
pong: 10
pong: 11
pong: 12
pong: 13
pong: 14
pong: 15
pong: 16
pong: 17
pong: 18
pong: 19
pong: 20
pong: 21
pong: 22
pong: 23
pong: 24
pong: 25
pong: 26
pong: 27
pong: 28
8 passed (8.0s)
```
Events tests pass:

```js
npx playwright test events.spec.js

Running 7 tests using 1 worker
[chromium] › events.spec.js:77:7 › events › create_room and pubkey
dApp connected
Wallet connected
7 passed (7.4s)
```

## Evaluation v1

Docker builds successfully:

```sh
docker build --tag plutonication .

[+] Building 28.8s (10/10) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 213B 0.0s
=> [internal] load metadata for docker.io/library/python:3.11 1.6s
=> [1/5] FROM docker.io/library/python:3.11@sha256:eb79d3fc1b3d3991133634f12cb58c13e27a1abfe51f1c7ee03f6911bca5d4 20.6s
=> => resolve docker.io/library/python:3.11@sha256:eb79d3fc1b3d3991133634f12cb58c13e27a1abfe51f1c7ee03f6911bca5d41 0.0s
=> => sha256:1444f25b8cb0d573358dc90b9cc4844791f6d006fa0d01611c36212653b5999f 2.01kB / 2.01kB 0.0s
=> => sha256:df2021ddb7d686bdbb125598b2a6163d63035f080356b3014595f354ea0b40d6 49.61MB / 49.61MB 5.0s
=> => sha256:8d647f1dd7e741209a8a75083ccc889e39cb3e94c17f45441eae96e1a679d971 23.58MB / 23.58MB 2.3s
=> => sha256:5cdd9a70365f741a6b9f7a4e32cdb7d4aa29ac73da0b78ca0a83e937f285fdd5 63.99MB / 63.99MB 8.6s
=> => sha256:eb79d3fc1b3d3991133634f12cb58c13e27a1abfe51f1c7ee03f6911bca5d412 2.14kB / 2.14kB 0.0s
=> => sha256:38771d50ca44f9c2bcf4e0cc4dc84b6cbb8a3be4a0490b9b4f4e57aa07195710 7.54kB / 7.54kB 0.0s
=> => sha256:95089c600b361807380090316c250b0b8eaf4fa2175b11ac8f49bb7581c61125 202.45MB / 202.45MB 15.0s
=> => sha256:45be536bb9e879fb192bfb15f431b02ec652da4ffc4c6de13cbe39ae887ffb42 6.47MB / 6.47MB 5.9s
=> => extracting sha256:df2021ddb7d686bdbb125598b2a6163d63035f080356b3014595f354ea0b40d6 2.2s
=> => sha256:68d92c2043a0adf9ee66b0897ff193e7a71039d9b16bd3f9cc558fc69c3b3677 19.44MB / 19.44MB 8.6s
=> => extracting sha256:8d647f1dd7e741209a8a75083ccc889e39cb3e94c17f45441eae96e1a679d971 0.4s
=> => extracting sha256:5cdd9a70365f741a6b9f7a4e32cdb7d4aa29ac73da0b78ca0a83e937f285fdd5 2.0s
=> => sha256:2735ee5c975ede760a65f361c6fe135e858fa4b3f33b4179eb31d143514848db 3.11MB / 3.11MB 9.1s
=> => sha256:fa081e3e96e0c2d9f8fdcad4b7ca92c8027c12805607b609b48adf26e867aa0c 244B / 244B 8.9s
=> => extracting sha256:95089c600b361807380090316c250b0b8eaf4fa2175b11ac8f49bb7581c61125 4.4s
=> => extracting sha256:45be536bb9e879fb192bfb15f431b02ec652da4ffc4c6de13cbe39ae887ffb42 0.2s
=> => extracting sha256:68d92c2043a0adf9ee66b0897ff193e7a71039d9b16bd3f9cc558fc69c3b3677 0.4s
=> => extracting sha256:fa081e3e96e0c2d9f8fdcad4b7ca92c8027c12805607b609b48adf26e867aa0c 0.0s
=> => extracting sha256:2735ee5c975ede760a65f361c6fe135e858fa4b3f33b4179eb31d143514848db 0.2s
=> [internal] load build context 0.2s
=> => transferring context: 22.20MB 0.2s
=> [2/5] WORKDIR /python-docker 1.8s
=> [3/5] COPY requirements.txt requirements.txt 0.0s
=> [4/5] RUN pip3 install -r requirements.txt 4.5s
=> [5/5] COPY . . 0.1s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:f6d77bf969686ff9b500c55791045ecbdba5c7963bf0bc3543adbe67010f00d3 0.0s
=> => naming to docker.io/library/plutonication:latest
```

Docker boots but can't see it on local host:

```sh
docker run plutonication
[2023-11-27 23:23:45 +0000] [7] [INFO] Starting gunicorn 20.1.0
[2023-11-27 23:23:45 +0000] [7] [INFO] Listening at: http://127.0.0.1:8000 (7)
[2023-11-27 23:23:45 +0000] [7] [INFO] Using worker: gthread
[2023-11-27 23:23:45 +0000] [8] [INFO] Booting worker with pid: 8
```
App boots up:

```
gunicorn -w 1 --threads 100 main:app
[2023-11-27 18:28:39 -0500] [6597] [INFO] Starting gunicorn 20.1.0
[2023-11-27 18:28:39 -0500] [6597] [INFO] Listening at: http://127.0.0.1:8000 (6597)
[2023-11-27 18:28:39 -0500] [6597] [INFO] Using worker: gthread
[2023-11-27 18:28:39 -0500] [6598] [INFO] Booting worker with pid: 6598
```

Unit tests successful:
```
npx playwright test
Running 8 tests using 1 worker
[chromium] › events.spec.js:77:7 › events › create_room and pubkey
dApp connected
Wallet connected
[chromium] › stresstest.spec.js:6:7 › stress tests › limit_socketio
Connected
pong: 0
pong: 1
pong: 2
pong: 3
pong: 4
pong: 5
pong: 6
pong: 7
pong: 8
pong: 9
pong: 10
pong: 11
pong: 12
pong: 13
pong: 14
pong: 15
pong: 16
pong: 17
pong: 18
pong: 19
pong: 20
pong: 21
pong: 22
pong: 23
pong: 24
pong: 25
pong: 26
pong: 27
pong: 28
8 passed (8.0s)
```

Events tests pass:

```js
npx playwright test events.spec.js

Running 7 tests using 1 worker
[chromium] › events.spec.js:77:7 › events › create_room and pubkey
dApp connected
Wallet connected
7 passed (7.4s)
```
Loading

0 comments on commit f2360ac

Please sign in to comment.