switch ipfs init default key
Petar Maymounkov committed
Aug 5, 2020 at 09:09 UTC
ece0cda10d7d6e5577e79bab18ba31bf59e7f9ad
6 files changed
+14
-16
cmd/ipfs/init.go
+1
-1
@@ -24,7 +24,7 @@ import (
24
)
25
26
const (
27
- algorithmDefault = options.RSAKey
27
+ algorithmDefault = options.Ed25519Key
28
algorithmOptionName = "algorithm"
29
bitsOptionName = "bits"
30
emptyRepoOptionName = "empty-repo"
test/sharness/t0020-init.sh
+6
-6
@@ -138,7 +138,7 @@ test_ipfs_init_flags() {
138
ipfs init --algorithm=ed25519 --empty-repo >actual_init
139
;;
140
*)
141
- ipfs init --bits="$RSA_BITS" --empty-repo >actual_init
141
+ ipfs init --empty-repo >actual_init
142
;;
143
esac
144
'
@@ -166,7 +166,7 @@ test_ipfs_init_flags() {
166
test_cmp ed25519_expected actual_init
167
;;
168
*)
169
- test_cmp rsa_expected actual_init
169
+ test_cmp ed25519_expected actual_init
170
;;
171
esac
172
'
@@ -190,14 +190,14 @@ test_ipfs_init_flags ''
190
# test init profiles
191
test_expect_success "'ipfs init --profile' with invalid profile fails" '
192
RSA_BITS="2048" &&
193
- test_must_fail ipfs init --bits="$RSA_BITS" --profile=nonexistent_profile 2> invalid_profile_out
193
+ test_must_fail ipfs init --profile=nonexistent_profile 2> invalid_profile_out
194
EXPECT="Error: invalid configuration profile: nonexistent_profile" &&
195
grep "$EXPECT" invalid_profile_out
196
'
197
198
test_expect_success "'ipfs init --profile' succeeds" '
199
RSA_BITS="2048" &&
200
- ipfs init --bits="$RSA_BITS" --profile=server
200
+ ipfs init --profile=server
201
'
202
203
test_expect_success "'ipfs config Swarm.AddrFilters' looks good" '
@@ -211,7 +211,7 @@ test_expect_success "clean up ipfs dir" '
211
212
test_expect_success "'ipfs init --profile=test' succeeds" '
213
RSA_BITS="2048" &&
214
- ipfs init --bits="$RSA_BITS" --profile=test
214
+ ipfs init --profile=test
215
'
216
217
test_expect_success "'ipfs config Bootstrap' looks good" '
@@ -244,7 +244,7 @@ test_expect_success "clean up ipfs dir" '
244
245
test_expect_success "'ipfs init --profile=lowpower' succeeds" '
246
RSA_BITS="2048" &&
247
- ipfs init --bits="$RSA_BITS" --profile=lowpower
247
+ ipfs init --profile=lowpower
248
'
249
250
test_expect_success "'ipfs config Discovery.Routing' looks good" '
test/sharness/t0022-init-default.sh
+1
-1
@@ -16,7 +16,7 @@ test_expect_success "ipfs init succeeds" '
16
export IPFS_PATH="$(pwd)/.ipfs" &&
17
echo "IPFS_PATH: \"$IPFS_PATH\"" &&
18
BITS="2048" &&
19
- ipfs init --bits="$BITS" >actual_init ||
19
+ ipfs init >actual_init ||
20
test_fsh cat actual_init
21
'
22
test/sharness/t0025-datastores.sh
+1
-1
@@ -6,7 +6,7 @@ test_description="Test non-standard datastores"
6
7
test_expect_success "'ipfs init --profile=badgerds' succeeds" '
8
BITS="2048" &&
9
- ipfs init --bits="$BITS" --profile=badgerds
9
+ ipfs init --profile=badgerds
10
'
11
12
test_expect_success "'ipfs pin ls' works" '
test/sharness/t0160-resolve.sh
+3
-3
@@ -11,9 +11,9 @@ test_expect_success "resolve: prepare files" '
11
echo "a/b/c" >a/b/c &&
12
a_hash=$(ipfs add -q -r a | tail -n1) &&
13
b_hash=$(ipfs add -q -r a/b | tail -n1) &&
14
- c_hash=$(ipfs add -q -r a/b/c | tail -n1)
15
- a_hash_b32=$(cid-fmt -v 1 -b b %s $a_hash)
16
- b_hash_b32=$(cid-fmt -v 1 -b b %s $b_hash)
14
+ c_hash=$(ipfs add -q -r a/b/c | tail -n1) &&
15
+ a_hash_b32=$(cid-fmt -v 1 -b b %s $a_hash) &&
16
+ b_hash_b32=$(cid-fmt -v 1 -b b %s $b_hash) &&
17
c_hash_b32=$(cid-fmt -v 1 -b b %s $c_hash)
18
'
19
test/sharness/t0184-http-proxy-over-p2p.sh
+2
-4
@@ -167,7 +167,8 @@ test_expect_success 'setup p2p listener on the receiver' '
167
'
168
169
test_expect_success 'setup environment' '
170
- RECEIVER_ID="$(iptb attr get 1 id)"
170
+ RECEIVER_ID=$(ipfsi 1 id -f="<id>" --peerid-base=b58mh)
171
+ RECEIVER_ID_CIDv1=$(ipfsi 1 id -f="<id>" --peerid-base=base36)
172
'
173
174
test_expect_success 'handle proxy http request sends bad-gateway when remote server not available ' '
@@ -215,9 +216,6 @@ test_expect_success 'handle multipart/form-data http request' '
216
curl_send_multipart_form_request 200
217
'
218
218
-# subdomain gateway at *.p2p.example.com requires PeerdID in base32
219
-RECEIVER_ID_CIDv1=$( ipfs cid format -v 1 --codec libp2p-key -b base36 -- $RECEIVER_ID)
220
-
219
# OK: $peerid.p2p.example.com/http/index.txt
220
test_expect_success "handle http request to a subdomain gateway" '
221
serve_content "SUBDOMAIN PROVIDES ORIGIN ISOLATION PER RECEIVER_ID" &&