Skip to content

Gossipsub Publish Null Reference Exception #113

@uink45

Description

@uink45

Description
When calling the Publish method in PubsubRouter, the program ends up throwing a NullReferenceException: Object reference not set to an instance of an object. error.

Steps to Reproduce
This can be reproduced by calling the Publish method in the instance of PubsubRouter.

Actual behavior
The program will throw a NullReferenceException: Object reference not set to an instance of an object. error. This error prevents publishing messages to the Gossip network and results in not adhering to the light client specification.

Expected behavior
The expected behaviour is for it to avoid throwing a NullReferenceException error and to correctly publish the message.

Setup (please complete the following information):

  • Operating System: macOS
  • Version: 1.0.0-preview.34

Additional context
Consensus layer light clients in Ethereum are required to forward the light_client_finality_update and light_client_optimistic_update objects to the network after performing validations.

Logs
Here are the error logs during the program's execution:

[00:31:27] fail: Lantern.Beacon.Networking.Gossip.GossipSubManager[0] Error when handling light client optimistic update received from gossip System.NullReferenceException: Object reference not set to an instance of an object. at Nethermind.Libp2p.Protocols.Pubsub.PubsubRouter.Publish(String topicId, Byte[] message) at Lantern.Beacon.Networking.Gossip.GossipSubManager.HandleLightClientOptimisticUpdate(Byte[] update) in /Users/multi/Documents/GitHub/Lantern.Beacon/src/Lantern.Beacon/Networking/Gossip/GossipSubManager.cs:line 152

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions