Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: replace testnet 3 with testnet 4 #16426

Merged
merged 4 commits into from
Jan 31, 2025
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
7 changes: 4 additions & 3 deletions .github/workflows/template-connect-test-params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ on:
type: "boolean"
required: false
default: false
cache_tx:
description: "Cache transactions"
# After migrating from testnet 3 to testnet 4 using `disable_cache_tx=true` should be required for tests where tx are used.
disable_cache_tx:
description: "Disable Cache transactions (when `true` tests don't use cache for transactions)"
type: "string"
required: false
default: false
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
- if: ${{ inputs.testEnv == 'node' }}
run: yarn workspaces focus @trezor/connect

- if: ${{ inputs.cache_tx == 'true' }}
- if: ${{ inputs.disable_cache_tx == 'true' }}
run: echo "ADDITIONAL_ARGS=-c" >> "$GITHUB_ENV"
- if: ${{ inputs.testFirmwareModel }}
run: echo "ADDITIONAL_ARGS=$ADDITIONAL_ARGS -m ${{ inputs.testFirmwareModel }}" >> "$GITHUB_ENV"
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test-connect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,23 @@ jobs:

- name: Set daily matrix
id: set-matrix-daily
run: echo "dailyMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=2-latest --env=all --groups=api,api-flaky --cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT
run: echo "dailyMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=2-latest --env=all --groups=api,api-flaky --disable_cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT

- name: Set all firmwares matrix
id: set-matrix-all-firmwares
run: echo "allFwsMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=all --env=all --groups=all --cache_tx=false --transport=2.0.33)" >> $GITHUB_OUTPUT
run: echo "allFwsMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=all --env=all --groups=all --disable_cache_tx=false --transport=2.0.33)" >> $GITHUB_OUTPUT

- name: Set other devices matrix
id: set-matrix-other-devices
run: echo "otherDevicesMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=all --firmware=2-main --env=node --groups=api --cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT
run: echo "otherDevicesMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=all --firmware=2-main --env=node --groups=api --disable_cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT

- name: Set all transports matrix
id: set-matrix-all-transports
run: echo "allTransportsMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=2-latest --env=node --groups=api --cache_tx=true --transport=all)" >> $GITHUB_OUTPUT
run: echo "allTransportsMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T2T1 --firmware=2-latest --env=node --groups=api --disable_cache_tx=true --transport=all)" >> $GITHUB_OUTPUT

- name: Set trezor model one matrix
id: set-matrix-model-one
run: echo "modelOneMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T1B1 --firmware=1-latest --env=node --groups=api --cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT
run: echo "modelOneMatrix=$(node ./scripts/ci/connect-test-matrix-generator.js --model=T1B1 --firmware=1-latest --env=node --groups=api --disable_cache_tx=true --transport=2.0.33)" >> $GITHUB_OUTPUT

