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

Smoke test on westend #1291

Merged

Conversation

yrong
Copy link
Contributor

@yrong yrong commented Sep 18, 2024

@yrong yrong mentioned this pull request Sep 18, 2024
Base automatically changed from ron/westend to main September 20, 2024 07:23
@yrong yrong marked this pull request as ready for review September 24, 2024 01:46
Comment on lines +10 to +19
name: "transferToPolkadot",
node_args: "--require=dotenv/config",
script: "./dist/src/transfer_to_polkadot.js",
args: "cron"
},
{
name: "transferToEthereum",
node_args: "--require=dotenv/config",
script: "./dist/src/transfer_to_ethereum.js",
args: "cron"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Periodically run the transfer tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

How do we know if they fail?

Copy link
Contributor Author

@yrong yrong Sep 26, 2024

Choose a reason for hiding this comment

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

Yeah, we don't wait here. Instead just depend on alarm infrastructure same as we do for production.

I'll run the task every day and we can alarm on nonce not increased for more than 1 day. It will be notified in https://snowfork.slack.com/archives/C07BG558XE1

Copy link
Contributor

@claravanstaden claravanstaden left a comment

Choose a reason for hiding this comment

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

Awesome! ✨

Comment on lines 133 to 163
// Fetches heads for each parachain Id filtering out para threads.
func (conn *Connection) FetchParachainHeads(relayChainBlockHash types.Hash) ([]ParaHead, error) {
// Fetch para heads
paraHeads, err := conn.fetchParaHeads(relayChainBlockHash)
if err != nil {
log.WithError(err).Error("Cannot fetch para heads.")
return nil, err
}

// fetch ids of parachains (not including parathreads)
var parachainIDs []uint32
parachainsKey, err := types.CreateStorageKey(conn.Metadata(), "Paras", "Parachains", nil, nil)
if err != nil {
return nil, err
}

_, err = conn.API().RPC.State.GetStorage(parachainsKey, &parachainIDs, relayChainBlockHash)
if err != nil {
return nil, err
}

// filter out parathreads
var parachainHeads []ParaHead
for _, v := range parachainIDs {
if head, ok := paraHeads[v]; ok {
parachainHeads = append(parachainHeads, head)
}
}
return parachainHeads, nil
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be great if we can keep this and make the relayer forwards compatible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, though would prefer to address that in #1288

@alistair-singh I would assume the fix in #1288 will also be compatible with polkadot production?

@@ -89,7 +89,7 @@ async fn send_token() {

assert_eq!(receipt.status.unwrap().as_u64(), 1u64);

let wait_for_blocks = 100;
let wait_for_blocks = 1000;
Copy link
Contributor

Choose a reason for hiding this comment

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

This increase will cause test failures to be super slow. Is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's nessessary for testnet/production as the finality latency is about 1 hour there, so we need to wait a bit longer.

Maybe better to load from some env and decrease it for local setup.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe better to load from some env and decrease it for local setup.

Good idea!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

smoketest/make-bindings.sh Show resolved Hide resolved
},
{
id: "muse",
name: "Muse",
Copy link
Contributor

Choose a reason for hiding this comment

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

It doesn't look like Muse is deployed on Westend?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but would prefer to leave it here as placeholder as Muse will migrate to Westend sooner or later?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should remove it as it will appear in the user interface. We can add it when the integration works.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

web/packages/operations/src/transfer_to_ethereum.ts Outdated Show resolved Hide resolved
web/packages/operations/src/transfer_to_polkadot.ts Outdated Show resolved Hide resolved
},
{
id: "muse",
name: "Muse",
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should remove it as it will appear in the user interface. We can add it when the integration works.

web/packages/operations/src/transfer_token.ts Outdated Show resolved Hide resolved
@@ -8,22 +9,23 @@ import {
} from "@snowbridge/api"
import { WETH9__factory } from "@snowbridge/contract-types"
import { Wallet } from "ethers"
import cron from "node-cron"

const monitor = async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +10 to +19
name: "transferToPolkadot",
node_args: "--require=dotenv/config",
script: "./dist/src/transfer_to_polkadot.js",
args: "cron"
},
{
name: "transferToEthereum",
node_args: "--require=dotenv/config",
script: "./dist/src/transfer_to_ethereum.js",
args: "cron"
Copy link
Contributor

Choose a reason for hiding this comment

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

How do we know if they fail?

minimumTransferAmount: 15_000_000_000_000n,
},
{
id: "vETH",
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets remove vETH until its registered. This case was for bifrost in rococo. They are not in Westend so I do not think we need this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

web/packages/api/src/environment.ts Outdated Show resolved Hide resolved
web/packages/api/src/environment.ts Outdated Show resolved Hide resolved
web/packages/api/src/environment.ts Outdated Show resolved Hide resolved
yrong and others added 6 commits September 26, 2024 12:21
* adds paseo UI

* remove muse and bump versions

* remove muse and bump versions

* remove veth token

* paseo things

* fix subscan urls

* revert version

* fix versions
@yrong yrong changed the base branch from main to alistair/fix-mmr-root-validation September 27, 2024 12:21
* fix wrap around

* logs

* doesnt have to be in the same period

* testing something

* fix

* adds test and config

* writer

* fix compilation

* remove temp building relayer

* comment
@claravanstaden claravanstaden merged commit af56d9d into alistair/fix-mmr-root-validation Oct 1, 2024
1 check passed
@claravanstaden claravanstaden deleted the ron/smoke-test-on-westend branch October 1, 2024 12:23
@alistair-singh alistair-singh restored the ron/smoke-test-on-westend branch October 1, 2024 12:35
@alistair-singh alistair-singh deleted the ron/smoke-test-on-westend branch October 1, 2024 12:35
claravanstaden added a commit that referenced this pull request Oct 2, 2024
* add back in para threads

* fix out of bounds error

* forward compatible

* fix comment

* move function back up

* move again

* Smoke test on westend (#1291)

* Initialize for westend

* Update beacon checkpoint

* add back in para threads

* fix out of bounds error

* Smoke tests on westend

* Load config from env

* Cleanup env

* Remove penpal code

* Cleanup

* Update smoke tests

* Add westend env

* crontab smoke tests

* Split as two tests

* Fix typo

* Remove assets/parachain non-exist

* Revert change

* Wait config from env

* Load interval from env

* Add alarm check no transfer

* Adds paseo UI (#1276)

* adds paseo UI

* remove muse and bump versions

* remove muse and bump versions

* remove veth token

* paseo things

* fix subscan urls

* revert version

* fix versions

* Update api package

* Fix the merge

* Remove unused

* Fix find on-chain checkpoint (#1294)

* fix wrap around

* logs

* doesnt have to be in the same period

* testing something

* fix

* adds test and config

* writer

* fix compilation

* remove temp building relayer

* comment

* bump version

---------

Co-authored-by: Alistair Singh <[email protected]>
Co-authored-by: Clara van Staden <[email protected]>

---------

Co-authored-by: Ron <[email protected]>
Co-authored-by: Clara van Staden <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants