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

Shwap #2675

Draft
wants to merge 32 commits into
base: main
Choose a base branch
from
Draft

Shwap #2675

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d953117
chore(moddas): speed up sampling for LN
Wondertan Nov 29, 2023
f122a71
prototype
Wondertan Sep 7, 2023
7237ad7
feat(modp2p): listen on WebTransport by default
Wondertan Sep 11, 2023
ab6bec8
lint
Wondertan Sep 12, 2023
2f08bdd
now test verifies all the share proofs
Wondertan Sep 17, 2023
b33515e
refactor sampling protocol and use proto for serialization
Wondertan Sep 18, 2023
59aa730
docs and tests for ipldv2
Wondertan Sep 18, 2023
1b3d881
add support for col proofs sampling
Wondertan Sep 21, 2023
b53769b
blockstore impl and various cleanups and improvements
Wondertan Sep 22, 2023
ce31854
initial support for ODS Mode
Wondertan Sep 22, 2023
3ab6b37
implement axis sampling
Wondertan Sep 30, 2023
041ed3d
introduce File interface and decouple ipldv2 tests from on disk file
Wondertan Oct 1, 2023
1601460
use height as block id
Wondertan Oct 19, 2023
600d186
chore: extract proto helper
Wondertan Oct 19, 2023
6673564
successful experiment with request size shortening for axis sampling
Wondertan Oct 19, 2023
830860d
docs fix
Wondertan Oct 19, 2023
9ffb284
request size optimization for share sample
Wondertan Oct 19, 2023
52f3ab9
refactor AxisID away and many more improvements
Wondertan Oct 22, 2023
21bd2fc
remove serialization ambigiouty and ensure there is only one serializ…
Wondertan Oct 22, 2023
cdbd694
cleanup proto field names
Wondertan Oct 22, 2023
c3e8450
namespace mh
Wondertan Dec 2, 2023
8a66fd5
namespace mh but finished and tested
Wondertan Dec 2, 2023
bbcd956
lol
Wondertan Dec 2, 2023
583481b
pass by value and cid must constructors
Wondertan Dec 3, 2023
a28cfef
fix data id test
Wondertan Dec 3, 2023
f6db8f9
blockservice constructor
Wondertan Dec 3, 2023
9a8b5ed
implement Getter and tests for it
Wondertan Dec 3, 2023
0d4dd27
rename to shwap
Wondertan Dec 6, 2023
c96579a
ensure only shares a cached in blockstore
Wondertan Dec 6, 2023
bb034b3
add sessions
Wondertan Dec 6, 2023
fc082f4
protocol updates:
Wondertan Dec 28, 2023
a358713
remove ids
Wondertan Mar 11, 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
Prev Previous commit
Next Next commit
blockservice constructor
  • Loading branch information
Wondertan committed Dec 3, 2023
commit f6db8f9fe96c88b985fd8d1488a3c326a7dedd83
8 changes: 8 additions & 0 deletions share/ipldv2/ipldv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import (
"fmt"
"hash"

"github.com/ipfs/boxo/blockservice"
"github.com/ipfs/boxo/blockstore"
"github.com/ipfs/boxo/exchange"
"github.com/ipfs/go-cid"
logger "github.com/ipfs/go-log/v2"
mh "github.com/multiformats/go-multihash"
Expand Down Expand Up @@ -42,6 +45,11 @@ func MustDataCID(axisIdx int, root *share.Root, height uint64, namespace share.N
return cid
}

// NewBlockService creates a new blockservice.BlockService with allowlist supporting the protocol.
func NewBlockService(b blockstore.Blockstore, ex exchange.Interface) blockservice.BlockService {
return blockservice.New(b, ex, blockservice.WithAllowlist(defaultAllowlist))
}

var log = logger.Logger("ipldv2")

const (
Expand Down
2 changes: 1 addition & 1 deletion share/ipldv2/ipldv2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,5 +261,5 @@ func remoteClient(ctx context.Context, t *testing.T, bstore blockstore.Blockstor
err = net.ConnectAllButSelf()
require.NoError(t, err)

return blockservice.New(bstoreClient, bitswapClient, blockservice.WithAllowlist(defaultAllowlist))
return NewBlockService(bstoreClient, bitswapClient)
}