PR-check:
needs: [build, set-matrix]
Expand All @@ -108,7 +108,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.env }}-${{ matrix.groups.pattern }}-${{ matrix.groups.name }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand All @@ -126,7 +126,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.env }}-${{ matrix.groups.pattern }}-${{ matrix.groups.name }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand All @@ -145,7 +145,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.firmware }}-${{ matrix.groups.pattern }}-${{ matrix.groups.name }}-${{ matrix.env }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand All @@ -163,7 +163,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.model }}-${{ matrix.firmware }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand All @@ -181,7 +181,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.transport }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand All @@ -199,7 +199,7 @@ jobs:
includeFilter: ${{ matrix.groups.includeFilter }}
testsFirmware: ${{ matrix.firmware }}
testDescription: ${{ matrix.model }}-${{ matrix.firmware }}
cache_tx: ${{ matrix.cache_tx }}
disable_cache_tx: ${{ matrix.disable_cache_tx }}
transport: ${{ matrix.transport }}
testEnv: ${{ matrix.env }}
testFirmwareModel: ${{ matrix.model }}
Expand Down
7 changes: 2 additions & 5 deletions packages/connect-common/files/coins.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@
"address_type": 111,
"address_type_p2sh": 196,
"bech32_prefix": "tb",
"blockchain_link": {
"type": "blockbook",
"url": ["https://tbtc1.trezor.io", "https://tbtc2.trezor.io"]
},
"blockchain_link": { "type": "blockbook", "url": ["https://tbtc4-1.trezor.io"] },
"blocktime_seconds": 600,
"cashaddr_prefix": null,
"coin_label": "Testnet",
Expand All @@ -124,7 +121,7 @@
"extra_data": false,
"force_bip143": false,
"fork_id": null,
"hash_genesis_block": "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943",
"hash_genesis_block": "00000000da84f2bafbbc53dee25a72ae507ff4914b867c565be350b0da8bf043",
"is_testnet": true,
"max_address_length": 34,
"maxfee_kb": 10000000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,16 @@ describe('utils/deviceFeaturesUtils', () => {
expect(getUnavailableCapabilities(featT1B1, coins2)).toEqual({
ada: 'no-support',
tada: 'no-support',
bnb: 'no-support',
bsc: 'update-required',
arb: 'update-required',
base: 'update-required',
bnb: 'no-support',
bsc: 'update-required',
crw: 'update-required',
eos: 'no-support',
maid: 'no-capability',
pol: 'update-required',
op: 'update-required',
omni: 'no-capability',
op: 'update-required',
ppc: 'update-required',
sol: 'no-support',
dsol: 'no-support',
Expand Down Expand Up @@ -182,8 +182,8 @@ describe('utils/deviceFeaturesUtils', () => {
'eip712-domain-only': 'update-required',
maid: 'no-capability',
pol: 'update-required',
op: 'update-required',
omni: 'no-capability',
op: 'update-required',
taproot: 'update-required',
tsep: 'update-required',
thol: 'update-required',
Expand Down
59 changes: 58 additions & 1 deletion suite-common/message-system/config/config.v1.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,65 @@
{
"version": 1,
"timestamp": "2025-01-28T00:00:00+00:00",
"sequence": 76,
"sequence": 77,
"actions": [
{
"conditions": [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It requires condition so it display only to users that have Testnet coin enabled.

Copy link
Contributor

@MiroslavProchazka MiroslavProchazka Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to bump the sequence number, rebase to develop should solve this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I rebased to develop and the new number is sequence": 76, should I bump it to 77?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the new sequence needs to be higher than the existing one

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{
"environment": {
"desktop": ">=25.1.2",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably going to be next release. But maybe confirm it when release come.

"mobile": "!",
"web": "*"
},
"settings": [
{
"test": true
}
]
}
],
"message": {
"id": "2855131c-c871-4fe3-a758-ab7bd92b9934",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I generated this id randomly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it uuid4? I usually generate it here https://www.uuidgenerator.net/version4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I did not use that tool but the format is the same.

"priority": 90,
"dismissible": true,
"variant": "info",
"category": ["banner"],
"content": {
"en-GB": "Testnet account has been updated to new Testnet 4.",
"en": "Testnet account has been updated to new Testnet 4.",
"es": "Testnet account has been updated to new Testnet 4.",
"cs": "Testnet account has been updated to new Testnet 4.",
"ru": "Testnet account has been updated to new Testnet 4.",
"ja": "Testnet account has been updated to new Testnet 4.",
"hu": "Testnet account has been updated to new Testnet 4.",
"it": "Testnet account has been updated to new Testnet 4.",
"fr": "Testnet account has been updated to new Testnet 4.",
"de": "Testnet account has been updated to new Testnet 4.",
"tr": "Testnet account has been updated to new Testnet 4.",
"pt": "Testnet account has been updated to new Testnet 4.",
"uk": "Testnet account has been updated to new Testnet 4.."
},
"cta": {
"action": "external-link",
"link": "https://trezor.io/learn/a/bitcoin-testnet#testnet4",
"label": {
"en-GB": "Learn More",
"en": "Learn More",
"es": "Learn More",
"cs": "Learn More",
"ru": "Learn More",
"ja": "Learn More",
"hu": "Learn More",
"it": "Learn More",
"fr": "Learn More",
"de": "Learn More",
"tr": "Learn More",
"pt": "Learn More",
"uk": "Learn More"
}
}
}
},
{
"conditions": [
{
Expand Down
Loading