repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/connection_utils.py
flax/server/connection_utils.py
from __future__ import annotations import asyncio import random from typing import Any, List, Optional, Tuple from flax.server.ws_connection import WSFlaxConnection async def send_all_first_reply( func: str, arg: Any, peers: List[WSFlaxConnection], timeout=15 ) -> Optional[Tuple[Any, WSFlaxConnection]]: """...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/node_discovery.py
flax/server/node_discovery.py
import asyncio import math import time import traceback from random import Random from secrets import randbits from typing import Dict, Optional, List, Set import flax.server.ws_connection as ws import dns.asyncresolver from flax.protocols import full_node_protocol, introducer_protocol from flax.protocols.protocol_me...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/rate_limit_numbers.py
flax/server/rate_limit_numbers.py
# All of these rate limits scale with the number of transactions so the aggregate amounts are higher from __future__ import annotations import copy import dataclasses import functools from typing import Any, Dict, List, Optional from flax.protocols.protocol_message_types import ProtocolMessageTypes from flax.protocol...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/address_manager_sqlite_store.py
flax/server/address_manager_sqlite_store.py
import aiosqlite from flax.server.address_manager import AddressManager, ExtendedPeerInfo, NEW_BUCKETS_PER_ADDRESS from pathlib import Path from typing import Dict, List, Optional, Tuple Node = Tuple[int, ExtendedPeerInfo] Table = Tuple[int, int] async def create_address_manager_from_db(db_path: Path) -> Optional[A...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/start_full_node.py
flax/server/start_full_node.py
from __future__ import annotations import logging import os import pathlib import sys from multiprocessing import freeze_support from typing import Dict, List, Optional, Tuple from flax.consensus.constants import ConsensusConstants from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.full_node.ful...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/start_timelord.py
flax/server/start_timelord.py
from __future__ import annotations import logging import pathlib import sys from typing import Dict, Optional from flax.consensus.constants import ConsensusConstants from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.rpc.timelord_rpc_api import TimelordRpcApi from flax.server.outbound_message im...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/introducer_peers.py
flax/server/introducer_peers.py
import random import time from typing import Set, List, Optional from dataclasses import dataclass from flax.types.peer_info import PeerInfo from flax.util.ints import uint64, uint16 @dataclass(frozen=False) class VettedPeer: host: str port: uint16 # 0 means we have not attempted to vet this peer yet ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/address_manager.py
flax/server/address_manager.py
from __future__ import annotations import logging import math import time from asyncio import Lock from random import choice, randrange from secrets import randbits from typing import Dict, List, Optional, Set, Tuple from flax.types.peer_info import PeerInfo, TimestampedPeerInfo from flax.util.hash import std_hash fr...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/start_farmer.py
flax/server/start_farmer.py
from __future__ import annotations import pathlib import sys from typing import Dict, Optional from flax.consensus.constants import ConsensusConstants from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.farmer.farmer import Farmer from flax.farmer.farmer_api import FarmerAPI from flax.rpc.farmer_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/peer_store_resolver.py
flax/server/peer_store_resolver.py
import os from pathlib import Path from typing import Dict, Optional class PeerStoreResolver: """ Determines the peers data file path using values from the config """ def __init__( self, root_path: Path, config: Dict, *, selected_network: str, peers_fi...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/ws_connection.py
flax/server/ws_connection.py
from __future__ import annotations import asyncio import contextlib import logging import time import traceback from typing import Any, Callable, Dict, List, Optional, Tuple from aiohttp import WSCloseCode, WSMessage, WSMsgType from flax.cmds.init_funcs import flax_full_version_str from flax.protocols.protocol_messa...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/__init__.py
flax/server/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/ssl_context.py
flax/server/ssl_context.py
from __future__ import annotations from pathlib import Path from typing import Dict def public_ssl_paths(path: Path, config: Dict): return ( path / config["ssl"]["public_crt"], path / config["ssl"]["public_key"], ) def private_ssl_paths(path: Path, config: Dict): return ( path /...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/server.py
flax/server/server.py
from __future__ import annotations import asyncio import logging import ssl import time import traceback from collections import Counter from ipaddress import IPv4Network, IPv6Address, IPv6Network, ip_address, ip_network from pathlib import Path from secrets import token_bytes from typing import Any, Callable from typ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/upnp.py
flax/server/upnp.py
from __future__ import annotations import logging import threading from dataclasses import dataclass, field from queue import Queue from typing import Optional, Tuple, Union from typing_extensions import Literal log = logging.getLogger(__name__) try: import miniupnpc except ImportError: log.info( "i...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/start_harvester.py
flax/server/start_harvester.py
from __future__ import annotations import pathlib import sys from typing import Dict, Optional from flax.consensus.constants import ConsensusConstants from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.harvester.harvester import Harvester from flax.harvester.harvester_api import HarvesterAPI fro...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/server/start_wallet.py
flax/server/start_wallet.py
import pathlib import os from multiprocessing import freeze_support import sys from typing import Dict, Optional from flax.consensus.constants import ConsensusConstants from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.rpc.wallet_rpc_api import WalletRpcApi from flax.server.outbound_message impo...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/block_height_map.py
flax/full_node/block_height_map.py
import logging from typing import Dict, List, Optional, Tuple from flax.util.ints import uint32 from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.blockchain_format.sub_epoch_summary import SubEpochSummary from pathlib import Path import aiofiles from dataclasses import dataclass from flax.uti...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/bitcoin_fee_estimator.py
flax/full_node/bitcoin_fee_estimator.py
from __future__ import annotations import logging from datetime import datetime from flax.full_node.fee_estimate_store import FeeStore from flax.full_node.fee_estimation import FeeBlockInfo, FeeMempoolInfo from flax.full_node.fee_estimator import SmartFeeEstimator from flax.full_node.fee_estimator_interface import Fe...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/bundle_tools.py
flax/full_node/bundle_tools.py
import re from typing import Optional, Tuple, List, Union from flax.full_node.generator import create_compressed_generator from flax.types.blockchain_format.program import SerializedProgram, Program from flax.types.coin_spend import CoinSpend from flax.types.generator_types import BlockGenerator, CompressorArg from fl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_history.py
flax/full_node/fee_history.py
from __future__ import annotations from dataclasses import dataclass from typing import List from flax.util.ints import uint8, uint32 from flax.util.streamable import Streamable, streamable @streamable @dataclass(frozen=True) class FeeStatBackup(Streamable): type: str tx_ct_avg: List[str] confirmed_aver...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimate_store.py
flax/full_node/fee_estimate_store.py
from __future__ import annotations import dataclasses from typing import Optional import typing_extensions from flax.full_node.fee_history import FeeTrackerBackup @typing_extensions.final @dataclasses.dataclass class FeeStore: """ This object stores Fee Stats """ _backup: Optional[FeeTrackerBackup...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimate.py
flax/full_node/fee_estimate.py
from __future__ import annotations from dataclasses import dataclass from typing import List, Optional from flax.types.fee_rate import FeeRate from flax.util.ints import uint64 from flax.util.streamable import Streamable, streamable @streamable @dataclass(frozen=True) class FeeEstimate(Streamable): """ erro...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimator.py
flax/full_node/fee_estimator.py
from __future__ import annotations import logging from dataclasses import dataclass, field from flax.full_node.fee_estimate import FeeEstimate, FeeEstimateGroup from flax.full_node.fee_estimation import FeeMempoolInfo from flax.full_node.fee_tracker import BucketResult, EstimateResult, FeeTracker, get_estimate_time_i...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimator_interface.py
flax/full_node/fee_estimator_interface.py
from __future__ import annotations from typing_extensions import Protocol from flax.full_node.fee_estimation import FeeBlockInfo, FeeMempoolInfo from flax.types.clvm_cost import CLVMCost from flax.types.fee_rate import FeeRate from flax.types.mempool_item import MempoolItem class FeeEstimatorInterface(Protocol): ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/hint_management.py
flax/full_node/hint_management.py
from __future__ import annotations from typing import Dict, List, Optional, Set, Tuple from flax.consensus.blockchain import StateChangeSummary from flax.types.blockchain_format.coin import Coin from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.ints import uint64 def get_hints_and_subscrip...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/generator.py
flax/full_node/generator.py
import logging from typing import List, Optional, Union, Tuple from flax.types.blockchain_format.program import Program, SerializedProgram from flax.types.generator_types import BlockGenerator, GeneratorBlockCacheInterface, CompressorArg from flax.util.ints import uint32 from flax.wallet.puzzles.load_clvm import load_c...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/weight_proof.py
flax/full_node/weight_proof.py
import asyncio import dataclasses import logging import math from multiprocessing.context import BaseContext import pathlib import random from concurrent.futures.process import ProcessPoolExecutor import tempfile from typing import Dict, IO, List, Optional, Tuple, Awaitable from flax.consensus.block_header_validation ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/pending_tx_cache.py
flax/full_node/pending_tx_cache.py
from __future__ import annotations from typing import Dict from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.mempool_item import MempoolItem class PendingTxCache: _cache_max_total_cost: int _cache_cost: int _txs: Dict[bytes32, MempoolItem] def __init__(self, cost_limit: i...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/coin_store.py
flax/full_node/coin_store.py
from __future__ import annotations import dataclasses import sqlite3 from typing import List, Optional, Set, Dict, Any, Tuple, Union import typing_extensions from aiosqlite import Cursor from flax.protocols.wallet_protocol import CoinState from flax.types.blockchain_format.coin import Coin from flax.types.blockchain...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/hint_store.py
flax/full_node/hint_store.py
from __future__ import annotations import dataclasses from typing import List, Tuple import typing_extensions from flax.types.blockchain_format.sized_bytes import bytes32 from flax.util.db_wrapper import DBWrapper2 import logging log = logging.getLogger(__name__) @typing_extensions.final @dataclasses.dataclass cl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/block_store.py
flax/full_node/block_store.py
from __future__ import annotations import dataclasses import logging import sqlite3 from typing import Dict, List, Optional, Tuple, Any, Union, Sequence import typing_extensions import zstd from flax.consensus.block_record import BlockRecord from flax.types.blockchain_format.program import SerializedProgram from fla...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_tracker.py
flax/full_node/fee_tracker.py
from __future__ import annotations import logging from dataclasses import dataclass from typing import List, Optional, Tuple from sortedcontainers import SortedDict from flax.full_node.fee_estimate_store import FeeStore from flax.full_node.fee_estimator_constants import ( FEE_ESTIMATOR_VERSION, INFINITE_FEE_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/mempool.py
flax/full_node/mempool.py
from __future__ import annotations import logging from datetime import datetime from typing import Dict, List, Optional from sortedcontainers import SortedDict from flax.full_node.bitcoin_fee_estimator import create_bitcoin_fee_estimator from flax.full_node.fee_estimation import FeeMempoolInfo from flax.full_node.fe...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/__init__.py
flax/full_node/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimator_example.py
flax/full_node/fee_estimator_example.py
from __future__ import annotations from typing import Any, Dict, List from flax.full_node.fee_estimate import FeeEstimate from flax.full_node.fee_estimation import FeeBlockInfo, FeeMempoolInfo from flax.full_node.fee_estimator_interface import FeeEstimatorInterface from flax.types.clvm_cost import CLVMCost from flax....
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/lock_queue.py
flax/full_node/lock_queue.py
from __future__ import annotations import asyncio import dataclasses import logging import traceback from types import TracebackType from typing import Awaitable, Callable log = logging.getLogger(__name__) @dataclasses.dataclass(frozen=True, order=True) class PrioritizedCallable: priority: int af: Callable[[...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/sync_store.py
flax/full_node/sync_store.py
from __future__ import annotations import asyncio import logging from collections import OrderedDict as orderedDict from dataclasses import dataclass, field from typing import Dict, List, Optional, OrderedDict, Set, Tuple import typing_extensions from flax.types.blockchain_format.sized_bytes import bytes32 from flax...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/mempool_manager.py
flax/full_node/mempool_manager.py
import asyncio import collections import logging from concurrent.futures import Executor from multiprocessing.context import BaseContext import time from concurrent.futures.process import ProcessPoolExecutor from flax.full_node.fee_estimation import FeeMempoolInfo, FeeBlockInfo from flax.types.clvm_cost import CLVMCos...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimation.py
flax/full_node/fee_estimation.py
from __future__ import annotations from dataclasses import dataclass from datetime import datetime from typing import List from flax.types.clvm_cost import CLVMCost from flax.types.fee_rate import FeeRate from flax.types.mempool_item import MempoolItem from flax.util.ints import uint32 @dataclass(frozen=True) class...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/mempool_check_conditions.py
flax/full_node/mempool_check_conditions.py
import logging from typing import Dict, Optional, Tuple from chia_rs import MEMPOOL_MODE, NO_NEG_DIV, get_puzzle_and_solution_for_coin as get_puzzle_and_solution_for_coin_rust from flax.types.blockchain_format.coin import Coin from flax.consensus.cost_calculator import NPCResult from flax.types.spend_bundle_conditions...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/fee_estimator_constants.py
flax/full_node/fee_estimator_constants.py
# https://github.com/bitcoin/bitcoin/blob/5b6f0f31fa6ce85db3fb7f9823b1bbb06161ae32/src/policy/fees.h from __future__ import annotations MIN_FEE_RATE = 0 # Value of first bucket INITIAL_STEP = 100 # First bucket after zero value MAX_FEE_RATE = 40000000 # Mojo per 1000 cost unit INFINITE_FEE_RATE = 1000000000 STEP_S...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/full_node.py
flax/full_node/full_node.py
from __future__ import annotations import asyncio import contextlib import dataclasses import logging import multiprocessing from multiprocessing.context import BaseContext import random import time import traceback from pathlib import Path from typing import Any, Awaitable, Callable, Dict, List, Optional, Set, Tuple,...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/full_node_api.py
flax/full_node/full_node_api.py
import asyncio import dataclasses import logging import time import traceback import functools from datetime import datetime, timezone from secrets import token_bytes from typing import Dict, List, Optional, Tuple, Set from blspy import AugSchemeMPL, G2Element, G1Element from chiabip158 import PyBIP158 import flax.se...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/full_node_store.py
flax/full_node/full_node_store.py
from __future__ import annotations import asyncio import dataclasses import logging import time from typing import Dict, List, Optional, Set, Tuple from flax.consensus.block_record import BlockRecord from flax.consensus.blockchain_interface import BlockchainInterface from flax.consensus.constants import ConsensusCons...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/full_node/signage_point.py
flax/full_node/signage_point.py
from __future__ import annotations from dataclasses import dataclass from typing import Optional from flax.types.blockchain_format.vdf import VDFInfo, VDFProof from flax.util.streamable import Streamable, streamable @streamable @dataclass(frozen=True) class SignagePoint(Streamable): cc_vdf: Optional[VDFInfo] ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/client.py
flax/daemon/client.py
from __future__ import annotations import asyncio import json import ssl from contextlib import asynccontextmanager from pathlib import Path from typing import Any, AsyncIterator, Dict, Optional import aiohttp from flax.util.json_util import dict_to_json_str from flax.util.ws_message import WsRpcMessage, create_payl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/keychain_proxy.py
flax/daemon/keychain_proxy.py
import asyncio import logging import ssl import traceback from aiohttp import ClientSession, ClientConnectorError from blspy import AugSchemeMPL, PrivateKey from flax.cmds.init_funcs import check_keys from flax.daemon.client import DaemonProxy from flax.daemon.keychain_server import ( KEYCHAIN_ERR_KEYERROR, KE...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/keychain_server.py
flax/daemon/keychain_server.py
import logging from blspy import PrivateKey from flax.cmds.init_funcs import check_keys from flax.util.errors import KeychainException, KeychainFingerprintNotFound from flax.util.ints import uint32 from flax.util.keychain import KeyData, Keychain from flax.util.streamable import streamable, Streamable from pathlib imp...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/windows_signal.py
flax/daemon/windows_signal.py
""" Code taken from Stack Overflow Eryk Sun. https://stackoverflow.com/questions/35772001/how-to-handle-the-signal-in-python-on-windows-machine """ from __future__ import annotations import os import signal import sys from types import FrameType from typing import Any, Callable, Optional, Union # https://github.com/...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/__init__.py
flax/daemon/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/daemon/server.py
flax/daemon/server.py
import asyncio import functools import json import logging import os import signal import ssl import subprocess import sys import time import traceback import uuid from concurrent.futures import ThreadPoolExecutor from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, TextIO, Tuple...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/start_funcs.py
flax/cmds/start_funcs.py
import asyncio from concurrent.futures import ThreadPoolExecutor import os import subprocess import sys from pathlib import Path from typing import Any, Dict, Optional from flax.cmds.keys_funcs import migrate_keys from flax.cmds.passphrase_funcs import get_current_passphrase from flax.daemon.client import DaemonProxy...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/show.py
flax/cmds/show.py
from typing import Optional import click from flax.cmds.show_funcs import show_async @click.command("show", short_help="Show node information", no_args_is_help=True) @click.option( "-p", "--rpc-port", help=( "Set the port where the Full Node is hosting the RPC interface. " "See the rpc_p...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/netspace_funcs.py
flax/cmds/netspace_funcs.py
from __future__ import annotations from typing import Optional from flax.cmds.cmds_util import get_any_service_client from flax.rpc.full_node_rpc_client import FullNodeRpcClient from flax.util.byte_types import hexstr_to_bytes from flax.util.misc import format_bytes async def netstorge_async(rpc_port: Optional[int]...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/beta_funcs.py
flax/cmds/beta_funcs.py
from __future__ import annotations import os import sys from pathlib import Path from typing import Any, Callable, Dict, List, Optional from flax.util.beta_metrics import metrics_log_interval_max, metrics_log_interval_min from flax.util.flax_logging import get_beta_logging_config from flax.util.errors import InvalidP...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/db_backup_func.py
flax/cmds/db_backup_func.py
from __future__ import annotations from pathlib import Path from typing import Any, Dict, Optional from flax.util.config import load_config from flax.util.path import path_from_root def db_backup_func( root_path: Path, backup_db_file: Optional[Path] = None, *, no_indexes: bool, ) -> None: config...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/wallet_funcs.py
flax/cmds/wallet_funcs.py
import asyncio import os import pathlib import sys import time from datetime import datetime from decimal import Decimal from typing import Any, Awaitable, Callable, Dict, List, Optional, Tuple, Union from flax.cmds.cmds_util import transaction_status_msg, transaction_submitted_msg from flax.cmds.peer_funcs import pri...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/plots.py
flax/cmds/plots.py
from __future__ import annotations import asyncio import logging import sys from pathlib import Path import click from flax.plotting.util import add_plot_directory, validate_plot_size DEFAULT_STRIPE_SIZE = 65536 log = logging.getLogger(__name__) def show_plots(root_path: Path): from flax.plotting.util import ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/peer.py
flax/cmds/peer.py
from __future__ import annotations from typing import Optional import click from flax.cmds.cmds_util import NODE_TYPES from flax.cmds.peer_funcs import peer_async @click.command("peer", short_help="Show, or modify peering connections", no_args_is_help=True) @click.option( "-p", "--rpc-port", help=( ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/db_validate_func.py
flax/cmds/db_validate_func.py
from __future__ import annotations from pathlib import Path from typing import Any, Dict, Optional from flax.consensus.block_record import BlockRecord from flax.consensus.default_constants import DEFAULT_CONSTANTS from flax.types.blockchain_format.sized_bytes import bytes32 from flax.types.full_block import FullBlock...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/wallet.py
flax/cmds/wallet.py
import sys from typing import Any, Dict, List, Optional, Tuple import click from flax.cmds.plotnft import validate_fee from flax.wallet.transaction_sorting import SortKey from flax.wallet.util.address_type import AddressType from flax.wallet.util.wallet_types import WalletType from flax.cmds.cmds_util import execute_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
true
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/cmds_util.py
flax/cmds/cmds_util.py
from __future__ import annotations from contextlib import asynccontextmanager from pathlib import Path from typing import Any, AsyncIterator, Awaitable, Callable, Dict, Optional, Tuple, Type from aiohttp import ClientConnectorError from flax.rpc.farmer_rpc_client import FarmerRpcClient from flax.rpc.full_node_rpc_cl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/db.py
flax/cmds/db.py
from pathlib import Path import click from flax.cmds.db_upgrade_func import db_upgrade_func from flax.cmds.db_validate_func import db_validate_func from flax.cmds.db_backup_func import db_backup_func @click.group("db", short_help="Manage the blockchain database") def db_cmd() -> None: pass @db_cmd.command("upgr...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/rpc.py
flax/cmds/rpc.py
from __future__ import annotations import asyncio import json import sys from typing import Any, Dict, List, Optional, TextIO import click from aiohttp import ClientResponseError from flax.util.config import load_config from flax.util.default_root import DEFAULT_ROOT_PATH from flax.util.ints import uint16 services:...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/units.py
flax/cmds/units.py
from __future__ import annotations from typing import Dict # The rest of the codebase uses mojos everywhere. # Only use these units for user facing interfaces. units: Dict[str, int] = { "flax": 10**12, # 1 flax (XFX) is 1,000,000,000,000 mojo (1 trillion) "mojo": 1, "cat": 10**3, # 1 CAT is 1000 CAT moj...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/show_funcs.py
flax/cmds/show_funcs.py
from __future__ import annotations from pathlib import Path from typing import Any, Dict, List, Optional, Union from flax.rpc.full_node_rpc_client import FullNodeRpcClient async def print_blockchain_state(node_client: FullNodeRpcClient, config: Dict[str, Any]) -> bool: import time from flax.consensus.block...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/flax.py
flax/cmds/flax.py
from io import TextIOWrapper import click from flax import __version__ from flax.cmds.beta import beta_cmd from flax.cmds.configure import configure_cmd from flax.cmds.farm import farm_cmd from flax.cmds.data import data_cmd from flax.cmds.init import init_cmd from flax.cmds.keys import keys_cmd from flax.cmds.netspac...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/netspace.py
flax/cmds/netspace.py
from typing import Optional import click @click.command("netspace", short_help="Estimate total farmed space on the network") @click.option( "-p", "--rpc-port", help=( "Set the port where the Full Node is hosting the RPC interface. " "See the rpc_port under full_node in config.yaml. " ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/farm.py
flax/cmds/farm.py
from typing import Optional import click @click.group("farm", short_help="Manage your farm") def farm_cmd() -> None: pass @farm_cmd.command("summary", short_help="Summary of farming information") @click.option( "-p", "--rpc-port", help=( "Set the port where the Full Node is hosting the RPC ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/stop.py
flax/cmds/stop.py
from __future__ import annotations import asyncio import sys from pathlib import Path from typing import Any, Dict import click from flax.util.config import load_config from flax.util.service_groups import all_groups, services_for_groups async def async_stop(root_path: Path, config: Dict[str, Any], group: str, sto...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/passphrase_funcs.py
flax/cmds/passphrase_funcs.py
import click import colorama import os import sys import time from flax.daemon.client import acquire_connection_to_daemon from flax.util.config import load_config from flax.util.errors import KeychainMaxUnlockAttempts from flax.util.keychain import Keychain, supports_os_passphrase_storage from flax.util.keyring_wrappe...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/keys.py
flax/cmds/keys.py
import asyncio import click import sys from typing import Optional, Tuple @click.group("keys", short_help="Manage your keys") @click.pass_context def keys_cmd(ctx: click.Context): """Create, delete, view and use your key pairs""" from pathlib import Path from .keys_funcs import migrate_keys root_pa...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/start.py
flax/cmds/start.py
import click from flax.util.config import load_config from flax.util.service_groups import all_groups @click.command("start", short_help="Start service groups") @click.option("-r", "--restart", is_flag=True, type=bool, help="Restart running services") @click.argument("group", type=click.Choice(list(all_groups())), n...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/configure.py
flax/cmds/configure.py
from __future__ import annotations from pathlib import Path from typing import Optional import click from flax.util.config import load_defaults_for_missing_services, lock_and_load_config, save_config, str2bool def configure( root_path: Path, set_farmer_peer: str, set_node_introducer: str, set_fulln...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/beta.py
flax/cmds/beta.py
from __future__ import annotations import zipfile from datetime import datetime from pathlib import Path from typing import List, Optional import click from flax.cmds.beta_funcs import ( default_beta_root_path, prepare_flax_blockchain_log, prepare_logs, prepare_plotting_log, prompt_beta_warning, ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/data_funcs.py
flax/cmds/data_funcs.py
from __future__ import annotations from contextlib import asynccontextmanager from decimal import Decimal from pathlib import Path from typing import AsyncIterator, Dict, List, Optional, Tuple, cast import aiohttp from flax.cmds.units import units from flax.rpc.data_layer_rpc_client import DataLayerRpcClient from fl...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/passphrase.py
flax/cmds/passphrase.py
import asyncio import click import sys from io import TextIOWrapper from typing import Optional from flax.util.config import load_config @click.group("passphrase", short_help="Manage your keyring passphrase") @click.pass_context def passphrase_cmd(ctx: click.Context): from .keys_funcs import migrate_keys if...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/plotters.py
flax/cmds/plotters.py
import click from flax.plotters.plotters import call_plotters @click.command( "plotters", short_help="Advanced plotting options", context_settings={"ignore_unknown_options": True}, add_help_option=False, ) @click.pass_context @click.argument("args", nargs=-1) def plotters_cmd(ctx: click.Context, args)...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/__init__.py
flax/cmds/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/peer_funcs.py
flax/cmds/peer_funcs.py
from __future__ import annotations from pathlib import Path from typing import Any, Dict, Optional from flax.cmds.cmds_util import get_any_service_client from flax.rpc.rpc_client import RpcClient async def add_node_connection(rpc_client: RpcClient, add_connection: str) -> None: if ":" not in add_connection: ...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/init_funcs.py
flax/cmds/init_funcs.py
import os import shutil import sqlite3 from pathlib import Path from typing import Any, Dict, List, Optional, Tuple import yaml from flax import __version__ from flax.consensus.coinbase import create_puzzlehash_for_pk from flax.ssl.create_ssl import ( ensure_ssl_dirs, generate_ca_signed_cert, get_flax_ca_...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/farm_funcs.py
flax/cmds/farm_funcs.py
from typing import Any, Dict, List, Optional from flax.cmds.cmds_util import get_any_service_client from flax.cmds.units import units from flax.consensus.block_record import BlockRecord from flax.rpc.farmer_rpc_client import FarmerRpcClient from flax.rpc.full_node_rpc_client import FullNodeRpcClient from flax.rpc.wal...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/plotnft_funcs.py
flax/cmds/plotnft_funcs.py
from decimal import Decimal from dataclasses import replace import aiohttp import asyncio import functools import json import time from pprint import pprint from typing import Any, List, Dict, Optional, Callable from flax.cmds.units import units from flax.cmds.wallet_funcs import print_balance, wallet_coin_unit from...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/plotnft.py
flax/cmds/plotnft.py
from decimal import Decimal from typing import Optional import click from flax.cmds.cmds_util import execute_with_wallet MAX_CMDLINE_FEE = Decimal(0.5) def validate_fee(ctx, param, value): try: fee = Decimal(value) except ValueError: raise click.BadParameter("Fee must be decimal dotted valu...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/keys_funcs.py
flax/cmds/keys_funcs.py
import logging import os import sys from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey from enum import Enum from pathlib import Path from typing import Any, Dict, List, Optional, Tuple, Union from flax.consensus.coinbase import create_puzzlehash_for_pk from flax.cmds.passphrase_funcs import obtain_curr...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/db_upgrade_func.py
flax/cmds/db_upgrade_func.py
from typing import Dict, Optional import platform from pathlib import Path import shutil import sys from time import time import textwrap import os from flax.util.config import load_config, lock_and_load_config, save_config from flax.util.path import path_from_root from flax.util.ints import uint32 from flax.types.blo...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/init.py
flax/cmds/init.py
import click @click.command("init", short_help="Create or migrate the configuration") @click.option( "--create-certs", "-c", default=None, help="Create new SSL certificates based on CA in [directory]", type=click.Path(), ) @click.option( "--fix-ssl-permissions", is_flag=True, help="Att...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/cmds/data.py
flax/cmds/data.py
from __future__ import annotations import json import logging from pathlib import Path from typing import Any, Callable, Coroutine, Dict, List, Optional, TypeVar, Union import click _T = TypeVar("_T") FC = TypeVar("FC", bound=Union[Callable[..., Any], click.Command]) logger = logging.getLogger(__name__) # TODO:...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/introducer/introducer_api.py
flax/introducer/introducer_api.py
from __future__ import annotations from typing import Callable, Optional from flax.introducer.introducer import Introducer from flax.protocols.introducer_protocol import RequestPeersIntroducer, RespondPeersIntroducer from flax.protocols.protocol_message_types import ProtocolMessageTypes from flax.server.outbound_mess...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/introducer/introducer.py
flax/introducer/introducer.py
import asyncio import logging import time from typing import Any, Callable, Dict, List, Optional from flax.rpc.rpc_server import default_get_connections from flax.server.outbound_message import NodeType from flax.server.server import FlaxServer from flax.server.introducer_peers import VettedPeer from flax.server.ws_co...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/flax/introducer/__init__.py
flax/introducer/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/jsonify.py
benchmarks/jsonify.py
from __future__ import annotations import random from time import perf_counter from tests.util.test_full_block_utils import get_full_blocks random.seed(123456789) def main() -> None: total_time = 0.0 counter = 0 for block in get_full_blocks(): start = perf_counter() block.to_json_dict()...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/coin_store.py
benchmarks/coin_store.py
from __future__ import annotations import asyncio import os import random import sys from pathlib import Path from time import monotonic from typing import List, Tuple from utils import rand_hash, rewards, setup_db from flax.full_node.coin_store import CoinStore from flax.types.blockchain_format.coin import Coin fro...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/utils.py
benchmarks/utils.py
from __future__ import annotations import os import random import subprocess import sys from datetime import datetime from pathlib import Path from typing import Tuple, Union import aiosqlite import click from blspy import AugSchemeMPL, G1Element, G2Element from flax.consensus.coinbase import create_farmer_coin, cre...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/block_store.py
benchmarks/block_store.py
from __future__ import annotations import asyncio import os import random import sys from pathlib import Path from time import monotonic from utils import ( rand_bytes, rand_class_group_element, rand_g1, rand_g2, rand_hash, rand_vdf, rand_vdf_proof, rewards, setup_db, ) from bench...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/streamable.py
benchmarks/streamable.py
from __future__ import annotations import json import sys from dataclasses import dataclass from enum import Enum from statistics import stdev from time import process_time as clock from typing import Any, Callable, Dict, List, Optional, TextIO, Tuple, Type, Union import click from utils import EnumType, get_commit_h...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/block_ref.py
benchmarks/block_ref.py
from __future__ import annotations import asyncio import os import random from dataclasses import dataclass from pathlib import Path from time import monotonic from typing import List, Optional import aiosqlite import click from flax.consensus.blockchain import Blockchain from flax.consensus.default_constants import...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/mempool.py
benchmarks/mempool.py
from __future__ import annotations import asyncio import cProfile from contextlib import contextmanager from subprocess import check_call from time import monotonic from typing import Iterator, List from utils import setup_db from flax.consensus.block_record import BlockRecord from flax.consensus.coinbase import cre...
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false
Flax-Network/flax-blockchain
https://github.com/Flax-Network/flax-blockchain/blob/bb8715f3155bb8011a04cc8c05b3fa8133e4c64b/benchmarks/__init__.py
benchmarks/__init__.py
python
Apache-2.0
bb8715f3155bb8011a04cc8c05b3fa8133e4c64b
2026-01-05T07:13:52.951017Z
false