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/types/announcement.py | flax/types/announcement.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.hash import std_hash
@dataclass(frozen=True)
class Announcement:
origin_info: bytes32
message: bytes
morph_bytes: Optional[bytes] =... | 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/types/peer_info.py | flax/types/peer_info.py | from __future__ import annotations
import ipaddress
from dataclasses import dataclass
from typing import Optional, Union
from flax.util.ints import uint16, uint64
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class PeerInfo(Streamable):
host: str
port: uint16
... | 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/types/condition_with_args.py | flax/types/condition_with_args.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List
from flax.types.condition_opcodes import ConditionOpcode
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class ConditionWithArgs(Streamable):
"""
This structure is used to... | 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/types/mojos.py | flax/types/mojos.py | from __future__ import annotations
from typing import NewType
from flax.util.ints import uint64
Mojos = NewType("Mojos", uint64)
| 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/types/unfinished_header_block.py | flax/types/unfinished_header_block.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock
from flax.types.blockchain_format.reward_chain_block import RewardChainBlockUnfinished
from flax.types.blockchain_format.vdf import V... | 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/types/coin_spend.py | flax/types/coin_spend.py | from dataclasses import dataclass
from typing import List
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.program import SerializedProgram, INFINITE_COST
from flax.util.chain_utils import additions_for_solution, fee_for_solution
from flax.util.streamable import Streamable, streamabl... | 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/types/coin_record.py | flax/types/coin_record.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.protocols.wallet_protocol import CoinState
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint32, uint64
from flax.util... | 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/types/fee_rate.py | flax/types/fee_rate.py | from __future__ import annotations
import math
from dataclasses import dataclass
import typing_extensions
from flax.types.clvm_cost import CLVMCost
from flax.types.mojos import Mojos
from flax.util.ints import uint64
from flax.util.streamable import Streamable, streamable
@typing_extensions.final
@streamable
@data... | 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/types/unfinished_block.py | flax/types/unfinished_block.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock, TransactionsInfo
from flax.types.blockchain_format.program import SerializedProgram
from flax.types.blockchain_format.reward_chain_b... | 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/types/end_of_slot_bundle.py | flax/types/end_of_slot_bundle.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.types.blockchain_format.slots import (
ChallengeChainSubSlot,
InfusedChallengeChainSubSlot,
RewardChainSubSlot,
SubSlotProofs,
)
from flax.util.streamable import Streamable, streamable
@streama... | 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/types/weight_proof.py | flax/types/weight_proof.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.reward_chain_block import RewardChainBlock
from flax.types.blockchain_format.sized_bytes import bytes32
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/types/header_block.py | flax/types/header_block.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock, TransactionsInfo
from flax.types.blockchain_format.reward_chain_block import RewardChainBlock
from flax.types.blockchain_format.vdf ... | 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/types/full_block.py | flax/types/full_block.py | from dataclasses import dataclass
from typing import List, Optional, Set
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.foliage import Foliage, FoliageTransactionBlock, TransactionsInfo
from flax.types.blockchain_format.program import SerializedProgram
from flax.types.blockchain_fo... | 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/types/transaction_queue_entry.py | flax/types/transaction_queue_entry.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.server.ws_connection import WSFlaxConnection
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.spend_bundle import SpendBundle
@dataclass(frozen=True)
class TransactionQueueEntry:
... | 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/types/coin_solution.py | flax/types/coin_solution.py | import warnings
from .coin_spend import CoinSpend as CoinSolution # noqa lgtm[py/unused-import]
warnings.warn("`CoinSolution` is now `CoinSpend`")
| 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/types/mempool_inclusion_status.py | flax/types/mempool_inclusion_status.py | from __future__ import annotations
from enum import IntEnum
class MempoolInclusionStatus(IntEnum):
SUCCESS = 1 # Transaction added to mempool
PENDING = 2 # Transaction not yet added to mempool
FAILED = 3 # Transaction was invalid and dropped
| 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/types/block_protocol.py | flax/types/block_protocol.py | from __future__ import annotations
from typing import List, Optional
from typing_extensions import Protocol
from flax.types.blockchain_format.program import SerializedProgram
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint32
class BlockInfo(Protocol):
@property
... | 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/types/generator_types.py | flax/types/generator_types.py | from dataclasses import dataclass
from typing import List
from flax.types.blockchain_format.program import SerializedProgram
from flax.util.ints import uint32
from flax.util.streamable import Streamable, streamable
class GeneratorBlockCacheInterface:
def get_generator_for_block_height(self, height: uint32) -> Ser... | 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/types/condition_opcodes.py | flax/types/condition_opcodes.py | from __future__ import annotations
import enum
from typing import Any
# See flax/wallet/puzzles/condition_codes.clvm
class ConditionOpcode(bytes, enum.Enum):
# AGG_SIG is ascii "1"
# the conditions below require bls12-381 signatures
AGG_SIG_UNSAFE = bytes([49])
AGG_SIG_ME = bytes([50])
# the 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/types/spend_bundle.py | flax/types/spend_bundle.py | from __future__ import annotations
import warnings
from dataclasses import dataclass
from typing import List, Dict, Any
from blspy import AugSchemeMPL, G2Element
from flax.consensus.default_constants import DEFAULT_CONSTANTS
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.sized_b... | 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/types/__init__.py | flax/types/__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/types/clvm_cost.py | flax/types/clvm_cost.py | from __future__ import annotations
from typing import NewType
from flax.util.ints import uint64
"""
CLVM Cost is the cost to run a CLVM program on the CLVM.
It is similar to transaction bytes in the Bitcoin, but some operations
are charged a higher rate, depending on their arguments.
"""
CLVMCost = NewType("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/types/mempool_item.py | flax/types/mempool_item.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List
from flax.consensus.cost_calculator import NPCResult
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.spend_bundle import SpendBundle
from flax.ut... | 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/types/spend_bundle_conditions.py | flax/types/spend_bundle_conditions.py | from __future__ import annotations
from chia_rs import Spend, SpendBundleConditions
__all__ = ["Spend", "SpendBundleConditions"]
| 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/types/mempool_submission_status.py | flax/types/mempool_submission_status.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Dict, Optional, Union
from flax.types.mempool_inclusion_status import MempoolInclusionStatus
from flax.util.ints import uint8
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class Memp... | 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/types/blockchain_format/slots.py | flax/types/blockchain_format/slots.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from blspy import G2Element
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.blockchain_format.vdf import VDFInfo, VDFProof... | 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/types/blockchain_format/program.py | flax/types/blockchain_format/program.py | from __future__ import annotations
import io
from typing import Callable, Dict, List, Set, Tuple, Optional, Any
from clvm import SExp
from clvm.casts import int_from_bytes
from clvm.EvalError import EvalError
from clvm.serialize import sexp_from_stream, sexp_to_stream
from chia_rs import MEMPOOL_MODE, run_chia_program... | 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/types/blockchain_format/reward_chain_block.py | flax/types/blockchain_format/reward_chain_block.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from blspy import G2Element
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.blockchain_format.vdf import VDFInfo
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/types/blockchain_format/proof_of_space.py | flax/types/blockchain_format/proof_of_space.py | import logging
from dataclasses import dataclass
from typing import Optional
from bitstring import BitArray
from blspy import G1Element, AugSchemeMPL, PrivateKey
from chiapos import Verifier
from flax.consensus.constants import ConsensusConstants
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/types/blockchain_format/foliage.py | flax/types/blockchain_format/foliage.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from blspy import G2Element
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.pool_target import PoolTarget
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/types/blockchain_format/sub_epoch_summary.py | flax/types/blockchain_format/sub_epoch_summary.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint8, uint64
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class SubEpochSummary(Str... | 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/types/blockchain_format/tree_hash.py | flax/types/blockchain_format/tree_hash.py | """
This is an implementation of `sha256_treehash`, used to calculate
puzzle hashes in clvm.
This implementation goes to great pains to be non-recursive so we don't
have to worry about blowing out the python stack.
"""
from __future__ import annotations
from typing import Optional, Set
from clvm import CLVMObject
... | 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/types/blockchain_format/classgroup.py | flax/types/blockchain_format/classgroup.py | from __future__ import annotations
from dataclasses import dataclass
from flax.consensus.constants import ConsensusConstants
from flax.types.blockchain_format.sized_bytes import bytes100
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class ClassgroupElement(Streamable):
... | 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/types/blockchain_format/vdf.py | flax/types/blockchain_format/vdf.py | import logging
import traceback
from dataclasses import dataclass
from enum import IntEnum
from typing import Optional
from functools import lru_cache
from chiavdf import create_discriminant, verify_n_wesolowski
from flax.consensus.constants import ConsensusConstants
from flax.types.blockchain_format.classgroup impor... | 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/types/blockchain_format/__init__.py | flax/types/blockchain_format/__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/types/blockchain_format/pool_target.py | flax/types/blockchain_format/pool_target.py | from __future__ import annotations
from dataclasses import dataclass
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint32
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class PoolTarget(Streamable):
puzzle_hash: bytes32
m... | 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/types/blockchain_format/sized_bytes.py | flax/types/blockchain_format/sized_bytes.py | from __future__ import annotations
from flax.util.byte_types import SizedBytes
class bytes4(SizedBytes):
_size = 4
class bytes8(SizedBytes):
_size = 8
class bytes32(SizedBytes):
_size = 32
class bytes48(SizedBytes):
_size = 48
class bytes96(SizedBytes):
_size = 96
class bytes100(SizedBy... | 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/types/blockchain_format/coin.py | flax/types/blockchain_format/coin.py | from __future__ import annotations
from typing import List, Union
from chia_rs import Coin
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.hash import std_hash
from flax.util.ints import uint64
__all__ = ["Coin", "coin_as_list", "hash_coin_ids"]
def coin_as_list(c: Coin) -> List[Union[... | 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/protocols/protocol_timing.py | flax/protocols/protocol_timing.py | # These settings should not be end-user configurable
from __future__ import annotations
INVALID_PROTOCOL_BAN_SECONDS = 10
API_EXCEPTION_BAN_SECONDS = 10
INTERNAL_PROTOCOL_ERROR_BAN_SECONDS = 10 # Don't flap if our client is at fault
| 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/protocols/protocol_state_machine.py | flax/protocols/protocol_state_machine.py | from flax.protocols.protocol_message_types import ProtocolMessageTypes as pmt, ProtocolMessageTypes
NO_REPLY_EXPECTED = [
# full_node -> full_node messages
pmt.new_peak,
pmt.new_transaction,
pmt.new_unfinished_block,
pmt.new_signage_point_or_end_of_sub_slot,
pmt.request_mempool_transactions,
... | 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/protocols/timelord_protocol.py | flax/protocols/timelord_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple
from flax.types.blockchain_format.foliage import Foliage
from flax.types.blockchain_format.reward_chain_block import RewardChainBlock, RewardChainBlockUnfinished
from flax.types.blockchain_format.sized_bytes ... | 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/protocols/farmer_protocol.py | flax/protocols/farmer_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from blspy import G2Element
from flax.types.blockchain_format.pool_target import PoolTarget
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.sized_bytes import bytes3... | 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/protocols/full_node_protocol.py | flax/protocols/full_node_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.blockchain_format.vdf import VDFInfo, VDFProof
from flax.types.end_of_slot_bundle import EndOfSubSlotBundle
from flax.types.full_block 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/protocols/harvester_protocol.py | flax/protocols/harvester_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple
from blspy import G1Element, G2Element
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import int16, uint... | 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/protocols/protocol_message_types.py | flax/protocols/protocol_message_types.py | from __future__ import annotations
from enum import Enum
class ProtocolMessageTypes(Enum):
# Shared protocol (all services)
handshake = 1
# Harvester protocol (harvester <-> farmer)
harvester_handshake = 3
# new_signage_point_harvester = 4 Changed to 66 in new protocol
new_proof_of_space = 5... | 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/protocols/wallet_protocol.py | flax/protocols/wallet_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional, Tuple
from chia_rs import CoinState, RespondToPhUpdates
from flax.full_node.fee_estimate import FeeEstimateGroup
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.program 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/protocols/shared_protocol.py | flax/protocols/shared_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from enum import IntEnum
from typing import List, Tuple
from flax.util.ints import uint8, uint16
from flax.util.streamable import Streamable, streamable
protocol_version = "0.0.34"
"""
Handshake when establishing a connection between two servers.
... | 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/protocols/pool_protocol.py | flax/protocols/pool_protocol.py | from dataclasses import dataclass
from enum import Enum
import time
from typing import Optional
from blspy import G1Element, G2Element
from flax.types.blockchain_format.proof_of_space import ProofOfSpace
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint8, uint16, uint32, uin... | 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/protocols/__init__.py | flax/protocols/__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/protocols/introducer_protocol.py | flax/protocols/introducer_protocol.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List
from flax.types.peer_info import TimestampedPeerInfo
from flax.util.streamable import Streamable, streamable
"""
Protocol to introducer
Note: When changing this file, also change protocol_message_types.py, and the protocol v... | 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/harvester/harvester.py | flax/harvester/harvester.py | from __future__ import annotations
import asyncio
import concurrent
import dataclasses
import logging
from concurrent.futures.thread import ThreadPoolExecutor
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Tuple
import flax.server.ws_connection as ws # lgtm [py/import-and-import-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/harvester/harvester_api.py | flax/harvester/harvester_api.py | from __future__ import annotations
import asyncio
import time
from pathlib import Path
from typing import List, Tuple
from blspy import AugSchemeMPL, G1Element, G2Element
from flax.consensus.pot_iterations import calculate_iterations_quality, calculate_sp_interval_iters
from flax.harvester.harvester import Harvester... | 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/harvester/__init__.py | flax/harvester/__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/farmer/farmer_api.py | flax/farmer/farmer_api.py | from __future__ import annotations
import json
import time
from typing import Any, Dict, List, Optional, Tuple
import aiohttp
from blspy import AugSchemeMPL, G2Element, PrivateKey
import flax.server.ws_connection as ws
from flax import __version__
from flax.consensus.pot_iterations import calculate_iterations_qualit... | 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/farmer/farmer.py | flax/farmer/farmer.py | from __future__ import annotations
import asyncio
import json
import logging
import time
import traceback
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
import aiohttp
from blspy import AugSchemeMPL, G1Element, G2Element, PrivateKey
import flax.server.ws_connection as ws ... | 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/farmer/__init__.py | flax/farmer/__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/ssl/create_ssl.py | flax/ssl/create_ssl.py | import datetime
import os
from pathlib import Path
from typing import Any, List, Tuple
import pkg_resources
from flax.util.ssl_check import DEFAULT_PERMISSIONS_CERT_FILE, DEFAULT_PERMISSIONS_KEY_FILE
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primiti... | 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/ssl/__init__.py | flax/ssl/__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/plotting/util.py | flax/plotting/util.py | from __future__ import annotations
import logging
from dataclasses import dataclass, field
from enum import Enum
from pathlib import Path
from typing import Dict, List, Optional, Tuple, Union
from blspy import G1Element, PrivateKey
from chiapos import DiskProver
from flax.types.blockchain_format.sized_bytes import b... | 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/plotting/__init__.py | flax/plotting/__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/plotting/cache.py | flax/plotting/cache.py | from __future__ import annotations
import logging
import time
import traceback
from dataclasses import dataclass, field
from math import ceil
from pathlib import Path
from typing import Dict, ItemsView, KeysView, List, Optional, Tuple, ValuesView
from blspy import G1Element
from chiapos import DiskProver
from flax.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/plotting/manager.py | flax/plotting/manager.py | from __future__ import annotations
import logging
import threading
import time
import traceback
from concurrent.futures.thread import ThreadPoolExecutor
from pathlib import Path
from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from blspy import G1Element
from chiapos import DiskProver
from flax.con... | 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/plotting/create_plots.py | flax/plotting/create_plots.py | from __future__ import annotations
import logging
from datetime import datetime
from pathlib import Path
from secrets import token_bytes
from typing import Dict, List, Optional, Tuple
from blspy import AugSchemeMPL, G1Element, PrivateKey
from chiapos import DiskPlotter
from flax.daemon.keychain_proxy import Keychain... | 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/plotting/check_plots.py | flax/plotting/check_plots.py | from __future__ import annotations
import logging
from collections import Counter
from pathlib import Path
from time import sleep, time
from typing import List
from blspy import G1Element
from chiapos import Verifier
from flax.plotting.manager import PlotManager
from flax.plotting.util import (
PlotRefreshEvents... | 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/pools/pool_puzzles.py | flax/pools/pool_puzzles.py | import logging
from typing import Tuple, List, Optional
from blspy import G1Element
from clvm.casts import int_from_bytes, int_to_bytes
from flax.clvm.singleton import SINGLETON_LAUNCHER
from flax.consensus.block_rewards import calculate_pool_reward
from flax.consensus.coinbase import pool_parent_id
from flax.pools.po... | 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/pools/pool_wallet_info.py | flax/pools/pool_wallet_info.py | from dataclasses import dataclass
from enum import IntEnum
from typing import Optional, Dict
from blspy import G1Element
from flax.protocols.pool_protocol import POOL_PROTOCOL_VERSION
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.program import Program
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/pools/pool_wallet.py | flax/pools/pool_wallet.py | from __future__ import annotations
import asyncio
import dataclasses
import logging
import time
from typing import cast, Any, Optional, Set, Tuple, List, Dict, TYPE_CHECKING
from typing_extensions import final
from blspy import PrivateKey, G2Element, G1Element
from flax.pools.pool_config import PoolWalletConfig, load... | 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/pools/__init__.py | flax/pools/__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/pools/pool_config.py | flax/pools/pool_config.py | from __future__ import annotations
import logging
from dataclasses import dataclass
from pathlib import Path
from typing import List
from blspy import G1Element
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.byte_types import hexstr_to_bytes
from flax.util.config import load_config, lock... | 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/consensus/blockchain.py | flax/consensus/blockchain.py | from __future__ import annotations
import asyncio
import dataclasses
import logging
import multiprocessing
import traceback
from concurrent.futures import Executor
from concurrent.futures.process import ProcessPoolExecutor
from enum import Enum
from multiprocessing.context import BaseContext
from pathlib import Path
f... | 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/consensus/block_creation.py | flax/consensus/block_creation.py | from __future__ import annotations
import logging
import random
from dataclasses import replace
from typing import Callable, Dict, List, Optional, Tuple
import blspy
from blspy import G1Element, G2Element
from chia_rs import compute_merkle_set_root
from chiabip158 import PyBIP158
from flax.consensus.block_record 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/consensus/default_constants.py | flax/consensus/default_constants.py | from __future__ import annotations
from flax.util.ints import uint64
from .constants import ConsensusConstants
default_kwargs = {
"SLOT_BLOCKS_TARGET": 32,
"MIN_BLOCKS_PER_CHALLENGE_BLOCK": 16, # Must be less than half of SLOT_BLOCKS_TARGET
"MAX_SUB_SLOT_BLOCKS": 128, # Must be less than half of SUB_EP... | 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/consensus/cost_calculator.py | flax/consensus/cost_calculator.py | from __future__ import annotations
from dataclasses import dataclass
from typing import Optional
from flax.types.spend_bundle_conditions import SpendBundleConditions
from flax.util.ints import uint16, uint64
from flax.util.streamable import Streamable, streamable
@streamable
@dataclass(frozen=True)
class NPCResult(... | 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/consensus/block_record.py | flax/consensus/block_record.py | from __future__ import annotations
from dataclasses import dataclass
from typing import List, Optional
from flax.consensus.constants import ConsensusConstants
from flax.consensus.pot_iterations import calculate_ip_iters, calculate_sp_iters
from flax.types.blockchain_format.classgroup import ClassgroupElement
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/consensus/block_body_validation.py | flax/consensus/block_body_validation.py | from __future__ import annotations
import collections
import logging
from typing import Awaitable, Callable, Dict, List, Optional, Set, Tuple, Union
from chiabip158 import PyBIP158
from flax.consensus.block_record import BlockRecord
from flax.consensus.block_rewards import calculate_base_farmer_reward, calculate_poo... | 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/consensus/block_rewards.py | flax/consensus/block_rewards.py | from __future__ import annotations
from flax.util.ints import uint32, uint64
# 1 Flax coin = 1,000,000,000,000 = 1 trillion mojo.
_mojo_per_flax = 1000000000000
_blocks_per_year = 1681920 # 32 * 6 * 24 * 365
def calculate_pool_reward(height: uint32) -> uint64:
"""
Returns the pool reward at a certain 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/consensus/vdf_info_computation.py | flax/consensus/vdf_info_computation.py | from __future__ import annotations
from typing import List, Optional, Tuple
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.consensus.constants import ConsensusConstants
from flax.types.blockchain_format.classgroup import ClassgroupElem... | 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/consensus/constants.py | flax/consensus/constants.py | from __future__ import annotations
import dataclasses
import logging
from typing import Any
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.byte_types import hexstr_to_bytes
from flax.util.ints import uint8, uint32, uint64, uint128
log = logging.getLogger(__name__)
@dataclasses.dataclas... | 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/consensus/make_sub_epoch_summary.py | flax/consensus/make_sub_epoch_summary.py | from __future__ import annotations
import logging
from typing import Optional, Union
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.consensus.constants import ConsensusConstants
from flax.consensus.deficit import calculate_deficit
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/consensus/difficulty_adjustment.py | flax/consensus/difficulty_adjustment.py | from __future__ import annotations
from typing import List, Optional, Tuple
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.consensus.constants import ConsensusConstants
from flax.types.blockchain_format.sized_bytes import bytes32
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/consensus/pot_iterations.py | flax/consensus/pot_iterations.py | from __future__ import annotations
from flax.consensus.constants import ConsensusConstants
from flax.consensus.pos_quality import _expected_plot_size
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.hash import std_hash
from flax.util.ints import uint8, uint64, uint128
def is_overflow_bloc... | 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/consensus/get_block_challenge.py | flax/consensus/get_block_challenge.py | from __future__ import annotations
import logging
from typing import List, Union
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.consensus.constants import ConsensusConstants
from flax.types.blockchain_format.sized_bytes import bytes32
... | 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/consensus/find_fork_point.py | flax/consensus/find_fork_point.py | from __future__ import annotations
from typing import Union
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.types.header_block import HeaderBlock
def find_fork_point_in_chain(
blocks: BlockchainInterface,
block_1: Union[BlockR... | 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/consensus/blockchain_interface.py | flax/consensus/blockchain_interface.py | from __future__ import annotations
from typing import Dict, List, Optional
from flax.consensus.block_record import BlockRecord
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.types.blockchain_format.sub_epoch_summary import SubEpochSummary
from flax.types.blockchain_format.vdf import VDFInfo
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/consensus/deficit.py | flax/consensus/deficit.py | from __future__ import annotations
from typing import Optional
from flax.consensus.block_record import BlockRecord
from flax.consensus.constants import ConsensusConstants
from flax.util.ints import uint8, uint32
def calculate_deficit(
constants: ConsensusConstants,
height: uint32,
prev_b: Optional[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/consensus/multiprocess_validation.py | flax/consensus/multiprocess_validation.py | from __future__ import annotations
import asyncio
import logging
import traceback
from concurrent.futures import Executor
from dataclasses import dataclass
from typing import Awaitable, Callable, Dict, List, Optional, Sequence, Tuple
from blspy import AugSchemeMPL, G1Element
from flax.consensus.block_header_validati... | 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/consensus/block_header_validation.py | flax/consensus/block_header_validation.py | from __future__ import annotations
import dataclasses
import logging
import time
from typing import Optional, Tuple
from blspy import AugSchemeMPL
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/consensus/__init__.py | flax/consensus/__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/consensus/condition_costs.py | flax/consensus/condition_costs.py | from __future__ import annotations
from enum import Enum
class ConditionCost(Enum):
# Condition Costs
AGG_SIG = 1200000 # the cost of one G1 subgroup check + aggregated signature validation
CREATE_COIN = 1800000
| 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/consensus/pos_quality.py | flax/consensus/pos_quality.py | from __future__ import annotations
from flax.util.ints import uint64
# The actual space in bytes of a plot, is _expected_plot_size(k) * UI_ACTUAL_SPACE_CONSTANT_FACTO
# This is not used in consensus, only for display purposes
UI_ACTUAL_SPACE_CONSTANT_FACTOR = 0.762
def _expected_plot_size(k: int) -> uint64:
"""... | 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/consensus/coinbase.py | flax/consensus/coinbase.py | from __future__ import annotations
from blspy import G1Element
from flax.types.blockchain_format.coin import Coin
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.ints import uint32, uint64
from flax.wallet.puzzles.p2_delegated_puzzle_or_hidden_puzzle import puzzle_hash_for_pk
def create_... | 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/consensus/block_root_validation.py | flax/consensus/block_root_validation.py | from __future__ import annotations
from typing import Dict, List, Optional, Tuple
from chia_rs import compute_merkle_set_root
from flax.types.blockchain_format.coin import Coin, hash_coin_ids
from flax.types.blockchain_format.sized_bytes import bytes32
from flax.util.errors import Err
def validate_block_merkle_roo... | 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/consensus/full_block_to_block_record.py | flax/consensus/full_block_to_block_record.py | from __future__ import annotations
from typing import List, Optional, Union
from flax.consensus.block_record import BlockRecord
from flax.consensus.blockchain_interface import BlockchainInterface
from flax.consensus.constants import ConsensusConstants
from flax.consensus.deficit import calculate_deficit
from flax.con... | 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_store.py | flax/server/address_manager_store.py | import aiofiles
import asyncio
import logging
from flax.server.address_manager import (
BUCKET_SIZE,
NEW_BUCKET_COUNT,
NEW_BUCKETS_PER_ADDRESS,
AddressManager,
ExtendedPeerInfo,
)
from flax.util.files import write_file_async
from flax.util.ints import uint64
from flax.util.streamable import streama... | 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_introducer.py | flax/server/start_introducer.py | from __future__ import annotations
import pathlib
import sys
from typing import Dict, Optional
from flax.introducer.introducer import Introducer
from flax.introducer.introducer_api import IntroducerAPI
from flax.server.outbound_message import NodeType
from flax.server.start_service import Service, async_run
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/server/outbound_message.py | flax/server/outbound_message.py | from __future__ import annotations
from dataclasses import dataclass
from enum import IntEnum
from typing import Optional, SupportsBytes, Union
from flax.protocols.protocol_message_types import ProtocolMessageTypes
from flax.util.ints import uint8, uint16
from flax.util.streamable import Streamable, streamable
clas... | 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_data_layer.py | flax/server/start_data_layer.py | from __future__ import annotations
import logging
import pathlib
import sys
from typing import Any, Dict, Optional, cast
from flax.cmds.init_funcs import create_all_ssl
from flax.data_layer.data_layer import DataLayer
from flax.data_layer.data_layer_api import DataLayerAPI
from flax.rpc.data_layer_rpc_api import Data... | 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_limits.py | flax/server/rate_limits.py | from __future__ import annotations
import dataclasses
import logging
import time
from collections import Counter
from typing import Dict, List
from flax.protocols.protocol_message_types import ProtocolMessageTypes
from flax.protocols.shared_protocol import Capability
from flax.server.outbound_message import Message
f... | 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/reconnect_task.py | flax/server/reconnect_task.py | import asyncio
from typing import Optional
from flax.server.server import FlaxServer
from flax.types.peer_info import PeerInfo
from flax.util.network import get_host_addr
def start_reconnect_task(server: FlaxServer, peer_info_arg: PeerInfo, log, prefer_ipv6: Optional[bool]):
"""
Start a background task that... | 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_service.py | flax/server/start_service.py | import asyncio
import functools
import os
import logging
import logging.config
import signal
import sys
from typing import Any, Callable, Coroutine, Dict, Generic, List, Optional, Tuple, Type, TypeVar
from flax.daemon.server import service_launch_lock_path
from flax.util.lock import Lockfile, LockfileError
from flax.s... | python | Apache-2.0 | bb8715f3155bb8011a04cc8c05b3fa8133e4c64b | 2026-01-05T07:13:52.951017Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.