Skip to content

Commit 9896a4c

Browse files
committed
Remove vault valuation service code.
1 parent f2d6315 commit 9896a4c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+39
-3343
lines changed

gradle/wrapper/gradle-wrapper.jar

2.73 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/src/main/java/systems/glam/sdk/GlamAccountClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class GlamAccountClientImpl implements GlamAccountClient {
3838
this.wrappedSolPDA = splAccountClient.wrappedSolPDA().publicKey();
3939
this.glamAccounts = glamVaultAccounts.glamAccounts();
4040
this.invokedProtocolProgram = glamAccounts.invokedProtocolProgram();
41-
this.globalConfigKey = glamVaultAccounts.glamAccounts().globalConfigPDA().publicKey();
41+
this.globalConfigKey = glamAccounts.globalConfigPDA().publicKey();
4242
}
4343

4444
static ProtocolPermissions adaptPermissions(final GlamAccounts glamAccounts,

services/src/main/java/module-info.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
exports systems.glam.services.mints;
4848
exports systems.glam.services.oracles.scope.parsers;
4949
exports systems.glam.services.oracles.scope;
50-
exports systems.glam.services.pricing.accounting;
5150
exports systems.glam.services.pricing;
5251
exports systems.glam.services.rpc;
5352
exports systems.glam.services.state;

services/src/main/java/systems/glam/services/BaseDelegateService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public BaseDelegateService(final GlamAccountClient glamAccountClient) {
1616
}
1717

1818
protected final StateAccount stateAccount(final Map<PublicKey, AccountInfo<byte[]>> accountsNeededMap) {
19-
return StateAccount.read(accountsNeededMap.get(stateAccountKey()));
19+
return StateAccount.read(accountsNeededMap.get(key()));
2020
}
2121

22-
public PublicKey stateAccountKey() {
22+
public PublicKey key() {
2323
return glamAccountClient.vaultAccounts().glamStateKey();
2424
}
2525
}

services/src/main/java/systems/glam/services/ServiceContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import java.nio.file.Path;
1515
import java.util.Map;
16+
import java.util.concurrent.ExecutorService;
1617

1718
public interface ServiceContext {
1819

@@ -51,6 +52,8 @@ default Path globalConfigCacheFile() {
5152

5253
void executeTask(final Runnable task);
5354

55+
ExecutorService taskExecutor();
56+
5457
void backoff(final long failureCount) throws InterruptedException;
5558

5659
long minCheckStateDelayNanos();

services/src/main/java/systems/glam/services/ServiceContextImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ public void executeTask(final Runnable task) {
140140
taskExecutor.execute(task);
141141
}
142142

143+
@Override
144+
public ExecutorService taskExecutor() {
145+
return taskExecutor;
146+
}
147+
143148
@Override
144149
public void backoff(final long failureCount) throws InterruptedException {
145150
NANOSECONDS.sleep(Math.max(minCheckStateDelayNanos, backoff.delay(failureCount, NANOSECONDS)));

services/src/main/java/systems/glam/services/execution/BaseServiceContext.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
import java.nio.file.Path;
1010
import java.util.Map;
11+
import java.util.concurrent.ExecutorService;
1112

1213
public class BaseServiceContext {
1314

@@ -52,4 +53,8 @@ public final Path resolveGlamStateFilePath(final PublicKey glamStateKey) {
5253
public final void executeTask(final Runnable task) {
5354
serviceContext.executeTask(task);
5455
}
56+
57+
public final ExecutorService taskExecutor() {
58+
return serviceContext.taskExecutor();
59+
}
5560
}

services/src/main/java/systems/glam/services/integrations/IntegrationServiceContext.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,21 @@
88
import software.sava.rpc.json.http.response.AccountInfo;
99
import software.sava.services.solana.remote.call.RpcCaller;
1010
import systems.glam.services.ServiceContext;
11-
import systems.glam.services.db.sql.BatchSqlExecutor;
1211
import systems.glam.services.integrations.drift.DriftMarketCache;
1312
import systems.glam.services.integrations.kamino.KaminoCache;
1413
import systems.glam.services.mints.*;
1514
import systems.glam.services.oracles.scope.FeedIndexes;
16-
import systems.glam.services.pricing.accounting.VaultAumRecord;
1715
import systems.glam.services.rpc.AccountConsumer;
1816
import systems.glam.services.rpc.AccountFetcher;
1917
import systems.glam.services.state.GlobalConfigCache;
2018

2119
import java.nio.file.Path;
2220
import java.util.Collection;
21+
import java.util.concurrent.ExecutorService;
2322

2423
public interface IntegrationServiceContext {
2524

2625
static IntegrationServiceContext createContext(final ServiceContext serviceContext,
27-
final BatchSqlExecutor<VaultAumRecord> aumRecordBatchExecutor,
2826
final MintCache mintCache,
2927
final StakePoolCache stakePoolCache,
3028
final GlobalConfigCache globalConfigCache,
@@ -36,7 +34,6 @@ static IntegrationServiceContext createContext(final ServiceContext serviceConte
3634
final KaminoCache kaminoCache) {
3735
return new IntegrationServiceContextImpl(
3836
serviceContext,
39-
aumRecordBatchExecutor,
4037
mintCache,
4138
stakePoolCache,
4239
globalConfigCache,
@@ -65,6 +62,8 @@ default AccountMeta readClockSysVar() {
6562

6663
void executeTask(final Runnable task);
6764

65+
ExecutorService taskExecutor();
66+
6867
RpcCaller rpcCaller();
6968

7069
MintContext mintContext(final PublicKey mint);
@@ -83,8 +82,6 @@ default AccountMeta readClockSysVar() {
8382

8483
FeedIndexes scopeAggregateIndexes(final PublicKey mint, final PublicKey oracle, final OracleType oracleType);
8584

86-
void persistAumRecord(final VaultAumRecord aumRecord) throws InterruptedException;
87-
8885
IntegLookupTableCache integTableCache();
8986

9087
DriftMarketCache driftMarketCache();

0 commit comments

Comments
 (0)