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

attempting to interact with the tpu client #35614

Closed
qg5 opened this issue Jul 26, 2024 · 1 comment
Closed

attempting to interact with the tpu client #35614

qg5 opened this issue Jul 26, 2024 · 1 comment
Labels
community Community contribution

Comments

@qg5
Copy link

qg5 commented Jul 26, 2024

Problem

Is there any reason this doesn't work? I was thinking certificates but I'm not sure which to use or how to generate them. I'm trying to access the tpu client I have running and send a transaction

I tried to listen for messages but nothing is returned

I'm using quic-go

func sendTransactionUsingQuic(addr string, txBytes []byte) error {
	tlsConfig := &tls.Config{
		InsecureSkipVerify: true,
		NextProtos:         []string{"solana-tpu"},
		MinVersion:         tls.VersionTLS13,
	}

	session, err := quic.DialAddr(context.Background(), addr, tlsConfig, &quic.Config{
		MaxIdleTimeout: time.Second * 30,
	})
	if err != nil {
		return err
	}
	defer session.CloseWithError(0, "closing")

	stream, err := session.OpenUniStreamSync(context.Background())
	if err != nil {
		return err
	}
	defer stream.Close()

	_, err = stream.Write(txBytes)
	return err
}

Any guidance or help would be appreciated

@qg5 qg5 added the community Community contribution label Jul 26, 2024
Copy link
Contributor

This repository is no longer in use. Please re-open this issue in the agave repo: https://github.com/anza-xyz/agave

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

No branches or pull requests

1 participant