Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release Candidate 7 #1279

Merged
merged 13 commits into from
Mar 14, 2021
4 changes: 0 additions & 4 deletions .github/workflows/build-macos-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ jobs:
run: |
. ./activate
cd ./chia-blockchain-gui
npm install
npm audit fix
npm run locale:extract
npm run locale:compile
git status
cd ../build_scripts
sh build_macos.sh
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ chia-blockchain.tar.gz.tar.gz
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
#*.spec
build_scripts/*.dmg
build_scripts/build

Expand Down
7 changes: 4 additions & 3 deletions BUILD_TIMELORD.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Building timelords

The Linux and MacOS chiavdf binary wheels currently exclude an executable
required to run a Timelord. If you want to run a Timelord on Linux or MacOS,
you must install the wheel from source (which may require some additional
development packages) while in the virtual environment.
required to run a [Timelord](https://github.com/Chia-Network/chia-blockchain/wiki/Timelords).
If you want to run a Timelord on Linux or MacOS, you must install the wheel
from source (which may require some additional development packages) while in
the virtual environment.

```bash
. ./activate
Expand Down
27 changes: 25 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,30 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project does not yet adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
for setuptools_scm/PEP 440 reasons.

## Unreleased 1.0rc6 aka Release Candidate 6 - 2020-03-11
## 1.0rc7 aka Release Candidate 7 - 2020-03-13

### Changed

- Our green flag test blockchain launch worked but it uncovered a flaw in our installer versions. This release is a bug fix release to address that flaw. You should read the RC6 changes below if this is your first time installing since RC5.
- Thanks to @dkackman for implementing an early exit of the GUI if you run `npm run build` without being in the `venv`.
- `chia netspace` now defaults to 1000 blocks to mirror the GUI.
- The installer build process was spruced up some.

### Fixed

- Setting difficulty way too low on the testnet_6 launch revealed a Timelord edge case. The full node was hardcoding the default difficulty if block height is < EPOCH_BLOCKS. However there were many overlapping blocks, so none of the blocks reached the height, and therefore the timelord infused the wrong difficulty.
- Fixed a race condition in the Timelord, where it took time to update the state, so it ignored the new_peak_timelord form the full_node, which should have reset the timelord to a good state.
- Wallet notoriously showed "not synced" when it was in sync.
- Installers were not correctly placing root TLS certificates into the bundle.
- Weight proofs had a logic typo.
- There was a typo in `chia netspace`. Thanks @altendky.
- There was a typo in `chia plots`. Thanks @adamfiddler.

### Known Issues

- Some users can't plot in the GUI in MacOS Big Sur - especially on M1. See issue [1189](https://github.com/Chia-Network/chia-blockchain/issues/1189)

## 1.0rc6 aka Release Candidate 6 - 2020-03-11

### Added

Expand Down Expand Up @@ -65,7 +88,7 @@ for setuptools_scm/PEP 440 reasons.
- The RC5 release is a new breaking change/hard fork blockchain. Plots and keys from previous chains will work fine on RC5 but balances of TXCH will not come forward.
- We now support a "green flag" chain launch process. A new version of the software will poll download.chia.net/notify/ for a signed json file that will be the genesis block of the chain for that version. This will allow unattended start at mainnet.
- Bluebox Timelords are back. These are Timelords most anyone can run. They search through the historical chain and find large proofs of times and compact them down to their smallest representation. This significantly speeds up syncing for newly started nodes. Currently this is only supported on Linux and MacOS x86_64 but we will expand that. Any desktop or server of any age will be fast enough to be a useful Bluebox Timelord.
- Thanks to @jespino there is now `chia farm show`. You can now get almost exactly the same farming information on the CLI as the GUI.
- Thanks to @jespino there is now `chia farm summary`. You can now get almost exactly the same farming information on the CLI as the GUI.
- We have added Romanian to the GUI translations. Thank you to @bicilis on [Crowdin](https://crowdin.com/project/chia-blockchain). We also added a couple of additional target languages. Klingon anyone?
- `chia wallet` now takes get_address to get a new wallet receive address from the CLI.
- `chia plots check` will list out all the failed plot filenames at the end of the report. Thanks for the PR go to @eFishCent.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

| Current Release/main | Development Branch/dev |
| :---: | :---: |
| ![Build Ubuntu on 3.7 and 3.8](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20Ubuntu%20on%20Python%203.7%20and%203.8/badge.svg) ![Build MacOS](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20MacOS/badge.svg) ![Build Windows](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20Windows/badge.svg) | ![Build Ubuntu on 3.7 and 3.8](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20Ubuntu%20on%20Python%203.7%20and%203.8/badge.svg?branch=dev) ![Build MacOS](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20MacOS/badge.svg?branch=dev) ![Build Windows](https://github.com/Chia-Network/chia-blockchain/workflows/Build%20Windows/badge.svg?branch=dev) |
| [![Ubuntu Core Tests](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-ubuntu-core.yml/badge.svg)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-ubuntu-core.yml) [![MacOS Core Tests](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-macos-core.yml/badge.svg)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-macos-core.yml) [![Windows Installer on Windows 10 and Python 3.7](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-windows-installer.yml/badge.svg)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-windows-installer.yml) | [![Ubuntu Core Tests](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-ubuntu-core.yml/badge.svg?branch=dev)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-ubuntu-core.yml) [![MacOS Core Tests](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-macos-core.yml/badge.svg?branch=dev)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-test-macos-core.yml) [![Windows Installer on Windows 10 and Python 3.7](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-windows-installer.yml/badge.svg?branch=dev)](https://github.com/Chia-Network/chia-blockchain/actions/workflows/build-windows-installer.yml) |

![GitHub contributors](https://img.shields.io/github/contributors/Chia-Network/chia-blockchain?logo=GitHub)

Expand All @@ -22,9 +22,9 @@ TCP port 8444 access to your peer.
These methods tend to be router make/model specific.

Most should only install harvesters, farmers, plotter, full nodes, and wallets.
Building timelords and VDFs is for sophisticated users in most environments.
Building Timelords and VDFs is for sophisticated users in most environments.
Chia Network and additional volunteers are running sufficient Timelords
for testnet consensus.
for consensus.

## Installing
Install instructions are available in the
Expand Down
11 changes: 1 addition & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,14 @@ steps:
versionSpec: '12.x'
displayName: "Setup Node 12.x"

- script: |
. ./activate
git submodule update --init --recursive
cd ./chia-blockchain-gui
npm install
npm audit fix
npm run locale:extract
npm run locale:compile
displayName: "Build Electron/React UI"

- bash: |
. ./activate
APPLE_NOTARIZE_USERNAME="$(APPLE_NOTARIZE_USERNAME)"
export APPLE_NOTARIZE_USERNAME
APPLE_NOTARIZE_PASSWORD="$(APPLE_NOTARIZE_PASSWORD)"
export APPLE_NOTARIZE_PASSWORD
if [ "$(APPLE_NOTARIZE_PASSWORD)" ]; then NOTARIZE="true"; export NOTARIZE; fi
git submodule update --init --recursive
cd build_scripts || exit
sh build_macos.sh
displayName: "Build DMG with build_scripts/build_macos.sh"
Expand Down
1 change: 1 addition & 0 deletions build_scripts/build_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ cd chia-blockchain-gui || exit

echo "npm build"
npm install
npm audit fix
npm run locale:extract
npm run locale:compile
npm run build
Expand Down
1 change: 1 addition & 0 deletions build_scripts/build_windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ Write-Output " ---"
npm install --save-dev electron-winstaller
npm install -g electron-packager
npm install
npm audit fix
npm run locale:extract
npm run locale:compile

Expand Down
21 changes: 11 additions & 10 deletions build_scripts/daemon.spec
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,18 @@ root = build.parent
version_data = copy_metadata(get_distribution("chia-blockchain"))[0]

SUBCOMMANDS = [
"configure",
"farm",
"init",
"plots",
"keys",
"netspace",
"plots",
"run_daemon",
"show",
"start",
"stop",
"version",
"netspace",
"run_daemon",
"wallet",
"configure",
]
block_cipher = None
subcommand_modules = [f"{root}/src.cmds.%s" % _ for _ in SUBCOMMANDS]
Expand All @@ -60,7 +61,7 @@ subcommand_modules.extend(entry_points)


daemon = Analysis([f"{root}/src/daemon/server.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data, (f"../src/util/initial-config.yaml", f"./src/util/"), ] +
hex_puzzles,
Expand All @@ -74,7 +75,7 @@ daemon = Analysis([f"{root}/src/daemon/server.py"],
noarchive=False)

full_node = Analysis([f"{root}/src/server/start_full_node.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
Expand All @@ -87,7 +88,7 @@ full_node = Analysis([f"{root}/src/server/start_full_node.py"],
noarchive=False)

wallet = Analysis([f"{root}/src/server/start_wallet.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[(f"../mozilla-ca/cacert.pem", f"./mozilla-ca/"), (f"../src/ssl/dst_root_ca.pem", f"./src/ssl/"), (f"../src/ssl/chia_ca.key", f"./src/ssl/"), (f"../src/ssl/chia_ca.crt", f"./src/ssl/"), (f"../src/util/english.txt", f"./src/util/"), version_data ] + hex_puzzles,
hiddenimports=subcommand_modules,
Expand All @@ -100,7 +101,7 @@ wallet = Analysis([f"{root}/src/server/start_wallet.py"],
noarchive=False)

chia = Analysis([f"{root}/src/cmds/chia.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
Expand All @@ -113,7 +114,7 @@ chia = Analysis([f"{root}/src/cmds/chia.py"],
noarchive=False)

farmer = Analysis([f"{root}/src/server/start_farmer.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
Expand All @@ -126,7 +127,7 @@ farmer = Analysis([f"{root}/src/server/start_farmer.py"],
noarchive=False)

harvester = Analysis([f"{root}/src/server/start_harvester.py"],
pathex=[f"{root}/venv/lib/python3.7/site-packages/aiter/", f"{root}"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
Expand Down
7 changes: 4 additions & 3 deletions build_scripts/daemon_windows.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@ keyring_datas = copy_metadata('keyring')[0]
version_data = copy_metadata(get_distribution("chia-blockchain"))[0]

SUBCOMMANDS = [
"configure",
"farm",
"init",
"keys",
"netspace",
"plots",
"run_daemon",
"show",
"start",
"stop",
"version",
"netspace",
"run_daemon",
"wallet",
"configure",
]
block_cipher = None
subcommand_modules = [f"../src.cmds.%s" % _ for _ in SUBCOMMANDS]
Expand Down
3 changes: 2 additions & 1 deletion src/cmds/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ def chia_init(root_path: Path):

# Starting with RC2 is the first version that used the bech32m addresses
# range current version and 0=version 1
for version_number in range(chia_minor_release_number() - 1, 2, -1):
# for version_number in range(chia_minor_release_number() - 1, 2, -1):
for version_number in range(5, 2, -1):
old_path = Path(os.path.expanduser("~/.chia/1.0rc%s" % version_number))
print(f"Checking {old_path}")
# This is reached if the user has updated the application, and therefore a new configuration
Expand Down
10 changes: 5 additions & 5 deletions src/cmds/netspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

async def netstorge_async(rpc_port: int, delta_block_height: str, start: str) -> None:
"""
Calculates the estimated space on the network given two block header hases
Calculates the estimated space on the network given two block header hashes.
"""
try:
config = load_config(DEFAULT_ROOT_PATH, "config.yaml")
Expand Down Expand Up @@ -95,12 +95,12 @@ async def netstorge_async(rpc_port: int, delta_block_height: str, start: str) ->
"--delta-block-height",
help=(
"Compare a block X blocks older to estimate total network space. "
"Defaults to 192 blocks (~1 hour) and Peak block as the starting block. "
"Defaults to 1000 blocks (~5.2 hours) and Peak block as the starting block. "
"Use --start BLOCK_HEIGHT to specify starting block. "
"Use 1000 blocks to replicate the GUI estimate."
"Use 192 blocks to estimate over the last hour."
),
type=str,
default="192",
default="1000",
)
@click.option(
"-s",
Expand All @@ -111,6 +111,6 @@ async def netstorge_async(rpc_port: int, delta_block_height: str, start: str) ->
)
def netspace_cmd(rpc_port: int, delta_block_height: str, start: str) -> None:
"""
Calculates the estimated space on the network given two block header hases.
Calculates the estimated space on the network given two block header hashes.
"""
asyncio.run(netstorge_async(rpc_port, delta_block_height, start))
2 changes: 1 addition & 1 deletion src/cmds/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def __init__(self):
print("If you are testing and you want to use smaller size please add the --override-k flag.")
sys.exit(1)
elif size < 25 and override_k:
print("Error: The minimun k size allowed from the cli is k=25.")
print("Error: The minimum k size allowed from the cli is k=25.")
sys.exit(1)

create_plots(Params(), ctx.obj["root_path"])
Expand Down
2 changes: 1 addition & 1 deletion src/consensus/difficulty_adjustment.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def _get_next_difficulty(
"""
next_height: uint32 = uint32(height + 1)

if next_height < constants.EPOCH_BLOCKS:
if next_height < (constants.EPOCH_BLOCKS - 3 * constants.MAX_SUB_SLOT_BLOCKS):
# We are in the first epoch
return uint64(constants.DIFFICULTY_STARTING)

Expand Down
4 changes: 2 additions & 2 deletions src/consensus/pot_iterations.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from src.consensus.constants import ConsensusConstants
from src.consensus.pos_quality import _expected_plot_size
from src.types.blockchain_format.sized_bytes import bytes32
from src.util.hash import std_hash
from src.consensus.pos_quality import _expected_plot_size
from src.consensus.constants import ConsensusConstants
from src.util.ints import uint8, uint64, uint128


Expand Down
7 changes: 3 additions & 4 deletions src/farmer/farmer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

from blspy import G1Element

from src.consensus.coinbase import create_puzzlehash_for_pk
from src.util.config import load_config, save_config

import src.server.ws_connection as ws # lgtm [py/import-and-import-from]
from src.consensus.coinbase import create_puzzlehash_for_pk
from src.consensus.constants import ConsensusConstants
from src.protocols import farmer_protocol, harvester_protocol
from src.protocols.protocol_message_types import ProtocolMessageTypes
Expand All @@ -18,7 +16,8 @@
from src.types.blockchain_format.proof_of_space import ProofOfSpace
from src.types.blockchain_format.sized_bytes import bytes32
from src.util.bech32m import decode_puzzle_hash
from src.util.ints import uint64, uint32
from src.util.config import load_config, save_config
from src.util.ints import uint32, uint64
from src.util.keychain import Keychain
from src.wallet.derive_keys import master_sk_to_farmer_sk, master_sk_to_pool_sk, master_sk_to_wallet_sk

Expand Down
5 changes: 2 additions & 3 deletions src/full_node/full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,19 @@
from src.server.outbound_message import Message, NodeType, make_msg
from src.server.server import ChiaServer
from src.types.blockchain_format.classgroup import ClassgroupElement
from src.types.end_of_slot_bundle import EndOfSubSlotBundle
from src.types.blockchain_format.pool_target import PoolTarget
from src.types.blockchain_format.sized_bytes import bytes32
from src.types.blockchain_format.sub_epoch_summary import SubEpochSummary
from src.types.blockchain_format.vdf import CompressibleVDFField, VDFInfo, VDFProof
from src.types.end_of_slot_bundle import EndOfSubSlotBundle
from src.types.full_block import FullBlock
from src.types.header_block import HeaderBlock
from src.types.mempool_inclusion_status import MempoolInclusionStatus
from src.types.spend_bundle import SpendBundle
from src.types.unfinished_block import UnfinishedBlock
from src.util.errors import ConsensusError, Err
from src.util.ints import uint8, uint32, uint64, uint128
from src.util.genesis_wait import wait_for_genesis_challenge

from src.util.ints import uint8, uint32, uint64, uint128
from src.util.path import mkdir, path_from_root


Expand Down
2 changes: 1 addition & 1 deletion src/full_node/weight_proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ def _validate_segment(
if not _validate_challenge_block_vdfs(constants, idx, segment.sub_slots, curr_ssi):
log.error(f"failed to validate challenge slot {idx} vdfs")
return False, uint64(0), uint64(0), uint64(0)
if sampled and after_challenge:
elif sampled and after_challenge:
if not _validate_sub_slot_data(constants, idx, segment.sub_slots, curr_ssi):
log.error(f"failed to validate sub slot data {idx} vdfs")
return False, uint64(0), uint64(0), uint64(0)
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/shared_protocol.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dataclasses import dataclass
from typing import Tuple, List

from enum import IntEnum
from typing import List, Tuple

from src.util.ints import uint8, uint16
from src.util.streamable import Streamable, streamable

Expand Down
3 changes: 1 addition & 2 deletions src/server/rate_limits.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import dataclasses
import logging
import time
from collections import Counter
from typing import Optional

from src.protocols.protocol_message_types import ProtocolMessageTypes
from collections import Counter

from src.server.outbound_message import Message

log = logging.getLogger(__name__)
Expand Down
Loading