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 transaction snapshots #1078

Merged
merged 49 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a20285a
Added a conversion function
esuwu Apr 17, 2023
f19b9a4
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 17, 2023
fe5e2eb
Added payment transaction conversion
esuwu Apr 18, 2023
5f9ffef
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 18, 2023
a80fb2b
Added transfer tx conversion
esuwu Apr 18, 2023
516a1c7
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 18, 2023
ef5c2f7
Transfer tx conversion changed
esuwu Apr 18, 2023
1d20048
Added issue and reissue tx conversions
esuwu Apr 19, 2023
30f6ce2
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 19, 2023
39fb959
Issue
esuwu Apr 24, 2023
fb8f27f
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 24, 2023
db76e0d
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 24, 2023
a8a6670
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 24, 2023
b570eb7
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 24, 2023
ce7a0fc
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 24, 2023
048e04b
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 25, 2023
de38edc
Issue, reissue, burn, exchange
esuwu Apr 25, 2023
17a6687
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 26, 2023
8e470a8
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 26, 2023
f416ea0
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Apr 26, 2023
1ddae7a
Hanled lease transactions
esuwu Apr 26, 2023
147c280
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu May 11, 2023
e67edea
Finished performers
esuwu May 11, 2023
a590cbb
Added snapshots for all types of transactions
esuwu May 22, 2023
5b13025
Merge branch 'master' into node-transactions-snapshots-types
esuwu May 23, 2023
6c5b791
Merged from master
esuwu May 23, 2023
dc87a94
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu May 23, 2023
42f26e6
Fixed types after merging
esuwu May 23, 2023
7b8438e
Fixed issue snapshot mistake
esuwu May 24, 2023
8c4a181
Added rewards snapshot in append block
esuwu May 24, 2023
a01a14d
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu May 24, 2023
d7d8585
Changed functions to newest
esuwu May 28, 2023
e3be090
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu May 29, 2023
b783632
Added snapshots from actions
esuwu Jun 4, 2023
9665d45
Removed todos
esuwu Jun 4, 2023
62fbfaf
Deleted useless code
esuwu Jun 4, 2023
ba90197
Fixed a mistake with leasing cancel
esuwu Jun 6, 2023
a19d710
Added tests for issue and reissue transactions
esuwu Jun 14, 2023
ddbaa2f
Fixed tests
esuwu Jun 15, 2023
e1c48c3
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Jun 15, 2023
d28da6a
fixed implicit memory aliasing
esuwu Jun 18, 2023
8843880
Added tests for burn, lease, lease cancel, exchange and create alias …
esuwu Jun 20, 2023
8cd823f
Added tests for data, sponsorship, set account and asset script trans…
esuwu Jun 21, 2023
cfef63a
Added a test for the invoke transaction snapshots
esuwu Jun 28, 2023
5458c20
Merge branch 'node-transactions-snapshots-types' into node-transactio…
esuwu Jun 28, 2023
624df00
Fixed after merge
esuwu Jun 28, 2023
1f45400
Fixed a function
esuwu Jun 28, 2023
885f421
Merged from snapshots types
esuwu Jun 30, 2023
256dc87
Moved snapshot generation
esuwu Jun 30, 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
121 changes: 85 additions & 36 deletions pkg/state/appender.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,49 +319,55 @@ func (a *txAppender) saveTransactionIdByAddresses(addresses []proto.WavesAddress
return nil
}

func (a *txAppender) commitTxApplication(tx proto.Transaction, params *appendTxParams, res *applicationResult) error {
func (a *txAppender) commitTxApplication(tx proto.Transaction, params *appendTxParams, invocationRes *invocationResult, applicationRes *applicationResult) (TransactionSnapshot, error) {
// Add transaction ID to recent IDs.
txID, err := tx.GetID(a.settings.AddressSchemeCharacter)
if err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to get tx id: %v", err))
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to get tx id: %v", err))
}
a.recentTxIds[string(txID)] = empty
// Update script runs.
a.totalScriptsRuns += res.totalScriptsRuns
a.totalScriptsRuns += applicationRes.totalScriptsRuns
// Update complexity.
a.sc.addRecentTxComplexity()
// Save balance diff.
if err := a.diffStor.saveTxDiff(res.changes.diff); err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to save balance diff: %v", err))
// TODO get balances snapshots
if err := a.diffStor.saveTxDiff(applicationRes.changes.diff); err != nil {
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to save balance diff: %v", err))
}
// Perform state changes.
if res.status {
currentMinerAddress := proto.MustAddressFromPublicKey(a.settings.AddressSchemeCharacter, params.currentMinerPK)

var snapshot TransactionSnapshot
if applicationRes.status {
// We only perform tx in case it has not failed.
performerInfo := &performerInfo{
height: params.checkerInfo.height,
stateActionsCounter: params.stateActionsCounterInBlock,
blockID: params.checkerInfo.blockID,
currentMinerAddress: currentMinerAddress,
stateActionsCounter: params.stateActionsCounterInBlock,
}
if err := a.txHandler.performTx(tx, performerInfo); err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to perform: %v", err))
// TODO other snapshots
snapshot, err = a.txHandler.performTx(tx, performerInfo, invocationRes, applicationRes)
if err != nil {
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to perform: %v", err))
}
}
if params.validatingUtx {
// Save transaction to in-mem storage.
if err := a.rw.writeTransactionToMem(tx, !res.status); err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to write transaction to in mem stor: %v", err))
if err := a.rw.writeTransactionToMem(tx, !applicationRes.status); err != nil {
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to write transaction to in mem stor: %v", err))
}
} else {
// Count tx fee.
if err := a.blockDiffer.countMinerFee(tx); err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to count miner fee: %v", err))
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to count miner fee: %v", err))
}
// Save transaction to storage.
if err := a.rw.writeTransaction(tx, !res.status); err != nil {
return wrapErr(TxCommitmentError, errors.Errorf("failed to write transaction to storage: %v", err))
if err := a.rw.writeTransaction(tx, !applicationRes.status); err != nil {
return nil, wrapErr(TxCommitmentError, errors.Errorf("failed to write transaction to storage: %v", err))
}
}
return nil
return snapshot, nil
}

func (a *txAppender) verifyWavesTxSigAndData(tx proto.Transaction, params *appendTxParams, accountHasVerifierScript bool) error {
Expand Down Expand Up @@ -405,18 +411,19 @@ type appendTxParams struct {
invokeExpressionActivated bool // TODO: check feature naming
validatingUtx bool // if validatingUtx == false then chans MUST be initialized with non nil value
stateActionsCounterInBlock *proto.StateActionsCounter
currentMinerPK crypto.PublicKey
}

func (a *txAppender) handleInvokeOrExchangeTransaction(tx proto.Transaction, fallibleInfo *fallibleValidationParams) (*applicationResult, error) {
applicationRes, err := a.handleFallible(tx, fallibleInfo)
func (a *txAppender) handleInvokeOrExchangeTransaction(tx proto.Transaction, fallibleInfo *fallibleValidationParams) (*invocationResult, *applicationResult, error) {
invocationRes, applicationRes, err := a.handleFallible(tx, fallibleInfo)
if err != nil {
msg := "fallible validation failed"
if txID, err2 := tx.GetID(a.settings.AddressSchemeCharacter); err2 == nil {
msg = fmt.Sprintf("fallible validation failed for transaction '%s'", base58.Encode(txID))
}
return nil, errs.Extend(err, msg)
return nil, nil, errs.Extend(err, msg)
}
return applicationRes, nil
return invocationRes, applicationRes, nil
}

func (a *txAppender) handleDefaultTransaction(tx proto.Transaction, params *appendTxParams, accountHasVerifierScript bool) (*applicationResult, error) {
Expand Down Expand Up @@ -470,13 +477,14 @@ func (a *txAppender) appendTx(tx proto.Transaction, params *appendTxParams) erro

// Check tx against state, check tx scripts, calculate balance changes.
var applicationRes *applicationResult
var invocationResult *invocationResult
needToValidateBalanceDiff := false
switch tx.GetTypeInfo().Type {
case proto.InvokeScriptTransaction, proto.InvokeExpressionTransaction, proto.ExchangeTransaction:
// Invoke and Exchange transactions should be handled differently.
// They may fail, and will be saved to blockchain anyway.
fallibleInfo := &fallibleValidationParams{appendTxParams: params, senderScripted: accountHasVerifierScript, senderAddress: senderAddr}
applicationRes, err = a.handleInvokeOrExchangeTransaction(tx, fallibleInfo)
invocationResult, applicationRes, err = a.handleInvokeOrExchangeTransaction(tx, fallibleInfo)
if err != nil {
return errors.Wrap(err, "failed to handle invoke or exchange transaction")
}
Expand Down Expand Up @@ -507,7 +515,7 @@ func (a *txAppender) appendTx(tx proto.Transaction, params *appendTxParams) erro
senderScripted: accountHasVerifierScript,
senderAddress: senderAddr,
}
applicationRes, err = a.handleInvokeOrExchangeTransaction(tx, fallibleInfo)
invocationResult, applicationRes, err = a.handleInvokeOrExchangeTransaction(tx, fallibleInfo)
if err != nil {
return errors.Wrapf(err, "failed to handle ethereum invoke script transaction (type %s) with id %s, on height %d",
ethTx.TxKind.String(), ethTx.ID.String(), params.checkerInfo.height+1)
Expand Down Expand Up @@ -540,10 +548,17 @@ func (a *txAppender) appendTx(tx proto.Transaction, params *appendTxParams) erro
if err != nil {
return errs.Extend(err, "get transaction id")
}
if err := a.commitTxApplication(tx, params, applicationRes); err != nil {

// invocationResult may be empty if it was not an Invoke Transaction
snapshot, err := a.commitTxApplication(tx, params, invocationResult, applicationRes)
if err != nil {
zap.S().Errorf("failed to commit transaction (id %s) after successful validation; this should NEVER happen", base58.Encode(txID))
return err
}
// a temporary dummy for linters
if len(snapshot) > 1000 {
zap.S().Debug(snapshot)
}
Comment on lines +559 to +562
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, replace it with _ = initialSnapshot and add TODO.

// Store additional data for API: transaction by address.
if !params.validatingUtx && a.buildApiData {
if err := a.saveTransactionIdByAddresses(applicationRes.changes.addresses(), txID, blockID); err != nil {
Expand All @@ -553,6 +568,29 @@ func (a *txAppender) appendTx(tx proto.Transaction, params *appendTxParams) erro
return nil
}

// rewards and 60% of the fee to the previous miner
func (a *txAppender) createInitialBlockSnapshot(minerAndRewardDiff txDiff) (TransactionSnapshot, error) {
addrWavesBalanceDiff, _, err := addressBalanceDiffFromTxDiff(minerAndRewardDiff, a.settings.AddressSchemeCharacter)
if err != nil {
return nil, errors.Wrap(err, "failed to create balance diff from tx diff")
}
// add miner address to the diff
var snapshot TransactionSnapshot
for wavesAddress, diffAmount := range addrWavesBalanceDiff {

fullBalance, err := a.stor.balances.wavesBalance(wavesAddress.ID())
if err != nil {
return nil, errors.Wrap(err, "failed to receive sender's waves balance")
}
newBalance := &WavesBalanceSnapshot{
Address: wavesAddress,
Balance: uint64(int64(fullBalance.balance) + diffAmount.balance),
}
snapshot = append(snapshot, newBalance)
}
return snapshot, nil
}

func (a *txAppender) appendBlock(params *appendBlockParams) error {
// Reset block complexity counter.
defer func() {
Expand Down Expand Up @@ -588,12 +626,21 @@ func (a *txAppender) appendBlock(params *appendBlockParams) error {
// Create miner balance diff.
// This adds 60% of prev block fees as very first balance diff of the current block
// in case NG is activated, or empty diff otherwise.
minerDiff, err := a.blockDiffer.createMinerDiff(params.block, hasParent)
minerAndRewardDiff, err := a.blockDiffer.createMinerAndRewardDiff(params.block, hasParent)
if err != nil {
return err
}
// create the initial snapshot
initialSnapshot, err := a.createInitialBlockSnapshot(minerAndRewardDiff)
if err != nil {
return errors.Wrap(err, "failed to create initial snapshot")
}
// a temporary dummy for linters
if len(initialSnapshot) > 100 {
zap.S().Debug(initialSnapshot)
}
Comment on lines +639 to +642
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here

// Save miner diff first.
if err := a.diffStor.saveTxDiff(minerDiff); err != nil {
if err := a.diffStor.saveTxDiff(minerAndRewardDiff); err != nil {
return err
}
blockInfo, err := a.currentBlockInfo()
Expand Down Expand Up @@ -633,13 +680,14 @@ func (a *txAppender) appendBlock(params *appendBlockParams) error {
invokeExpressionActivated: invokeExpressionActivated,
validatingUtx: false,
stateActionsCounterInBlock: stateActionsCounterInBlock,
currentMinerPK: params.block.GeneratorPublicKey,
}
if err := a.appendTx(tx, appendTxArgs); err != nil {
return err
}
}
// Save fee distribution of this block.
// This will be needed for createMinerDiff() of next block due to NG.
// This will be needed for createMinerAndRewardDiff() of next block due to NG.
if err := a.blockDiffer.saveCurFeeDistr(params.block); err != nil {
return err
}
Expand Down Expand Up @@ -669,7 +717,7 @@ type applicationResult struct {
changes txBalanceChanges
}

func (a *txAppender) handleInvoke(tx proto.Transaction, info *fallibleValidationParams) (*applicationResult, error) {
func (a *txAppender) handleInvoke(tx proto.Transaction, info *fallibleValidationParams) (*invocationResult, *applicationResult, error) {
var ID crypto.Digest
switch t := tx.(type) {
case *proto.InvokeScriptWithProofs:
Expand All @@ -681,17 +729,17 @@ func (a *txAppender) handleInvoke(tx proto.Transaction, info *fallibleValidation
case *proto.EthereumInvokeScriptTxKind:
ID = *t.ID
default:
return nil, errors.Errorf("unexpected ethereum tx kind (%T)", tx)
return nil, nil, errors.Errorf("unexpected ethereum tx kind (%T)", tx)
}
default:
return nil, errors.Errorf("failed to handle invoke: wrong type of transaction (%T)", tx)
return nil, nil, errors.Errorf("failed to handle invoke: wrong type of transaction (%T)", tx)
}
res, err := a.ia.applyInvokeScript(tx, info)
invocationRes, applicationRes, err := a.ia.applyInvokeScript(tx, info)
if err != nil {
zap.S().Debugf("failed to apply InvokeScript transaction %s to state: %v", ID.String(), err)
return nil, err
return nil, nil, err
}
return res, nil
return invocationRes, applicationRes, nil
}

func (a *txAppender) countExchangeScriptsRuns(scriptsRuns uint64) (uint64, error) {
Expand Down Expand Up @@ -798,19 +846,20 @@ func (a *txAppender) handleExchange(tx proto.Transaction, info *fallibleValidati
return &applicationResult{true, scriptsRuns, successfulChanges}, nil
}

func (a *txAppender) handleFallible(tx proto.Transaction, info *fallibleValidationParams) (*applicationResult, error) {
func (a *txAppender) handleFallible(tx proto.Transaction, info *fallibleValidationParams) (*invocationResult, *applicationResult, error) {
if info.acceptFailed {
if err := a.checkTxFees(tx, info); err != nil {
return nil, err
return nil, nil, err
}
}
switch tx.GetTypeInfo().Type {
case proto.InvokeScriptTransaction, proto.InvokeExpressionTransaction, proto.EthereumMetamaskTransaction:
return a.handleInvoke(tx, info)
case proto.ExchangeTransaction:
return a.handleExchange(tx, info)
applicationRes, err := a.handleExchange(tx, info)
return nil, applicationRes, err
}
return nil, errors.New("transaction is not fallible")
return nil, nil, errors.New("transaction is not fallible")
}

// For UTX validation.
Expand Down
2 changes: 1 addition & 1 deletion pkg/state/block_differ.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ func (d *blockDiffer) saveCurFeeDistr(block *proto.BlockHeader) error {
return nil
}

func (d *blockDiffer) createMinerDiff(block *proto.BlockHeader, hasParent bool) (txDiff, error) {
func (d *blockDiffer) createMinerAndRewardDiff(block *proto.BlockHeader, hasParent bool) (txDiff, error) {
var err error
var minerDiff txDiff
var minerAddr proto.WavesAddress
Expand Down
22 changes: 11 additions & 11 deletions pkg/state/block_differ_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func TestCreateBlockDiffWithoutNg(t *testing.T) {
to := createBlockDiffer(t)

block, _ := genBlocks(t, to)
minerDiff, err := to.blockDiffer.createMinerDiff(&block.BlockHeader, true)
require.NoError(t, err, "createMinerDiff() failed")
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&block.BlockHeader, true)
require.NoError(t, err, "createMinerAndRewardDiff() failed")
// Empty miner diff before NG activation.
assert.Equal(t, txDiff{}, minerDiff)
}
Expand All @@ -84,8 +84,8 @@ func TestCreateBlockDiffNg(t *testing.T) {
parentFeeNextBlock := parentFeeTotal - parentFeePrevBlock

// Create diff from child block.
minerDiff, err := to.blockDiffer.createMinerDiff(&child.BlockHeader, true)
require.NoError(t, err, "createMinerDiff() failed")
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&child.BlockHeader, true)
require.NoError(t, err, "createMinerAndRewardDiff() failed")
// Verify child block miner's diff.
correctMinerAssetBalanceDiff := newBalanceDiff(parentFeeNextBlock, 0, 0, false)
correctMinerAssetBalanceDiff.blockID = child.BlockID()
Expand Down Expand Up @@ -122,15 +122,15 @@ func TestCreateBlockDiffSponsorship(t *testing.T) {
}
err = to.blockDiffer.saveCurFeeDistr(&parent.BlockHeader)
require.NoError(t, err, "saveCurFeeDistr() failed")
_, err = to.blockDiffer.createMinerDiff(&parent.BlockHeader, false)
require.NoError(t, err, "createMinerDiff() failed")
_, err = to.blockDiffer.createMinerAndRewardDiff(&parent.BlockHeader, false)
require.NoError(t, err, "createMinerAndRewardDiff() failed")
parentFeeTotal := int64(txs[0].GetFee() * FeeUnit / assetCost)
parentFeePrevBlock := parentFeeTotal / 5 * 2
parentFeeNextBlock := parentFeeTotal - parentFeePrevBlock

// Create diff from child block.
minerDiff, err := to.blockDiffer.createMinerDiff(&child.BlockHeader, true)
require.NoError(t, err, "createMinerDiff() failed")
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&child.BlockHeader, true)
require.NoError(t, err, "createMinerAndRewardDiff() failed")
// Verify child block miner's diff.
correctMinerWavesBalanceDiff := newBalanceDiff(parentFeeNextBlock, 0, 0, false)
correctMinerWavesBalanceDiff.blockID = child.BlockID()
Expand Down Expand Up @@ -185,7 +185,7 @@ func TestCreateBlockDiffWithReward(t *testing.T) {
// Second block
block2 := genBlockWithSingleTransaction(t, block1.BlockID(), block1.GenSignature, to)
to.stor.addBlock(t, block2.BlockID())
minerDiff, err := to.blockDiffer.createMinerDiff(&block2.BlockHeader, true)
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&block2.BlockHeader, true)
require.NoError(t, err)

fee := defaultFee - defaultFee/5*2
Expand Down Expand Up @@ -224,7 +224,7 @@ func TestBlockRewardDistributionWithTwoAddresses(t *testing.T) {
// Second block
block2 := genBlockWithSingleTransaction(t, block1.BlockID(), block1.GenSignature, to)
to.stor.addBlock(t, block2.BlockID())
minerDiff, err := to.blockDiffer.createMinerDiff(&block2.BlockHeader, true)
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&block2.BlockHeader, true)
require.NoError(t, err)

fee := int64(defaultFee - defaultFee/5*2)
Expand Down Expand Up @@ -272,7 +272,7 @@ func TestBlockRewardDistributionWithOneAddress(t *testing.T) {
// Second block
block2 := genBlockWithSingleTransaction(t, block1.BlockID(), block1.GenSignature, to)
to.stor.addBlock(t, block2.BlockID())
minerDiff, err := to.blockDiffer.createMinerDiff(&block2.BlockHeader, true)
minerDiff, err := to.blockDiffer.createMinerAndRewardDiff(&block2.BlockHeader, true)
require.NoError(t, err)

fee := defaultFee - defaultFee/5*2
Expand Down
4 changes: 2 additions & 2 deletions pkg/state/fee_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func TestAccountHasVerifierAfterRollbackFilterFalse(t *testing.T) {
assert.NoError(t, err, "failed to receive an address from public key")

txPerformerInfo := &performerInfo{blockID: blockID2}
err = to.tp.performSetScriptWithProofs(tx, txPerformerInfo)
_, err = to.tp.performSetScriptWithProofs(tx, txPerformerInfo, nil, nil)
assert.NoError(t, err, "performSetScriptWithProofs failed with valid SetScriptWithProofs tx")

hasVerifier, err := to.tp.stor.scriptsStorage.newestAccountHasVerifier(address)
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestAccountDoesNotHaveScriptAfterRollbackFilterTrue(t *testing.T) {
assert.NoError(t, err, "failed to receive an address from public key")

txPerformerInfo := &performerInfo{blockID: blockID2}
err = to.tp.performSetScriptWithProofs(tx, txPerformerInfo)
_, err = to.tp.performSetScriptWithProofs(tx, txPerformerInfo, nil, nil)
assert.NoError(t, err, "performSetScriptWithProofs failed with valid SetScriptWithProofs tx")

hasVerifier, err := to.tp.stor.scriptsStorage.newestAccountHasVerifier(address)
Expand Down
Loading