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

NODE-2449 Run Ride on any environment #3869

Merged
merged 494 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
494 commits
Select commit Hold shift + click to select a range
779499d
added a total number of scripts
vsuharnikov Feb 14, 2023
4a0aa29
dashboard: a minimum interval
vsuharnikov Feb 14, 2023
4c592c2
dashboard: fixed fd
vsuharnikov Feb 14, 2023
9292c5b
limit connections and a thread pool for HTTP
vsuharnikov Feb 14, 2023
74e215b
lazy eval for not changed scripts
vsuharnikov Feb 15, 2023
dc6c62a
+ lazy eval for all scripts
vsuharnikov Feb 16, 2023
02b138f
dashboard:
vsuharnikov Feb 16, 2023
99d7084
dashboard: merged JVM memory pools into one table
vsuharnikov Feb 16, 2023
04b243e
dashboard: sorting and decimals
vsuharnikov Feb 16, 2023
2f102e7
+ heap dumps: listing, downloading, API key;
vsuharnikov Feb 20, 2023
4f084cf
renaming packages
vsuharnikov Feb 20, 2023
a1b54ff
moving packages
vsuharnikov Feb 20, 2023
28379dc
Merge remote-tracking branch 'origin/version-1.4.x' into NODE-2449-ru…
vsuharnikov Feb 21, 2023
4a401e4
migration to rocksdb: tests passed
vsuharnikov Feb 21, 2023
d76d469
fixes
vsuharnikov Feb 22, 2023
7029035
moving classes
vsuharnikov Feb 22, 2023
94037d9
run all in one batch (wip)
vsuharnikov Feb 28, 2023
d0e1f94
run all in one batch: fixed tests
vsuharnikov Mar 1, 2023
35c9b4a
CompareApp: exclude "stateChanges" from the comparison
vsuharnikov Mar 1, 2023
8ad6dd7
Catching UNAVAILABLE from gRPC
vsuharnikov Mar 7, 2023
de42c7d
Faster startup: storing indexes (wip)
vsuharnikov Mar 7, 2023
707f08b
Faster startup: storing indexes (2)
vsuharnikov Mar 9, 2023
a63d2ce
+ Faster setup: do not run scripts after become working
vsuharnikov Mar 9, 2023
9e4246b
+ RocksDB works without core dumps;
vsuharnikov Mar 13, 2023
65a478e
Making the service alive (wip)
vsuharnikov Mar 16, 2023
bda7f37
Updated a dashboard
vsuharnikov Mar 18, 2023
024be16
+ RideDb + RocksDbProperties: open a db and write metrics;
vsuharnikov Mar 18, 2023
c949920
Housekeeping
vsuharnikov Mar 18, 2023
46b6ead
Moving packages and housekeeping
vsuharnikov Mar 18, 2023
39ecd53
Moving packages and housekeeping (2)
vsuharnikov Mar 19, 2023
f62f0c8
+ Fixed a bug with undo
vsuharnikov Mar 19, 2023
5227bfe
Rename Storage to DiscStorage
vsuharnikov Mar 19, 2023
21f9eb3
+ DiskStorage is renamed to PersistentStorage (much better)
vsuharnikov Mar 19, 2023
9e624de
+ ride.runner.app package is renamed to ride.runner.entrypoints
vsuharnikov Mar 19, 2023
abfc118
+ New version of Kamon and Kanela
vsuharnikov Mar 19, 2023
e78f618
Fixed some mess with heights
vsuharnikov Mar 19, 2023
f9f6e57
Delays before blockchain update restarts
vsuharnikov Mar 19, 2023
e849558
Up
vsuharnikov Mar 21, 2023
b47685a
Copied implementation from RocksDB, tests passed
vsuharnikov Mar 21, 2023
4643e2a
Catching RocksDB stats issues
vsuharnikov Mar 21, 2023
fe8a396
RocksDB: reduced: manifest file, max open files, write buffer size
vsuharnikov Mar 21, 2023
a93f742
Blockchain.height affects only a script (wip)
vsuharnikov Mar 21, 2023
8a25fa7
RideDb: removed unnecessary options (because WAL is disabled)
vsuharnikov Mar 22, 2023
d9b9d08
Revert "Blockchain.height affects only a script (wip)"
vsuharnikov Mar 23, 2023
b8b0f54
merge origin/version-1.4.x
vsuharnikov Mar 23, 2023
10e96fb
NODE-2449 Run RIDE on any environment (using DAppEnvironment)
Mar 31, 2023
05f3503
Resolve NODE-2449 "Run ride on any environment script queue"
Apr 3, 2023
8f1e276
renamings
vsuharnikov Apr 3, 2023
071d492
getting vrf from gRPC and BlockchainUpdates API
vsuharnikov Apr 4, 2023
198cbac
fixed tests
vsuharnikov Apr 4, 2023
ca1e187
Fixed JobScheduler and its metrics
vsuharnikov Apr 5, 2023
1c06b0b
NODE-2449 DB fixes
Apr 13, 2023
4cb5ae8
NODE-2449 DB refactoring and fixes
Apr 26, 2023
a5536c8
NODE-2449 Run ride on any environment - cache weigher
May 3, 2023
b45d65f
* Fixed bug which could lead to HTTP timeouts during running scripts;
vsuharnikov May 4, 2023
8a93ea8
* RideRunnerWithBlockchainUpdatesApp now works;
vsuharnikov May 4, 2023
f5a3185
Cleanup
vsuharnikov May 4, 2023
8a9561c
FIX: return an error when a compiler can't compile the given expr fro…
vsuharnikov May 4, 2023
059d807
Return right status codes
vsuharnikov May 5, 2023
a9019ef
FIX: catching all gRPC errors during trackAndRun
vsuharnikov May 5, 2023
cdd2e2c
Rename stats to avoid confusion
vsuharnikov May 5, 2023
38a3cde
* Better controlling the job queue size;
vsuharnikov May 5, 2023
f48967f
Limit the size of an ignored requests set
vsuharnikov May 5, 2023
b3bc83b
Metrics: limit decimals in CPU graphs;
vsuharnikov May 5, 2023
1c88b87
Moving classes
vsuharnikov May 5, 2023
4a803d7
Saving the result of request expr compilation
vsuharnikov May 6, 2023
809eb8d
Fixed "Closed by a client" warning on start
vsuharnikov May 10, 2023
316aadd
* Removing ignored requests from the memory;
vsuharnikov May 10, 2023
27058cf
Fixed an eviction strategy
vsuharnikov May 10, 2023
2db7187
Time in queue stats
vsuharnikov May 10, 2023
bca0552
Ignored requests cleanup fix
vsuharnikov May 10, 2023
aaabed6
Stopping RequestService queue
vsuharnikov May 11, 2023
f4ce5ff
Activated features from blockchain updates
vsuharnikov May 11, 2023
1160678
* Direct and batched DB operations;
vsuharnikov May 12, 2023
d3f02d1
Storing AddressId instead of Address for Alias
vsuharnikov May 12, 2023
5a2232c
Fix for activation status
vsuharnikov May 12, 2023
e21a1fc
Scripts de-duplication in memory
vsuharnikov May 12, 2023
fec7326
AppInitializer.checkDbVersion
vsuharnikov May 13, 2023
3d87af5
* AppInitializer: checking a DB version by a flag;
vsuharnikov May 15, 2023
da3b9c2
RideRunnerWithPreparedStateApp: fixed input JSON parsing issues
vsuharnikov May 15, 2023
76ee0ac
ImmutableBlockchain cleanup
vsuharnikov May 15, 2023
c4f6b76
RunnerTransactionInfo: attachment and proofs elements as StringOrBytes
vsuharnikov May 15, 2023
783dd6d
* StringOrBytesAsByteStr renamed to StringOrBytesAsByteString;
vsuharnikov May 15, 2023
adbf1ff
Script either as src or as compiled bytes
vsuharnikov May 15, 2023
e9cea0b
RideRunnerWithPreparedStateApp - CLI with scopt
vsuharnikov May 16, 2023
7cef2d9
RideRunnerWithPreparedStateApp - blockchain settings in input instead…
vsuharnikov May 16, 2023
70f73f5
RideRunnerWithPreparedStateApp - disable logs by default
vsuharnikov May 16, 2023
e652f01
* RideRunnerWithPreparedStateApp - better errors if input is wrong;
vsuharnikov May 16, 2023
3b2b933
Wrong invocation test
vsuharnikov May 17, 2023
4c96cd7
* RideRunnerWithPreparedStateApp - simplified settings;
vsuharnikov May 17, 2023
ce55221
Documentation update
vsuharnikov May 17, 2023
58d502b
* Improved parsing of Alias and AddressOrAlias;
vsuharnikov May 18, 2023
c120fc1
Sample input now works
vsuharnikov May 18, 2023
bd4f0d9
RideRunnerWithPreparedStateApp:
vsuharnikov May 18, 2023
0e65dc8
RideRunnerWithPreparedStateApp: int as string in output
vsuharnikov May 18, 2023
208987f
RideRunnerWithPreparedStateApp:
vsuharnikov May 18, 2023
2412508
Disable shutdown hook for logs by default, because it slows shutdown …
vsuharnikov May 18, 2023
d33a50a
Fat JAR
vsuharnikov May 19, 2023
f9c78e4
FIX: a bug with not updating values after gRPC failure
vsuharnikov May 19, 2023
1665aee
* Disable CompositeHttpService logs;
vsuharnikov Jun 14, 2023
e4a3335
FIX: JobScheduler - don't add regular items that is in the queue.
vsuharnikov Jun 14, 2023
d9d3474
Configurable state changes.
vsuharnikov Jun 14, 2023
f8d5627
Updated graphs
vsuharnikov Jun 15, 2023
8eea68f
Proper requests cleanup and stats
vsuharnikov Jun 15, 2023
06c5a47
Fixed a data race.
vsuharnikov Jun 16, 2023
8d88bbf
* Run only active tasks;
vsuharnikov Jun 19, 2023
2bf2bad
FIX: timeouts when a script failed to run.
vsuharnikov Jun 19, 2023
5b64e60
utils / script / evaluate works accept type and can return integers a…
vsuharnikov Jun 20, 2023
605cc09
FIX: returned "expr" field in a response
vsuharnikov Jun 20, 2023
142547a
Size of request and response caches in megabytes (approx)
vsuharnikov Jun 20, 2023
36dcf9c
Optimization: result as String, not as JsObject
vsuharnikov Jun 20, 2023
af15548
* Cache entities weighing in one file;
vsuharnikov Jun 21, 2023
6225b02
FIX: RideRunnerWithPreparedStateApp doesn't correctly resolve relativ…
vsuharnikov Jun 23, 2023
5426cb6
jol is replaced by org.ehcache.sizeof
vsuharnikov Jun 25, 2023
0bab4af
* Right JVM flags to log GC events;
vsuharnikov Jun 25, 2023
35e01ea
Fix
vsuharnikov Jun 26, 2023
a23970d
* FIX: attach agent for ehcache/sizeof;
vsuharnikov Jun 30, 2023
891bde8
Batched read only requests to DB on start
vsuharnikov Jul 4, 2023
552168b
RocksDB grafana panels
vsuharnikov Jul 5, 2023
d3ffd74
Small fixes
vsuharnikov Jul 5, 2023
a464658
Dashboard fixes
vsuharnikov Jul 5, 2023
324a08a
FIX: slow loading issue. Now we write all blockchain updates to disk …
vsuharnikov Jul 5, 2023
29d68d9
Compare: show an elapsed time and difference
vsuharnikov Jul 6, 2023
748426c
merge version-1.4.x
vsuharnikov Jul 7, 2023
b2b5ab3
block rewards support
vsuharnikov Jul 7, 2023
4aacf28
changed limits
vsuharnikov Jul 10, 2023
4621409
Use the dApp version during a request parsing in /utils/script/evalua…
vsuharnikov Jul 11, 2023
ddcfe6c
Code cleanup
vsuharnikov Jul 11, 2023
57b7870
Code cleanup (2)
vsuharnikov Jul 11, 2023
8cf2a8d
attaching jemalloc, extended dashboard
vsuharnikov Jul 13, 2023
68baf88
RunnerAccountState: split balance into assetBalances and regularBalan…
vsuharnikov Jul 13, 2023
4a75775
RunnerAccountState: TxNonNegativeAmount instead of Long
vsuharnikov Jul 13, 2023
c1df0ab
ImmutableBlockchain: load only required data, cache the data that cou…
vsuharnikov Jul 13, 2023
7827f22
Cleanup
vsuharnikov Jul 14, 2023
aec67a4
* Restarting a blockchain stream if a node during a rollback;
vsuharnikov Jul 17, 2023
a0be11b
Db: mandatory column family handles
vsuharnikov Jul 17, 2023
f63ab6b
* FIX: always increasing affected scripts metric;
vsuharnikov Jul 19, 2023
caef259
Added dependency on alias when it
vsuharnikov Jul 19, 2023
cf895bd
DefaultRequestService.clearIgnored: remove from ignoredRequests only …
vsuharnikov Jul 19, 2023
20b2d31
* FIX: exclude SharedBlockchainStorage from cache size calculations, …
vsuharnikov Jul 19, 2023
f6c8b12
* FIX: wrong JVM flags in sbt-native-packager build;
vsuharnikov Jul 19, 2023
d5d6455
* sample-input.conf now in tests;
vsuharnikov Jul 19, 2023
0f29a37
Guarantee the correct work of `wavesBalance(...).generating`
vsuharnikov Jul 20, 2023
53a2749
FIX: "Error opening zip file or JAR manifest missing : /usr/share/rid…
vsuharnikov Jul 20, 2023
e42d4de
FIX: Right HTTP error response if a gRPC request failed
vsuharnikov Jul 20, 2023
12e65a6
Refactoring
vsuharnikov Jul 21, 2023
206e4a1
Refactoring (2)
vsuharnikov Jul 21, 2023
47b69a6
* FIX: network-dependent timeouts didn't work;
vsuharnikov Jul 26, 2023
8f8a0f9
* DEB works;
vsuharnikov Jul 27, 2023
601fe45
Entrypoint names consistency
vsuharnikov Jul 27, 2023
2a3d97c
DOC: How to run Ride with prepared state
vsuharnikov Jul 27, 2023
0d8abb8
FIX: Relative paths work in entrypoint parameters
vsuharnikov Jul 27, 2023
f898ad5
Documentation updates
vsuharnikov Jul 27, 2023
6d0bd89
Documentation updates (2)
vsuharnikov Jul 27, 2023
f5c48e3
Configs cleanup
vsuharnikov Jul 27, 2023
6a8f7bf
Stream errors logging improvements
vsuharnikov Jul 28, 2023
5323187
merge version-1.4.x
vsuharnikov Jul 28, 2023
858d714
* Load a public key of dApp, because it is required for a validation …
vsuharnikov Jul 29, 2023
608ecb2
Fixed tests
vsuharnikov Jul 30, 2023
0fe479c
Fixed tests (2)
vsuharnikov Jul 30, 2023
8b9e331
* FIX: Evaluation.build provided blockchain instead of overriddenBloc…
vsuharnikov Jul 31, 2023
038500d
* FIX: a possible concurrency issue with caches;
vsuharnikov Jul 31, 2023
d32406e
Cleanup
vsuharnikov Aug 1, 2023
0f683f3
Cleanup (2)
vsuharnikov Aug 1, 2023
b1bbea8
PersistentCache: use CacheKey instead of raw values
vsuharnikov Aug 1, 2023
343bfcd
Remove unused PersistentCache.getLatest
vsuharnikov Aug 1, 2023
500f85d
Write transactions only if they exist. We don't need to write all tra…
vsuharnikov Aug 1, 2023
6a19874
Transactions and aliases in the cache become Absence instead of delet…
vsuharnikov Aug 1, 2023
3f02891
Own openapi.yaml for ride runner. Fixed typos in openapi.yaml.
vsuharnikov Aug 1, 2023
2817ca0
Fixed build
vsuharnikov Aug 1, 2023
b47dd1f
Fix
vsuharnikov Aug 2, 2023
4b1be81
Disable warnings about User-Agent HTTP header parsing issues
vsuharnikov Aug 3, 2023
c3f0f95
Tracking gRPC status codes and latency with an interceptor instead of…
vsuharnikov Aug 3, 2023
b2a7cef
gRPC: limit concurrent calls with an interceptor instead manually
vsuharnikov Aug 4, 2023
aeab74e
Added blocked calls to dashboard
vsuharnikov Aug 4, 2023
5ca7dd3
Cleanup
vsuharnikov Aug 4, 2023
83de821
Added on-empty-start-from functionality
vsuharnikov Aug 4, 2023
440889d
Running multiple RIDE scripts
vsuharnikov Aug 8, 2023
76b5abe
WavesRideRunnerWithPreparedStateApp: configurable parallelism
vsuharnikov Aug 8, 2023
672fd97
Added JsonManipulations
vsuharnikov Aug 8, 2023
642a33e
Added JsonManipulations.pruneAll, made a consistent behaviour of othe…
vsuharnikov Aug 8, 2023
0622837
WavesRideRunnerWithPreparedStateApp: better output, relativize file p…
vsuharnikov Aug 8, 2023
cd09a4b
Added PathUtils and tests
vsuharnikov Aug 9, 2023
35db163
WavesRideRunnerWithPreparedStateApp: additional options, refactoring …
vsuharnikov Aug 9, 2023
88d76a5
WavesRideRunnerWithPreparedStateApp: added postProcessing and running…
vsuharnikov Aug 9, 2023
246df74
WavesRideRunnerWithPreparedStateApp: JUnit reports
vsuharnikov Aug 10, 2023
164bc1c
WavesRideRunnerWithPreparedStateApp: added a list of functionality in…
vsuharnikov Aug 10, 2023
83544dc
Separated settings into multiple files
vsuharnikov Aug 11, 2023
725d2ce
CLI: colorizer
vsuharnikov Aug 11, 2023
293980f
merge version-1.4.x
vsuharnikov Aug 11, 2023
bc285da
Coloring in JUnit Report doesn't work in GitHub, disabled.
vsuharnikov Aug 11, 2023
ca75fe7
Right paths in JUnit report
vsuharnikov Aug 11, 2023
16c6381
JUnit: print a timestamp in testsuites
vsuharnikov Aug 11, 2023
c48c02c
JUnit: create parent directories
vsuharnikov Aug 11, 2023
28baa04
WavesRideRunnerWithPreparedStateApp: right exit status
vsuharnikov Aug 11, 2023
8d4ca37
* RideRunnerInputParser works with HOCON instead of JSON, because we …
vsuharnikov Aug 13, 2023
8c13116
Removed old code
vsuharnikov Aug 13, 2023
a0b8b5f
Removed duplicates
vsuharnikov Aug 13, 2023
7dd7235
Cleanup and tests
vsuharnikov Aug 13, 2023
4414fdf
RideRunnerInputParserTestSuite: JsValue and JsObject tests
vsuharnikov Aug 13, 2023
ba43679
Fixing TODOs (1)
vsuharnikov Aug 14, 2023
a556ee6
* RideRocksDb.ColumnFamilySettings;
vsuharnikov Aug 14, 2023
e1de439
Cleanup: storage renamed to caches
vsuharnikov Aug 14, 2023
8c38812
Cleanup: moving types and removing obsolete code
vsuharnikov Aug 14, 2023
5baed5e
Cleanup: persistent renamed to disk
vsuharnikov Aug 14, 2023
8a97dae
Cleanup: persistent word replaced to disk
vsuharnikov Aug 14, 2023
c0abacc
Fixed IDEA issues
vsuharnikov Aug 14, 2023
ab2ca07
Fixed IDEA issues (2)
vsuharnikov Aug 14, 2023
f59c0f0
Cleanup: moving and renaming classes
vsuharnikov Aug 14, 2023
6bd3cf3
AffectedTags type replaced by type alias
vsuharnikov Aug 14, 2023
e180338
SharedBlockchainStorage and settings improvements
vsuharnikov Aug 14, 2023
d596bde
Cleanup
vsuharnikov Aug 15, 2023
b8242c9
Cleanup: removed asInstanceOf
vsuharnikov Aug 15, 2023
188655b
Cleanup: removed ProxyBlockchain
vsuharnikov Aug 15, 2023
a99458e
Cleanup: SharedBlockchainStorage
vsuharnikov Aug 15, 2023
c9bbfdf
Cleanup: SharedBlockchainStorage renamed to LazyBlockchain
vsuharnikov Aug 15, 2023
b811d25
Cleanup: LazyBlockchain moved to the blockchain package
vsuharnikov Aug 15, 2023
03812fb
Cleanup: simplified settings
vsuharnikov Aug 15, 2023
aa88bdc
Cleanup: disk cache uncoupled from mem cache
vsuharnikov Aug 15, 2023
b76b591
Cleanup: removed not used AliasDiskCache.getAllKeys
vsuharnikov Aug 15, 2023
5b8cd6e
Cleanup: removed not actual todos
vsuharnikov Aug 15, 2023
e278060
Cleanup: removed not actual todos, added comments
vsuharnikov Aug 15, 2023
574b4ae
Cleanup: removed not actual todos
vsuharnikov Aug 15, 2023
820e3ae
Working with DB: small simplification
vsuharnikov Aug 15, 2023
215138e
DefaultDiskCaches: removeFrom only if the address exists, removed not…
vsuharnikov Aug 16, 2023
da931ee
Cleanup
vsuharnikov Aug 16, 2023
a835cf6
Cleanup (2)
vsuharnikov Aug 16, 2023
5e8a4ef
Updated dependencies
vsuharnikov Aug 16, 2023
7881bcc
Merge remote-tracking branch 'github/version-1.4.x' into NODE-2449-ru…
vsuharnikov Aug 16, 2023
89805e1
Undo some node changes
vsuharnikov Aug 16, 2023
5b950a7
Renamings
vsuharnikov Aug 16, 2023
a4980da
Using available converters to protobuf
vsuharnikov Aug 16, 2023
286d07e
Supporting imports in CLI
vsuharnikov Aug 17, 2023
082b3b1
FIX: parsing when there is no imports
vsuharnikov Aug 17, 2023
5eb9153
CLI: postProcessing as a list
vsuharnikov Aug 18, 2023
9e0e6aa
CLI: added a regex post processing
vsuharnikov Aug 18, 2023
cf08e9e
CLI: ${cleanErrorMessage}
vsuharnikov Aug 18, 2023
8b08188
FIX: issue an asset doesn't work in a script
vsuharnikov Aug 18, 2023
5f9825a
Updated a doc
vsuharnikov Aug 18, 2023
9d6db9e
Removed NoRequestStructure
vsuharnikov Sep 22, 2023
cebc09d
Uncommented building NODE artifacts
vsuharnikov Sep 22, 2023
f9b4de2
Merge remote-tracking branch 'github/version-1.4.x' into NODE-2449-ru…
vsuharnikov Sep 22, 2023
26504ed
Fixed compilation issues
vsuharnikov Sep 22, 2023
66309de
Simplification of DB tests
vsuharnikov Sep 22, 2023
a8c773b
Simplification of DB tests (2)
vsuharnikov Sep 22, 2023
72fa304
Fixed compilation issues
vsuharnikov Sep 22, 2023
a0dd90f
Fixed a bug with addresses
vsuharnikov Sep 22, 2023
3c3475e
Unified methods to work with keys
vsuharnikov Sep 22, 2023
9b42f69
Merge branch 'version-1.4.x' into NODE-2449-run-ride-on-any-environment
phearnot Oct 12, 2023
b5ea691
Merge branch 'version-1.4.x' into NODE-2449-run-ride-on-any-environment
phearnot Oct 13, 2023
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ docker/temp

package
!src/package
!ride-runner/src/package
native

!lang/jvm/lib/*.jar
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.wavesplatform.state

import java.io.File

import com.wavesplatform.Application
import com.wavesplatform.account.AddressScheme
import com.wavesplatform.common.state.ByteStr
Expand All @@ -14,6 +12,8 @@ import monix.eval.Coeval
import org.iq80.leveldb.DB
import org.openjdk.jmh.annotations.{Param, Scope, State, TearDown}

import java.io.File

@State(Scope.Benchmark)
abstract class DBState extends ScorexLogging {
@Param(Array("waves.conf"))
Expand All @@ -31,7 +31,7 @@ abstract class DBState extends ScorexLogging {

AddressScheme.current = new AddressScheme { override val chainId: Byte = 'W' }

lazy val environment = new WavesEnvironment(
lazy val environment = WavesEnvironment(
AddressScheme.current.chainId,
Coeval.raiseError(new NotImplementedError("`tx` is not implemented")),
Coeval(levelDBWriter.height),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.wavesplatform.state

import java.io.File
import java.util.concurrent.{ThreadLocalRandom, TimeUnit}

import cats.Id
import com.typesafe.config.ConfigFactory
import com.wavesplatform.account.{AddressOrAlias, AddressScheme, Alias}
Expand All @@ -13,15 +10,17 @@ import com.wavesplatform.lang.directives.DirectiveSet
import com.wavesplatform.lang.v1.traits.Environment
import com.wavesplatform.lang.v1.traits.domain.Recipient
import com.wavesplatform.settings.{WavesSettings, loadConfig}
import com.wavesplatform.state.WavesEnvironmentBenchmark._
import com.wavesplatform.state.WavesEnvironmentBenchmark.*
import com.wavesplatform.state.bench.DataTestData
import com.wavesplatform.transaction.smart.WavesEnvironment
import monix.eval.Coeval
import org.iq80.leveldb.{DB, Options}
import org.openjdk.jmh.annotations._
import org.openjdk.jmh.annotations.*
import org.openjdk.jmh.infra.Blackhole
import scodec.bits.BitVector

import java.io.File
import java.util.concurrent.{ThreadLocalRandom, TimeUnit}
import scala.io.Codec

/**
Expand Down Expand Up @@ -141,7 +140,7 @@ object WavesEnvironmentBenchmark {

val environment: Environment[Id] = {
val state = LevelDBWriter.readOnly(db, wavesSettings)
new WavesEnvironment(
WavesEnvironment(
AddressScheme.current.chainId,
Coeval.raiseError(new NotImplementedError("`tx` is not implemented")),
Coeval(state.height),
Expand Down
10 changes: 9 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ lazy val `lang-tests-js` = project
lazy val node = project.dependsOn(`lang-jvm`, `lang-testkit` % "test;test->test")

lazy val `grpc-server` = project.dependsOn(node % "compile;test->test;runtime->provided")
lazy val `ride-runner` = project.dependsOn(node % "compile;test->test", `grpc-server`)
lazy val `node-it` = project.dependsOn(node % "compile;test->test", `lang-testkit`, `repl-jvm`, `grpc-server`)
lazy val `node-generator` = project.dependsOn(node % "compile->test")
lazy val benchmark = project.dependsOn(node % "compile;test->test")
Expand Down Expand Up @@ -158,7 +159,8 @@ inScope(Global)(
testOptions += Tests.Setup(_ => sys.props("sbt-testing") = "true"),
network := Network.default(),
instrumentation := false,
resolvers ++= Resolver.sonatypeOssRepos("snapshots") ++ Seq(Resolver.mavenLocal),
resolvers ++= Resolver.sonatypeOssRepos("snapshots") ++ Seq(Resolver.mavenLocal) ++
Seq(MavenRepository("wvservices-releases", "https://nexus.wvservices.com/repository/maven-releases/")),
Compile / doc / sources := Seq.empty,
Compile / packageDoc / publishArtifact := false,
concurrentRestrictions := Seq(Tags.limit(Tags.Test, math.min(EvaluateTask.SystemProcessors, 8))),
Expand All @@ -177,6 +179,7 @@ git.uncommittedSignifier := Some("DIRTY")
lazy val packageAll = taskKey[Unit]("Package all artifacts")
packageAll := {
(node / assembly).value
(`ride-runner` / assembly).value
buildDebPackages.value
buildTarballsForDocker.value
}
Expand All @@ -185,6 +188,10 @@ lazy val buildTarballsForDocker = taskKey[Unit]("Package node and grpc-server ta
buildTarballsForDocker := {
IO.copyFile((node / Universal / packageZipTarball).value, new File(baseDirectory.value, "docker/target/waves.tgz"))
IO.copyFile((`grpc-server` / Universal / packageZipTarball).value, new File(baseDirectory.value, "docker/target/waves-grpc-server.tgz"))
IO.copyFile(
(`ride-runner` / Universal / packageZipTarball).value,
(`ride-runner` / baseDirectory).value / "docker" / "target" / s"${(`ride-runner` / name).value}.tgz"
)
}

lazy val checkPRRaw = taskKey[Unit]("Build a project and run unit tests")
Expand Down Expand Up @@ -232,6 +239,7 @@ lazy val buildDebPackages = taskKey[Unit]("Build debian packages")
buildDebPackages := {
(`grpc-server` / Debian / packageBin).value
(node / Debian / packageBin).value
(`ride-runner` / Debian / packageBin).value
}

def buildPackages: Command = Command("buildPackages")(_ => Network.networkParser) { (state, args) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AccountsApiGrpcImpl(commonApi: CommonAccountsApi)(implicit sc: Scheduler)
BalanceResponse().withAsset(fromAssetIdAndAmount(v))

override def getBalances(request: BalancesRequest, responseObserver: StreamObserver[BalanceResponse]): Unit = responseObserver.interceptErrors {
val addressOption: Option[Address] = if (request.address.isEmpty) None else Some(request.address.toAddress)
val addressOption: Option[Address] = if (request.address.isEmpty) None else Some(request.address.toAddress())
val assetIds: Seq[Asset] = request.assets.map(id => if (id.isEmpty) Asset.Waves else Asset.IssuedAsset(id.toByteStr))

val responseStream = (addressOption, assetIds) match {
Expand All @@ -65,7 +65,7 @@ class AccountsApiGrpcImpl(commonApi: CommonAccountsApi)(implicit sc: Scheduler)
}

override def getScript(request: AccountRequest): Future[ScriptResponse] = Future {
commonApi.script(request.address.toAddress) match {
commonApi.script(request.address.toAddress()) match {
case Some(desc) => ScriptResponse(PBTransactions.toPBScript(Some(desc.script)), desc.script.expr.toString, desc.verifierComplexity, desc.publicKey.toByteString)
case None => ScriptResponse()
}
Expand All @@ -77,7 +77,7 @@ class AccountsApiGrpcImpl(commonApi: CommonAccountsApi)(implicit sc: Scheduler)
val result =
Observable.fromIterator(
commonApi
.activeLeases(request.address.toAddress)
.activeLeases(request.address.toAddress())
.map { case LeaseInfo(leaseId, originTransactionId, sender, recipient, amount, height, status, _, _) =>
assert(status == LeaseInfo.Status.Active)
LeaseResponse(
Expand All @@ -98,10 +98,10 @@ class AccountsApiGrpcImpl(commonApi: CommonAccountsApi)(implicit sc: Scheduler)

override def getDataEntries(request: DataRequest, responseObserver: StreamObserver[DataEntryResponse]): Unit = responseObserver.interceptErrors {
val stream = if (request.key.nonEmpty) {
Observable.fromIterable(commonApi.data(request.address.toAddress, request.key))
Observable.fromIterable(commonApi.data(request.address.toAddress(), request.key))
} else {
// FIXME: Strict loading because of segfault in leveldb
Observable.fromIterator(commonApi.dataStream(request.address.toAddress, Option(request.key).filter(_.nonEmpty)).toListL.map(_.iterator))
Observable.fromIterator(commonApi.dataStream(request.address.toAddress(), Option(request.key).filter(_.nonEmpty)).toListL.map(_.iterator))
}

responseObserver.completeWith(stream.map(de => DataEntryResponse(request.address, Some(PBTransactions.toPBDataEntry(de)))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class AssetsApiGrpcImpl(assetsApi: CommonAssetsApi, accountsApi: CommonAccountsA
}

override def getNFTList(request: NFTRequest, responseObserver: StreamObserver[NFTResponse]): Unit = responseObserver.interceptErrors {
val addressOption: Option[Address] = if (request.address.isEmpty) None else Some(request.address.toAddress)
val addressOption: Option[Address] = if (request.address.isEmpty) None else Some(request.address.toAddress())
val afterAssetId: Option[IssuedAsset] = if (request.afterAssetId.isEmpty) None else Some(IssuedAsset(request.afterAssetId.toByteStr))

val responseStream = addressOption match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class BlocksApiGrpcImpl(commonApi: CommonBlocksApi)(implicit sc: Scheduler) exte

responseObserver.completeWith(request.filter match {
case Filter.GeneratorPublicKey(publicKey) => stream.filter(_.getBlock.getHeader.generator.toPublicKey == publicKey.toPublicKey)
case Filter.GeneratorAddress(address) => stream.filter(_.getBlock.getHeader.generator.toAddress == address.toAddress)
case Filter.GeneratorAddress(address) => stream.filter(_.getBlock.getHeader.generator.toAddress() == address.toAddress())
case Filter.Empty => stream
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class TransactionsApiGrpcImpl(blockchain: Blockchain, commonApi: CommonTransacti
.fold(e => throw new IllegalArgumentException(e.toString), identity)

val maybeSender = Option(request.sender)
.collect { case s if !s.isEmpty => s.toAddress }
.collect { case s if !s.isEmpty => s.toAddress() }

Observable.fromIterator(
commonApi
Expand All @@ -46,7 +46,7 @@ class TransactionsApiGrpcImpl(blockchain: Blockchain, commonApi: CommonTransacti

// By sender
case None if !request.sender.isEmpty =>
val senderAddress = request.sender.toAddress
val senderAddress = request.sender.toAddress()
Observable.fromIterator(
commonApi
.transactionsByAddress(
Expand Down Expand Up @@ -77,7 +77,7 @@ class TransactionsApiGrpcImpl(blockchain: Blockchain, commonApi: CommonTransacti
override def getUnconfirmed(request: TransactionsRequest, responseObserver: StreamObserver[TransactionResponse]): Unit =
responseObserver.interceptErrors {
val unconfirmedTransactions = if (!request.sender.isEmpty) {
val senderAddress = request.sender.toAddress
val senderAddress = request.sender.toAddress()
commonApi.unconfirmedTransactions.collect {
case a: Authorized if a.sender.toAddress == senderAddress => a
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ object StateUpdate {
def fromPB(v: PBBalanceUpdate): BalanceUpdate = {
val (asset, after) = PBAmounts.toAssetAndAmount(v.getAmountAfter)
val before = v.amountBefore
BalanceUpdate(v.address.toAddress, asset, before, after)
BalanceUpdate(v.address.toAddress(), asset, before, after)
}

def toPB(v: BalanceUpdate): PBBalanceUpdate = {
Expand All @@ -82,7 +82,7 @@ object StateUpdate {

def fromPB(v: PBDataEntryUpdate): DataEntryUpdate = {
DataEntryUpdate(
v.address.toAddress,
v.address.toAddress(),
PBTransactions.toVanillaDataEntry(v.getDataEntryBefore),
PBTransactions.toVanillaDataEntry(v.getDataEntry)
)
Expand All @@ -106,7 +106,7 @@ object StateUpdate {

def fromPB(v: PBLeasingUpdate): LeasingBalanceUpdate = {
LeasingBalanceUpdate(
v.address.toAddress,
v.address.toAddress(),
LeaseBalance(v.inBefore, v.outBefore),
LeaseBalance(v.inAfter, v.outAfter)
)
Expand Down Expand Up @@ -158,7 +158,7 @@ object StateUpdate {
},
v.amount,
v.sender.toPublicKey,
v.recipient.toAddress,
v.recipient.toAddress(),
v.originTransactionId.toByteStr
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,13 @@ class BlockchainUpdatesSpec extends FreeSpec with WithBUDomain with ScalaFutures
val reward = 600000000
val genesisAmount = Constants.TotalWaves * Constants.UnitsInWave + reward
val genesis = results.head.getAppend.transactionStateUpdates.head.balances.head
genesis.address.toAddress shouldBe TxHelpers.defaultAddress
genesis.address.toAddress() shouldBe TxHelpers.defaultAddress
genesis.getAmountAfter.amount shouldBe genesisAmount
genesis.amountBefore shouldBe reward
genesis.getAmountAfter.assetId shouldBe empty

val payment = results.last.getAppend.transactionStateUpdates.last.balances.find { bu =>
bu.address.toAddress == TxHelpers.secondAddress
bu.address.toAddress() == TxHelpers.secondAddress
}.get

payment.getAmountAfter.amount shouldBe 100
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ object StdLibVersion {
implicit object VersionDic extends DirectiveDictionary[StdLibVersion] {
override val default: StdLibVersion = V3
override val all: Iterable[StdLibVersion] = Seq(V1, V2, V3, V4, V5, V6, V7)
val latest = all.last
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import org.scalatest.{Assertion, CancelAfterFailure}
class InvokeExpressionGrpcSuite extends GrpcBaseTransactionSuite with CancelAfterFailure {
override protected def nodeConfigs: Seq[Config] =
NodeConfigs
.Builder(Default, 2, Seq.empty)
.Builder(Default, 1, Seq.empty)
.overrideBase(_.quorum(0))
.overrideBase(_.preactivatedFeatures((ContinuationTransaction.id, 1)))
.buildNonConflicting()

Expand Down
4 changes: 2 additions & 2 deletions node/src/main/resources/swagger-ui/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5225,7 +5225,7 @@ components:
- dApp
- payment
- call
- stateCahnges
- stateChanges
properties:
error:
type: object
Expand All @@ -5237,7 +5237,7 @@ components:
- dApp
- payment
- call
- stateCahnges
- stateChanges
properties:
error:
type: object
Expand Down
2 changes: 1 addition & 1 deletion node/src/main/scala/com/wavesplatform/Application.scala
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ class Application(val actorSystem: ActorSystem, val settings: WavesSettings, con
}

object Application extends ScorexLogging {
private[wavesplatform] def loadApplicationConfig(external: Option[File] = None): WavesSettings = {
def loadApplicationConfig(external: Option[File] = None): WavesSettings = {
import com.wavesplatform.settings.*

val maybeExternalConfig = Try(external.map(f => ConfigFactory.parseFile(f.getAbsoluteFile, ConfigParseOptions.defaults().setAllowMissing(false))))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import play.api.libs.json.*

object InvokeScriptRequest {

case class FunctionCallPart(function: String, args: List[EVALUATED])
case class FunctionCallPart(function: String, args: List[EVALUATED] = Nil)

implicit val EvaluatedReads: Reads[EVALUATED] = (jv: JsValue) => {
jv \ "type" match {
Expand Down
Loading