weeaa / jito-go Goto Github PK
View Code? Open in Web Editor NEW๐ช Jito Go SDK [unnoficial]
Home Page: https://www.jito.wtf
License: Apache License 2.0
๐ช Jito Go SDK [unnoficial]
Home Page: https://www.jito.wtf
License: Apache License 2.0
searcher_client/searcher.go:267
var out *BroadcastBundleResponse
err = json.NewDecoder(resp.Body).Decode(out)
Could you add an example to subscribe to geyser? Thanks
in searcher.go
if err = c.handleBundleResult(bundleResult); err != nil {
return nil, err
}
var statuses *rpc.GetSignatureStatusesResult
statuses, err = c.RpcConn.GetSignatureStatuses(ctx, false, bundleSignatures...)
if err != nil {
return nil, err
}
for _, status := range statuses.Value {
if status.ConfirmationStatus != rpc.ConfirmationStatusProcessed {
return nil, errors.New("searcher service did not provide bundle status in time")
}
}
I tested the transfer operation using the Send Bundle
method in the example, but returned an error
Panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc000000 5 code=0x0 addr=0x0 pc=0x172496e]
After inspection, it was found that the status.Value
may be nil
or rpc.ConfirmationStatusConfirmed
an error in my call. resulting in the returned resp being nil
๏ผHow can I obtain the tx_hash for this transaction
Hi, I've seen the repo offers functionality to "[Subscribe to Mempool Transactions | Accounts], but I noticed this feature was closed due to sandwitch attacks suffered in solana.
If I am correct thi could be removed.
Thanks for your work !
Hey, is it possible to subscribe to program updates? If not, when is this feature going to be added?
I'm sending bundles successfuly with:
func SendBundle(ctx context.Context, txs []*solana.Transaction) (*jito_pb.SendBundleResponse, error) {
logger.Sugar.Info("Sending Bundle...")
if len(txs) > 5 {
return nil, fmt.Errorf("TX bundle must have len <= 5")
}
return client.JITO_CLIENT.BroadcastBundleWithConfirmation(ctx, txs)
}
However the confirmation response isn't received
res, err := executor.SendBundle(context.Background(), []*solana.Transaction{tx})
if err != nil {
logger.Sugar.Fatal(err)
}
logger.Sugar.Info(res)
My code hangs here, but i can see the successful TX on solscan / jito explorer.
I am working on both local machine and on a windows 10 VPS.
For some reason, when tryin to initialize the client on the VPS i get the following error: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp [::1]:443: connectex: No connection could be made because the target machine actively refused it.
this is how my client is being initialized:
client, err := searcher_client.NewNoAuth(
ctx,
block_engine_url,
rpc_helper.New(jito_rpc),
rpc_helper.New(sol_rpc),
nil,
)
Im on MacOS arm64.
A friend of mine is running on his local Windows 10 machine and is getting the same error aswell so I guess it's not only limited to VPS as I think.
I'm getting this error thrown when I try to compile:
# github.com/weeaa/jito-go/pb
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:116:6: SubscribePacketsRequest redeclared in this block
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:23:6: other declaration of SubscribePacketsRequest
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:122:35: method SubscribePacketsRequest.Reset already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:29:35
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:131:35: method SubscribePacketsRequest.String already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:38:35
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:135:33: method SubscribePacketsRequest.ProtoMessage already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:42:33
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:137:35: method SubscribePacketsRequest.ProtoReflect already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:44:35
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:150:33: method SubscribePacketsRequest.Descriptor already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:57:33
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:154:6: SubscribePacketsResponse redeclared in this block
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:61:6: other declaration of SubscribePacketsResponse
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:167:36: method SubscribePacketsResponse.Reset already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:70:36
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:176:36: method SubscribePacketsResponse.String already declared at ../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/block_engine.pb.go:79:36
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/shredstream.pb.go:23:6: Heartbeat redeclared in this block
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/shared.pb.go:71:6: other declaration of Heartbeat
../../../go/pkg/mod/github.com/weeaa/[email protected]/pb/relayer.pb.go:176:36: too many errors
I was doing some tests with the package last week and it was working fine, but I created a new project to work from and now compilation throws these errors. Didn't want to go editing generated files, as could be a bug on my end. Any thoughts?
// max per bundle is 5 transactions
txns := make([]*solana.Transaction, 0, 5)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.