Skip to content

Commit

Permalink
arkd: migrate to 7070 as default port (ark-network#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiero authored Aug 13, 2024
1 parent cfb6f9e commit e79819c
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion docker-compose.clark.regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
- ARK_NO_TLS=true
- ARK_NO_MACAROONS=true
ports:
- "6000:6000"
- "7070:7070"
volumes:
- clarkd:/app/data
- clark:/app/wallet-data
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.regtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ services:
- ARK_ROUND_LIFETIME=512
- ARK_DB_TYPE=sqlite
- ARK_TX_BUILDER_TYPE=covenant
- ARK_PORT=8080
- ARK_PORT=6060
- ARK_NO_TLS=true
- ARK_NO_MACAROONS=true
ports:
- "8080:8080"
- "6060:6060"
volumes:
- arkd:/app/data
- ark:/app/wallet-data
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ services:
- ARK_ROUND_INTERVAL=10
- ARK_NETWORK=liquidtestnet
ports:
- "8080:6000"
- "7070:7070"
volumes:
- arkd:/app/data
- ark:/app/wallet-data
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/example/covenant/alice_to_bob.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
aspUrl = "localhost:8080"
aspUrl = "localhost:6060"
clientType = arksdk.GrpcClient
password = "password"
walletType = arksdk.SingleKeyWallet
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/example/covenant/wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h1>Ark SDK WASM Example</h1>
<h2>Wallet</h2>
<div>
<button onclick="initWallet()">Init</button>
<input type="text" id="aspUrl" placeholder="http://localhost:8080">
<input type="text" id="aspUrl" placeholder="http://localhost:6060">
<input type="password" id="i_password" placeholder="password">
<input type="text" id="prvkey" placeholder="Optional: privkey (hex)">
</div>
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/example/covenantless/alice_to_bob.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
)

