Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
4b4d198
OpenAPI:
vsuharnikov Feb 17, 2026
eb36660
Better logs and more filters for endorsements (exclusion of miner end…
vsuharnikov Feb 17, 2026
afa7b9e
OpenAPI: Added CommitToGenerationTransaction
vsuharnikov Feb 17, 2026
aaa0c35
OpenAPI: added /addresses/bls/{address}
vsuharnikov Feb 18, 2026
0034777
OpenAPI, added:
vsuharnikov Feb 18, 2026
84f6f1a
OpenAPI: New fields "nextCommittedGeneratorsHash" and "committedGener…
vsuharnikov Feb 18, 2026
db16b40
OpenAPI: new endpoint `/generators/at/{height}`
vsuharnikov Feb 18, 2026
908bdd5
OpenAPI: new field nextCommittedGenerators in TransactionSnapshot
vsuharnikov Feb 18, 2026
f1403b4
OpenAPI: only few transaction types has `feeAssetId`: InvokeExpressio…
vsuharnikov Feb 18, 2026
393d5dc
Updated tests
vsuharnikov Feb 18, 2026
bb7b95e
Forced rollback fix
vsuharnikov Feb 18, 2026
99ed6a8
Updated Swagger UI to 5.31.1
vsuharnikov Feb 19, 2026
4a9ecc5
Swagger UI: enable "Try it" mode always, hide "Try it out" button
vsuharnikov Feb 19, 2026
ae00b3a
Swagger UI: Disable "Explore" functionality
vsuharnikov Feb 19, 2026
a2ee99e
Swagger UI: Disable choosing other server
vsuharnikov Feb 19, 2026
4e9508d
OpenAPI: transaction schema changes to help Swagger UI show precise t…
vsuharnikov Feb 19, 2026
05e4d7a
OpenAPI:
vsuharnikov Feb 19, 2026
d2c1334
OpenAPI: Added AssetPair
vsuharnikov Feb 20, 2026
dadf968
DB Keys: ported finalizedHeight parsing
vsuharnikov Feb 20, 2026
b0fc13b
Open API: Fixes
vsuharnikov Feb 20, 2026
0465784
Removed obsolete code
vsuharnikov Feb 20, 2026
7bd4360
New balance tests, common error format WIP
vsuharnikov Feb 21, 2026
fc12874
New balance tests, common error format WIP (2)
vsuharnikov Feb 21, 2026
f9ac810
HTTP API: TransactionId and BlockId matchers blocked route fallback
vsuharnikov Feb 24, 2026
337c46a
CommitToGenerationTransaction: precise balance validation
vsuharnikov Feb 25, 2026
8e5abe3
Fixed a keyblock validation against the latest removed microblock
vsuharnikov Feb 26, 2026
f49916a
New test for appending after removing the last microblock
vsuharnikov Feb 27, 2026
1569500
Added comments
vsuharnikov Feb 27, 2026
6057aec
Fixed tests, backported MiningFailuresSuite
vsuharnikov Feb 27, 2026
7fdd4eb
Additional test
vsuharnikov Feb 27, 2026
a8553fd
Miner forges after right liquid block
vsuharnikov Mar 4, 2026
bc0b753
Additional test in LastMicroBlockSuite
vsuharnikov Mar 4, 2026
94cda4c
Do not try to apply same block twice
vsuharnikov Mar 4, 2026
41df265
Fixed order of logs
vsuharnikov Mar 4, 2026
b07c7a9
Fixed liquid block forging
vsuharnikov Mar 5, 2026
e5310a3
Merge 'github/version-1.6.x'
vsuharnikov Mar 5, 2026
5b3163b
Finalization height and voting from right liquid block, NgState refactor
vsuharnikov Mar 7, 2026
0dc8d58
Refactor NgState (2): VectorMap instead of Vector+List for micro blocks
vsuharnikov Mar 7, 2026
dd4e60d
Refactor NgState (3): cleanup
vsuharnikov Mar 7, 2026
7ffdf88
Refactor NgState (4): cleanup
vsuharnikov Mar 7, 2026
7af5b4d
Refactor NgState (5): minor fixes
vsuharnikov Mar 7, 2026
847c429
Refactor NgState (6): linter fixes
vsuharnikov Mar 7, 2026
f6f70cd
Fixes in BLS validation, new tests
vsuharnikov Mar 10, 2026
e1035b4
Fixes in Importer
vsuharnikov Mar 10, 2026
7abc0f6
BLS related code improvements
vsuharnikov Mar 13, 2026
db1a4b3
BlockAppenderAfterFinalizationSpec: finalization checks
vsuharnikov Mar 19, 2026
42a538d
MinerWithFinalitySuite: additional checks
vsuharnikov Mar 19, 2026
3c560a3
New tests
vsuharnikov Mar 19, 2026
7174c6f
New tests, cleanup
vsuharnikov Mar 20, 2026
63398bf
Disable endorsing of challenging block
vsuharnikov Mar 23, 2026
cae89a5
CommitToGenerationTransactionDiffTest
vsuharnikov Mar 24, 2026
64a8aad
CommitToGenerationTransactionDiff: additional tests
vsuharnikov Mar 24, 2026
f8ad496
Tests added and updated
vsuharnikov Mar 24, 2026
a6dc9e2
Always endorse with the latest finalized block
vsuharnikov Mar 24, 2026
400e55a
Cleanup
vsuharnikov Mar 25, 2026
066eb8f
Cleanup, additional check in test
vsuharnikov Mar 25, 2026
bf27bc0
GET /generators/at/$height shows generators those committed on next p…
vsuharnikov Mar 26, 2026
b5fa656
Exporter fixes
vsuharnikov Mar 27, 2026
55d4b1f
Swagger UI: change the document title to info.title of OpenAPI spec
vsuharnikov Mar 30, 2026
3d8c42e
Tests: createBlock has a default value for block version argument, fo…
vsuharnikov Mar 30, 2026
114c5bb
Cleanup
vsuharnikov Mar 30, 2026
ba37128
PBTransactions: fixed CreateAliasTransaction creation in createVanill…
vsuharnikov Mar 30, 2026
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 build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ inScope(Global)(
)
)

