mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-27 22:28:21 +00:00
81ea5bab78
* Initial commit * Add sentry gRPC interface * p2psentry directory * Update README.md * Update README.md * Update README.md * Add go package * Correct syntax * add external downloader interface (#2) * Add txpool (#3) * Add private API (#4) * Invert control.proto, add PeerMinBlock, Separare incoming Tx message into a separate stream (#5) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Separate upload messages into its own stream (#6) Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> * Only send changed accounts to listeners (#7) * Txpool interface doc (#9) * More additions * More additions * Fix locking * Intermediate * Fix separation of phases * Intermediate * Fix test * More transformations * New simplified way of downloading headers * Fix hard-coded header sync * Fixed syncing near the tip of the chain * Add architecture diagram source and picture (#10) * More fixes * rename tip to link * Use preverified hashes instead of preverified headers * Fix preverified hashes generation * more parametrisation * Continue parametrisation * Fix grpc data limit, interruption of headers stage * Add ropsten preverified hashes * Typed hashes (#11) * Typed hashes * Fix PeerId * 64-bit tx nonce * Disable penalties * Add goerli settings, bootstrap nodes * Try to fix goerly sync * Remove interfaces * Add proper golang packages, max_block into p2p sentry Status * Prepare for proto overhaul * Squashed 'interfaces/' content from commit ce36053c2 git-subtree-dir: interfaces git-subtree-split: ce36053c24db2f56e48ac752808de60afa1dfb4b * Change EtherReply to address * Adaptations to new types * Switch to new types * Fixes * Fix formatting * Fix lint * Lint fixes, reverse order in types * Fix lint * Fix lint * Fix lint * Fix test * Not supporting eth/66 yet * Fix shutdown * Fix lint * Fix lint * Fix lint * return stopped check Co-authored-by: Artem Vorotnikov <artem@vorotnikov.me> Co-authored-by: b00ris <b00ris@mail.ru> Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local> Co-authored-by: lightclient <14004106+lightclient@users.noreply.github.com> Co-authored-by: canepat <16927169+canepat@users.noreply.github.com>
135 lines
4.7 KiB
Go
135 lines
4.7 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
|
|
package snapshotsync
|
|
|
|
import (
|
|
context "context"
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// DownloaderClient is the client API for Downloader service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
type DownloaderClient interface {
|
|
Download(ctx context.Context, in *DownloadSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
Snapshots(ctx context.Context, in *SnapshotsRequest, opts ...grpc.CallOption) (*SnapshotsInfoReply, error)
|
|
}
|
|
|
|
type downloaderClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewDownloaderClient(cc grpc.ClientConnInterface) DownloaderClient {
|
|
return &downloaderClient{cc}
|
|
}
|
|
|
|
func (c *downloaderClient) Download(ctx context.Context, in *DownloadSnapshotRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, "/snapshotsync.Downloader/Download", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *downloaderClient) Snapshots(ctx context.Context, in *SnapshotsRequest, opts ...grpc.CallOption) (*SnapshotsInfoReply, error) {
|
|
out := new(SnapshotsInfoReply)
|
|
err := c.cc.Invoke(ctx, "/snapshotsync.Downloader/Snapshots", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// DownloaderServer is the server API for Downloader service.
|
|
// All implementations must embed UnimplementedDownloaderServer
|
|
// for forward compatibility
|
|
type DownloaderServer interface {
|
|
Download(context.Context, *DownloadSnapshotRequest) (*emptypb.Empty, error)
|
|
Snapshots(context.Context, *SnapshotsRequest) (*SnapshotsInfoReply, error)
|
|
mustEmbedUnimplementedDownloaderServer()
|
|
}
|
|
|
|
// UnimplementedDownloaderServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedDownloaderServer struct {
|
|
}
|
|
|
|
func (UnimplementedDownloaderServer) Download(context.Context, *DownloadSnapshotRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Download not implemented")
|
|
}
|
|
func (UnimplementedDownloaderServer) Snapshots(context.Context, *SnapshotsRequest) (*SnapshotsInfoReply, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Snapshots not implemented")
|
|
}
|
|
func (UnimplementedDownloaderServer) mustEmbedUnimplementedDownloaderServer() {}
|
|
|
|
// UnsafeDownloaderServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to DownloaderServer will
|
|
// result in compilation errors.
|
|
type UnsafeDownloaderServer interface {
|
|
mustEmbedUnimplementedDownloaderServer()
|
|
}
|
|
|
|
func RegisterDownloaderServer(s grpc.ServiceRegistrar, srv DownloaderServer) {
|
|
s.RegisterService(&_Downloader_serviceDesc, srv)
|
|
}
|
|
|
|
func _Downloader_Download_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DownloadSnapshotRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DownloaderServer).Download(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/snapshotsync.Downloader/Download",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DownloaderServer).Download(ctx, req.(*DownloadSnapshotRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Downloader_Snapshots_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(SnapshotsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(DownloaderServer).Snapshots(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: "/snapshotsync.Downloader/Snapshots",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(DownloaderServer).Snapshots(ctx, req.(*SnapshotsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
var _Downloader_serviceDesc = grpc.ServiceDesc{
|
|
ServiceName: "snapshotsync.Downloader",
|
|
HandlerType: (*DownloaderServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Download",
|
|
Handler: _Downloader_Download_Handler,
|
|
},
|
|
{
|
|
MethodName: "Snapshots",
|
|
Handler: _Downloader_Snapshots_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "snapshot_downloader/external_downloader.proto",
|
|
}
|