Skip to content

Commit

Permalink
Merge branch 'main' into EL.fix-twine-error
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Jul 24, 2024
2 parents e875ca1 + 41ce8e1 commit 1f2be5f
Show file tree
Hide file tree
Showing 69 changed files with 2,868 additions and 3,556 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,14 @@ jobs:
rm -rf ./chia-blockchain-gui/packages/gui/daemon
publish:
name: 📦 Publish Installers
uses: ./.github/workflows/reflow-publish-installer.yml
with:
concurrency-name: deb
chia-installer-version: ${{ needs.version.outputs.chia-installer-version }}
chia-dev-version: ${{ needs.version.outputs.chia-dev-version }}
configuration: ${{ toJSON( matrix.configuration ) }}
secrets: inherit
needs:
- version
- build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,14 @@ jobs:
rm -rf ./chia-blockchain-gui/packages/gui/daemon
publish:
name: 📦 Publish Installers
uses: ./.github/workflows/reflow-publish-installer.yml
with:
concurrency-name: rpm
chia-installer-version: ${{ needs.version.outputs.chia-installer-version }}
chia-dev-version: ${{ needs.version.outputs.chia-dev-version }}
configuration: ${{ toJSON( matrix.configuration ) }}
secrets: inherit
needs:
- version
- build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-macos-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,14 @@ jobs:
run: security delete-keychain signing_temp.keychain || true

publish:
name: 📦 Publish Installers
uses: ./.github/workflows/reflow-publish-installer.yml
with:
concurrency-name: macos
chia-installer-version: ${{ needs.version.outputs.chia-installer-version }}
chia-dev-version: ${{ needs.version.outputs.chia-dev-version }}
configuration: ${{ toJSON( matrix.configuration ) }}
secrets: inherit
needs:
- version
- build
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,14 @@ jobs:
Remove-Item .\chia-blockchain-gui\release-builds -Recurse -Force
publish:
name: 📦 Publish Installers
uses: ./.github/workflows/reflow-publish-installer.yml
with:
concurrency-name: windows
chia-installer-version: ${{ needs.version.outputs.chia-installer-version }}
chia-dev-version: ${{ needs.version.outputs.chia-dev-version }}
configuration: ${{ toJSON( matrix.configuration ) }}
secrets: inherit
needs:
- version
- build
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/reflow-publish-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency_name }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency-name }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
aws s3 cp "artifacts/${FILE}.sha256" "${LATEST_DEV_S3_URL}/${DEV_FILE}.sha256"
- name: Create torrent
if: env.FULL_RELEASE == 'true' && matrix.mode.matrix == 'gui'
if: env.RELEASE == 'true' && matrix.mode.matrix == 'gui'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand All @@ -128,10 +128,14 @@ jobs:
aws s3 cp artifacts/${FILE}.sha256 ${LATEST_DEV_S3_URL}/${LATEST_DEV_FILE}.sha256
- name: Upload Release Files
if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.FULL_RELEASE == 'true'
if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.RELEASE == 'true'
run: |
aws s3 cp artifacts/${FILE} ${INSTALL_S3_URL}
aws s3 cp artifacts/${FILE}.sha256 ${INSTALL_S3_URL}
- name: Upload Release Torrent
if: steps.check_secrets.outputs.HAS_AWS_SECRET && env.RELEASE == 'true' && matrix.mode.matrix == 'gui'
run: |
aws s3 cp artifacts/${FILE}.torrent ${TORRENT_S3_URL}
- name: Upload release artifacts
Expand All @@ -146,7 +150,7 @@ jobs:
- name: Mark installer complete
uses: Chia-Network/actions/github/glue@main
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && (env.PRE_RELEASE == 'true' || env.FULL_RELEASE == 'true')
if: steps.check_secrets.outputs.HAS_GLUE_SECRET && (env.RELEASE == 'true')
env:
REPO_SUFFIX: ${{ env.PRE_RELEASE == 'true' && '-prerelease' || '' }}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
file_name:
required: true
type: string
concurrency_name:
concurrency-name:
required: true
type: string
configuration:
Expand All @@ -42,7 +42,7 @@ on:

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency_name }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || '' }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.ref }}-${{ github.workflow }}-${{ inputs.concurrency-name }}-${{ github.event_name == 'workflow_dispatch' && github.run_id || '' }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true

defaults:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
matrix: macos-intel
name: macOS Intel
file_name: macos
concurrency_name: macos-intel
concurrency-name: macos-intel
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: macos-12
Expand All @@ -131,7 +131,7 @@ jobs:
matrix: macos
name: macOS ARM
file_name: macos-arm
concurrency_name: macos-arm
concurrency-name: macos-arm
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: macos-14
Expand All @@ -146,7 +146,7 @@ jobs:
matrix: ubuntu
name: Ubuntu
file_name: ubuntu
concurrency_name: ubuntu
concurrency-name: ubuntu
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: ubuntu-latest
Expand All @@ -161,7 +161,7 @@ jobs:
matrix: windows
name: Windows
file_name: windows
concurrency_name: windows
concurrency-name: windows
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: windows-latest
Expand Down
8 changes: 8 additions & 0 deletions chia/_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,14 @@ async def crawler_service(root_path_populated_with_config: Path, database_uri: s
yield service


@pytest.fixture(scope="function")
async def crawler_service_no_loop(
root_path_populated_with_config: Path, database_uri: str
) -> AsyncIterator[CrawlerService]:
async with setup_crawler(root_path_populated_with_config, database_uri, start_crawler_loop=False) as service:
yield service


@pytest.fixture(scope="function")
async def seeder_service(root_path_populated_with_config: Path, database_uri: str) -> AsyncIterator[DNSServer]:
async with setup_seeder(root_path_populated_with_config, database_uri) as seeder:
Expand Down
42 changes: 22 additions & 20 deletions chia/_tests/core/full_node/test_full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ async def test_block_compression(self, setup_two_nodes_and_wallet, empty_blockch
await full_node_1.wait_for_wallet_synced(wallet_node=wallet_node_1, timeout=30)

# Send a transaction to mempool
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
tx_size,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
Expand All @@ -219,14 +219,14 @@ async def check_transaction_confirmed(transaction) -> bool:
assert len((await full_node_1.get_all_full_blocks())[-1].transactions_generator_ref_list) == 0

# Send another tx
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
20000,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
Expand Down Expand Up @@ -260,58 +260,58 @@ async def check_transaction_confirmed(transaction) -> bool:
await full_node_1.wait_for_wallet_synced(wallet_node=wallet_node_1, timeout=30)

# Send another 2 tx
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
30000,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
tr.spend_bundle,
tr.name,
)
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
40000,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
tr.spend_bundle,
tr.name,
)

async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
50000,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
tr.spend_bundle,
tr.name,
)

