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

GO-4009: New sync protocol #108

Merged
merged 44 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a092dec
Update any-sync
mcrakhman Jun 18, 2024
838920b
Merge branch 'main' into GO-2482-new-sync-protocol
mcrakhman Jun 18, 2024
81aeaad
Update any-sync
mcrakhman Jun 20, 2024
6c5163a
Update any-sync
mcrakhman Jun 27, 2024
426339d
Merge branch 'main' into GO-2482-new-sync-protocol
fb929 Jun 28, 2024
bb74b84
WIP new load iterator
mcrakhman Jul 3, 2024
0128dd3
Update node
mcrakhman Jul 3, 2024
afece72
Update queue limits
mcrakhman Jul 3, 2024
f729e2b
Add limiter
mcrakhman Jul 3, 2024
34352d1
Update any-sync (proto version)
mcrakhman Jul 3, 2024
81cc387
Update any-sync
mcrakhman Jul 4, 2024
fa1090a
Update any-sync
mcrakhman Jul 4, 2024
06308a3
Update any-sync
mcrakhman Jul 4, 2024
3b804c0
Update any-sync
mcrakhman Jul 4, 2024
148bf4d
Update any-sync
mcrakhman Jul 4, 2024
5363ff8
Update any-sync
mcrakhman Jul 4, 2024
d6e9e65
Track tree len
mcrakhman Jul 4, 2024
e6ffbfb
Update any-sync
mcrakhman Jul 5, 2024
28e102d
Update marshal append
mcrakhman Jul 15, 2024
299521c
Update any-sync
mcrakhman Jul 15, 2024
09dff78
Update any-sync
mcrakhman Jul 15, 2024
78f6008
Update any-sync
mcrakhman Jul 16, 2024
6b7dc45
Update object sync
mcrakhman Jul 30, 2024
b6da1a5
Implement ValidateAndPutTree
mcrakhman Jul 30, 2024
7f1213f
Update any-sync
mcrakhman Aug 2, 2024
d928888
Update any-sync and pogreb
mcrakhman Aug 5, 2024
bef5b4d
Update any-sync
mcrakhman Aug 7, 2024
e181d0c
Update any-sync
mcrakhman Aug 8, 2024
77d4d7e
Update any-sync
mcrakhman Aug 8, 2024
b558197
Update any-sync
mcrakhman Aug 9, 2024
947fc75
Update any-sync
mcrakhman Aug 9, 2024
40f0a16
Update any-sync with old streampools
mcrakhman Aug 12, 2024
e872b23
Update any-sync
mcrakhman Aug 12, 2024
7205d76
Update streampool queue size
mcrakhman Aug 12, 2024
9905afc
Update any-sync
mcrakhman Aug 14, 2024
c704c98
Update treesyncer
mcrakhman Aug 14, 2024
d4767a1
Update tree storage
mcrakhman Aug 15, 2024
22d8ade
Update any-sync
mcrakhman Aug 16, 2024
8d3dfb3
Update any-sync
mcrakhman Aug 19, 2024
47f9eda
Update any-sync
mcrakhman Sep 1, 2024
c187c35
Add limiter
mcrakhman Sep 1, 2024
828dbc5
Change limits
mcrakhman Sep 1, 2024
fc01403
Remove limiter
mcrakhman Sep 2, 2024
ec548a7
Update any-sync
mcrakhman Sep 3, 2024
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
7 changes: 4 additions & 3 deletions cmd/any-sync-node.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ import (
"github.com/anyproto/any-sync/node/nodeclient"
"github.com/anyproto/any-sync/nodeconf"
"github.com/anyproto/any-sync/nodeconf/nodeconfstore"
"github.com/anyproto/any-sync/util/syncqueues"

"github.com/anyproto/any-sync-node/nodehead"
"github.com/anyproto/any-sync-node/nodespace/peermanager"
"github.com/anyproto/any-sync-node/nodespace/spacedeleter"
"github.com/anyproto/any-sync-node/nodespace/statusprovider"
"github.com/anyproto/any-sync-node/nodesync"
"github.com/anyproto/any-sync-node/nodesync/coldsync"
"github.com/anyproto/any-sync-node/nodesync/hotsync"
Expand Down Expand Up @@ -120,19 +120,20 @@ func Bootstrap(a *app.App) {
a.Register(account.New()).
Register(metric.New()).
Register(debugstat.New()).
Register(statusprovider.New()).
Register(credentialprovider.NewNoOp()).
Register(coordinatorclient.New()).
Register(nodeconfstore.New()).
Register(nodeconfsource.New()).
Register(nodeconf.New()).
Register(nodestorage.New()).
Register(syncqueues.New()).
Register(server.New()).
Register(peerservice.New()).
Register(pool.New()).
Register(streampool.New()).
Register(nodeclient.New()).
Register(consensusclient.New()).
Register(nodespace.NewStreamOpener()).
Register(streampool.New()).
Register(nodehead.New()).
Register(nodecache.New(200)).
Register(hotsync.New()).
Expand Down
25 changes: 21 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
package config

import (
"github.com/anyproto/any-sync-node/nodestorage"
"github.com/anyproto/any-sync-node/nodesync"
"github.com/anyproto/any-sync-node/nodesync/hotsync"
"os"

commonaccount "github.com/anyproto/any-sync/accountservice"
"github.com/anyproto/any-sync/app"
"github.com/anyproto/any-sync/app/logger"
"github.com/anyproto/any-sync/commonspace/config"
"github.com/anyproto/any-sync/metric"
"github.com/anyproto/any-sync/net/rpc"
"github.com/anyproto/any-sync/net/rpc/debugserver"
"github.com/anyproto/any-sync/net/rpc/limiter"
"github.com/anyproto/any-sync/net/streampool"
"github.com/anyproto/any-sync/net/transport/quic"
"github.com/anyproto/any-sync/net/transport/yamux"
"github.com/anyproto/any-sync/nodeconf"
"gopkg.in/yaml.v3"
"os"

"github.com/anyproto/any-sync-node/nodestorage"
"github.com/anyproto/any-sync-node/nodesync"
"github.com/anyproto/any-sync-node/nodesync/hotsync"
)

const CName = "config"
Expand Down Expand Up @@ -45,6 +49,7 @@ type Config struct {
Log logger.Config `yaml:"log"`
NodeSync nodesync.Config `yaml:"nodeSync"`
Yamux yamux.Config `yaml:"yamux"`
Limiter limiter.Config `yaml:"limiter"`
Quic quic.Config `yaml:"quic"`
}

Expand Down Expand Up @@ -96,6 +101,10 @@ func (c Config) GetNodeSync() nodesync.Config {
return c.NodeSync
}

func (c Config) GetLimiterConf() limiter.Config {
return c.Limiter
}

func (c Config) GetHotSync() hotsync.Config {
return c.NodeSync.HotSync
}
Expand All @@ -107,3 +116,11 @@ func (c Config) GetYamux() yamux.Config {
func (c Config) GetQuic() quic.Config {
return c.Quic
}

func (c Config) GetStreamConfig() streampool.StreamConfig {
return streampool.StreamConfig{
SendQueueSize: 300,
DialQueueWorkers: 4,
DialQueueSize: 100,
}
}
4 changes: 4 additions & 0 deletions etc/any-sync-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ log:
production: false
defaultLevel: ""
namedLevels: { }
limiter:
default:
rps: 10
burst: 20
46 changes: 17 additions & 29 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ toolchain go1.22.1

require (
github.com/ahmetb/govvv v0.3.0
github.com/akrylysov/pogreb v0.10.2
github.com/anyproto/any-sync v0.4.17
github.com/akrylysov/pogreb v0.10.3-0.20240803013244-523613e335e9
github.com/anyproto/any-sync v0.5.1
github.com/anyproto/go-chash v0.1.0
github.com/gogo/protobuf v1.3.2
github.com/prometheus/client_golang v1.19.1
Expand All @@ -16,8 +16,8 @@ require (
go.uber.org/mock v0.4.0
go.uber.org/multierr v1.11.0
go.uber.org/zap v1.27.0
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
golang.org/x/net v0.25.0
golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842
golang.org/x/net v0.28.0
gopkg.in/yaml.v3 v3.0.1
storj.io/drpc v0.0.34
)
Expand All @@ -26,46 +26,37 @@ require (
filippo.io/edwards25519 v1.1.0 // indirect
github.com/anyproto/go-slip10 v1.0.0 // indirect
github.com/anyproto/go-slip21 v1.0.0 // indirect
github.com/anyproto/protobuf v1.3.3-0.20240814124528-72b8c7e0e0f5 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bits-and-blooms/bitset v1.10.0 // indirect
github.com/btcsuite/btcd v0.22.1 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1 // indirect
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/cheggaaa/mb/v3 v3.0.2 // indirect
github.com/consensys/bavard v0.1.13 // indirect
github.com/consensys/gnark-crypto v0.12.1 // indirect
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
github.com/ethereum/go-ethereum v1.13.15 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
github.com/fogleman/gg v1.3.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/goccy/go-graphviz v0.1.2 // indirect
github.com/goccy/go-graphviz v0.1.3 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/holiman/uint256 v1.2.4 // indirect
github.com/huandu/skiplist v1.2.0 // indirect
github.com/ipfs/go-cid v0.4.1 // indirect
github.com/ipfs/go-log/v2 v2.5.1 // indirect
github.com/jbenet/go-temp-err-catcher v0.1.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.33.2 // indirect
github.com/libp2p/go-libp2p v0.35.1 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/miguelmota/go-ethereum-hdwallet v0.1.2 // indirect
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mmcloughlin/addchain v0.4.0 // indirect
github.com/mr-tron/base58 v1.2.0 // indirect
github.com/multiformats/go-base32 v0.1.0 // indirect
github.com/multiformats/go-base36 v0.2.0 // indirect
github.com/multiformats/go-multiaddr v0.12.3 // indirect
github.com/multiformats/go-multiaddr v0.12.4 // indirect
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
Expand All @@ -74,23 +65,20 @@ require (
github.com/onsi/ginkgo/v2 v2.17.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.48.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/quic-go/quic-go v0.43.1 // indirect
github.com/quic-go/quic-go v0.46.0 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/supranational/blst v0.3.11 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/zeebo/blake3 v0.2.3 // indirect
github.com/zeebo/blake3 v0.2.4 // indirect
github.com/zeebo/errs v1.3.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/mod v0.16.0 // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sys v0.23.0 // indirect
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/protobuf v1.33.0 // indirect
golang.org/x/tools v0.21.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect
lukechampine.com/blake3 v1.2.1 // indirect
rsc.io/tmplfunc v0.0.3 // indirect
)
Loading
Loading