This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Docker Image #593
Merged
Merged
Docker Image #593
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Docker CI Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
DOCKER_IMAGE: thehubbleproject/node | ||
DOCKER_IMAGE_SHA: ${{ env.DOCKER_IMAGE }}:${{ github.sha }} | ||
DOCKER_IMAGE_TAG: ${{ env.DOCKER_IMAGE }}:${{ github.event.release.tag_name }} | ||
DOCKER_IMAGE_LATEST: ${{ env.DOCKER_IMAGE }}:latest | ||
|
||
jobs: | ||
pull-tag-push: | ||
runs-on: ubuntu-latest | ||
needs: images | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Pull image for git sha | ||
run: docker pull ${{ env.DOCKER_IMAGE_SHA }} | ||
- | ||
name: Tag image with release | ||
run: docker tag ${{ env.DOCKER_IMAGE_SHA }} ${{ env.DOCKER_IMAGE_TAG }} | ||
- | ||
name: Tag image with latest | ||
if: ${{ github.event.release.prerelease == 'false' }} | ||
run: docker tag ${{ env.DOCKER_IMAGE_SHA }} ${{ env.DOCKER_IMAGE_LATEST }} | ||
- | ||
name: Push tagged image(s) | ||
# Pushing the image name without a tag will push all new tags. | ||
run: docker push ${{ env.DOCKER_IMAGE }} | ||
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Docker CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
DOCKER_IMAGE: thehubbleproject/node | ||
|
||
jobs: | ||
build-push: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
- | ||
name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Build and push git sha | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
file: docker/Dockerfile | ||
push: true | ||
tags: ${{ env.DOCKER_IMAGE }}:${{ github.sha }} | ||
# Consider using GitHub local cache in the future | ||
# https://docs.docker.com/ci-cd/github-actions/#optimizing-the-workflow | ||
# https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#github-cache | ||
cache-from: type=registry,ref=${{ env.DOCKER_IMAGE }}:latest | ||
cache-to: type=inline | ||
- | ||
name: Image digest | ||
run: echo ${{ steps.docker_build.outputs.digest }} |
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
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ types/ethers-contracts/ | |
cache/ | ||
artifacts/ | ||
build/ | ||
docker/testData |
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 |
---|---|---|
@@ -1,49 +1,55 @@ | ||
# Hubble Optimistic Rollup Contracts | ||
# Hubble Optimistic Rollup Contracts & NodeJS TypeScript Client (Node) | ||
|
||
 | ||
|
||
## About Hubble | ||
|
||
Hubble is a token transfer solution to improve Ethereum throughput from 20 transactions per second to 2600. | ||
Hubble is an [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/) token transfer solution that improves Ethereum throughput from 20 transactions per second to ~2700. | ||
|
||
### How it work | ||
### How it works | ||
|
||
People sumit transfers to a coordinator, who then submits transactions and the state root of the balances update to a Ethereum contract. | ||
Accounts submit transfers to a coordinator node who then submits transactions and the state root of the balance updates to an Ethereum smart contract ([Rollup.sol](./contracts/rollup/Rollup.sol)). | ||
|
||
### Why can that improve the throughput | ||
### How does this improve throughput? | ||
|
||
The contract does not validate either the correctness of the balances update or the authenticity of the sender. | ||
The contract does not validate either the correctness of the balance updates or the authenticity of the sender. | ||
|
||
### What if the coordinator submit incorrect balances update? | ||
### What if the coordinator submits incorrect balance updates? | ||
|
||
Anyone can trigger the dispute methods of the contract and penalize the coordinator by burning the assets they staked beforehand. The contract rolls back to the last state when the balance was correct. | ||
Anyone can trigger the dispute methods of the contract and penalize the coordinator by burning the assets they staked beforehand. The contract rolls back to the last state when the balances were correct. | ||
|
||
### How is it different from these projects | ||
### How is it different from other Layer 2 (L2) Ethereum projects? | ||
|
||
- Optimism: Hubble does not support virtual machine, ... yet. | ||
- ZK rollups: Both improve throughput but Hubble is ZK free. No zero-knowledge moon math, only boring EVM at work. | ||
- [Optimism](https://optimism.io/): Hubble does not support the EVM virtual machine, ... yet. | ||
- [ZK (zero knowledge proof) rollups](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/): Both improve throughput but Hubble is ZK free. No zero-knowledge moon math, only boring EVM at work. | ||
- ZK optimistic rollups: Hubble does not address privacy. | ||
|
||
Hubble has the highest throughput compared with all above applications, since | ||
Hubble has the highest throughput compared with the above, since: | ||
|
||
- We use BLS signature aggregation to reduce the size to store data on chain | ||
- We optimize for simple transfer | ||
- Hubble use BLS signature aggregation to reduce the size to store data on chain. | ||
- We optimize for simple token transfers. | ||
|
||
### What else can Hubble do | ||
|
||
- Mass Migration: Users can migrate their tokens to other layer 2 solutions without withdraw to and deposit from layer 1 again. | ||
- Create2Transfer: Users can onboard Hubble without going through layer 1. The coordinator can register pubkeys for them and they can acquire tokens from holders who are already in Hubble. | ||
#### Mass Migration | ||
|
||
Users can migrate their tokens to other L2 solutions without withdrawing to and depositing from Layer 1 (L1) again. | ||
|
||
## Getting Started | ||
#### Create2Transfer | ||
|
||
```sh | ||
npm install | ||
npm run generate | ||
``` | ||
Users can onboard accounts to Hubble without going through L1. The coordinator can register their public keys and then they can acquire tokens from holders who are already in the Hubble L2. | ||
|
||
## Local Development | ||
|
||
## Testing | ||
See [Setup](./SETUP.md) instructions | ||
|
||
## Docker | ||
|
||
https://hub.docker.com/r/thehubbleproject/node | ||
|
||
```sh | ||
npm run test | ||
docker pull thehubbleproject/node:latest | ||
# or for a specific release, ...:v0.x.y | ||
``` | ||
|
||
See [Docker](./docker/README.md) instructions. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't be able to test this until we tag next release.