commands += Command.command("packageAll"){ state =>
commands += Command.command("packageAll") { state =>
"node / assembly" :: "ride-runner / assembly" :: "buildDebPackages" :: "buildTarballsForDocker" :: state
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,22 @@ import com.google.protobuf.ByteString
import com.wavesplatform.TestValues
import com.wavesplatform.account.{Address, KeyPair}
import com.wavesplatform.api.grpc.*
import com.wavesplatform.block.Block
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.crypto.DigestLength
import com.wavesplatform.db.WithDomain
import com.wavesplatform.db.WithState.AddrWithBalance
import com.wavesplatform.history.Domain
import com.wavesplatform.protobuf.Amount
import com.wavesplatform.protobuf.transaction.{DataEntry, Recipient}
import com.wavesplatform.state.{Height, BlockRewardCalculator, EmptyDataEntry, IntegerDataEntry}
import com.wavesplatform.state.{BlockRewardCalculator, EmptyDataEntry, Height, IntegerDataEntry}
import com.wavesplatform.test.*
import com.wavesplatform.test.DomainPresets.*
import com.wavesplatform.transaction.Asset.Waves
import com.wavesplatform.transaction.TxHelpers
import com.wavesplatform.utils.{DiffMatchers, Schedulers}
import org.scalatest.{Assertion, BeforeAndAfterAll}
import com.wavesplatform.test.DomainPresets.*
import monix.execution.ExecutionModel.SynchronousExecution
import monix.execution.Scheduler
import org.scalatest.{Assertion, BeforeAndAfterAll}

import scala.concurrent.Await
import scala.concurrent.duration.{DurationInt, FiniteDuration}
Expand Down Expand Up @@ -189,7 +188,10 @@ class AccountsApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatch

val sender = TxHelpers.signer(1)
val challengedMiner = TxHelpers.signer(2)
withDomain(TransactionStateSnapshot.configure(_.copy(lightNodeBlockFieldsAbsenceInterval = 0)), balances = AddrWithBalance.enoughBalances(sender)) { d =>
withDomain(
TransactionStateSnapshot.configure(_.copy(lightNodeBlockFieldsAbsenceInterval = 0)),
balances = AddrWithBalance.enoughBalances(sender)
) { d =>
val grpcApi = getGrpcApi(d)

val challengingMiner = d.wallet.generateNewAccount().get
Expand All @@ -206,8 +208,6 @@ class AccountsApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatch

val invalidStateHash = ByteStr.fill(DigestLength)(1)
val originalBlock = d.createBlock(
Block.ProtoBlockVersion,
Seq.empty,
strictTime = true,
generator = challengedMiner,
stateHash = Some(Some(invalidStateHash))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.wavesplatform.api.grpc.test
import com.google.protobuf.ByteString
import com.wavesplatform.account.KeyPair
import com.wavesplatform.api.grpc.{AssetInfoResponse, AssetsApiGrpcImpl, NFTRequest, NFTResponse}
import com.wavesplatform.block.Block.ProtoBlockVersion
import com.wavesplatform.db.WithDomain
import com.wavesplatform.db.WithState.AddrWithBalance
import com.wavesplatform.features.BlockchainFeatures
Expand All @@ -18,7 +17,7 @@ import org.scalatest.BeforeAndAfterAll

class AssetsApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatchers with WithDomain with GrpcApiHelpers {
private given scheduler: Scheduler = Schedulers.singleThread("grpc", executionModel = SynchronousExecution)
val sender: KeyPair = TxHelpers.signer(1)
val sender: KeyPair = TxHelpers.signer(1)

"GetNFTList should work" in withDomain(RideV6.addFeatures(BlockchainFeatures.ReduceNFTFee), AddrWithBalance.enoughBalances(sender)) { d =>
val grpcApi = getGrpcApi(d)
Expand Down Expand Up @@ -75,7 +74,7 @@ class AssetsApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatcher
check()

// liquid afterId
d.appendBlock(d.createBlock(ProtoBlockVersion, nftIssues.drop(afterId + 1), Some(mb1)))
d.appendBlock(d.createBlock(nftIssues.drop(afterId + 1), Some(mb1)))
d.rocksDBWriter.containsTransaction(nftIssues(afterId)) shouldBe true
d.rocksDBWriter.containsTransaction(nftIssues(afterId + 1)) shouldBe false
check()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ class BlocksApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatcher

val invalidStateHash = ByteStr.fill(DigestLength)(1)
val originalBlock = d.createBlock(
Block.ProtoBlockVersion,
Seq(TxHelpers.transfer(sender)),
strictTime = true,
stateHash = Some(Some(invalidStateHash))
Expand Down Expand Up @@ -323,7 +322,6 @@ class BlocksApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffMatcher

val invalidStateHash = ByteStr.fill(DigestLength)(1)
val originalBlock = d.createBlock(
Block.ProtoBlockVersion,
Seq(TxHelpers.transfer(sender)),
strictTime = true,
stateHash = Some(Some(invalidStateHash))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ package com.wavesplatform.api.grpc.test

import com.google.protobuf.ByteString
import com.wavesplatform.account.KeyPair
import com.wavesplatform.api.grpc.{ApplicationStatus, TransactionResponse, TransactionSnapshotResponse, TransactionSnapshotsRequest, TransactionsApiGrpcImpl, TransactionsRequest}
import com.wavesplatform.block.Block
import com.wavesplatform.api.grpc.{
ApplicationStatus,
TransactionResponse,
TransactionSnapshotResponse,
TransactionSnapshotsRequest,
TransactionsApiGrpcImpl,
TransactionsRequest
}
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils.EitherExt2.*
import com.wavesplatform.crypto.DigestLength
Expand All @@ -13,7 +19,7 @@ import com.wavesplatform.history.Domain
import com.wavesplatform.protobuf.transaction.{PBTransactions, Recipient}
import com.wavesplatform.protobuf.{PBSnapshots, toByteString}
import com.wavesplatform.state.diffs.ENOUGH_AMT
import com.wavesplatform.state.{StateSnapshot, TxMeta, Height}
import com.wavesplatform.state.{Height, StateSnapshot, TxMeta}
import com.wavesplatform.test.*
import com.wavesplatform.test.DomainPresets.*
import com.wavesplatform.transaction.Asset.Waves
Expand Down Expand Up @@ -229,7 +235,6 @@ class TransactionsApiGrpcSpec extends FreeSpec with BeforeAndAfterAll with DiffM
val resenderTxs = Seq(TxHelpers.transfer(resender, recipient.toAddress, 1.waves), TxHelpers.transfer(resender, recipient.toAddress, 2.waves))
val challengedBlockTx = TxHelpers.transfer(challengedMiner, resender.toAddress, 1001.waves)
val originalBlock = d.createBlock(
Block.ProtoBlockVersion,
challengedBlockTx +: resenderTxs,
strictTime = true,
generator = challengedMiner,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ import com.google.common.primitives.Longs
import com.google.protobuf.ByteString
import com.wavesplatform.TestValues
import com.wavesplatform.account.{Address, KeyPair}
import com.wavesplatform.block.Block
import com.wavesplatform.common.state.ByteStr
import com.wavesplatform.common.utils.EitherExt2.*
import com.wavesplatform.crypto.DigestLength
import com.wavesplatform.db.InterferableDB
import com.wavesplatform.events.FakeObserver.*
import com.wavesplatform.events.StateUpdate.LeaseUpdate.LeaseStatus
import com.wavesplatform.events.StateUpdate.{AssetInfo, AssetStateUpdate, BalanceUpdate, DataEntryUpdate, LeaseUpdate, LeasingBalanceUpdate, ScriptUpdate}
import com.wavesplatform.events.StateUpdate.{
AssetInfo,
AssetStateUpdate,
BalanceUpdate,
DataEntryUpdate,
LeaseUpdate,
LeasingBalanceUpdate,
ScriptUpdate
}
import com.wavesplatform.events.api.grpc.protobuf.{GetBlockUpdateRequest, GetBlockUpdatesRangeRequest, SubscribeRequest}
import com.wavesplatform.events.protobuf.BlockchainUpdated.Rollback.RollbackType
import com.wavesplatform.events.protobuf.BlockchainUpdated.Update
Expand Down Expand Up @@ -56,7 +63,7 @@ import scala.util.Random

class BlockchainUpdatesSpec extends FreeSpec with WithBUDomain with ScalaFutures {
private given scheduler: Scheduler = Schedulers.singleThread("grpc", executionModel = SynchronousExecution)

val currentSettings: WavesSettings = RideV5

val transfer: TransferTransaction = TxHelpers.transfer()
Expand Down Expand Up @@ -828,7 +835,6 @@ class BlockchainUpdatesSpec extends FreeSpec with WithBUDomain with ScalaFutures
TxHelpers.transfer(sender, recipient.toAddress, 2.waves, timestamp = txTimestamp + 1)
)
val originalBlock = d.createBlock(
Block.ProtoBlockVersion,
txs,
generator = challengedMiner,
stateHash = Some(Some(invalidStateHash))
Expand Down Expand Up @@ -1100,27 +1106,23 @@ class BlockchainUpdatesSpec extends FreeSpec with WithBUDomain with ScalaFutures
"should return correct updated_waves_amount when reward boost is active" in {
val settings = ConsensusImprovements
.setFeaturesHeight(
BlockchainFeatures.BlockReward -> 0,
BlockchainFeatures.BlockReward -> 0,
BlockchainFeatures.BlockRewardDistribution -> 0,
BlockchainFeatures.BoostBlockReward -> 5
)
.configure(fs =>
fs.copy(blockRewardBoostPeriod = 10)
)
.configure(fs => fs.copy(blockRewardBoostPeriod = 10))

withDomainAndRepo(settings) { case (d, repo) =>
d.appendBlock()
val subscription = repo.createFakeObserver(SubscribeRequest.of(1, 0))

(1 to 15).foreach(_ => d.appendBlock())


subscription
.fetchAllEvents(d.blockchain)
.map(_.getUpdate.getAppend.getBlock.updatedWavesAmount) shouldBe
.map(_.getUpdate.getAppend.getBlock.updatedWavesAmount) shouldBe
(2 to 16).scanLeft(100_000_000.waves) { (total, height) => total + 6.waves * d.blockchain.blockRewardBoost(Height(height)) }


}
}
}
Expand Down
2 changes: 1 addition & 1 deletion node-it/src/test/resources/template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ waves {
rest-api {
enable = yes
bind-address = 0.0.0.0
api-key-hash = 7L6GpLHhA5KyJTAVc8WFHwEcyTY8fC8rRbyMCiFnM4i
api-key-hash = 7L6GpLHhA5KyJTAVc8WFHwEcyTY8fC8rRbyMCiFnM4i # integration-test-rest-api
minimum-peers = 0
}
wallet {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ object NodeConfigs {
val totalEntities = defaultEntities + specialsConfigs.size
require(totalEntities <= NonConflictingNodes.size)

val (defaultNodes: Seq[Config], specialNodes: Seq[Config]) = baseConfigs.zipWithIndex
val bc =
if (totalEntities > 1) baseConfigs
else baseConfigs.map(ConfigFactory.parseString("waves.network.max-outbound-connections = 0").withFallback)

val (defaultNodes: Seq[Config], specialNodes: Seq[Config]) = bc.zipWithIndex
.collect { case (x, i) if NonConflictingNodes.contains(i + 1) => x }
.splitAt(defaultEntities)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class AddressApiSuite extends BaseTransactionSuite with NTPTime {
)
}

test("requests to the illegal height should be handled correctly ") {
test("requests to the illegal height should be handled correctly") {
val height = miner.height + 100
assertApiError(
miner.get(s"/addresses/balance?height=$height&address=$firstKeyPair"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ class TwoNodesFinalizationTestSuite extends BaseFreeSpec, OptionValues, ScorexLo

step("Commit to generation")
val commitTxn1 = node1.sign(CommitToGenerationRequest(sender = Some(miner1Addr)))
node1.broadcastRequest(commitTxn1)

val commitTxn2 = node2.sign(CommitToGenerationRequest(sender = Some(miner2Addr)))
Seq(node1, node2).foreach { node =>
node.broadcastRequest(commitTxn1)
node.broadcastRequest(commitTxn2)
}
node2.broadcastRequest(commitTxn2)

node1.waitForGenerationPeriod(period1)
node2.waitForGenerationPeriod(period1)

step("Generators")
isolated {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class BlockchainGenerator(wavesSettings: WavesSettings) extends ScorexLogging {
val result = genBlocks.foldLeft[Either[ValidationError, Unit]](Right(())) {
case (res @ Left(_), _) => res
case (_, genBlock) =>
time.time = miner.nextBlockGenerationTime(blockchain, blockchain.lastBlockHeader.get, genBlock.signer).explicitGet()
time.time = miner.nextBlockGenerationTime(blockchain, genBlock.signer).explicitGet()
val correctedTimeTxs = genBlock.txs.map(correctTxTimestamp(_, time))

miner.forgeBlock(genBlock.signer) match {
Expand Down
8 changes: 8 additions & 0 deletions node/src/main/resources/swagger-ui/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ body {
margin: 0;
background: #fafafa;
}

.try-out {
display: none !important;
}

.schemes-server-container div {
display: none;
}
75 changes: 1 addition & 74 deletions node/src/main/resources/swagger-ui/oauth2-redirect.html
Original file line number Diff line number Diff line change
@@ -1,79 +1,6 @@
<!doctype html>
<html lang="en-US">
<head>
<title>Swagger UI: OAuth2 Redirect</title>
</head>
<body>
<script>
'use strict';
function run () {
var oauth2 = window.opener.swaggerUIRedirectOauth2;
var sentState = oauth2.state;
var redirectUrl = oauth2.redirectUrl;
var isValid, qp, arr;

if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}

arr = qp.split("&");
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
qp = qp ? JSON.parse('{' + arr.join() + '}',
function (key, value) {
return key === "" ? value : decodeURIComponent(value);
}
) : {};

isValid = qp.state === sentState;

if ((
oauth2.auth.schema.get("flow") === "accessCode" ||
oauth2.auth.schema.get("flow") === "authorizationCode" ||
oauth2.auth.schema.get("flow") === "authorization_code"
) && !oauth2.auth.code) {
if (!isValid) {
oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}

if (qp.code) {
delete oauth2.state;
oauth2.auth.code = qp.code;
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
} else {
let oauthErrorMsg;
if (qp.error) {
oauthErrorMsg = "["+qp.error+"]: " +
(qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
(qp.error_uri ? "More info: "+qp.error_uri : "");
}

oauth2.errCb({
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
}
window.close();
}

if (document.readyState !== 'loading') {
run();
} else {
document.addEventListener('DOMContentLoaded', function () {
run();
});
}
</script>
<script src="oauth2-redirect.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions node/src/main/resources/swagger-ui/oauth2-redirect.js

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

Loading
Loading