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

e2e test improvements, and fixes for executor classes #18312

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

hayes-mysten
Copy link
Contributor

Description

Describe the changes or additions included in this PR.

Test plan

How did you test the new or updated feature?


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL:
  • CLI:
  • Rust SDK:

Copy link

vercel bot commented Jun 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 0:07am
sui-typescript-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 0:07am
2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2024 0:07am
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Jun 21, 2024 0:07am

@hayes-mysten hayes-mysten force-pushed the mh--debug-e2e-cache-error-2 branch 2 times, most recently from d383cf1 to bd6733e Compare June 18, 2024 18:43
@hayes-mysten hayes-mysten changed the title debug e2e cache error 2 e2e test improvements, and fixes for executor classes Jun 19, 2024
@@ -13,6 +13,9 @@ runs:
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # [email protected]
with:
version: 9.1.1
- name: Install dependencies
run: pnpm install --frozen-lockfile
shell: bash
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 was defaulting to using a new version of turbo that removed commands this job depends on, so e2e test were only triggered on rust changes

- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-on-failure: true
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this shaves a few minutes off the build, but doesn't seem to cache builds for things in the repo. Probably needs further improvement

@@ -197,6 +240,8 @@ export class ParallelTransactionExecutor {
}
}

this.#lastDigest = results.digest;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The executor tracks a list of gas coins to use to refill the pool, this contains the coins from failed executions and coins who's balance was too low. we don't track the versions for these coins, because in error cases, they might become invalid. By tracking the digest of the last executed transaction, we can wait for that digest to be indexed before executing the refill transaction, which should ensure the index is up-to-date for all coins used to refill the pool.

async #refillCoinPool() {
const batchSize = Math.min(
this.#coinBatchSize,
this.#maxPoolSize - (this.#coinPool.length + this.#executeQueue.activeTasks) + 1,
this.#maxPoolSize - (this.#coinPool.length + this.#pendingTransactions) + 1,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using the number of transaction in the executeQueue was slightly wrong, because they may not have borrowed a coin yet. Instead we should have been counting the coins in the pool + the transactions that are actively borrowing a gas coin

@hayes-mysten hayes-mysten merged commit fef99d3 into main Jun 21, 2024
50 checks passed
@hayes-mysten hayes-mysten deleted the mh--debug-e2e-cache-error-2 branch June 21, 2024 00:43
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this pull request Jul 29, 2024
## Description 

Describe the changes or additions included in this PR.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
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.

2 participants