build: upgrade to go 1.19 (#25726)
This changes the CI / release builds to use the latest Go version. It also upgrades golangci-lint to a newer version compatible with Go 1.19. In Go 1.19, godoc has gained official support for links and lists. The syntax for code blocks in doc comments has changed and now requires a leading tab character. gofmt adapts comments to the new syntax automatically, so there are a lot of comment re-formatting changes in this PR. We need to apply the new format in order to pass the CI lint stage with Go 1.19. With the linter upgrade, I have decided to disable 'gosec' - it produces too many false-positive warnings. The 'deadcode' and 'varcheck' linters have also been removed because golangci-lint warns about them being unmaintained. 'unused' provides similar coverage and we already have it enabled, so we don't lose much with this change.
This commit is contained in:
+20
-20
@@ -117,32 +117,32 @@ func (t *Tree) Nodes() []*enode.Node {
|
||||
We want to keep the UDP size below 512 bytes. The UDP size is roughly:
|
||||
UDP length = 8 + UDP payload length ( 229 )
|
||||
UPD Payload length:
|
||||
- dns.id 2
|
||||
- dns.flags 2
|
||||
- dns.count.queries 2
|
||||
- dns.count.answers 2
|
||||
- dns.count.auth_rr 2
|
||||
- dns.count.add_rr 2
|
||||
- queries (query-size + 6)
|
||||
- answers :
|
||||
- dns.resp.name 2
|
||||
- dns.resp.type 2
|
||||
- dns.resp.class 2
|
||||
- dns.resp.ttl 4
|
||||
- dns.resp.len 2
|
||||
- dns.txt.length 1
|
||||
- dns.txt resp_data_size
|
||||
- dns.id 2
|
||||
- dns.flags 2
|
||||
- dns.count.queries 2
|
||||
- dns.count.answers 2
|
||||
- dns.count.auth_rr 2
|
||||
- dns.count.add_rr 2
|
||||
- queries (query-size + 6)
|
||||
- answers :
|
||||
- dns.resp.name 2
|
||||
- dns.resp.type 2
|
||||
- dns.resp.class 2
|
||||
- dns.resp.ttl 4
|
||||
- dns.resp.len 2
|
||||
- dns.txt.length 1
|
||||
- dns.txt resp_data_size
|
||||
|
||||
So the total size is roughly a fixed overhead of `39`, and the size of the
|
||||
query (domain name) and response.
|
||||
The query size is, for example, FVY6INQ6LZ33WLCHO3BPR3FH6Y.snap.mainnet.ethdisco.net (52)
|
||||
So the total size is roughly a fixed overhead of `39`, and the size of the query (domain
|
||||
name) and response. The query size is, for example,
|
||||
FVY6INQ6LZ33WLCHO3BPR3FH6Y.snap.mainnet.ethdisco.net (52)
|
||||
|
||||
We also have some static data in the response, such as `enrtree-branch:`, and potentially
|
||||
splitting the response up with `" "`, leaving us with a size of roughly `400` that we need
|
||||
to stay below.
|
||||
|
||||
The number `370` is used to have some margin for extra overhead (for example, the dns query
|
||||
may be larger - more subdomains).
|
||||
The number `370` is used to have some margin for extra overhead (for example, the dns
|
||||
query may be larger - more subdomains).
|
||||
*/
|
||||
const (
|
||||
hashAbbrevSize = 1 + 16*13/8 // Size of an encoded hash (plus comma)
|
||||
|
||||
Reference in New Issue
Block a user