Rename `src` to `chia`.

This commit is contained in:
Richard Kiss 2021-03-22 12:36:05 -07:00 committed by Gene Hoffman
parent ad7d7e0cce
commit 8a3e00548a
26 changed files with 369 additions and 121 deletions

View File

@ -51,12 +51,12 @@ jobs:
- name: Lint source with flake8
run: |
flake8 src tests
flake8 chia tests
- name: Lint source with mypy
run: |
mypy --exclude config.py tests
mypy src
mypy chia
- name: Build source distribution
run: |

View File

@ -58,7 +58,7 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
fi
electron-packager . chia-blockchain --asar.unpack="**/daemon/**" --platform=linux \
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
--icon=chia/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
--appVersion=$CHIA_INSTALLER_VERSION
LAST_EXIT_CODE=$?
if [ "$LAST_EXIT_CODE" -ne 0 ]; then

View File

@ -23,7 +23,7 @@ mkdir dist
echo "Create executables with pyinstaller"
pip install pyinstaller==4.2
SPEC_FILE=$(python -c 'import src; print(src.PYINSTALLER_SPEC_PATH)')
SPEC_FILE=$(python -c 'import chia; print(chia.PYINSTALLER_SPEC_PATH)')
pyinstaller --log-level=INFO "$SPEC_FILE"
LAST_EXIT_CODE=$?
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
@ -45,7 +45,7 @@ if [ "$LAST_EXIT_CODE" -ne 0 ]; then
fi
electron-packager . Chia --asar.unpack="**/daemon/**" --platform=darwin \
--icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
--icon=chia/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain \
--appVersion=$CHIA_INSTALLER_VERSION
LAST_EXIT_CODE=$?
if [ "$LAST_EXIT_CODE" -ne 0 ]; then

View File

@ -66,7 +66,7 @@ pip install --no-index --find-links=.\win_build\ chia-blockchain
Write-Output " ---"
Write-Output "Use pyinstaller to create chia .exe's"
Write-Output " ---"
$SPEC_FILE = (python -c 'import src; print(src.PYINSTALLER_SPEC_PATH)') -join "`n"
$SPEC_FILE = (python -c 'import chia; print(chia.PYINSTALLER_SPEC_PATH)') -join "`n"
pyinstaller --log-level INFO $SPEC_FILE
Write-Output " ---"
@ -108,7 +108,7 @@ Write-Output "packageName is $packageName"
Write-Output " ---"
Write-Output "electron-packager"
electron-packager . Chia --asar.unpack="**\daemon\**" --overwrite --icon=.\src\assets\img\chia.ico --app-version=$packageVersion
electron-packager . Chia --asar.unpack="**\daemon\**" --overwrite --icon=.\chia\assets\img\chia.ico --app-version=$packageVersion
Write-Output " ---"
Write-Output " ---"

244
build_scripts/daemon.spec Normal file
View File

