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

fix(test3): RunMemPackage on p/leon/avl to restore types #2217

Merged
merged 2 commits into from
May 27, 2024

Conversation

thehowl
Copy link
Member

@thehowl thehowl commented May 27, 2024

		// XXX(morgan): test3 specific, there is a bug with the transactions and
		// the way test3 runs.
		// The theory is as follows:
		//     Take a look at defaultStore.SetType
		//     When p/leon/avl was called, a type with the same TypeID was found in the cache, but it was different than the ones passed, so the function returned
		//     But the type was never in the store
		//     The reason this can happen is that up until this recent commit
		//     https://github.com/gnolang/gno/commit/8afb1a42e138014a3025ef4817aff67b6f4f7ded
		//     The store caches were shared with all child stores, even the ones that are eventually rolled back (due to, like, a failing transaction)
		//     So, in the running node, in a first addpkg, the type was saved in the cache, but then there was a bug in the code so the transaction failed
		//     The type is now in cacheTypes, but not in the database
		//     Afterwards, it was re-uploaded. SetType is called, it detects an existing type in cacheType, but the types are different; so SetType returns without storing it in the database

@thehowl thehowl self-assigned this May 27, 2024
@leohhhn
Copy link
Contributor

leohhhn commented May 27, 2024

I need a badge for breaking test3

@zivkovicmilos zivkovicmilos self-requested a review May 27, 2024 16:52
pkgs/gnolang/store.go Show resolved Hide resolved
.github/workflows/build.yml Show resolved Hide resolved
@thehowl thehowl merged commit b515cd0 into chain/test3 May 27, 2024
49 of 51 checks passed
@thehowl thehowl deleted the dev/morgan/test3-hotfix branch May 27, 2024 16:59
@moul
Copy link
Member

moul commented May 27, 2024

Congratulations on the forensic work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants