Skip to content
Merged

v1.7.7 #1026

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Release Notes

## [v1.7.7](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.7)

This version is backwards compatible to [v1.7.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.0). It is optional, but encouraged.

### Networking

- Refactored the networking library to track potential peers by nodeID rather than IP.
- Separated peer connections from the mesh network implementation to simplify testing.
- Fixed duplicate `Connected` messages bug.
- Supported establishing outbound connections with peers reporting different inbound and outbound IPs.

### Database

- Disabled seek compaction in leveldb by default.

### GRPC

- Increased protocol version, this requires all plugin definitions to update their communication dependencies.
- Merged services to be served using the same server when possible.
- Implemented a fast path for simple HTTP requests.
- Removed duplicated message definitions.
- Improved error reporting around invalid plugins.

### Coreth

- Optimized FeeHistory API.
- Added protection to prevent accidental corruption of archival node trie index.
- Added capability to restore complete trie index on best effort basis.
- Rounded up fastcache sizes to utilize all mmap'd memory in chunks of 64MB.

### Configs

- Removed `--inbound-connection-throttling-max-recent`
- Renamed `--network-peer-list-size` to `--network-peer-list-num-validator-ips`
- Removed `--network-peer-list-gossip-size`
- Removed `--network-peer-list-staker-gossip-fraction`
- Added `--network-peer-list-validator-gossip-size`
- Added `--network-peer-list-non-validator-gossip-size`
- Removed `--network-get-version-timeout`
- Removed `--benchlist-peer-summary-enabled`
- Removed `--peer-alias-timeout`

### Miscellaneous

- Fixed error reporting when making Avalanche chains that did not manually specify a primary alias.
- Added beacon utils for easier programmatic handling of beacon nodes.
- Resolved the default log directory on initialization to avoid additional error handling.
- Added support to the chain state module to specify an arbitrary new accepted block.

## [v1.7.6](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.6)

This version is backwards compatible to [v1.7.0](https://github.com/ava-labs/avalanchego/releases/tag/v1.7.0). It is optional, but encouraged.
Expand Down
1 change: 1 addition & 0 deletions api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ lint:
# TODO: how will fixing this affect functionality. Multiple fields are used as the request
# or response type for multiple RPCs
- galiasreaderproto/aliasreader.proto
- gconnproto/conn.proto
# allows RPC requests or responses to be google.protobuf.Empty messages. This can be set if you
# want to allow messages to be void forever, that is they will never take any parameters.
rpc_allow_google_protobuf_empty_requests: true
Expand Down
56 changes: 29 additions & 27 deletions api/gconnproto/conn.proto
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
syntax = "proto3";
package gconnproto;
option go_package = "github.com/ava-labs/avalanchego/api/gconnproto";
import "google/protobuf/empty.proto";

// Conn is a net.Conn see: https://pkg.go.dev/net#Conn
service Conn {
// Read reads data from the connection.
rpc Read(ReadRequest) returns (ReadResponse);
// Write writes data to the connection.
rpc Write(WriteRequest) returns (WriteResponse);
// Close closes the connection.
rpc Close(google.protobuf.Empty) returns (google.protobuf.Empty);
// SetDeadline sets the read and write deadlines associated
// with the connection.
rpc SetDeadline(SetDeadlineRequest) returns (google.protobuf.Empty);
// SetReadDeadline sets the deadline for future Read calls
// and any currently-blocked Read call.
rpc SetReadDeadline(SetDeadlineRequest) returns (google.protobuf.Empty);
// SetWriteDeadline sets the deadline for future Write calls
// and any currently-blocked Write call.
rpc SetWriteDeadline(SetDeadlineRequest) returns (google.protobuf.Empty);
}

message ReadRequest {
// length of the request in bytes
int32 length = 1;
}

message ReadResponse {
// read is the payload in bytes
bytes read = 1;
// error is an error message
string error = 2;
// errored is true if an error has been set
bool errored = 3;
}

message WriteRequest {
// payload is the write request in bytes
bytes payload = 1;
}

message WriteResponse {
// length of the response in bytes
int32 length = 1;
// error is an error message
string error = 2;
// errored is true if an error has been set
bool errored = 3;
}

message CloseRequest {}

message CloseResponse {}

message SetDeadlineRequest {
// time represents an instant in time in bytes
bytes time = 1;
}

message SetDeadlineResponse {}

message SetReadDeadlineRequest {
bytes time = 1;
}

message SetReadDeadlineResponse {}

message SetWriteDeadlineRequest {
bytes time = 1;
}

message SetWriteDeadlineResponse {}

service Conn {
rpc Read(ReadRequest) returns (ReadResponse);
rpc Write(WriteRequest) returns (WriteResponse);
rpc Close(CloseRequest) returns (CloseResponse);
rpc SetDeadline(SetDeadlineRequest) returns (SetDeadlineResponse);
rpc SetReadDeadline(SetReadDeadlineRequest) returns (SetReadDeadlineResponse);
rpc SetWriteDeadline(SetWriteDeadlineRequest) returns (SetWriteDeadlineResponse);
}
113 changes: 102 additions & 11 deletions api/ghttpproto/http.proto
Original file line number Diff line number Diff line change
@@ -1,80 +1,171 @@
syntax = "proto3";
package ghttpproto;
option go_package = "github.com/ava-labs/avalanchego/api/ghttpproto";
import "google/protobuf/empty.proto";

message Userinfo {
string username = 1;
string password = 2;
bool password_set = 3;
service HTTP {
// Handle wraps http1 over http2 and provides support for websockets by implementing
// net conn and responsewriter in http2.
rpc Handle(HTTPRequest) returns (google.protobuf.Empty);
// HandleSimple wraps http1 requests over http2 similar to Handle but only passes headers
// and body bytes. Because the request and response are single protos with no inline
// gRPC servers the CPU cost as well as file descriptor overhead is less
// (no additional goroutines).
rpc HandleSimple(HandleSimpleHTTPRequest) returns (HandleSimpleHTTPResponse);
}

// URL is a net.URL see: https://pkg.go.dev/net/url#URL
message URL {
// scheme is the url scheme name
string scheme = 1;
// opaque is encoded opaque data
string opaque = 2;
// user is username and password information
Userinfo user = 3;
// host can be in the format host or host:port
string host = 4;
// path (relative paths may omit leading slash)
string path = 5;
// raw_path is encoded path hint (see EscapedPath method)
string raw_path = 6;
// force is append a query ('?') even if RawQuery is empty
bool force_query = 7;
// raw_query is encoded query values, without '?'
string raw_query = 8;
// fragment is fragment for references, without '#'
string fragment = 9;
}

// UserInfo is net.Userinfo see: https://pkg.go.dev/net/url#Userinfo
message Userinfo {
// username is the username for the user
string username = 1;
// password is the password for the user
string password = 2;
// password_set is a boolean which is true if the passord is set
bool password_set = 3;
}

message Element {
// key is a element key in a key value pair
string key = 1;
// values are a list of strings coresponding to the key
repeated string values = 2;
}

message Certificates {
// cert is the certificate body
repeated bytes cert = 1;
}

// ConnectionState is tls.ConnectionState see: https://pkg.go.dev/crypto/tls#ConnectionState
message ConnectionState {
// reserved fields ids have been removed and should not be reused
reserved 6, 12;
// version is the TLS version used by the connection (e.g. VersionTLS12)
uint32 version = 1;
// handshake_complete is true if the handshake has concluded
bool handshake_complete = 2;
// did_resume is true if this connection was successfully resumed from a
// previous session with a session ticket or similar mechanism
bool did_resume = 3;
// cipher_suite is the cipher suite negotiated for the connection
uint32 cipher_suite = 4;
// negotiated_protocol is the application protocol negotiated with ALPN
string negotiated_protocol = 5;
bool negotiated_protocol_is_mutual = 6;
// server_name is the value of the Server Name Indication extension sent by
// the client
string server_name = 7;
// peer_certificates are the parsed certificates sent by the peer, in the
// order in which they were sent
Certificates peer_certificates = 8;
// verified_chains is a list of one or more chains where the first element is
// PeerCertificates[0] and the last element is from Config.RootCAs (on the
// client side) or Config.ClientCAs (on the server side).
repeated Certificates verified_chains = 9;
// signed_certificate_timestamps is a list of SCTs provided by the peer
// through the TLS handshake for the leaf certificate, if any
repeated bytes signed_certificate_timestamps = 10;
// ocsp_response is a stapled Online Certificate Status Protocol (OCSP)
// response provided by the peer for the leaf certificate, if any.
bytes ocsp_response = 11;
bytes tls_unique = 12;
}

// Request is an http.Request see: https://pkg.go.dev/net/http#Request
message Request {
// method specifies the HTTP method (GET, POST, PUT, etc.)
string method = 1;
// url specifies either the URI being requested (for server requests)
// or the URL to access (for client requests)
URL url = 2;
// proto is the protocol version for incoming server requests
string proto = 3;
// proto_major is the major version
int32 proto_major = 4;
// proto_minor is the minor version
int32 proto_minor = 5;
// header contains the request header fields either received
// by the server or to be sent by the client
repeated Element header = 6;
uint32 body = 7; // server ID
// body is the request payload in bytes
bytes body = 7;
// content_length records the length of the associated content
int64 content_length = 8;
// transfer_encoding lists the transfer encodings from outermost to
// innermost
repeated string transfer_encoding = 9;
// host specifies the host on which the URL is sought
string host = 10;
// form contains the parsed form data, including both the URL
// field's query parameters and the PATCH, POST, or PUT form data
repeated Element form = 11;
// post_form contains the parsed form data from PATCH, POST
// or PUT body parameters
repeated Element post_form = 12;
// trailer_keys specifies additional headers that are sent after the request
repeated string trailer_keys = 13;
// remote_addr allows HTTP servers and other software to record
// the network address that sent the request
string remote_addr = 14;
// request_uri is the unmodified request-target
string request_uri = 15;
// tls connection state
ConnectionState tls = 16;
}

message ResponseWriter {
uint32 id = 1; // server ID
// id correlates to a stream id of the gRPC server hosting the Writer service
uint32 id = 1;
// header returns the header map that will be sent by
// WriteHeader.
repeated Element header = 2;
}

message HTTPRequest {
// response_writer is used by an HTTP handler to construct an HTTP response
ResponseWriter response_writer = 1;
// request is an http request
Request request = 2;
}

message HTTPResponse {}
message HandleSimpleHTTPRequest {
// method specifies the HTTP method (GET, POST, PUT, etc.)
string method = 1;
// url specifies either the URI being requested
string url = 2;
// headers contains the request header fields either received
// by the server or to be sent by the client
repeated Element headers = 3;
// body is the request payload in bytes
bytes body = 4;
}

service HTTP {
rpc Handle(HTTPRequest) returns (HTTPResponse);
message HandleSimpleHTTPResponse {
// code is the response code
int32 code = 1;
// headers contains the request header fields either received
// by the server or to be sent by the client
repeated Element headers = 2;
// body is the response payload in bytes
bytes body = 3;
}
22 changes: 0 additions & 22 deletions api/greadcloserproto/readcloser.proto

This file was deleted.

13 changes: 9 additions & 4 deletions api/greaderproto/reader.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@ syntax = "proto3";
package greaderproto;
option go_package = "github.com/ava-labs/avalanchego/api/greaderproto";

// Reader is an io.Reader see: https://pkg.go.dev/io#Reader
service Reader {
rpc Read(ReadRequest) returns (ReadResponse);
}

message ReadRequest {
// length is the request in bytes
int32 length = 1;
}

message ReadResponse {
// read is the payload in bytes
bytes read = 1;
// error is an error message
string error = 2;
// errored is true if an error has been set
bool errored = 3;
}

service Reader {
rpc Read(ReadRequest) returns (ReadResponse);
}
Loading