Skip to content

Commit

Permalink
Merge branch 'main' into crowdin-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandtH22 committed Jun 10, 2024
2 parents 25d1c2a + 3dbfc11 commit ce2ecdd
Show file tree
Hide file tree
Showing 100 changed files with 3,396 additions and 492 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text eol=lf
* text eol=lf
*.png binary
67 changes: 67 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# This file is managed by the repo-content-updater project. Manual changes here will result in a PR to bring back
# inline with the upstream template, unless you remove the dependabot managed file property from the repo

version: 2
updates:
- package-ecosystem: "gomod"
directory: /
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
labels:
- dependencies
- go
- "Changed"
reviewers: ["cmmarslender", "starttoaster"]
groups:
global:
patterns:
- "*"

- package-ecosystem: "pip"
directory: /
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
labels:
- dependencies
- python
- "Changed"
reviewers: ["emlowe", "altendky"]

- package-ecosystem: "github-actions"
directory: /
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
labels:
- dependencies
- github_actions
- "Changed"
reviewers: ["cmmarslender", "Starttoaster", "pmaslana"]

- package-ecosystem: "npm"
directory: /
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
labels:
- dependencies
- javascript
- "Changed"
reviewers: ["cmmarslender", "emlowe"]

- package-ecosystem: cargo
directory: /
schedule:
interval: "weekly"
day: "tuesday"
open-pull-requests-limit: 10
labels:
- dependencies
- rust
- "Changed"
4 changes: 2 additions & 2 deletions .github/workflows/crowdin-pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
role_name: github-chia-docs

- name: Get secrets from vault
uses: hashicorp/vault-action@v2
uses: hashicorp/vault-action@v3
with:
url: ${{ secrets.VAULT_URL }}
token: ${{ env.VAULT_TOKEN }}
Expand All @@ -56,7 +56,7 @@ jobs:
passphrase: ${{ secrets.CHIA_AUTOMATION_PRIVATE_GPG_PASSPHRASE }}

- name: crowdin action
uses: crowdin/github-action@v1.11.0
uses: crowdin/github-action@v2.0.0
with:
upload_sources: false
upload_translations: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/crowdin-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
role_name: github-chia-docs

- name: Get secrets from vault
uses: hashicorp/vault-action@v2
uses: hashicorp/vault-action@v3
with:
url: ${{ secrets.VAULT_URL }}
token: ${{ env.VAULT_TOKEN }}
Expand All @@ -34,7 +34,7 @@ jobs:
secret/data/crowdin project-id-docs | CROWDIN_PROJECT_ID;
- name: crowdin action
uses: crowdin/github-action@v1.11.0
uses: crowdin/github-action@v2.0.0
with:
upload_sources: true
upload_translations: false
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/delete-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ jobs:
fi
delete:
runs-on: [k8s-public]
runs-on: [k8s-public-fmt]
container:
image: registry.gitlab.com/cmmarslender/kubectl-helm:v3
needs:
- check-secret-access
if: needs.check-secret-access.outputs.allowed == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Vault Login
uses: Chia-Network/actions/vault/login@main
Expand All @@ -45,7 +45,7 @@ jobs:
role_name: github-chia-docs

