Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
import os
import json
full_matrix = {
'python': ['3.11', '3.12'],
'python': ['3.11', '3.12', '3.13'],
# available OS's: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on
'os': ['ubuntu-22.04', 'macos-15'],
}
Expand Down
3 changes: 3 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
extends: default

ignore:
- .venv/

rules:
document-start: disable
line-length:
Expand Down
3 changes: 2 additions & 1 deletion hathor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
TxOutputScript,
VertexId,
)
from hathor.nanocontracts.utils import sha3, verify_ecdsa
from hathor.nanocontracts.utils import json_dumps, sha3, verify_ecdsa
from hathor.version import __version__

__all__ = [
Expand Down Expand Up @@ -73,5 +73,6 @@
'VertexId',
'sha3',
'verify_ecdsa',
'json_dumps',
'__version__',
]
4 changes: 1 addition & 3 deletions hathor/builder/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,18 +411,17 @@ def _get_or_create_nc_log_storage(self) -> NCLogStorage:
def _get_or_create_consensus(self) -> ConsensusAlgorithm:
if self._consensus is None:
soft_voided_tx_ids = self._get_soft_voided_tx_ids()
pubsub = self._get_or_create_pubsub()
nc_storage_factory = self._get_or_create_nc_storage_factory()
nc_calls_sorter = self._get_nc_calls_sorter()
self._consensus = ConsensusAlgorithm(
nc_storage_factory=nc_storage_factory,
soft_voided_tx_ids=soft_voided_tx_ids,
pubsub=pubsub,
settings=self._get_or_create_settings(),
runner_factory=self._get_or_create_runner_factory(),
nc_log_storage=self._get_or_create_nc_log_storage(),
nc_calls_sorter=nc_calls_sorter,
feature_service=self._get_or_create_feature_service(),
tx_storage=self._get_or_create_tx_storage(),
)

return self._consensus
Expand Down Expand Up @@ -656,7 +655,6 @@ def _get_or_create_vertex_handler(self) -> VertexHandler:
feature_service=self._get_or_create_feature_service(),
execution_manager=self._get_or_create_execution_manager(),
pubsub=self._get_or_create_pubsub(),
wallet=self._get_or_create_wallet(),
)

return self._vertex_handler
Expand Down
20 changes: 20 additions & 0 deletions hathor/conf/mainnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,26 @@
version='0.67.0',
signal_support_by_default=True,
),
Feature.FEE_TOKENS: Criteria(
# XXX: parity with hathor/conf/mainnet.yml
bit=2,
start_height=6_249_600,
timeout_height=6_592_320,
minimum_activation_height=6_350_400,
lock_in_on_timeout=False,
version='0.69.0',
signal_support_by_default=True,
),
Feature.OPCODES_V2: Criteria(
# XXX: parity with hathor/conf/mainnet.yml
bit=3,
start_height=6_249_600,
timeout_height=6_592_320,
minimum_activation_height=6_350_400,
lock_in_on_timeout=False,
version='0.69.0',
signal_support_by_default=True,
),
}
)
)
20 changes: 20 additions & 0 deletions hathor/conf/mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,26 @@ FEATURE_ACTIVATION:
version: 0.67.0
signal_support_by_default: true

FEE_TOKENS:
bit: 2
# Right now the best block is 6_248_703 at Tuesday, 2026-01-27 22:45:36 GMT
start_height: 6_249_600 # expected around 2026-02-04 06:14:06 GMT
timeout_height: 6_592_320 # 16 weeks, expected around 2026-05-27 06:14:06 GMT
minimum_activation_height: 6_350_400 # 4 weeks, expected around 2026-03-04 06:14:06 GMT
lock_in_on_timeout: false
version: 0.69.0
signal_support_by_default: true

OPCODES_V2:
bit: 3
# Right now the best block is 6_248_703 at Tuesday, 2026-01-27 21:45:36 GMT
start_height: 6_249_600 # expected around 2026-02-04 06:14:06 GMT
timeout_height: 6_592_320 # 16 weeks, expected around 2026-05-27 06:14:06 GMT
minimum_activation_height: 6_350_400 # 4 weeks, expected around 2026-03-04 06:14:06 GMT
lock_in_on_timeout: false
version: 0.69.0
signal_support_by_default: true

ENABLE_NANO_CONTRACTS: feature_activation
NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES:
- HDkKGHwDHTuUGbhET73XdTJZkS8uU7PHf9
Expand Down
3 changes: 3 additions & 0 deletions hathor/conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ def GENESIS_TX2_TIMESTAMP(self) -> int:
# Used to enable fee-based tokens.
ENABLE_FEE_BASED_TOKENS: FeatureSetting = FeatureSetting.DISABLED

# Used to enable opcodes V2.
ENABLE_OPCODES_V2: FeatureSetting = FeatureSetting.DISABLED

# List of enabled blueprints.
BLUEPRINTS: dict[bytes, str] = {}

Expand Down
10 changes: 10 additions & 0 deletions hathor/conf/testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ FEATURE_ACTIVATION:
version: 0.69.0
signal_support_by_default: true

# current height: 316_075 at 2026-01-27 23:07:42 GMT
OPCODES_V2:
bit: 0
start_height: 316_080 # expected around 2026-01-27 23:12:42 GMT
timeout_height: 327_600 # 48 evaluation periods (4 days)
minimum_activation_height: 0
lock_in_on_timeout: false
version: 0.69.0
signal_support_by_default: true

ENABLE_NANO_CONTRACTS: feature_activation
ENABLE_FEE_BASED_TOKENS: feature_activation
NC_ON_CHAIN_BLUEPRINT_ALLOWED_ADDRESSES:
Expand Down
Loading
Loading