Skip to content

Commit 0c32664

Browse files
Local Dev audius-compose fixes for Rewards (#64)
See commit messages --------- Co-authored-by: Raymond Jacobson <ray@audius.co>
1 parent 4050b51 commit 0c32664

5 files changed

Lines changed: 26 additions & 10 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.env
1+
.env*
22
.DS_Store
33
bridgerton.audius.co
44
build

api/spl/transaction_sender.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ type InstructionError struct {
5050
}
5151

5252
func (e *InstructionError) Error() string {
53-
return fmt.Sprintf("instruction error. index: %d, type: %s, code: %d", e.Index, e.Type, e.Code)
53+
return fmt.Sprintf("instruction error. index: %d, type: %s, code: %d, transaction: %s", e.Index, e.Type, e.Code, e.EncodedTransaction)
5454
}
5555

5656
type AddComputeBudgetLimitParams struct {
@@ -91,12 +91,12 @@ func (ts *TransactionSender) AddComputeBudgetLimit(ctx context.Context, tx *sola
9191
if err != nil {
9292
return fmt.Errorf("failed to set compute budget limit. simulation failed: %s", simResult.Value.Err)
9393
}
94-
instErr := InstructionError{}
94+
instErr := InstructionError{EncodedTransaction: builtTx.MustToBase64()}
9595
err = json.Unmarshal(str, &instErr)
9696
if err != nil {
9797
return fmt.Errorf("failed to set compute budget limit. simulation failed: %s", str)
9898
}
99-
return fmt.Errorf("failed to set compute budget limit. simulation failed: %w", &instErr)
99+
return fmt.Errorf("failed to set compute budget limit. simulation failed: %w, logs: %s", &instErr, simResult.Value.Logs)
100100
}
101101

102102
if simResult.Value.UnitsConsumed == nil || *simResult.Value.UnitsConsumed == uint64(0) {
@@ -344,7 +344,7 @@ func makeWebsocketUrl(endpoint string) (string, error) {
344344

345345
websocketPort := ""
346346
if startPort > 0 {
347-
websocketPort = strconv.FormatInt(int64(startPort+1), 10)
347+
websocketPort = ":" + strconv.FormatInt(int64(startPort+1), 10)
348348
}
349349
return fmt.Sprintf("%s//%s%s%s", protocol, hostish, websocketPort, rest), nil
350350
}

api/v1_track_download_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ func TestGetTrackDownload(t *testing.T) {
1111
req := httptest.NewRequest("GET", "/v1/tracks/eYZmn/download", nil)
1212
res, err := app.Test(req, -1)
1313
assert.NoError(t, err)
14-
assert.Contains(t, res.Header.Get("Location"), "https://dummynode.com/tracks/cidstream/?signature=%7B%22data%22%3A%22%7B%5C%22cid%5C%22%3A%5C%22%5C%22%2C%5C%22timestamp%5C%22%3")
14+
assert.Contains(t, res.Header.Get("Location"), "tracks/cidstream/?signature=%7B%22data%22%3A%22%7B%5C%22cid%5C%22%3A%5C%22%5C%22%2C%5C%22timestamp%5C%22%3")
1515
}

api/v1_track_stream_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ func TestGetTrackStream(t *testing.T) {
1111
req := httptest.NewRequest("GET", "/v1/tracks/eYJyn/stream", nil)
1212
res, err := app.Test(req, -1)
1313
assert.NoError(t, err)
14-
assert.Contains(t, res.Header.Get("Location"), "https://dummynode.com/tracks/cidstream/?signature=%7B%22data%22%3A%22%7B%5C%22cid%5C%22%3A%5C%22%5C%22%2C%5C%22timestamp%5C%22%3")
14+
assert.Contains(t, res.Header.Get("Location"), "tracks/cidstream/?signature=%7B%22data%22%3A%22%7B%5C%22cid%5C%22%3A%5C%22%5C%22%2C%5C%22timestamp%5C%22%3")
1515
}

config/nodes.go

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -800,9 +800,25 @@ var (
800800
}
801801
DevNodes = []Node{
802802
{
803-
DelegateOwnerWallet: "0x0000000000000000000000000000000000000001",
804-
Endpoint: "https://dummynode.com",
805-
OwnerWallet: "0x0000000000000000000000000000000000000001",
803+
DelegateOwnerWallet: "0x73EB6d82CFB20bA669e9c178b718d770C49BB52f",
804+
Endpoint: "http://audius-protocol-discovery-provider-1",
805+
OwnerWallet: "0x73EB6d82CFB20bA669e9c178b718d770C49BB52f",
806+
IsStorageDisabled: true,
807+
},
808+
{
809+
DelegateOwnerWallet: "0x0D38e653eC28bdea5A2296fD5940aaB2D0B8875c",
810+
Endpoint: "http://audius-protocol-creator-node-1",
811+
OwnerWallet: "0x0D38e653eC28bdea5A2296fD5940aaB2D0B8875c",
812+
},
813+
{
814+
DelegateOwnerWallet: "0x1B569e8f1246907518Ff3386D523dcF373e769B6",
815+
Endpoint: "http://audius-protocol-creator-node-2",
816+
OwnerWallet: "0x1B569e8f1246907518Ff3386D523dcF373e769B6",
817+
},
818+
{
819+
DelegateOwnerWallet: "0xCBB025e7933FADfc7C830AE520Fb2FD6D28c1065",
820+
Endpoint: "http://audius-protocol-creator-node-3",
821+
OwnerWallet: "0xCBB025e7933FADfc7C830AE520Fb2FD6D28c1065",
806822
},
807823
}
808824
)

0 commit comments

Comments
 (0)