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

Panic in the PbGenericBlock() #14789

Open
bogdanprodanj opened this issue Jan 10, 2025 · 0 comments
Open

Panic in the PbGenericBlock() #14789

bogdanprodanj opened this issue Jan 10, 2025 · 0 comments
Labels
Bug Something isn't working

Comments

@bogdanprodanj
Copy link

Describe the bug

If I substitute params.BeaconConfig().GenesisForkVersion with params.BeaconConfig().DenebForkVersion in this test

tt.action()
bFunc, ok := BlockMap[bytesutil.ToBytes4(params.BeaconConfig().GenesisForkVersion)]
assert.Equal(t, tt.exists, ok)
if tt.exists {
	b, err := bFunc()
	require.NoError(t, err)
	generic, err := b.PbGenericBlock()
	require.NoError(t, err)
	assert.NotNil(t, generic.GetPhase0())
}

the test will panic on line 128

Has this worked before in a previous version?

Yes, this worked in `v5.0.3`

🔬 Minimal Reproduction

No response

Error

=== RUN   TestInitializeDataMaps
=== RUN   TestInitializeDataMaps/no_change
--- FAIL: TestInitializeDataMaps/no_change (18.89s)

--- FAIL: TestInitializeDataMaps (18.89s)
panic: interface conversion: protoreflect.ProtoMessage is *eth.SignedBeaconBlockDeneb, not *eth.SignedBeaconBlockContentsDeneb [recovered]
	panic: interface conversion: protoreflect.ProtoMessage is *eth.SignedBeaconBlockDeneb, not *eth.SignedBeaconBlockContentsDeneb

goroutine 36 [running]:
testing.tRunner.func1.2({0x100b3fd20, 0x14000418fc0})
	/Users/bogdan/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1632 +0x3c0
testing.tRunner.func1()
	/Users/bogdan/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1635 +0x57c
panic({0x100b3fd20?, 0x14000418fc0?})
	/Users/bogdan/go/pkg/mod/golang.org/[email protected]/src/runtime/panic.go:785 +0xf0
github.com/prysmaticlabs/prysm/v5/consensus-types/blocks.(*SignedBeaconBlock).PbGenericBlock(0x140002be5b0)
	/Users/bogdan/go/src/github.com/prysmaticlabs/prysm/consensus-types/blocks/getters.go:128 +0x1014
github.com/prysmaticlabs/prysm/v5/beacon-chain/p2p/types.TestInitializeDataMaps.func4(0x140002b6d00)
	/Users/bogdan/go/src/github.com/prysmaticlabs/prysm/beacon-chain/p2p/types/object_mapping_test.go:57 +0x228
testing.tRunner(0x140002b6d00, 0x140003ba1e0)
	/Users/bogdan/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1690 +0x1a8
created by testing.(*T).Run in goroutine 35
	/Users/bogdan/go/pkg/mod/golang.org/[email protected]/src/testing/testing.go:1743 +0x668

Debugger finished with the exit code 0


### Platform(s)

Mac (Apple Silicon)

### What version of Prysm are you running? (Which release)

v5.2.0

### Anything else relevant (validator index / public key)?

_No response_
@bogdanprodanj bogdanprodanj added the Bug Something isn't working label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant