Skip to content

feat:patch bolt "utc" support in Bolt 4.4#23

Merged
johannessen merged 4 commits intomajensen:mainfrom
npc1054657282:feat/patch-bolt
Aug 6, 2025
Merged

feat:patch bolt "utc" support in Bolt 4.4#23
johannessen merged 4 commits intomajensen:mainfrom
npc1054657282:feat/patch-bolt

Conversation

@npc1054657282
Copy link
Copy Markdown
Contributor

@npc1054657282 npc1054657282 commented Jun 28, 2025

  1. Fix a bug of getting minor version. The original impl incorrectly used octal mask rather than hexadecimal, resulting in always getting a wrong minor version.
  2. Use "utc" patch bolt in bolt version 4.4. Resolves Protocol Violation: Client sends Bolt 5.0 DateTime format when Bolt 4.x is negotiated #22
  3. Bump the default 4.x version from 4.0 to 4.4.

Add minor protocol version to debug log message.
The minor version is incorrectly masked with octal `0700`.
It get the false minor version(always zero).
The true mask is to use hexadecimal `0x0700`.
To solve the protocol violation issue.
The neo4j-omni always serializes `DateTime` to the modern structure defined in Bolt 5.0.
The Bolt 4.x version cannot unpack it.
However, the Bolt 4.4 version may unpack the Bolt 5.0 `DateTime` with a "utc" `patch-bolt`.
I just try to use this to solve the problem at least in Bolt 4.4.
@npc1054657282 npc1054657282 changed the title feat:patch bolt "utc" support in feat:patch bolt "utc" support in Bolt 4.4 Jun 28, 2025
Copy link
Copy Markdown
Collaborator

@johannessen johannessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the default configuration, Bolt 4.0 is still preferred, so #22 will continue to be a problem.

I’d say this patch should also change the default supported versions from 4.0 to 4.4 (in client_config.c).

Comment thread lib/src/connection.c
BREAKING CHANGE: Dropped default support for version 4.0.
Now default 4.x version is 4.4.
@johannessen johannessen merged commit a46599d into majensen:main Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Protocol Violation: Client sends Bolt 5.0 DateTime format when Bolt 4.x is negotiated

2 participants