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

Add ChallengesApi, RewardManager to SDK #7026

Merged
merged 70 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
51724ac
Flatten service structure
rickyrombo Dec 20, 2023
abf1306
allow solana-test-validator websockets through nginx
rickyrombo Dec 23, 2023
0df28e7
increase max connections on local dev db
rickyrombo Dec 23, 2023
ff5e799
include owner wallets on discovery healthcheck services list
rickyrombo Dec 23, 2023
6829698
log serialized transactions in relay so they can be inspected
rickyrombo Dec 23, 2023
8cb5287
force attestations to use lowercase addresses
rickyrombo Dec 23, 2023
6ecee48
add challenge attestations api to full namespace and gen sdk
rickyrombo Dec 23, 2023
6ede5e0
remove doesFollowCurrentUser from sdk
rickyrombo Dec 23, 2023
937e099
refactor audius/spl rewardmanager program, fix BorshString, add vitest
rickyrombo Dec 23, 2023
2959b8d
consume changes to audius/spl rewardmanager
rickyrombo Dec 23, 2023
98ab0fa
add AntiAbuseOracleSelector service and api
rickyrombo Dec 23, 2023
10ba3fe
fix create sender script with new reward manager refactor
rickyrombo Dec 23, 2023
7651aa9
include self in discovery node listing on dn
rickyrombo Dec 23, 2023
6578e60
support new healthcheck format in discoveryNodeSelector
rickyrombo Dec 23, 2023
a7ec40d
regen sdk bootstrap config
rickyrombo Dec 23, 2023
84cf38e
add antiAbuseOracleSelector to servicescontainer type
rickyrombo Dec 23, 2023
ee4d7a8
fix solana relay wallet adapter so that it connects or throws
rickyrombo Dec 23, 2023
0dba993
audius/spl claimable tokens: add explicit public and don't redeclare …
rickyrombo Dec 23, 2023
71d52cc
add RewardManager program service
rickyrombo Dec 23, 2023
c136841
DiscoveryNodes type for dn selector private member
rickyrombo Dec 23, 2023
6182f89
forgot to export antiabuseselector from services index
rickyrombo Dec 23, 2023
47b2af0
add helper method to refresh service list
rickyrombo Dec 23, 2023
81d0178
fix public key schema to transform strings to pubkeys
rickyrombo Dec 23, 2023
1157a6b
add helper to confirm all transactions to all solana program services
rickyrombo Dec 23, 2023
66d54c1
first impl of getUniquelyOwnedEndpoints (wet)
rickyrombo Dec 23, 2023
26edc99
add challenges api to allow claiming rewards
rickyrombo Dec 23, 2023
6d022cb
add missing solana wallet adapter base dep
rickyrombo Dec 23, 2023
68a8eb9
change usage to prevent pulling in dep for production
rickyrombo Dec 23, 2023
c6a5a7e
reconfigure SDK on web
rickyrombo Dec 23, 2023
6412c0e
consume changes in mobile
rickyrombo Dec 23, 2023
7a661e4
fix dn tests
rickyrombo Dec 23, 2023
2276a99
fix other tests
rickyrombo Dec 23, 2023
4049d23
rename things
rickyrombo Dec 28, 2023
0d9595a
remove unnecessary dep, fix some errors
rickyrombo Dec 29, 2023
b3581f9
fix client configuration
rickyrombo Dec 29, 2023
407594d
remove lower() in favor of the sdk doing checksums
rickyrombo Dec 29, 2023
4e02c05
remove redundant map
rickyrombo Dec 29, 2023
11f6eda
fix identity solana relay test
rickyrombo Dec 29, 2023
68ab9b8
fix solana relay tests
rickyrombo Dec 29, 2023
fc2f820
trial-and-error the ci bug
rickyrombo Dec 29, 2023
b9e96de
Rename get_all_other_nodes => get_all_nodes and restore backwards com…
rickyrombo Dec 29, 2023
3c81bd1
Remove get_node_endpoint
rickyrombo Dec 29, 2023
85834c1
remove unused
rickyrombo Jan 2, 2024
d092eac
Fix test
rickyrombo Jan 2, 2024
9c133b2
Fix mock for get_discovery_nodes
rickyrombo Jan 2, 2024
fe439bb
Fix mock for get_discovery_nodes
rickyrombo Jan 2, 2024
0ac946a
Add jsdoc, generateSpecifiers
rickyrombo Jan 3, 2024
5f505f4
export the things, rename
rickyrombo Jan 3, 2024
ccd75c0
hide new stuff
rickyrombo Jan 3, 2024
5241a7f
fix bug
rickyrombo Jan 4, 2024
22bfd38
Add tests for getUniquelyOwnedEndpoints, add more coverage, fix bug
rickyrombo Jan 10, 2024
ae1e01a
Improve AAO selector
rickyrombo Jan 10, 2024
4198b08
Rename AntiAbuseOracleApi, move to service
rickyrombo Jan 10, 2024
cab52b5
Refactor AntiAbuseOracle
rickyrombo Jan 11, 2024
30f135b
comments
rickyrombo Jan 12, 2024
632e19e
Merge remote-tracking branch 'origin/main' into mjp-sdk-solana-relay-2
rickyrombo Jan 18, 2024
3a46392
lint fix
rickyrombo Jan 18, 2024
db1273f
meh types
rickyrombo Jan 18, 2024
22b4d69
fix lint, program=>client
rickyrombo Jan 20, 2024
d011c03
fix mobile
rickyrombo Jan 20, 2024
d5259d1
Merge remote-tracking branch 'origin/main' into mjp-sdk-solana-relay-2
rickyrombo Jan 22, 2024
b49d575
Merge remote-tracking branch 'origin/main' into mjp-sdk-solana-relay-2
rickyrombo Jan 23, 2024
57e90e3
Fix test
rickyrombo Jan 23, 2024
9ce4066
Rename get_all_other_nodes.py
rickyrombo Jan 23, 2024
0922eb4
Fix env import
rickyrombo Jan 23, 2024
4e6ef8b
remove nullcheck
rickyrombo Jan 23, 2024
2d288d0
Merge remote-tracking branch 'origin/main' into mjp-sdk-solana-relay-2
rickyrombo Jan 23, 2024
1acbbce
fix test patch
rickyrombo Jan 24, 2024
b6ac798
forgot to save
rickyrombo Jan 24, 2024
604d044
add missing wallets
rickyrombo Jan 24, 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
2 changes: 1 addition & 1 deletion dev-tools/compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ services:
db:
image: postgres:11.4
shm_size: 2g
command: postgres -c shared_buffers=2GB
command: postgres -c shared_buffers=2GB -c max_connections=300
rickyrombo marked this conversation as resolved.
Show resolved Hide resolved
restart: unless-stopped
ports:
- 5432:5432
Expand Down
15 changes: 15 additions & 0 deletions dev-tools/compose/nginx_ingress.conf
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,21 @@ server {
server_name audius-protocol-solana-test-validator-1;

location / {
try_files /nonexistent @$http_upgrade;
}

location @websocket {
resolver 127.0.0.11 valid=30s;
set $upstream audius-protocol-solana-test-validator-1:8900;
proxy_http_version 1.1;
proxy_pass http://$upstream;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}

location @ {
resolver 127.0.0.11 valid=30s;
set $upstream audius-protocol-solana-test-validator-1:8899;
proxy_pass http://$upstream;
Expand Down
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -274,15 +274,17 @@ def test_get_attestation_weekly_pool_exhausted(app):


@pytest.fixture
def patch_get_all_other_nodes():
def patch_get_all_nodes():
with patch(
"src.queries.get_attestation.get_all_other_discovery_nodes_wallets_cached",
return_value=["0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"],
"src.queries.get_attestation.get_all_discovery_nodes_cached",
return_value=[
{"delegateOwnerWallet": "0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"}
],
):
yield


def test_get_create_sender_attestation(app, patch_get_all_other_nodes):
def test_get_create_sender_attestation(app, patch_get_all_nodes):
new_sender_address = "0x94e140D27F3d5EE9EcA0109A71CcBa0109964DCa"
owner_wallet, sender_attestation = get_create_sender_attestation(new_sender_address)

Expand Down Expand Up @@ -315,7 +317,7 @@ def test_get_create_sender_attestation(app, patch_get_all_other_nodes):
)


def test_get_create_sender_attestation_not_registered(app, patch_get_all_other_nodes):
def test_get_create_sender_attestation_not_registered(app, patch_get_all_nodes):
new_sender_address = "0x04e140D27F3d5EE9EcA0109A71CcBa0109964DCa"
with pytest.raises(
Exception,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ def get_events_side_effect(_, tx_receipt):
)

mocker.patch(
"src.queries.confirm_indexing_transaction_error.get_all_other_discovery_nodes_cached",
return_value=["node1", "node2", "node3"],
"src.queries.confirm_indexing_transaction_error.get_all_discovery_nodes_cached",
return_value=[
{"endpoint": "node1", "delegateOwnerWallet": "wallet1"},
{"endpoint": "node2", "delegateOwnerWallet": "wallet2"},
{"endpoint": "node3", "delegateOwnerWallet": "wallet3"},
],
autospec=True,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const main = async () => {
console.log(`using ${initialSelectedNode}`);

const discoveryNodeSelector = new DiscoveryNodeSelector({
initialSelectedNode,
initialSelectedNode: initialSelectedNode.endpoint,
});

const entityManager = new EntityManager({
Expand Down
Loading