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(pallet-gear-builtin): Fix the issue of bi-replying #3758

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

breathx
Copy link
Member

@breathx breathx commented Feb 27, 2024

An issue appeared due to improper merging of #3475 with builtins pallet

Incorrect merging produced the following error:

--- STDERR:              pallet-gear-builtin tests::basic::invoking_builtin_from_program_works ---
thread 'tests::basic::invoking_builtin_from_program_works' panicked at /Users/runner/work/gear/gear/pallets/gear/src/internal.rs:920:37:
internal error: entered unreachable code: GasTree corrupted! Module(ModuleError { index: 9, error: [1, 0, 0, 0], message: Some("NodeAlreadyExists") })
stack backtrace:
   0: rust_begin_unwind
             at /rustc/7ffc697ce10f19447c0ce338428ae4b9bc0c041c/library/std/src/panicking.rs:647:5
   1: core::panicking::panic_fmt
             at /rustc/7ffc697ce10f19447c0ce338428ae4b9bc0c041c/library/core/src/panicking.rs:72:14
   2: pallet_gear::internal::<impl pallet_gear::pallet::Pallet<T>>::split::{{closure}}
             at /Users/runner/work/gear/gear/pallets/gear/src/internal.rs:920:37
   3: core::result::Result<T,E>::unwrap_or_else
             at /rustc/7ffc697ce10f19447c0ce338428ae4b9bc0c041c/library/core/src/result.rs:1426:23
   4: pallet_gear::internal::<impl pallet_gear::pallet::Pallet<T>>::split
             at /Users/runner/work/gear/gear/pallets/gear/src/internal.rs:919:13
   5: pallet_gear::manager::journal::<impl gear_core_processor::common::JournalHandler for pallet_gear::manager::ExtManager<T>>::send_dispatch
             at /Users/runner/work/gear/gear/pallets/gear/src/manager/journal.rs:245:33
   6: gear_core_processor::handler::handle_journal
             at /Users/runner/work/gear/gear/core-processor/src/handler.rs:49:18
   7: pallet_gear::runtime_api::<impl pallet_gear::pallet::Pallet<T>>::calculate_gas_info_impl
             at /Users/runner/work/gear/gear/pallets/gear/src/runtime_api.rs:239:17
   8: pallet_gear::pallet::Pallet<T>::calculate_gas_info

see: https://github.com/gear-tech/gear/actions/runs/8060686017/job/22017781608

@breathx breathx added the A0-pleasereview PR is ready to be reviewed by the team label Feb 27, 2024
@breathx breathx requested a review from ekovalev February 27, 2024 10:49
@breathx breathx added the C0-bug Something isn't working label Feb 27, 2024
@NikVolf
Copy link
Member

NikVolf commented Feb 27, 2024

Can we add a test that there is only one reply?

@breathx
Copy link
Member Author

breathx commented Feb 27, 2024

Can we add a test that there is only one reply?

I guess it's not necessary, because exactly this error will everytime appear saying that there is duplicate gas node (so duplicate message in a system) signalising exactly about the issue

UPD: as I mentioned in a PR comment the problem didn't exist before merging two independent PRs where one uses replies and second changes structure that signalises that reply was sent

@NikVolf
Copy link
Member

NikVolf commented Feb 27, 2024

Can we add a test that there is only one reply?

I guess it's not necessary, because exactly this error will everytime appear saying that there is duplicate gas node (so duplicate message in a system) signalising exactly about the issue

UPD: as I mentioned in a PR comment the problem didn't exist before merging two independent PRs where one uses replies and second changes structure that signalises that reply was sent

ah sure, it has broken master then?

Post a link to the error / quote error maybe then

@NikVolf
Copy link
Member

NikVolf commented Feb 27, 2024

Can we add a test that there is only one reply?

I guess it's not necessary, because exactly this error will everytime appear saying that there is duplicate gas node (so duplicate message in a system) signalising exactly about the issue

UPD: as I mentioned in a PR comment the problem didn't exist before merging two independent PRs where one uses replies and second changes structure that signalises that reply was sent

nvm updated myself

@breathx breathx added A2-mergeoncegreen PR is ready to merge after CI passes and removed A0-pleasereview PR is ready to be reviewed by the team labels Feb 27, 2024
@breathx breathx merged commit 0e2f273 into master Feb 27, 2024
13 checks passed
@breathx breathx deleted the dn-fix-bi-replying-from-builtins branch February 27, 2024 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A2-mergeoncegreen PR is ready to merge after CI passes C0-bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants