Skip to content

Commit d79754d

Browse files
authored
Merge branch 'main' into main
2 parents 3b7d2bf + 8160180 commit d79754d

32 files changed

Lines changed: 1855 additions & 214 deletions

.env.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ CACHE_CLAIMS_TTL=3600 # Claim cache TTL in seconds
4949
# ==============================================
5050
# Blockchain Configuration
5151
# ==============================================
52+
# In-memory state service memory limits (prevents OOM)
53+
# Controls how many blocks, events, and reorg entries are kept in memory
54+
BLOCKCHAIN_MAX_BLOCKS=10000 # Max block records in memory (default: 10000)
55+
BLOCKCHAIN_MAX_EVENTS=50000 # Max pending/confirmed/orphaned events (default: 50000)
56+
BLOCKCHAIN_MAX_REORG_HISTORY=1000 # Max reorg history entries (default: 1000)
5257
# Redis configuration
5358
REDIS_HOST=localhost
5459
REDIS_PORT=6379
@@ -88,6 +93,13 @@ POLLING_INTERVAL_MS=12000
8893
# ]'
8994
INDEXED_CONTRACTS='[]'
9095

96+
# ==============================================
97+
# Sybil Resistance Configuration
98+
# ==============================================
99+
# Minimum number of claims a user must have voted on before their
100+
# accuracy score contributes to their sybil resistance score.
101+
SYBIL_MIN_CLAIMS_FOR_ACCURACY_SCORE=5
102+
91103
# ==============================================
92104
# Prisma Configuration (SQLite/LibSQL)
93105
# ==============================================

package-lock.json

Lines changed: 3 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app.module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { AppController } from './app.controller';
66
import { AppService } from './app.service';
77
import { RewardsModule } from './rewards/rewards.module';
88
import blockchainConfig from './config/blockchain.config';
9+
import sybilConfig from './config/sybil.config';
910
import { TypeOrmModule } from '@nestjs/typeorm';
1011
import { BlockchainModule } from './blockchain/blockchain.module';
1112
import { DisputeModule } from './dispute/dispute.module';
@@ -218,7 +219,7 @@ async function createThrottlerStorage(configService: ConfigService): Promise<any
218219
imports: [
219220
ConfigModule.forRoot({
220221
isGlobal: true,
221-
load: [blockchainConfig, throttlerConfig],
222+
load: [blockchainConfig, throttlerConfig, sybilConfig],
222223
envFilePath: ['.env.local', '.env'],
223224
}),
224225
TypeOrmModule.forRoot({

0 commit comments

Comments
 (0)