Statically setting the properties on Json ObjectMapper causes intermittent test failures

Description

It has been found that some acceptanceTests (NewPendingTransadctionAcceptanceTest) sometimes fails during Json decoding.

From investigation, this is because the Json mapping of responses is sometimes more strict (requiring all fields in the Object to exist in the supplied Json), than other times (missing fields are null).

All code in Besu assumes the latter - however it appears that some code in EthSigner (which is included in the Besu code base for use during AcceptanceTests) resets the Json Mapper properties to require all fields to be present (FAIL_ON_MISSING_CREATOR_PROPERTIES).

Ultimately this is due to the static initialiser code in EthSigners JsonRpcHandler class - which effectively means all json mapping done in EthSigner MUST have all required fields.

It is recommended/suggested that this static assignment be removed (of the Json.mapper global object) be removed, and EthSigner use explicit ObjectMapper instances with appropriate configuration settings) - ultimately, altering a global object is fraught with danger, as there is no knowledge of how others are expecting to use said object.

Status

Assignee

Trent Mohay

Reporter

Trent Mohay

Labels

None

Refinement State

Ready for Work

Scrum Team

Phoenix

Story Points

1

Sprint

None

Priority

P3
Configure