@ -0,0 +1,244 @@
# -*- mode: python ; coding: utf-8 -*-
#from chia.cmds.chia import SUBCOMMANDS
import pathlib
from pkg_resources import get_distribution
from os import listdir
from os.path import isfile, join
from PyInstaller.utils.hooks import copy_metadata
# Include all files that end with clvm.hex
puzzles_path = "../chia/wallet/puzzles"
puzzle_dist_path = "./chia/wallet/puzzles"
onlyfiles = [f for f in listdir(puzzles_path) if isfile(join(puzzles_path, f))]
hex_puzzles = []
for file in onlyfiles:
if file.endswith("clvm.hex"):
puzzle_path = f"{puzzles_path}/{file}"
hex_puzzles.append((puzzles_path, puzzle_dist_path))
build = pathlib.Path().absolute()
root = build.parent
version_data = copy_metadata(get_distribution("chia-blockchain"))[0]
SUBCOMMANDS = [
"configure",
"farm",
"init",
"keys",
"netspace",
"plots",
"run_daemon",
"show",
"start",
"stop",
"version",
"wallet",
]
block_cipher = None
subcommand_modules = [f"{root}/chia.cmds.%s" % _ for _ in SUBCOMMANDS]
subcommand_modules.extend([f"chia.cmds.%s" % _ for _ in SUBCOMMANDS])
other = ["aiter.active_aiter", "aiter.aiter_forker", "aiter.aiter_to_iter", "aiter.azip", "aiter.flatten_aiter", "aiter.gated_aiter",
"aiter.iter_to_aiter", "aiter.join_aiters", "aiter.map_aiter", "aiter.map_filter_aiter", "aiter.preload_aiter",
"aiter.push_aiter", "aiter.sharable_aiter", "aiter.stoppable_aiter", "pkg_resources.py2_warn"]
entry_points = ["chia.cmds.chia",
"chia.server.start_wallet",
"chia.server.start_full_node",
"chia.server.start_harvester",
"chia.server.start_farmer",
"chia.server.start_introducer",
"chia.server.start_timelord",
"chia.timelord_launcher",
"chia.simulator.start_simulator"]
subcommand_modules.extend(other)
subcommand_modules.extend(entry_points)
daemon = Analysis([f"{root}/chia/daemon/server.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data, (f"../chia/util/initial-config.yaml", f"./chia/util/"), ] +
hex_puzzles,
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
full_node = Analysis([f"{root}/chia/server/start_full_node.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
wallet = Analysis([f"{root}/chia/server/start_wallet.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[(f"../mozilla-ca/cacert.pem", f"./mozilla-ca/"), (f"../chia/ssl/dst_root_ca.pem", f"./chia/ssl/"), (f"../chia/ssl/chia_ca.key", f"./chia/ssl/"), (f"../chia/ssl/chia_ca.crt", f"./chia/ssl/"), (f"../chia/util/english.txt", f"./chia/util/"), version_data ] + hex_puzzles,
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
chia = Analysis([f"{root}/chia/cmds/chia.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
farmer = Analysis([f"{root}/chia/server/start_farmer.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
harvester = Analysis([f"{root}/chia/server/start_harvester.py"],
pathex=[f"{root}/venv/lib/python3.8/site-packages/aiter/", f"{root}"],
binaries = [],
datas=[version_data],
hiddenimports=subcommand_modules,
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
daemon_pyz = PYZ(daemon.pure, daemon.zipped_data,
cipher=block_cipher)
full_node_pyz = PYZ(full_node.pure, full_node.zipped_data,
cipher=block_cipher)
wallet_pyz = PYZ(wallet.pure, wallet.zipped_data,
cipher=block_cipher)
chia_pyz = PYZ(chia.pure, chia.zipped_data,
cipher=block_cipher)
farmer_pyz = PYZ(farmer.pure, farmer.zipped_data,
cipher=block_cipher)
harvester_pyz = PYZ(harvester.pure, harvester.zipped_data,
cipher=block_cipher)
daemon_exe = EXE(daemon_pyz,
daemon.scripts,
[],
exclude_binaries=True,
name='daemon',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
full_node_exe = EXE(full_node_pyz,
full_node.scripts,
[],
exclude_binaries=True,
name='start_full_node',
debug=False,
bootloader_ignore_signals=False,
strip=False)
wallet_exe = EXE(wallet_pyz,
wallet.scripts,
[],
exclude_binaries=True,
name='start_wallet',
debug=False,
bootloader_ignore_signals=False,
strip=False)
chia_exe = EXE(chia_pyz,
chia.scripts,
[],
exclude_binaries=True,
name='chia',
debug=False,
bootloader_ignore_signals=False,
strip=False)
farmer_exe = EXE(farmer_pyz,
farmer.scripts,
[],
exclude_binaries=True,
name='start_farmer',
debug=False,
bootloader_ignore_signals=False,
strip=False)
harvester_exe = EXE(harvester_pyz,
harvester.scripts,
[],
exclude_binaries=True,
name='start_harvester',
debug=False,
bootloader_ignore_signals=False,
strip=False)
coll = COLLECT(daemon_exe,
daemon.binaries,
daemon.zipfiles,
daemon.datas,
full_node_exe,
full_node.binaries,
full_node.zipfiles,
full_node.datas,
wallet_exe,
wallet.binaries,
wallet.zipfiles,
wallet.datas,
chia_exe,
chia.binaries,
chia.zipfiles,
chia.datas,
farmer_exe,
farmer.binaries,
farmer.zipfiles,
farmer.datas,
harvester_exe,
harvester.binaries,
harvester.zipfiles,
harvester.datas,
strip = False,
upx_exclude = [],
name = 'daemon'
)

View File

@ -54,51 +54,51 @@ kwargs = dict(
),
packages=[
"build_scripts",
"src",
"src.cmds",
"src.consensus",
"src.daemon",
"src.full_node",
"src.timelord",
"src.farmer",
"src.harvester",
"src.introducer",
"src.plotting",
"src.protocols",
"src.rpc",
"src.server",
"src.simulator",
"src.types.blockchain_format",
"src.types",
"src.util",
"src.wallet",
"src.wallet.puzzles",
"src.wallet.rl_wallet",
"src.wallet.cc_wallet",
"src.wallet.settings",
"src.wallet.trading",
"src.wallet.util",
"src.ssl",
"chia",
"chia.cmds",
"chia.consensus",
"chia.daemon",
"chia.full_node",
"chia.timelord",
"chia.farmer",
"chia.harvester",
"chia.introducer",
"chia.plotting",
"chia.protocols",
"chia.rpc",
"chia.server",
"chia.simulator",
"chia.types.blockchain_format",
"chia.types",
"chia.util",
"chia.wallet",
"chia.wallet.puzzles",
"chia.wallet.rl_wallet",
"chia.wallet.cc_wallet",
"chia.wallet.settings",
"chia.wallet.trading",
"chia.wallet.util",
"chia.ssl",
"mozilla-ca",
],
entry_points={
"console_scripts": [
"chia = src.cmds.chia:main",
"chia_wallet = src.server.start_wallet:main",
"chia_full_node = src.server.start_full_node:main",
"chia_harvester = src.server.start_harvester:main",
"chia_farmer = src.server.start_farmer:main",
"chia_introducer = src.server.start_introducer:main",
"chia_timelord = src.server.start_timelord:main",
"chia_timelord_launcher = src.timelord.timelord_launcher:main",
"chia_full_node_simulator = src.simulator.start_simulator:main",
"chia = chia.cmds.chia:main",
"chia_wallet = chia.server.start_wallet:main",
"chia_full_node = chia.server.start_full_node:main",
"chia_harvester = chia.server.start_harvester:main",
"chia_farmer = chia.server.start_farmer:main",
"chia_introducer = chia.server.start_introducer:main",
"chia_timelord = chia.server.start_timelord:main",
"chia_timelord_launcher = chia.timelord.timelord_launcher:main",
"chia_full_node_simulator = chia.simulator.start_simulator:main",
]
},
package_data={
"src": ["pyinstaller.spec"],
"src.wallet.puzzles": ["*.clvm", "*.clvm.hex"],
"src.util": ["initial-*.yaml", "english.txt"],
"src.ssl": ["chia_ca.crt", "chia_ca.key", "dst_root_ca.pem"],
"chia": ["pyinstaller.spec"],
"chia.wallet.puzzles": ["*.clvm", "*.clvm.hex"],
"chia.util": ["initial-*.yaml", "english.txt"],
"chia.ssl": ["chia_ca.crt", "chia_ca.key", "dst_root_ca.pem"],
"mozilla-ca": ["cacert.pem"],
},
use_scm_version={"fallback_version": "unknown-no-.git-directory"},

View File

@ -6,4 +6,4 @@ except DistributionNotFound:
# package is not installed
__version__ = "unknown"
PYINSTALLER_SPEC_PATH = resource_filename("src", "pyinstaller.spec")
PYINSTALLER_SPEC_PATH = resource_filename("chia", "pyinstaller.spec")

View File

@ -54,7 +54,7 @@ def version_cmd() -> None:
@cli.command("run_daemon", short_help="Runs chia daemon")
@click.pass_context
def run_daemon_cmd(ctx: click.Context) -> None:
from src.daemon.server import async_run_daemon
from chia.daemon.server import async_run_daemon
import asyncio
asyncio.get_event_loop().run_until_complete(async_run_daemon(ctx.obj["root_path"]))

View File

@ -31,6 +31,6 @@ def init_cmd(ctx: click.Context, create_certs: str):
if __name__ == "__main__":
from .init_funcs import chia_init
from src.util.default_root import DEFAULT_ROOT_PATH
from chia.util.default_root import DEFAULT_ROOT_PATH
chia_init(DEFAULT_ROOT_PATH)

View File

@ -9,7 +9,7 @@ log = logging.getLogger(__name__)
def show_plots(root_path: Path):
from src.plotting.plot_tools import get_plot_directories
from chia.plotting.plot_tools import get_plot_directories
print("Directories where plots are being searched for:")
print("Note that subdirectories must be added manually")
@ -27,7 +27,7 @@ def show_plots(root_path: Path):
@click.pass_context
def plots_cmd(ctx: click.Context):
"""Create, add, remove and check your plots"""
from src.util.chia_logging import initialize_logging
from chia.util.chia_logging import initialize_logging
root_path: Path = ctx.obj["root_path"]
if not root_path.is_dir():
@ -102,7 +102,7 @@ def create_cmd(
nobitfield: bool,
exclude_final_dir: bool,
):
from src.plotting.create_plots import create_plots
from chia.plotting.create_plots import create_plots
class Params(object):
def __init__(self):
@ -151,7 +151,7 @@ def create_cmd(
def check_cmd(
ctx: click.Context, num: int, grep_string: str, list_duplicates: bool, debug_show_memo: bool, challenge_start: int
):
from src.plotting.check_plots import check_plots
from chia.plotting.check_plots import check_plots
check_plots(ctx.obj["root_path"], num, challenge_start, grep_string, list_duplicates, debug_show_memo)
@ -167,7 +167,7 @@ def check_cmd(
)
@click.pass_context
def add_cmd(ctx: click.Context, final_dir: str):
from src.plotting.plot_tools import add_plot_directory
from chia.plotting.plot_tools import add_plot_directory
add_plot_directory(Path(final_dir), ctx.obj["root_path"])
print(f'Added plot directory "{final_dir}".')
@ -184,7 +184,7 @@ def add_cmd(ctx: click.Context, final_dir: str):
)
@click.pass_context
def remove_cmd(ctx: click.Context, final_dir: str):
from src.plotting.plot_tools import remove_plot_directory
from chia.plotting.plot_tools import remove_plot_directory
remove_plot_directory(Path(final_dir), ctx.obj["root_path"])
print(f'Removed plot directory "{final_dir}".')

View File

@ -19,15 +19,15 @@ async def show_async(
from time import localtime, struct_time
from typing import List, Optional
from src.consensus.block_record import BlockRecord
from src.rpc.full_node_rpc_client import FullNodeRpcClient
from src.server.outbound_message import NodeType
from src.types.full_block import FullBlock
from src.util.bech32m import encode_puzzle_hash
from src.util.byte_types import hexstr_to_bytes
from src.util.config import load_config
from src.util.default_root import DEFAULT_ROOT_PATH
from src.util.ints import uint16
from chia.consensus.block_record import BlockRecord
from chia.rpc.full_node_rpc_client import FullNodeRpcClient
from chia.server.outbound_message import NodeType
from chia.types.full_block import FullBlock
from chia.util.bech32m import encode_puzzle_hash
from chia.util.byte_types import hexstr_to_bytes
from chia.util.config import load_config
from chia.util.default_root import DEFAULT_ROOT_PATH
from chia.util.ints import uint16
try:
config = load_config(DEFAULT_ROOT_PATH, "config.yaml")

View File

@ -7,7 +7,7 @@ from src.util.service_groups import all_groups, services_for_groups
async def async_stop(root_path: Path, group: str, stop_daemon: bool) -> int:
from src.daemon.client import connect_to_daemon_and_validate
from chia.daemon.client import connect_to_daemon_and_validate
daemon = await connect_to_daemon_and_validate(root_path)
if daemon is None:

View File

@ -954,7 +954,7 @@ def run_daemon(root_path: Path) -> int:
def main():
from src.util.default_root import DEFAULT_ROOT_PATH
from chia.util.default_root import DEFAULT_ROOT_PATH
return run_daemon(DEFAULT_ROOT_PATH)

View File

@ -26,7 +26,7 @@ def path_for_file(mod_name, filename=None):
"""
mod = importlib.import_module(mod_name)
# some modules, like `src.ssl` don't set mod.__file__ because there isn't actually
# some modules, like `chia.ssl` don't set mod.__file__ because there isn't actually
# any code in there. We have to look at mod.__path__ instead, which is a list.
# for now, we just take the first item, since this function isn't expected to
# return a list of paths, just one path.
@ -45,9 +45,9 @@ def path_for_file(mod_name, filename=None):
# Include all files that end with clvm.hex
puzzles_path = dir_for_module("src.wallet.puzzles")
puzzles_path = dir_for_module("chia.wallet.puzzles")
puzzle_dist_path = "./src/wallet/puzzles"
puzzle_dist_path = "./chia/wallet/puzzles"
onlyfiles = [f for f in listdir(puzzles_path) if isfile(join(puzzles_path, f))]
root = pathlib.Path().absolute()
@ -77,12 +77,12 @@ if THIS_IS_WINDOWS:
# TODO: collapse all these entry points into one `chia_exec` entrypoint that accepts the server as a parameter
entry_points = ["src.cmds.chia"] + [f"src.server.start_{s}" for s in SERVERS]
entry_points = ["chia.cmds.chia"] + [f"chia.server.start_{s}" for s in SERVERS]
if THIS_IS_WINDOWS:
# this probably isn't necessary
entry_points.extend(["aiohttp", "src.util.bip39"])
entry_points.extend(["aiohttp", "chia.util.bip39"])
hiddenimports = []
hiddenimports.extend(other)
@ -93,7 +93,7 @@ binaries = []
if THIS_IS_WINDOWS:
binaries = [
(
dir_for_module("src").parent / "*.dll",
dir_for_module("chia").parent / "*.dll",
".",
),
(
@ -110,10 +110,10 @@ if THIS_IS_WINDOWS:
datas = [
(puzzles_path, puzzle_dist_path),
(path_for_file("mozilla-ca", "cacert.pem"), f"./mozilla-ca/"),
(path_for_file("src.ssl", "dst_root_ca.pem"), f"./src/ssl/"),
(path_for_file("src.ssl", "chia_ca.key"), f"./src/ssl/"),
(path_for_file("src.ssl", "chia_ca.crt"), f"./src/ssl/"),
(path_for_file("src.util", "english.txt"), f"./src/util/"),
(path_for_file("chia.ssl", "dst_root_ca.pem"), f"./chia/ssl/"),
(path_for_file("chia.ssl", "chia_ca.key"), f"./chia/ssl/"),
(path_for_file("chia.ssl", "chia_ca.crt"), f"./chia/ssl/"),
(path_for_file("chia.util", "english.txt"), f"./chia/util/"),
version_data,
]
@ -121,7 +121,7 @@ datas = [
pathex = [root]
chia = Analysis(
[path_for_file("src.cmds.chia")],
[path_for_file("chia.cmds.chia")],
pathex=pathex,
binaries=binaries,
datas=datas,
@ -158,7 +158,7 @@ COLLECT_ARGS = [
for server in SERVERS:
analysis = Analysis(
[path_for_file(f"src.server.start_{server}")],
[path_for_file(f"chia.server.start_{server}")],
pathex=pathex,
binaries=binaries,
datas=datas,

View File

@ -1,6 +1,6 @@
if __name__ == "__main__":
from src.util.block_tools import BlockTools, test_constants
from src.util.default_root import DEFAULT_ROOT_PATH
from chia.util.block_tools import BlockTools, test_constants
from chia.util.default_root import DEFAULT_ROOT_PATH
# TODO: mariano: fix this with new consensus
bt = BlockTools(root_path=DEFAULT_ROOT_PATH)

View File

@ -2,7 +2,7 @@ import enum
from typing import Any
# See src/wallet/puzzles/condition_codes.clvm
# See chia/wallet/puzzles/condition_codes.clvm
class ConditionOpcode(bytes, enum.Enum):
# UNKNOWN is ascii "0"
UNKNOWN = bytes([48])

View File

@ -1,4 +1,4 @@
; See src/types/condition_opcodes.py
; See chia/types/condition_opcodes.py
(
(defconstant AGG_SIG 49)

View File

@ -1,12 +1,12 @@
from clvm.casts import int_from_bytes
from clvm_tools import binutils
from src.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward
from src.types.blockchain_format.program import Program
from src.types.condition_opcodes import ConditionOpcode
from src.util.bech32m import decode_puzzle_hash, encode_puzzle_hash
from src.util.condition_tools import parse_sexp_to_conditions
from src.util.ints import uint32
from chia.consensus.block_rewards import calculate_base_farmer_reward, calculate_pool_reward
from chia.types.blockchain_format.program import Program
from chia.types.condition_opcodes import ConditionOpcode
from chia.util.bech32m import decode_puzzle_hash, encode_puzzle_hash
from chia.util.condition_tools import parse_sexp_to_conditions
from chia.util.ints import uint32
address1 = "txch15gx26ndmacfaqlq8m0yajeggzceu7cvmaz4df0hahkukes695rss6lej7h" # Gene wallet (m/12381/8444/2/42):
address2 = "txch1c2cguswhvmdyz9hr3q6hak2h6p9dw4rz82g4707k2xy2sarv705qcce4pn" # Mariano address (m/12381/8444/2/0)

View File

@ -32,7 +32,7 @@ from src.wallet.util.wallet_types import WalletType
from src.wallet.wallet import Wallet
from src.wallet.wallet_coin_record import WalletCoinRecord
# from src.wallet.cc_wallet.debug_spend_bundle import debug_spend_bundle
# from chia.wallet.cc_wallet.debug_spend_bundle import debug_spend_bundle
class TradeManager:

View File

@ -37,6 +37,6 @@ _run_bg_cmd chia_introducer --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd chia_full_node --port=8444 --database_path="simulation_1.db" --rpc_port=8555 --introducer_peer.host="127.0.0.1" --introducer_peer.port=8445 --logging.log_stdout=True --logging.log_level=INFO --logging.log_level=INFO
sleep 1
_run_bg_cmd chia_full_node --port=8002 --database_path="simulation_2.db" --rpc_port=8556 --introducer_peer.host="127.0.0.1" --introducer_peer.port=8445 --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd python -m src.daemon.server --logging.log_stdout=True --logging.log_level=INFO
_run_bg_cmd python -m chia.daemon.server --logging.log_stdout=True --logging.log_level=INFO
wait

View File

@ -4,7 +4,7 @@ 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")
DESERIALIZE_MOD = load_clvm("chialisp_deserialisation.clvm", package_or_requirement="chia.wallet.puzzles")
def serialized_atom_overflow(size):

View File

@ -7,29 +7,31 @@ from src.types.blockchain_format.program import Program, SerializedProgram
wallet_program_files = set(
[
"src/wallet/puzzles/calculate_synthetic_public_key.clvm",
"src/wallet/puzzles/cc.clvm",
"src/wallet/puzzles/chialisp_deserialisation.clvm",
# "src/wallet/puzzles/generator.clvm", - see src/wallet/puzzles/lowlevel_generator.py
"src/wallet/puzzles/generator_for_single_coin.clvm",
"src/wallet/puzzles/genesis-by-coin-id-with-0.clvm",
"src/wallet/puzzles/genesis-by-puzzle-hash-with-0.clvm",
"src/wallet/puzzles/lock.inner.puzzle.clvm",
"src/wallet/puzzles/p2_conditions.clvm",
"src/wallet/puzzles/p2_delegated_conditions.clvm",
"src/wallet/puzzles/p2_delegated_puzzle.clvm",
"src/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.clvm",
"src/wallet/puzzles/p2_m_of_n_delegate_direct.clvm",
"src/wallet/puzzles/p2_puzzle_hash.clvm",
"src/wallet/puzzles/rl_aggregation.clvm",
"src/wallet/puzzles/rl.clvm",
"src/wallet/puzzles/sha256tree_module.clvm",
"chia/wallet/puzzles/calculate_synthetic_public_key.clvm",
"chia/wallet/puzzles/cc.clvm",
"chia/wallet/puzzles/chialisp_deserialisation.clvm",
# "chia/wallet/puzzles/generator.clvm", - see chia/wallet/puzzles/lowlevel_generator.py
"chia/wallet/puzzles/generator_for_single_coin.clvm",
"chia/wallet/puzzles/genesis-by-coin-id-with-0.clvm",
"chia/wallet/puzzles/genesis-by-puzzle-hash-with-0.clvm",
"chia/wallet/puzzles/lock.inner.puzzle.clvm",
"chia/wallet/puzzles/p2_conditions.clvm",
"chia/wallet/puzzles/p2_delegated_conditions.clvm",
"chia/wallet/puzzles/p2_delegated_puzzle.clvm",
"chia/wallet/puzzles/p2_delegated_puzzle_or_hidden_puzzle.clvm",
"chia/wallet/puzzles/p2_m_of_n_delegate_direct.clvm",
"chia/wallet/puzzles/p2_puzzle_hash.clvm",
"chia/wallet/puzzles/rl_aggregation.clvm",
"chia/wallet/puzzles/rl.clvm",
"chia/wallet/puzzles/sha256tree_module.clvm",
]
)
clvm_include_files = set(["src/wallet/puzzles/create-lock-puzzlehash.clvm", "src/wallet/puzzles/condition_codes.clvm"])
clvm_include_files = set(
["chia/wallet/puzzles/create-lock-puzzlehash.clvm", "chia/wallet/puzzles/condition_codes.clvm"]
)
CLVM_PROGRAM_ROOT = "src/wallet/puzzles"
CLVM_PROGRAM_ROOT = "chia/wallet/puzzles"
def list_files(dir, glob):
@ -55,7 +57,9 @@ class TestClvmCompilation(TestCase):
"""
def test_all_programs_listed(self):
"""Checks to see if a new .clvm file was added to src/wallet/puzzles, but not added to `wallet_program_files`"""
"""
Checks to see if a new .clvm file was added to chia/wallet/puzzles, but not added to `wallet_program_files`
"""
existing_files = list_files(CLVM_PROGRAM_ROOT, "*.clvm")
existing_file_paths = set([Path(x).relative_to(CLVM_PROGRAM_ROOT) for x in existing_files])

View File

@ -2,7 +2,7 @@
#
# import pytest
#
# from src.util.merkle_set import MerkleSet, confirm_included_already_hashed
# from chia.util.merkle_set import MerkleSet, confirm_included_already_hashed
# from tests.setup_nodes import bt
#
#

View File

@ -73,7 +73,7 @@ def main():
if port is None or file_path is None:
print(
"Missing arguments, example usage:\n\n"
"python src/util/alert_server.py -p 4000 -file_path /home/user/alert.txt\n"
"python chia/util/alert_server.py -p 4000 -file_path /home/user/alert.txt\n"
)
quit()

View File

@ -4,12 +4,12 @@
#
# import pytest
#
# from src.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward
# from src.simulator.simulator_protocol import FarmNewBlockProtocol
# from src.types.peer_info import PeerInfo
# from src.util.ints import uint16, uint32, uint64
# from chia.consensus.block_rewards import calculate_pool_reward, calculate_base_farmer_reward
# from chia.simulator.simulator_protocol import FarmNewBlockProtocol
# from chia.types.peer_info import PeerInfo
# from chia.util.ints import uint16, uint32, uint64
# from tests.setup_nodes import setup_simulators_and_wallets
# from src.wallet.cc_wallet.cc_wallet import CCWallet
# from chia.wallet.cc_wallet.cc_wallet import CCWallet
# from tests.time_out_assert import time_out_assert
#
#

View File

@ -4,10 +4,10 @@
# from secrets import token_bytes
# import aiosqlite
# import pytest
# from src.util.ints import uint32, uint64, uint128
# from src.wallet.wallet_coin_record import WalletCoinRecord
# from src.wallet.util.wallet_types import WalletType
# from src.types.coin import Coin
# from chia.util.ints import uint32, uint64, uint128
# from chia.wallet.wallet_coin_record import WalletCoinRecord
# from chia.wallet.util.wallet_types import WalletType
# from chia.types.coin import Coin
#
#
# @pytest.fixture(scope="module")