Skip to content

Commit 03af467

Browse files
authored
Merge branch 'bsv-blockchain:develop-port' into develop-port
2 parents bff321e + b4730f4 commit 03af467

File tree

395 files changed

+53596
-12723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

395 files changed

+53596
-12723
lines changed

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Example environment variables for testing
2+
# Copy this file to .env.local and fill in your actual values
3+
4+
# ARC Broadcaster API Key
5+
ARC_API_KEY=your_api_key_here
6+
7+
# WhatsOnChain API Key for wallet tests
8+
WOC_API_KEY=your_woc_api_key_here

.github/workflows/build.yml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: build
22
permissions:
3-
contents: read
3+
contents: write
44

55
on:
66
push:
@@ -33,6 +33,25 @@ jobs:
3333
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3434
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
3535
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=140 --statistics
36-
- name: Test with pytest
36+
- name: Test with pytest and coverage
3737
run: |
38-
pytest
38+
pytest --cov=bsv --cov-report=html --cov-report=term --cov-report=xml
39+
- name: Extract coverage percentage
40+
if: matrix.python-version == '3.11'
41+
id: coverage
42+
run: |
43+
COVERAGE=$(python -c "import xml.etree.ElementTree as ET; root = ET.parse('coverage.xml').getroot(); print(f\"{float(root.attrib['line-rate'])*100:.1f}\")")
44+
echo "coverage_percentage=$COVERAGE" >> $GITHUB_OUTPUT
45+
- name: Update README with coverage
46+
if: matrix.python-version == '3.11' && github.ref == 'refs/heads/master' && github.event_name == 'push'
47+
run: |
48+
python update_coverage.py ${{ steps.coverage.outputs.coverage_percentage }}
49+
- name: Commit coverage update
50+
if: matrix.python-version == '3.11' && github.ref == 'refs/heads/master' && github.event_name == 'push'
51+
# Pin to specific commit SHA for security - v9.1.4
52+
uses: EndBug/add-and-commit@777a761e0f8293b7b051170404976d7cf10611cb # v9.1.4
53+
with:
54+
add: README.md
55+
message: "Update coverage badge to ${{ steps.coverage.outputs.coverage_percentage }}%"
56+
author_name: github-actions[bot]
57+
author_email: github-actions[bot]@users.noreply.github.com

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@ dist/
88
htmlcov/
99
.coverage
1010
build/
11+
.wallet
12+
.venv/
13+
14+
# Environment files
15+
.env
16+
.env.local
17+
.env.*.local

CHANGELOG.md

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77
## Table of Contents
88