var (
aspUrl = "localhost:8080"
aspUrl = "localhost:7070"
clientType = arksdk.GrpcClient
password = "password"
walletType = arksdk.SingleKeyWallet
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/example/covenantless/wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h1>Ark SDK WASM Example</h1>
<h2>Wallet</h2>
<div>
<button onclick="initWallet()">Init</button>
<input type="text" id="aspUrl" placeholder="http://localhost:8080">
<input type="text" id="aspUrl" placeholder="http://localhost:7070">
<input type="password" id="i_password" placeholder="password">
<input type="text" id="prvkey" placeholder="Optional: privkey (hex)">
</div>
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/store/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestStore(t *testing.T) {
key, _ := btcec.NewPrivateKey()
ctx := context.Background()
testStoreData := store.StoreData{
AspUrl: "localhost:8080",
AspUrl: "localhost:7070",
AspPubkey: key.PubKey(),
WalletType: wallet.SingleKeyWallet,
ClientType: client.GrpcClient,
Expand Down
2 changes: 1 addition & 1 deletion pkg/client-sdk/wallet/wallet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestWallet(t *testing.T) {
key, _ := btcec.NewPrivateKey()
password := "password"
testStoreData := store.StoreData{
AspUrl: "localhost:8080",
AspUrl: "localhost:7070",
AspPubkey: key.PubKey(),
WalletType: wallet.SingleKeyWallet,
ClientType: client.GrpcClient,
Expand Down
2 changes: 1 addition & 1 deletion server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ run: clean
export ARK_ROUND_INTERVAL=10; \
export ARK_LOG_LEVEL=5; \
export ARK_NETWORK=regtest; \
export ARK_PORT=8080; \
export ARK_PORT=7070; \
export ARK_NO_TLS=true; \
export ARK_NO_MACAROONS=true; \
export ARK_TX_BUILDER_TYPE=covenantless; \
Expand Down
2 changes: 1 addition & 1 deletion server/internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var (

defaultDatadir = common.AppDataDir("arkd", false)
defaultRoundInterval = 5
DefaultPort = 6000
DefaultPort = 7070
defaultWalletAddr = "localhost:18000"
defaultDbType = "sqlite"
defaultDbMigrationPath = "file://internal/infrastructure/db/sqlite/migration"
Expand Down
10 changes: 5 additions & 5 deletions server/test/e2e/covenant/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestMain(m *testing.M) {

time.Sleep(3 * time.Second)

_, err = runArkCommand("init", "--asp-url", "localhost:8080", "--password", utils.Password, "--network", common.LiquidRegTest.Name, "--explorer", "http://chopsticks-liquid:3000")
_, err = runArkCommand("init", "--asp-url", "localhost:6060", "--password", utils.Password, "--network", common.LiquidRegTest.Name, "--explorer", "http://chopsticks-liquid:3000")
if err != nil {
fmt.Printf("error initializing ark config: %s", err)
os.Exit(1)
Expand Down Expand Up @@ -185,7 +185,7 @@ func setupAspWallet() error {
Timeout: 15 * time.Second,
}

req, err := http.NewRequest("GET", "http://localhost:8080/v1/admin/wallet/seed", nil)
req, err := http.NewRequest("GET", "http://localhost:6060/v1/admin/wallet/seed", nil)
if err != nil {
return fmt.Errorf("failed to prepare generate seed request: %s", err)
}
Expand All @@ -205,7 +205,7 @@ func setupAspWallet() error {
}

reqBody := bytes.NewReader([]byte(fmt.Sprintf(`{"seed": "%s", "password": "%s"}`, seed.Seed, utils.Password)))
req, err = http.NewRequest("POST", "http://localhost:8080/v1/admin/wallet/create", reqBody)
req, err = http.NewRequest("POST", "http://localhost:6060/v1/admin/wallet/create", reqBody)
if err != nil {
return fmt.Errorf("failed to prepare wallet create request: %s", err)
}
Expand All @@ -217,7 +217,7 @@ func setupAspWallet() error {
}

reqBody = bytes.NewReader([]byte(fmt.Sprintf(`{"password": "%s"}`, utils.Password)))
req, err = http.NewRequest("POST", "http://localhost:8080/v1/admin/wallet/unlock", reqBody)
req, err = http.NewRequest("POST", "http://localhost:6060/v1/admin/wallet/unlock", reqBody)
if err != nil {
return fmt.Errorf("failed to prepare wallet unlock request: %s", err)
}
Expand All @@ -230,7 +230,7 @@ func setupAspWallet() error {

time.Sleep(time.Second)

req, err = http.NewRequest("GET", "http://localhost:8080/v1/admin/wallet/address", nil)
req, err = http.NewRequest("GET", "http://localhost:6060/v1/admin/wallet/address", nil)
if err != nil {
return fmt.Errorf("failed to prepare new address request: %s", err)
}
Expand Down
10 changes: 5 additions & 5 deletions server/test/e2e/covenantless/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestMain(m *testing.M) {

time.Sleep(3 * time.Second)

_, err = runClarkCommand("init", "--asp-url", "localhost:6000", "--password", utils.Password, "--network", "regtest", "--explorer", "http://chopsticks:3000")
_, err = runClarkCommand("init", "--asp-url", "localhost:7070", "--password", utils.Password, "--network", "regtest", "--explorer", "http://chopsticks:3000")
if err != nil {
fmt.Printf("error initializing ark config: %s", err)
os.Exit(1)
Expand Down Expand Up @@ -190,7 +190,7 @@ func setupAspWallet() error {
Timeout: 15 * time.Second,
}

req, err := http.NewRequest("GET", "http://localhost:6000/v1/admin/wallet/seed", nil)
req, err := http.NewRequest("GET", "http://localhost:7070/v1/admin/wallet/seed", nil)
if err != nil {
return fmt.Errorf("failed to prepare generate seed request: %s", err)
}
Expand All @@ -210,7 +210,7 @@ func setupAspWallet() error {
}

reqBody := bytes.NewReader([]byte(fmt.Sprintf(`{"seed": "%s", "password": "%s"}`, seed.Seed, utils.Password)))
req, err = http.NewRequest("POST", "http://localhost:6000/v1/admin/wallet/create", reqBody)
req, err = http.NewRequest("POST", "http://localhost:7070/v1/admin/wallet/create", reqBody)
if err != nil {
return fmt.Errorf("failed to prepare wallet create request: %s", err)
}
Expand All @@ -222,7 +222,7 @@ func setupAspWallet() error {
}

reqBody = bytes.NewReader([]byte(fmt.Sprintf(`{"password": "%s"}`, utils.Password)))
req, err = http.NewRequest("POST", "http://localhost:6000/v1/admin/wallet/unlock", reqBody)
req, err = http.NewRequest("POST", "http://localhost:7070/v1/admin/wallet/unlock", reqBody)
if err != nil {
return fmt.Errorf("failed to prepare wallet unlock request: %s", err)
}
Expand All @@ -235,7 +235,7 @@ func setupAspWallet() error {

time.Sleep(time.Second)

req, err = http.NewRequest("GET", "http://localhost:6000/v1/admin/wallet/address", nil)
req, err = http.NewRequest("GET", "http://localhost:7070/v1/admin/wallet/address", nil)
if err != nil {
return fmt.Errorf("failed to prepare new address request: %s", err)
}
Expand Down

0 comments on commit e79819c

Please sign in to comment.