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

test: make shadow_tracking more reliable #12306

Merged
merged 2 commits into from
Oct 25, 2024
Merged

Conversation

Longarithm
Copy link
Member

@Longarithm Longarithm commented Oct 24, 2024

Fixing issues:

  • _get_final_block_height' result is not a final block and expectation of min_height + 1 >= max_height fails sometimes. Getting minimum height instead.
  • We assumed that if we first query shard assignment and then block with chunks, then it will correspond to the same epoch, but it's not necessary the case. Instead, it is more reliable to just get block which everyone has and then retrieve epoch id and its assignment.
  • Making number of nodes = number of shards so that if shadowed account is incorrect, the test fails very quickly.
  • Also it won't hurt to ensure that all epoch ids in rounds should be unique.

@Longarithm Longarithm requested review from wacban and staffik October 24, 2024 20:53
@Longarithm Longarithm marked this pull request as ready for review October 24, 2024 20:54
@Longarithm Longarithm requested a review from a team as a code owner October 24, 2024 20:54
@marcelo-gonzalez
Copy link
Contributor

marcelo-gonzalez commented Oct 24, 2024

It passes on my laptop, but on my desktop it seems this has uncovered some bug :/ . In test1 logs (built from ab75966):

thread 'tokio-runtime-worker' panicked at core/store/src/trie/shard_tries.rs:441:9:
assertion failed: !self.0.mem_tries.read().unwrap().contains_key(shard_uid)

@marcelo-gonzalez marcelo-gonzalez added this pull request to the merge queue Oct 24, 2024
@marcelo-gonzalez marcelo-gonzalez removed this pull request from the merge queue due to a manual request Oct 24, 2024
@marcelo-gonzalez marcelo-gonzalez added this pull request to the merge queue Oct 25, 2024
Merged via the queue into master with commit e62f92c Oct 25, 2024
24 checks passed
@marcelo-gonzalez marcelo-gonzalez deleted the shadow-tracking branch October 25, 2024 13:54
@staffik
Copy link
Contributor

staffik commented Oct 26, 2024

Thanks Alex!

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