async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
async with wallet.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet.generate_signed_transaction(
3000000000000,
ph,
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = await wallet.wallet_state_manager.add_pending_transactions([tr])
[tr] = action_scope.side_effects.transactions
await time_out_assert(
10,
full_node_2.full_node.mempool_manager.get_spendbundle,
Expand All @@ -338,12 +338,13 @@ async def check_transaction_confirmed(transaction) -> bool:

# Creates a standard_transaction and an anyone-can-spend tx
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
await wallet.generate_signed_transaction(
30000,
Program.to(1).get_tree_hash(),
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = action_scope.side_effects.transactions
extra_spend = SpendBundle(
[
make_spend(
Expand Down Expand Up @@ -386,12 +387,13 @@ async def check_transaction_confirmed(transaction) -> bool:

# Make a standard transaction and an anyone-can-spend transaction
async with wallet.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tr] = await wallet.generate_signed_transaction(
await wallet.generate_signed_transaction(
30000,
Program.to(1).get_tree_hash(),
DEFAULT_TX_CONFIG,
action_scope,
)
[tr] = action_scope.side_effects.transactions
extra_spend = SpendBundle(
[
make_spend(
Expand Down
12 changes: 6 additions & 6 deletions chia/_tests/core/full_node/test_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ async def peak_height(fna: FullNodeAPI):
await time_out_assert(20, peak_height, num_blocks, full_node_api_1)
await time_out_assert(20, peak_height, num_blocks, full_node_api_2)

async with wallet_0.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tx] = await wallet_0.wallet_state_manager.main_wallet.generate_signed_transaction(
async with wallet_0.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet_0.wallet_state_manager.main_wallet.generate_signed_transaction(
10, ph1, DEFAULT_TX_CONFIG, action_scope, 0
)
[tx] = await wallet_0.wallet_state_manager.add_pending_transactions([tx])
[tx] = action_scope.side_effects.transactions

await time_out_assert(
10,
Expand Down Expand Up @@ -155,11 +155,11 @@ async def test_mempool_tx_sync(self, three_nodes_two_wallets, self_hostname, see
)
await time_out_assert(20, wallet_0.wallet_state_manager.main_wallet.get_confirmed_balance, funds)

async with wallet_0.wallet_state_manager.new_action_scope(push=False) as action_scope:
[tx] = await wallet_0.wallet_state_manager.main_wallet.generate_signed_transaction(
async with wallet_0.wallet_state_manager.new_action_scope(push=True) as action_scope:
await wallet_0.wallet_state_manager.main_wallet.generate_signed_transaction(
10, bytes32.random(seeded_random), DEFAULT_TX_CONFIG, action_scope, 0
)
[tx] = await wallet_0.wallet_state_manager.add_pending_transactions([tx])
[tx] = action_scope.side_effects.transactions

await time_out_assert(
10,
Expand Down
Loading

0 comments on commit 1f2be5f

Please sign in to comment.