- name: Get secrets from vault
uses: hashicorp/vault-action@v2
uses: hashicorp/vault-action@v3
with:
url: ${{ secrets.VAULT_URL }}
token: ${{ env.VAULT_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'main'
workflow_dispatch:

permissions:
contents: write
Expand All @@ -17,7 +18,7 @@ jobs:
run: |
apk add python3 make g++ git
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'npm install and build'
run: |
npm ci
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/deploy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: |
apk add python3 make g++ git
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: 'npm install and build'
run: |
npm ci
Expand All @@ -46,7 +46,7 @@ jobs:
- name: Check for Prettier issues
run: npm run check:prettier
- name: Upload build to artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build
path: build
Expand All @@ -59,32 +59,32 @@ jobs:
if: needs.check-secret-access.outputs.allowed == 'true'
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download build from artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: build
path: ./build
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
Expand All @@ -97,14 +97,14 @@ jobs:
- package
- check-secret-access
if: needs.check-secret-access.outputs.allowed == 'true'
runs-on: [k8s-public]
runs-on: [k8s-public-fmt]
container:
image: registry.gitlab.com/cmmarslender/kubectl-helm:v3
environment:
name: Review ${{ github.event.pull_request.number }}
url: https://${{ github.event.pull_request.number }}.docs.chia.net
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Vault Login
uses: Chia-Network/actions/vault/login@main
Expand All @@ -113,7 +113,7 @@ jobs:
role_name: github-chia-docs

- name: Get secrets from vault
uses: hashicorp/vault-action@v2
uses: hashicorp/vault-action@v3
with:
url: ${{ secrets.VAULT_URL }}
token: ${{ env.VAULT_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Apache License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand Down Expand Up @@ -186,7 +186,7 @@ Apache License
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Chia Network
Copyright 2024 Chia Network Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
29 changes: 5 additions & 24 deletions docs/architecture/timelords.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You can learn about potential attacks against Chia's network in the [Attacks and

There are two primary types of Timelords: Regular and Blueboxes.

The first is the core Timelord that takes in Proofs of Space and uses a single fastest core to perform repeated squaring in a [class group of unknown order](https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf) as fast as possible. Beside each running VDF (referred to as a vdf_client in the application and source) is a set of proof generation threads that accumulate the proof that the time calculation's number of iterations was done correctly.
The first is the core Timelord and can be either a software Timelord or a hardware Timelord (ASIC) that takes in Proofs of Space and uses a single fastest core to perform repeated squaring in a [class group of unknown order](https://github.com/Chia-Network/vdf-competition/blob/master/classgroups.pdf) as fast as possible. Beside each running VDF (referred to as a vdf_client in the application and source) is a set of proof generation threads that accumulate the proof that the time calculation's number of iterations was done correctly.

The second are Bluebox Timelords. Blueboxes are most any machine - especially things like old servers or gaming machines - that scour the historical chain looking for uncompressed proofs of time. So that the chain moves quickly, the regular Timelords use a faster method of generating proofs of time but the proofs are larger, which takes your Raspberry Pi a lot more time and effort to validate and sync the blockchain. A Bluebox picks up an uncompressed Proof of Time and recreates it, but this time with the slower and more compact proofs generated at the end. Those are then gossiped around to everyone so they can replace the large and slow to verify Proofs of Time with the compact and much quicker to validate version of exactly the same thing.

Expand All @@ -39,36 +39,17 @@ It's good to have a few Timelords out there. There can be things like routing fl

The Company plans to run a few Timelords around the world - and some backups too - to ensure that all Farmers and nodes can hear the beat that the Timelords are calling.

## Installing a Timelord
For installation and usage documentation please refer [here](/timelord-install).

:::info
If you want to run a Timelord on Linux/MacOS, first follow the Install from Source instructions [here](/installation#from-source). Then run:

```bash
. ./activate
sh install-timelord.sh
chia start timelord &
```

:::

Timelords execute sequential verifiable delay functions (proofs of time or VDFs), that get added to blocks to make them valid. This requires fast CPUs and a few cores per VDF.

Due to restrictions on how [MSVC](https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B) handles 128 bit numbers and how Python relies upon MSVC, it is not possible to build and run Timelords of all types on Windows.

### Regular Timelords

On MacOS x86_64 and all Linux distributions, building a Timelord is as easy as running `chia start timelord &` in the virtual environment. You can also run `./vdf_bench square_asm 400000` once you've built Timelord to give you a sense of your optimal and unloaded ips. Each run of `vdf_bench` can be surprisingly variable and, in production, the actual ips you will obtain will usually be about 20% lower due to load of creating proofs. The default configuration for Timelords is good enough to just let you start it up. Set your log level to INFO and then grep for "Estimated IPS:" to get a sense of what actual ips your Timelord is achieving.

### Bluebox Timelords
## Troubleshooting a Timelord

Once you build the Timelord with `sh install-timelord.sh` in the virtual environment, you will need to make two changes to `~/.chia/VERSION/config.yaml`. In the `timelord:` section, set `bluebox_mode:` to `True`. Then you need to proceed to the `full_node:` section and set `send_uncompact_interval:` to something greater than 0. We recommend `300` seconds there so that your Bluebox has some time to prove through a lot of the un-compacted Proofs of Time before the node drops more into its lap. The default settings may otherwise work but if the total effort is a little too much for whatever machine you are on you can also lower the `process_count:` from 3 to 2, or even 1, in the `timelord_launcher:` section. You know it is working if you see `VDF Client: Sent proof` in your logs at INFO level.
For troubleshooting steps please refer to the documentation [here](/troubleshooting/timelords).

## The Future of Timelords

In 2023, CNI received its first batch of ASIC timelords. When run as a cluster of three VDFs, these timelords could hit upwards of one million IPS. This was approximately four times the speed of the fastest non-ASIC timelords. After installing several timelords in strategic locations globally, and after thorough testing on private testnets, the company added the ASICs to a public testnet. Finally, after [years of designing](https://www.businesswire.com/news/home/20211013005324/en/Chia-Partners-With-Supranational-to-Create-Industry-Leading-Proof-of-Space-Time-Security) the ASICs and months of testing them, they were activated on mainnet in October 2023.

The next step is to distribute some of the remaining ASIC timelords to a select list of applicants, as detailed in a [blog post](https://www.chia.net/2023/10/26/asic-timelords-faster-than-fast-chia-network/). This process will ensure a high amount of global redundancy on this critical network infrastructure.
The next step was to distribute some of the remaining ASIC timelords to a select list of applicants, as detailed in a [blog post](https://www.chia.net/2023/10/26/asic-timelords-faster-than-fast-chia-network/). This process ensures a high amount of global redundancy on this critical network infrastructure.

Of course, as technology improves, the ASIC design will need to be updated. However, this process is extremely costly, and the current generation is already pushing upon the limits imposed by the laws of physics. We expect the current crop to remain the fastest timelords in the world for years to come.

Expand Down
Loading

0 comments on commit ce2ecdd

Please sign in to comment.