Open zivkovicmilos opened 9 months ago
There are two issues.
Issue 1: Missing Import for Amino Message Package The amino message package registered for vm.m_call and vm.m_addpkg must be imported into the global codec register. There are two potential solutions:
Issue 2: Stack Overflow Panic in Error Formatting When executing the line:
err = fmt.Errorf("unrecognized concrete type full name %s of %v", fullname, cdc.fullnameToTypeInfo)
a stack overflow panic occurs after vm.m_call is not found in the cdc.fullnameToTypeInfo map. PR #1179 removed the print out from fmt.Errorf("%v", fullname, cdc.fullnameToTypeInfo). While this addresses the immediate problem of the panic, it doesn't resolve the underlying issue causing the stack overflow.
Further investigation revealed that the attempt to print m["tm.SimpleProofNode"].StructInfo.Fields[1].TypeInfo leads to an infinite recursive loop.
Will provide a fix for this issue shortly
@piux2
This issue is still not resolved, please don't close it until we find a solution to the problem
amino.Unmarshal
doesn't work without unused importDescription
For some reason, calling
amino.Unmarhsal
without importing an unused package_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
causes a stack overflow exception.Your environment
master
(ce258b16cf27d10ac8e62abde2675c3b4ce76b6f)Steps to reproduce
Create a test file:
Running this test should produce a stack overflow error:
Now, add the unused import:
Running the test now should be good, with the transaction being printed:
Expected behaviour
Calling
amino.Unmarshal
should work with just the base import"github.com/gnolang/gno/tm2/pkg/amino"
.Actual behaviour
Calling
amino.Unmarshal
without the unused import (_ "github.com/gnolang/gno/gno.land/pkg/sdk/vm"
) causes a stack overflow exception.Logs
Proposed solution
No proposed solution as of now.