Various clean ups, spelling thanks @adamfiddler, isort (#1278)

* Various clean ups, spelling thanks @adamfiddler, isort

* Actually thank @adamfiddler

* isort tests

* Update changelog, readme, spec, spelling

* Readme nit

* locales

* locales again
This commit is contained in:
Gene Hoffman 2021-03-13 14:57:41 -08:00 committed by GitHub
parent 7534383a55
commit 4697e39470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 49 additions and 50 deletions

View File

@ -6,7 +6,7 @@ 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.
## 1.0rc7 aka Release Candidate 7 - 2020-03-12
## 1.0rc7 aka Release Candidate 7 - 2020-03-13
### Changed
@ -16,8 +16,13 @@ for setuptools_scm/PEP 440 reasons.
### 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.
## 1.0rc6 aka Release Candidate 6 - 2020-03-11
@ -78,7 +83,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.

View File

@ -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)
@ -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

View File

@ -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]

@ -1 +1 @@
Subproject commit 470880dd35ed2ab808f667d8c29bd0daab7ada4f
Subproject commit 56b1be7b0c9a9ace872b4915a214312e2cd538a2

View File

@ -128,7 +128,7 @@ def create_cmd(
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"])

View File

@ -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

View File

@ -6,10 +6,8 @@ from typing import Any, Callable, Dict, List, Optional, Tuple
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
@ -18,7 +16,8 @@ from src.server.ws_connection import WSChiaConnection
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

View File

@ -33,20 +33,19 @@ from src.server.node_discovery import FullNodePeers
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

View File

@ -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

View File

@ -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__)

View File

@ -8,7 +8,7 @@ from pathlib import Path
from secrets import token_bytes
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from aiohttp import ClientSession, ClientTimeout, WSCloseCode, client_exceptions, web, ServerDisconnectedError
from aiohttp import ClientSession, ClientTimeout, ServerDisconnectedError, WSCloseCode, client_exceptions, web
from aiohttp.web_app import Application
from aiohttp.web_runner import TCPSite
from cryptography import x509
@ -25,7 +25,6 @@ from src.types.blockchain_format.sized_bytes import bytes32
from src.types.peer_info import PeerInfo
from src.util.errors import Err, ProtocolError
from src.util.ints import uint16
from src.util.network import is_localhost
@ -527,7 +526,6 @@ class ChiaServer:
connection.log.error(f"Exception: {e}, closing connection {connection.get_peer_info()}. {tb}")
else:
connection.log.debug(f"Exception: {e} while closing connection")
pass
# TODO: actually throw one of the errors from errors.py and pass this to close
await connection.close(self.api_exception_ban_seconds, WSCloseCode.PROTOCOL_ERROR, Err.UNKNOWN)
finally:

View File

@ -5,7 +5,7 @@ import signal
from sys import platform
from typing import Any, Callable, List, Optional, Tuple
from src.server.ssl_context import private_ssl_ca_paths, chia_ssl_ca_paths
from src.server.ssl_context import chia_ssl_ca_paths, private_ssl_ca_paths
try:
import uvloop

View File

@ -8,7 +8,7 @@ from aiohttp import WSCloseCode, WSMessage, WSMsgType
from src.cmds.init import chia_full_version_str
from src.protocols.protocol_message_types import ProtocolMessageTypes
from src.protocols.shared_protocol import Handshake, Capability
from src.protocols.shared_protocol import Capability, Handshake
from src.server.outbound_message import Message, NodeType, make_msg
from src.server.rate_limits import RateLimiter
from src.types.blockchain_format.sized_bytes import bytes32

View File

@ -1,5 +1,4 @@
import datetime
import pathlib
from pathlib import Path
from typing import Any, Tuple
@ -19,7 +18,7 @@ def get_chia_ca_crt_key() -> Tuple[Any, Any]:
def get_mozzila_ca_crt() -> str:
mozilla_path = pathlib.Path(__file__).parent.parent.parent.absolute() / "mozilla-ca/cacert.pem"
mozilla_path = Path(__file__).parent.parent.parent.absolute() / "mozilla-ca/cacert.pem"
return str(mozilla_path)

View File

@ -27,10 +27,10 @@ from src.types.blockchain_format.slots import (
RewardChainSubSlot,
SubSlotProofs,
)
from src.util.genesis_wait import wait_for_genesis_challenge
from src.types.blockchain_format.sub_epoch_summary import SubEpochSummary
from src.types.blockchain_format.vdf import VDFInfo, VDFProof
from src.types.end_of_slot_bundle import EndOfSubSlotBundle
from src.util.genesis_wait import wait_for_genesis_challenge
from src.util.ints import uint8, uint32, uint64
log = logging.getLogger(__name__)

View File

@ -1,7 +1,8 @@
from src.wallet.chialisp import eval, sexp, args, make_if, quote, make_list, rest, cons, sha256tree
from src.types.blockchain_format.program import SerializedProgram, Program
from clvm_tools import binutils
from src.types.blockchain_format.program import Program, SerializedProgram
from src.wallet.chialisp import args, cons, eval, make_if, make_list, quote, rest, sexp, sha256tree
def get_generator():

View File

@ -35,7 +35,7 @@ from src.types.blockchain_format.sized_bytes import bytes32
from src.types.header_block import HeaderBlock
from src.types.peer_info import PeerInfo
from src.util.byte_types import hexstr_to_bytes
from src.util.errors import ValidationError, Err
from src.util.errors import Err, ValidationError
from src.util.genesis_wait import wait_for_genesis_challenge
from src.util.ints import uint32, uint128
from src.util.keychain import Keychain

View File

@ -14,23 +14,22 @@ from src.consensus.pot_iterations import is_overflow_block
from src.types.blockchain_format.classgroup import ClassgroupElement
from src.types.blockchain_format.sized_bytes import bytes32
from src.types.blockchain_format.slots import InfusedChallengeChainSubSlot
from src.types.blockchain_format.vdf import VDFInfo, VDFProof
from src.types.end_of_slot_bundle import EndOfSubSlotBundle
from src.types.full_block import FullBlock
from src.types.unfinished_block import UnfinishedBlock
from src.types.blockchain_format.vdf import VDFInfo, VDFProof
from src.util.block_tools import get_vdf_info_and_proof, BlockTools
from src.util.block_tools import BlockTools, get_vdf_info_and_proof
from src.util.errors import Err
from src.util.hash import std_hash
from src.util.ints import uint8, uint64
from src.util.recursive_replace import recursive_replace
from tests.core.fixtures import empty_blockchain, create_blockchain # noqa: F401
from tests.core.fixtures import default_1000_blocks # noqa: F401
from src.util.wallet_tools import WalletTool
from tests.core.fixtures import default_400_blocks # noqa: F401
from tests.core.fixtures import default_400_blocks # noqa: F401; noqa: F401
from tests.core.fixtures import default_1000_blocks # noqa: F401
from tests.core.fixtures import default_10000_blocks # noqa: F401
from tests.core.fixtures import default_10000_blocks_compact # noqa: F401
from tests.core.fixtures import empty_blockchain # noqa: F401
from tests.core.fixtures import create_blockchain
from tests.setup_nodes import bt, test_constants
log = logging.getLogger(__name__)

View File

@ -1,9 +1,8 @@
from unittest import TestCase
from src.wallet.puzzles.load_clvm import load_clvm
from src.util.byte_types import hexstr_to_bytes
from src.types.blockchain_format.program import Program
from src.util.byte_types import hexstr_to_bytes
from src.wallet.puzzles.load_clvm import load_clvm
DESERIALIZE_MOD = load_clvm("chialisp_deserialisation.clvm", package_or_requirement="src.wallet.puzzles")

View File

@ -10,10 +10,10 @@ from src.util.hash import std_hash
from src.util.ints import uint16
from src.util.validate_alert import create_alert_file, create_not_ready_alert_file
from tests.core.full_node.test_full_sync import node_height_at_least
from tests.setup_nodes import setup_daemon, self_hostname, setup_full_system
from tests.setup_nodes import self_hostname, setup_daemon, setup_full_system
from tests.simulation.test_simulation import test_constants_modified
from tests.util.alert_server import AlertServer
from tests.time_out_assert import time_out_assert, time_out_assert_custom_interval
from tests.util.alert_server import AlertServer
no_genesis = dataclasses.replace(test_constants_modified, GENESIS_CHALLENGE=None)
b_tools = BlockTools(constants=no_genesis)

View File

@ -1,14 +1,13 @@
import pickle
from os import path
from pathlib import Path
from typing import List
import aiosqlite
import pytest
from typing import List
from pathlib import Path
from src.consensus.constants import ConsensusConstants
from src.consensus.blockchain import Blockchain
from src.consensus.constants import ConsensusConstants
from src.full_node.block_store import BlockStore
from src.full_node.coin_store import CoinStore
from src.types.full_block import FullBlock

View File

@ -18,7 +18,7 @@ from src.util.block_cache import BlockCache
from src.util.block_tools import get_signage_point
from src.util.hash import std_hash
from src.util.ints import uint8, uint32, uint64, uint128
from tests.core.fixtures import empty_blockchain, default_1000_blocks # noqa: F401
from tests.core.fixtures import default_1000_blocks, empty_blockchain # noqa: F401
from tests.setup_nodes import bt, test_constants
log = logging.getLogger(__name__)

View File

@ -1,4 +1,5 @@
import asyncio
import pytest
from src.protocols.protocol_message_types import ProtocolMessageTypes

View File

@ -16,7 +16,7 @@ from src.types.blockchain_format.sized_bytes import bytes32
from src.util.bech32m import decode_puzzle_hash, encode_puzzle_hash
from src.util.block_tools import get_plot_dir
from src.util.hash import std_hash
from src.util.ints import uint8, uint16, uint64, uint32
from src.util.ints import uint8, uint16, uint32, uint64
from src.wallet.derive_keys import master_sk_to_wallet_sk
from tests.setup_nodes import bt, self_hostname, setup_farmer_harvester, test_constants
from tests.time_out_assert import time_out_assert