99
- [Unreleased](#unreleased)
10+
- [1.0.11 - 2025-11-23](#1011---2025-11-23)
11+
- [1.0.10 - 2025-10-30](#1010---2025-10-30)
12+
- [1.0.9 - 2025-09-30](#109---2025-09-30)
1013
- [1.0.8 - 2025-08-13](#108---2025-08-13)
1114
- [1.0.7.1- 2025-07-28](#1071---2025-07-28)
1215
- [1.0.7- 2025-07-28](#107---2025-07-28)
@@ -23,26 +26,79 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
2326
- [0.1.0 - 2024-04-09](#010---2024-04-09)
2427

2528
---
26-
27-
## [Unreleased]
29+
## [1.0.12] - 2025-11-25
2830

2931
### Added
30-
- (Include new features or significant user-visible enhancements here.)
32+
- Complete Wallet infrastructure with serializers, substrates, and implementations for full wallet functionality
33+
- Authentication system including peer authentication, certificates, session management, and HTTP transport
34+
- Enhanced BEEF infrastructure with dedicated builder, serializer, and validator modules for advanced transaction management
35+
- Script interpreter with comprehensive opcode support, stack operations, and script execution engine
36+
- Storage interfaces and implementations for data upload/download with encryption support
37+
- Overlay tools including lookup resolver, SHIP broadcaster, historian, and host reputation tracker
38+
- Registry client for overlay network management
39+
- Identity client with contacts manager for identity and contact management
40+
- Headers client for blockchain header synchronization
41+
- Keystore with local key-value store implementation supporting encrypted storage
42+
- Additional cryptographic primitives: Schnorr signatures, DRBG (Deterministic Random Bit Generator), AES-GCM encryption
43+
- Compatibility modules for BSM (Bitcoin Signed Message) and ECIES encryption
44+
- TOTP (Time-based One-Time Password) support for two-factor authentication
45+
- BIP-276 payment destination encoding support
46+
- PushDrop token protocol implementation
47+
- Teranode broadcaster support
3148

3249
### Changed
33-
- (Detail modifications that are non-breaking but relevant to the end-users.)
50+
- Refactored `bsv/utils.py` monolithic module into organized submodules under `bsv/utils/` for better maintainability
51+
- Enhanced broadcaster implementations with improved error handling and status categorization
52+
- Updated chain trackers with block headers service integration
53+
- Improved transaction handling with extended BEEF support and validation
54+
- Reorganized entire test suite into `tests/bsv/` structure with comprehensive coverage tests (455 files changed, 74,468+ additions)
55+
56+
### Notes
57+
- **No breaking changes** - All existing APIs remain fully compatible
58+
- Legacy tests continue to pass but have been superseded by new comprehensive test structure
59+
- Test organization now follows a more modular and maintainable structure under `tests/bsv/`
60+
- Added extensive test coverage across all modules ensuring code quality and reliability
3461

35-
### Deprecated
36-
- (List features that are in the process of being phased out or replaced.)
62+
---
63+
## [1.0.11] - 2025-11-23
3764

38-
### Removed
39-
- (Indicate features or capabilities that were taken out of the project.)
65+
### Changed
66+
- Converted `LivePolicy` fee model from asynchronous to synchronous implementation
67+
- Replaced `default_http_client()` (async) with `default_sync_http_client()` (sync) in `LivePolicy`
68+
- **`Transaction.fee()` can now be called from both synchronous and asynchronous functions without any special handling**
69+
- Removed unused `asyncio` and `inspect` imports from `transaction.py`
70+
- Simplified `Transaction.fee()` implementation by removing async helper methods
4071

4172
### Fixed
42-
- (Document bugs that were fixed since the last release.)
73+
- Updated all `LivePolicy` tests to use synchronous mocks instead of `AsyncMock`
74+
- Fixed `test_transaction_fee_with_default_rate` to use explicit fee model for deterministic testing
75+
- Removed `asyncio.run()` calls from `LivePolicy` test suite
4376

44-
### Security
45-
- (Notify of any improvements related to security vulnerabilities or potential risks.)
77+
### Notes
78+
- This change is transparent to users - `tx.fee()` works seamlessly in both sync and async contexts without any API changes
79+
- You can call `tx.fee()` inside `async def` functions or regular `def` functions - it works the same way
80+
- All existing code and documentation remain compatible with no modifications required
81+
82+
---
83+
## [1.0.10] - 2025-10-30
84+
85+
### Changed
86+
- Updated Script ASM output to use BRC-106 compliant format (outputs `OP_FALSE` instead of `OP_0` for better human readability)
87+
- Converted `test_arc_ef_or_rawhex.py` from unittest.TestCase to pytest style for better async test handling
88+
89+
### Fixed
90+
- Added missing test dependencies to requirements.txt: `ecdsa~=0.19.0` and `pytest-cov~=6.0.0`
91+
- Fixed pytest configuration by adding `asyncio_default_fixture_loop_scope` to eliminate deprecation warnings
92+
- Updated test expectations in `test_scripts.py` to match BRC-106 compliant ASM output
93+
- Resolved all pytest warnings for a clean test output (154 tests passing with zero warnings)
94+
95+
96+
---
97+
## [1.0.9] - 2025-09-30
98+
99+
### Added
100+
- Integrated `LivePolicy` for dynamic fee computations with caching and fallback mechanisms.
101+
[ts-sdk#343](https://github.com/bsv-blockchain/ts-sdk/pull/343).
46102

47103
---
48104
## [1.0.8] - 2025-08-13

0 commit comments

Comments
 (0)