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

Release v0.13.0 #465

Merged
merged 12 commits into from
Sep 20, 2023
Merged
2 changes: 1 addition & 1 deletion .github/workflows/gateway-conformance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.21.x
- name: Checkout boxo
uses: actions/checkout@v3
with:
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/gateway-sharness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
shell: bash
steps:
- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.19.1
go-version: 1.21.x
- name: Checkout boxo
uses: actions/checkout@v3
with:
Expand All @@ -30,10 +30,6 @@ jobs:
path: kubo
- name: Install Missing Tools
run: sudo apt install -y socat net-tools fish libxml2-utils
- name: Restore Go Cache
uses: protocol/cache-go-action@v1
with:
name: ${{ github.job }}
- name: Replace boxo in Kubo go.mod
run: |
go mod edit -replace=github.com/ipfs/boxo=../boxo
Expand Down
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,37 @@ The following emojis are used to highlight certain changes:

### Security

## [v0.13.0]

### Added

* ✨ The `routing/http` implements Delegated Peer Routing introduced in [IPIP-417](https://github.com/ipfs/specs/pull/417).

### Changed

* 🛠 The `routing/http` package received the following modifications:
* Client `GetIPNSRecord` and `PutIPNSRecord` have been renamed to `GetIPNS` and
`PutIPNS`, respectively. Similarly, the required function names in the server
`ContentRouter` have also been updated.
* `ReadBitswapProviderRecord` has been renamed to `BitswapRecord` and marked as deprecated.
From now on, please use the protocol-agnostic `PeerRecord` for most use cases. The new
Peer Schema has been introduced in [IPIP-417](https://github.com/ipfs/specs/pull/417).

### Removed

* 🛠 The `routing/http` package experienced following removals:
* Server and client no longer support the experimental `Provide` method.
`ProvideBitswap` is still usable, but marked as deprecated. A protocol-agnostic
provide mechanism is being worked on in [IPIP-378](https://github.com/ipfs/specs/pull/378).
* Server no longer exports `FindProvidersPath` and `ProvidePath`.

### Fixed

* The normalization of DNSLink identifiers in `gateway` has been corrected in the edge
case where the value passed to the path component of the URL is already normalized.

### Security

## [v0.12.0]

### Added
Expand All @@ -32,7 +63,7 @@ The following emojis are used to highlight certain changes:
as per [IPIP-379](https://specs.ipfs.tech/ipips/ipip-0379/).
* 🛠 The `verifycid` package has been updated with the new Allowlist interface as part of
reducing globals efforts.
* The `blockservice` and `provider` packages has been updated to accommodate for
* The `blockservice` and `provider` packages has been updated to accommodate for
changes in `verifycid`.

### Changed
Expand Down
35 changes: 0 additions & 35 deletions bitswap/bitswap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/ipfs/boxo/bitswap/server"
testinstance "github.com/ipfs/boxo/bitswap/testinstance"
tn "github.com/ipfs/boxo/bitswap/testnet"
"github.com/ipfs/boxo/internal/test"
mockrouting "github.com/ipfs/boxo/routing/mock"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
Expand Down Expand Up @@ -49,8 +48,6 @@ func addBlock(t *testing.T, ctx context.Context, inst testinstance.Instance, blk
const kNetworkDelay = 0 * time.Millisecond

func TestClose(t *testing.T) {
test.Flaky(t)

vnet := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(vnet, nil, nil)
defer ig.Close()
Expand All @@ -67,8 +64,6 @@ func TestClose(t *testing.T) {
}

func TestProviderForKeyButNetworkCannotFind(t *testing.T) { // TODO revisit this
test.Flaky(t)

rs := mockrouting.NewServer()
net := tn.VirtualNetwork(rs, delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
Expand All @@ -94,8 +89,6 @@ func TestProviderForKeyButNetworkCannotFind(t *testing.T) { // TODO revisit this
}

func TestGetBlockFromPeerAfterPeerAnnounces(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
block := blocks.NewBlock([]byte("block"))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
Expand Down Expand Up @@ -124,8 +117,6 @@ func TestGetBlockFromPeerAfterPeerAnnounces(t *testing.T) {
}

func TestDoesNotProvideWhenConfiguredNotTo(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
block := blocks.NewBlock([]byte("block"))
bsOpts := []bitswap.Option{bitswap.ProvideEnabled(false), bitswap.ProviderSearchDelay(50 * time.Millisecond)}
Expand Down Expand Up @@ -158,8 +149,6 @@ func TestDoesNotProvideWhenConfiguredNotTo(t *testing.T) {
// Tests that a received block is not stored in the blockstore if the block was
// not requested by the client
func TestUnwantedBlockNotAdded(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
block := blocks.NewBlock([]byte("block"))
bsMessage := bsmsg.New(true)
Expand Down Expand Up @@ -195,8 +184,6 @@ func TestUnwantedBlockNotAdded(t *testing.T) {
//
// (because the live request queue is full)
func TestPendingBlockAdded(t *testing.T) {
test.Flaky(t)

ctx := context.Background()
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
bg := blocksutil.NewBlockGenerator()
Expand Down Expand Up @@ -245,8 +232,6 @@ func TestPendingBlockAdded(t *testing.T) {
}

func TestLargeSwarm(t *testing.T) {
test.Flaky(t)

if testing.Short() {
t.SkipNow()
}
Expand Down Expand Up @@ -279,8 +264,6 @@ func TestLargeFile(t *testing.T) {
}

func TestLargeFileTwoPeers(t *testing.T) {
test.Flaky(t)

if testing.Short() {
t.SkipNow()
}
Expand All @@ -290,8 +273,6 @@ func TestLargeFileTwoPeers(t *testing.T) {
}

func PerformDistributionTest(t *testing.T, numInstances, numBlocks int) {
test.Flaky(t)

ctx := context.Background()
if testing.Short() {
t.SkipNow()
Expand Down Expand Up @@ -349,8 +330,6 @@ func PerformDistributionTest(t *testing.T, numInstances, numBlocks int) {

// TODO simplify this test. get to the _essence_!
func TestSendToWantingPeer(t *testing.T) {
test.Flaky(t)

if testing.Short() {
t.SkipNow()
}
Expand Down Expand Up @@ -393,8 +372,6 @@ func TestSendToWantingPeer(t *testing.T) {
}

func TestEmptyKey(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -428,8 +405,6 @@ func assertStat(t *testing.T, st *bitswap.Stat, sblks, rblks, sdata, rdata uint6
}

func TestBasicBitswap(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -502,8 +477,6 @@ func TestBasicBitswap(t *testing.T) {
}

func TestDoubleGet(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -569,8 +542,6 @@ func TestDoubleGet(t *testing.T) {
}

func TestWantlistCleanup(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -693,8 +664,6 @@ func newReceipt(sent, recv, exchanged uint64) *server.Receipt {
}

func TestBitswapLedgerOneWay(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -744,8 +713,6 @@ func TestBitswapLedgerOneWay(t *testing.T) {
}

func TestBitswapLedgerTwoWay(t *testing.T) {
test.Flaky(t)

net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
ig := testinstance.NewTestInstanceGenerator(net, nil, nil)
defer ig.Close()
Expand Down Expand Up @@ -834,8 +801,6 @@ func (tsl *testingScoreLedger) Stop() {

// Tests start and stop of a custom decision logic
func TestWithScoreLedger(t *testing.T) {
test.Flaky(t)

tsl := newTestingScoreLedger()
net := tn.VirtualNetwork(mockrouting.NewServer(), delay.Fixed(kNetworkDelay))
bsOpts := []bitswap.Option{bitswap.WithScoreLedger(tsl)}
Expand Down
19 changes: 0 additions & 19 deletions bitswap/client/bitswap_with_sessions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"github.com/ipfs/boxo/bitswap/client/traceability"
testinstance "github.com/ipfs/boxo/bitswap/testinstance"
tn "github.com/ipfs/boxo/bitswap/testnet"
"github.com/ipfs/boxo/internal/test"
mockrouting "github.com/ipfs/boxo/routing/mock"
blocks "github.com/ipfs/go-block-format"
cid "github.com/ipfs/go-cid"
Expand Down Expand Up @@ -40,8 +39,6 @@ func addBlock(t *testing.T, ctx context.Context, inst testinstance.Instance, blk
}

func TestBasicSessions(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -109,8 +106,6 @@ func assertBlockListsFrom(from peer.ID, got, exp []blocks.Block) error {
}

func TestSessionBetweenPeers(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -171,8 +166,6 @@ func TestSessionBetweenPeers(t *testing.T) {
}

func TestSessionSplitFetch(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -217,8 +210,6 @@ func TestSessionSplitFetch(t *testing.T) {
}

func TestFetchNotConnected(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()

Expand Down Expand Up @@ -262,8 +253,6 @@ func TestFetchNotConnected(t *testing.T) {
}

func TestFetchAfterDisconnect(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
defer cancel()

Expand Down Expand Up @@ -342,8 +331,6 @@ func TestFetchAfterDisconnect(t *testing.T) {
}

func TestInterestCacheOverflow(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -394,8 +381,6 @@ func TestInterestCacheOverflow(t *testing.T) {
}

func TestPutAfterSessionCacheEvict(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -434,8 +419,6 @@ func TestPutAfterSessionCacheEvict(t *testing.T) {
}

func TestMultipleSessions(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand Down Expand Up @@ -477,8 +460,6 @@ func TestMultipleSessions(t *testing.T) {
}

func TestWantlistClearsOnCancel(t *testing.T) {
test.Flaky(t)

ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
defer cancel()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"testing"

"github.com/ipfs/boxo/bitswap/internal/testutil"
"github.com/ipfs/boxo/internal/test"
cid "github.com/ipfs/go-cid"
peer "github.com/libp2p/go-libp2p/core/peer"
)
Expand All @@ -17,8 +16,6 @@ const (
)

func TestBlockPresenceManager(t *testing.T) {
test.Flaky(t)

bpm := New()

p := testutil.GeneratePeers(1)[0]
Expand Down Expand Up @@ -99,8 +96,6 @@ func TestBlockPresenceManager(t *testing.T) {
}

func TestAddRemoveMulti(t *testing.T) {
test.Flaky(t)

bpm := New()

peers := testutil.GeneratePeers(2)
Expand Down Expand Up @@ -184,8 +179,6 @@ func TestAddRemoveMulti(t *testing.T) {
}

func TestAllPeersDoNotHaveBlock(t *testing.T) {
test.Flaky(t)

bpm := New()

peers := testutil.GeneratePeers(3)
Expand Down
Loading
Loading