Skip to content

Commit bcc71fa

Browse files
bogdan-rosianucfaur09stefangutica
authored
Development to main (#1565)
* extend features flags config values * fixes after review + test fix * set more default configs to false * fixes after merge * Enhance error handling in GatewayProxyController for block retrieval by hash (#1545) * use EsdtType instead of hardcoded values (#1544) * token service improvements (#1543) * processes 50 tokens concurrently using ConcurrencyUtils * run all three batch operations in parallel with increased concurrency * add more logs * apply mex prices * add logs ( to be removed ) * increse cron time expression * set cron to 2 minutes * Websocket subscriptions (#1528) * add websockets for blocks and txs * add support for subscribe to stats * use websockets rooms * remove logs * add lock on crons * check stats room exists Signed-off-by: GuticaStefan <stefan.gutica@gmail.com> * fix indent spaces * add validation pipes + filters * add try catch + class validator fixes * fix linter * add pool subscription + reduce filters combinations for subscriptions * lint * add support for events subscription * lint * separate subscription websocket into separate app * add config * add path * fix * add path for events + config default settings * temp logs * temp logs 2 * added missing configs + remove temp logs * enable andromeda in config * add metrics on subscription * remove async + reschedule * refresh metrics every second * set max listeners to 12 * add EOL * add count on update + parallel broadcast to rooms * lower ttl for blocks count cache * remove comments * remove comments * renaming --------- Signed-off-by: GuticaStefan <stefan.gutica@gmail.com> Co-authored-by: bogdan-rosianu <bogdan.rosianu@yahoo.com> Co-authored-by: cfaur09 <catalinfaurpaul@gmail.com> * log instead of error for invalid legacy delegation contract (#1542) * implement event logAddress filter (#1548) * implement event logAddress filter * implement topics filter * Token market cap updates (#1550) * token mcap update * add logs * extend logs * add support for timestampMs for account * fix unit tests * improve token fetch price (#1549) * improve token fetch price * remove logger * update spec * fix lint error * add logs for error * add price * Enhance NFT type support in cache warmer and collection services (#1552) * Refactor function filter application in ElasticIndexerHelper to enhance query conditions with AND operator and existence checks (#1554) * apply supply info for all tokens (#1558) * Refactor token market cap calculation to ensure price and circulating supply are checked before computation * add specs * fix lint * added reserved field to blocks (#1560) * add support for custom url custom headers (#1557) * Add custom URL headers support and enhance token data fetching * Enhance custom URL headers handling by adding JSON parsing and validation checks * add logs * fixes * remove app.hatom.com value * add EOL * fix indentation * API-741: staking v5 support * bugfix * fix lint * refactor * fixes * try-catch for queue computing * hotfix disable snapshotless * revert * add staking v5 activation epoch feature * added devnet config * small fix * added mainnet config * add stakingv5 e2e configs * Deprecate relayed v1/v2 (#1564) * Add transaction reordering by nonce for account sent transactions * add relayed deprecation to transfers as well * add custom subscriptions * fix lint * fix lint & unit tests * hardcode class fields * lint * refactor * add tests for room key generator * iterate over round only if there are active subscriptions * improvements * add support for unsubscribe * lint * add support for events * add support for timestampMs in ES * lint * hardcode timestamp supernova in the future * extra checks + clean code * fixes * fixes * typo * use latest chainsim * fix * add unit tests for transaction reordering by nonce for account sent transactions (#1572) * add chain simulator e2e tests * lint * fix * missing comma * fix * Refactor account, NFT, and transaction services to improve concurrency and caching * improve NFT bulk fetch + applyOwner * add no empty payload validator for custom subscriptions * add global subscription limiter * remove log * add e2e tests for events * lint * added metric per topics * updates * implement ConcurrencyUtils in collection service * add tests for general subscriptions * add newline * use timestampMs * revert e2e mainnet config * custom verbose * use timestampMs on chain sim network * add subscription limits to config * fix * update configs * use barnard config * typo * added readme * typo * add lock on subscriptions * use same key for lock * fix * add async mutex * lint * return success status on stats * return unsubscribed status on stats * config update * collection service improvments * fix spec * fixes * fixes * add support for transfers subscription * add support for token transfers subscriptions * add ws transfers e2e tests * fix unit tests * fix transction filters cache * remove duplicate code * add new line * encapsulate into variable * renaming * refactoring + skip unneeded iterations for duplicate keys * explanation comments * add unit test for disallowed field comb constraint * fixes after review * add configurable broadcast interval * add check keys present for transfers + events filtered * remove async await * fix * fix nft attributes source * fix lint * allow admins to trigger nft updates * print * revert log --------- Signed-off-by: GuticaStefan <stefan.gutica@gmail.com> Co-authored-by: Catalin Faur <52102171+cfaur09@users.noreply.github.com> Co-authored-by: Gutica Stefan <123564494+stefangutica@users.noreply.github.com> Co-authored-by: cfaur09 <catalinfaurpaul@gmail.com> Co-authored-by: GuticaStefan <stefan.gutica@gmail.com>
1 parent fe23ca8 commit bcc71fa

75 files changed

Lines changed: 3011 additions & 388 deletions

File tree

Some content is hidden

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

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ It depends on the following optional external systems:
8383
- events notifier rabbitmq: queue that pushes logs & events which are handled internally e.g. to trigger NFT media fetch
8484
- data: provides EGLD price information for transactions
8585
- xexchange: provides price information regarding various tokens listed on the xExchange
86+
- nodes provider: fetch nodes data instead of self-computing (config: `features.nodesFetch`)
87+
- staking providers fetcher: fetch staking providers data instead of self-computing (config: `features.providersFetch`)
88+
- tokens provider: fetch tokens data instead of self-computing (config: `features.tokensFetch`)
8689
- ipfs: ipfs gateway for fetching mainly NFT metadata & media files
8790
- media: ipfs gateway which will be used as prefix for NFT media & metadata returned in the NFT details
8891
- media internal: caching layer for ipfs data to fetch from a centralized system such as S3 for performance reasons

config/config.devnet-old.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ features:
6161
jwtSecret: ''
6262
nodeEpochsLeft:
6363
enabled: false
64+
chainBarnard:
65+
enabled: false
66+
activationEpoch: 3964
67+
activationTimestamp: 1751460236
6468
image:
6569
width: 600
6670
height: 600

config/config.devnet.yaml

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ features:
2323
websocketSubscription:
2424
enabled: false
2525
port: 6002
26+
maxSubscriptionsPerInstance: 10000
27+
maxSubscriptionsPerClient: 10
28+
broadcastIntervalMs: 6000
2629
eventsNotifier:
2730
enabled: false
2831
port: 5674
@@ -54,7 +57,7 @@ features:
5457
serviceUrl: 'https://devnet-data-api.multiversx.com'
5558
assetsFetch:
5659
enabled: true
57-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
60+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
5861
auth:
5962
enabled: false
6063
maxExpirySeconds: 86400
@@ -64,12 +67,22 @@ features:
6467
- ''
6568
jwtSecret: ''
6669
stakingV4:
67-
enabled: false
70+
enabled: true
6871
cronExpression: '*/5 * * * * *'
6972
activationEpoch: 1043
7073
chainAndromeda:
7174
enabled: true
7275
activationEpoch: 4
76+
stakingV5:
77+
enabled: true
78+
activationEpoch: 4817
79+
chainBarnard:
80+
enabled: true
81+
activationEpoch: 3964
82+
activationTimestamp: 1751460236
83+
deprecatedRelayedV1V2:
84+
enabled: true
85+
activationEpoch: 4569
7386
nodeEpochsLeft:
7487
enabled: false
7588
transactionProcessor:
@@ -110,13 +123,13 @@ features:
110123
enabled: false
111124
maxLookBehindNonces: 100
112125
nodesFetch:
113-
enabled: true
126+
enabled: false
114127
serviceUrl: 'https://devnet-api.multiversx.com'
115128
tokensFetch:
116-
enabled: true
129+
enabled: false
117130
serviceUrl: 'https://devnet-api.multiversx.com'
118131
providersFetch:
119-
enabled: true
132+
enabled: false
120133
serviceUrl: 'https://devnet-api.multiversx.com'
121134
image:
122135
width: 600
@@ -179,11 +192,15 @@ inflation:
179192
- 1130177
180193
- 924690
181194
- 719203
195+
stakingV5Inflation:
196+
- 1069805
197+
# november 2025 devnet supply: 24_433_152. first year rewards = 50% * (8.757% * supply) = 1_069_805
198+
# TODO: calculate the inflation for upcoming years based on the inflation decay
182199
nftProcess:
183200
parallelism: 1
184201
maxRetries: 3
185202
compression:
186203
enabled: true
187204
level: 6
188205
threshold: 1024
189-
chunkSize: 16384
206+
chunkSize: 16384

config/config.e2e-mocked.mainnet.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ features:
88
websocketSubscription:
99
enabled: false
1010
port: 6002
11+
maxSubscriptionsPerInstance: 10000
12+
maxSubscriptionsPerClient: 10
13+
broadcastIntervalMs: 6000
1114
dataApi:
1215
enabled: false
1316
serviceUrl: 'https://data-api.multiversx.com'
@@ -16,6 +19,10 @@ features:
1619
maxExpirySeconds: 86400
1720
acceptedOrigins:
1821
- ''
22+
chainBarnard:
23+
enabled: true
24+
activationEpoch: 1820
25+
activationTimestamp: 1753376544
1926
cron:
2027
transactionProcessor: false
2128
transactionProcessorMaxLookBehind: 1000

config/config.e2e.mainnet.yaml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ flags:
2121
collectionPropertiesFromGateway: false
2222
features:
2323
websocketSubscription:
24-
enabled: false
24+
enabled: true
2525
port: 6002
26+
maxSubscriptionsPerInstance: 10000
27+
maxSubscriptionsPerClient: 10
28+
broadcastIntervalMs: 6000
2629
eventsNotifier:
2730
enabled: false
2831
port: 5674
@@ -68,6 +71,13 @@ features:
6871
chainAndromeda:
6972
enabled: true
7073
activationEpoch: 4
74+
stakingV5:
75+
enabled: true
76+
activationEpoch: 1951
77+
chainBarnard:
78+
enabled: true
79+
activationEpoch: 1820
80+
activationTimestamp: 1753376544
7181
nodeEpochsLeft:
7282
enabled: false
7383
transactionProcessor:
@@ -121,7 +131,7 @@ features:
121131
serviceUrl: 'https://api.multiversx.com'
122132
assetsFetch:
123133
enabled: false
124-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
134+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
125135
image:
126136
width: 600
127137
height: 600
@@ -183,6 +193,8 @@ inflation:
183193
- 1130177
184194
- 924690
185195
- 719203
196+
stakingV5Inflation:
197+
- 1262802
186198
nftProcess:
187199
parallelism: 1
188-
maxRetries: 3
200+
maxRetries: 3

config/config.mainnet.yaml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ features:
2323
websocketSubscription:
2424
enabled: false
2525
port: 6002
26+
maxSubscriptionsPerInstance: 10000
27+
maxSubscriptionsPerClient: 10
28+
broadcastIntervalMs: 6000
2629
eventsNotifier:
2730
enabled: false
2831
port: 5674
@@ -68,6 +71,16 @@ features:
6871
chainAndromeda:
6972
enabled: true
7073
activationEpoch: 1763
74+
stakingV5:
75+
enabled: true
76+
activationEpoch: 1951
77+
chainBarnard:
78+
enabled: true
79+
activationEpoch: 1820
80+
activationTimestamp: 1753376544
81+
deprecatedRelayedV1V2:
82+
enabled: true
83+
activationEpoch: 1918
7184
nodeEpochsLeft:
7285
enabled: false
7386
transactionProcessor:
@@ -111,17 +124,17 @@ features:
111124
enabled: false
112125
maxLookBehindNonces: 100
113126
nodesFetch:
114-
enabled: true
127+
enabled: false
115128
serviceUrl: 'https://api.multiversx.com'
116129
tokensFetch:
117-
enabled: true
130+
enabled: false
118131
serviceUrl: 'https://api.multiversx.com'
119132
providersFetch:
120-
enabled: true
133+
enabled: false
121134
serviceUrl: 'https://api.multiversx.com'
122135
assetsFetch:
123136
enabled: true
124-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
137+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
125138
image:
126139
width: 600
127140
height: 600
@@ -183,6 +196,10 @@ inflation:
183196
- 1130177
184197
- 924690
185198
- 719203
199+
stakingV5Inflation:
200+
- 1262802
201+
# december 2025 mainnet supply: 28_840_981. first year rewards = 50% * (8.75% * supply) = 1262802
202+
# TODO: calculate the inflation for upcoming years based on the inflation decay
186203
nftProcess:
187204
parallelism: 1
188205
maxRetries: 3

config/config.testnet.yaml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ features:
2323
websocketSubscription:
2424
enabled: false
2525
port: 6002
26+
maxSubscriptionsPerInstance: 10000
27+
maxSubscriptionsPerClient: 10
28+
broadcastIntervalMs: 6000
2629
eventsNotifier:
2730
enabled: false
2831
port: 5674
@@ -61,12 +64,22 @@ features:
6164
- ''
6265
jwtSecret: ''
6366
stakingV4:
64-
enabled: false
67+
enabled: true
6568
cronExpression: '*/5 * * * * *'
6669
activationEpoch: 1043
6770
chainAndromeda:
6871
enabled: true
6972
activationEpoch: 4
73+
stakingV5:
74+
enabled: true
75+
activationEpoch: 2519
76+
chainBarnard:
77+
enabled: false
78+
activationEpoch: 2030
79+
activationTimestamp: 1864749472
80+
deprecatedRelayedV1V2:
81+
enabled: true
82+
activationEpoch: 2038
7083
nodeEpochsLeft:
7184
enabled: false
7285
transactionProcessor:
@@ -110,17 +123,17 @@ features:
110123
enabled: false
111124
maxLookBehindNonces: 100
112125
nodesFetch:
113-
enabled: true
126+
enabled: false
114127
serviceUrl: 'https://testnet-api.multiversx.com'
115128
tokensFetch:
116-
enabled: true
129+
enabled: false
117130
serviceUrl: 'https://testnet-api.multiversx.com'
118131
providersFetch:
119-
enabled: true
132+
enabled: false
120133
serviceUrl: 'https://testnet-api.multiversx.com'
121134
assetsFetch:
122135
enabled: true
123-
assetesUrl: 'https://tools.multiversx.com/assets-cdn'
136+
assetsUrl: 'https://tools.multiversx.com/assets-cdn'
124137
image:
125138
width: 600
126139
height: 600
@@ -182,6 +195,10 @@ inflation:
182195
- 1130177
183196
- 924690
184197
- 719203
198+
stakingV5Inflation:
199+
- 930117
200+
# november 2025 testnet supply: 21_242_828. first year rewards = 50% * (8.75% * supply) = 930117
201+
# TODO: calculate the inflation for upcoming years based on the inflation decay
185202
nftProcess:
186203
parallelism: 1
187204
maxRetries: 3

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
"anchorme": "^3.0.8",
118118
"apollo-server-core": "^3.13.0",
119119
"apollo-server-express": "3.13.0",
120+
"async-mutex": "^0.5.0",
120121
"bignumber.js": "^9.0.2",
121122
"class-transformer": "^0.5.1",
122123
"class-validator": "^0.14.2",
@@ -220,4 +221,4 @@
220221
"node_modules"
221222
]
222223
}
223-
}
224+
}

0 commit comments

Comments
 (0)