Skip to content

QUIC Connection local TLS error - Peer closed with transport code 306 #98

@gherkins

Description

@gherkins

Describe the bug

I'm trying to connect to Solana TPU leaders via the quic string from the concactInfo,

tpuQuic: '18.132.XXX.XX:8009',

but consistently get:

QUIC Connection local TLS error - Peer closed with transport code 306

This happens to everyone of the Adresses from the cluster.
I just found error code 306 here:

DecodeError = 306,

which made me think I did the randomBytes part wrong, but I don't really see how...
I also tried using peculiarWebcrypto as in the benchmarks...

To Reproduce

import {QUICClient} from "@matrixai/quic";
import {getRandomValues} from "node:crypto";

const client = await QUICClient.createQUICClient({
        host: HOST_IP
        port: parseInt(PORT),
        config: {
            verifyPeer: false,
        },
        crypto: {
            ops: {
                randomBytes: async (data: ArrayBuffer) => {
                    getRandomValues(new Uint8Array(data));
                },
            },
        },
    }
)

// -> ERROR BEING THROWN HERE

const clientStream = client.connection.newStream();
const writer = clientStream.writable.getWriter()
await writer.write(BUFFER);
await writer.close();

Expected behavior

established connection w/o errors

Platform (please complete the following information)

macOS 14.4.1
node v20.11.1
ts-node v10.9.2

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingr&d:polykey:core activity 4End to End Networking behind Consumer NAT Devices

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions