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

Add snapshot storage #1215

Merged
merged 133 commits into from
Nov 21, 2023
Merged

Add snapshot storage #1215

merged 133 commits into from
Nov 21, 2023

Conversation

Anton-Rampage
Copy link
Contributor

No description provided.

nickeskov and others added 8 commits October 27, 2023 03:25
* Replaced current recording to storage to snapshot applier

* Replaced to snapshot applier, except balances

* Fixed a comment

* Removed the comment

* Removed unnecessary code

* Returned the linter command back

* Added asset script atomic snapshot to the issue script actions

* Fixed some linter issues

* Fixed a few more linter issues

* Fixed all linter issues

* Fixed err shadowing

* Fixed a mistake with issue counter

* removed a useless line

* Fixed applying order transactions

* Fixed applying order transactions

* Added lising snapshot to the tx diff generated group

* Moved complexity saving into transaction performer

* Moved complexity saving into transaction performer

* removed a line

* Fixed a bug with an empty sender

* Used error.Is

* Set an empty script for issue with sig

* move snapshots types to proto

* Fixed a bug with wrong action sender

* Fixed a bug with wrong action sender

* Add 'TransactionStatusSnapshot'.

* Implemented 'AtomicSnapshot' interface for 'TransactionStatusSnapshot'.

* Changed 'AssetScriptSnapshot' and 'scriptStorageState.setAssetScript'.

Removed 'pk' arg from 'setAssetScript'.
Removed two fields from 'AssetScriptSnapshot':
- 'SenderPK'
- 'Complexity'

* * Commented invoke snapshots, import ok

* moved setting complexity and set script to snapshot applier

* Fixed a test and a mistake

* Fixed renaming

* Fixed a comment

* Moved dapp complexity to applier

* Added dapp complexity to set script as well

* Fixed a check mistake

* Fixed a test

* removed empty script check

* removed a todo

* Removed useless code

* Modified a test

* Fixed same keys issue for data entry actions

* Remove invoke snapshot (#1235)

* moved complexity back

* Reverted some changes, import ok

* Returned account script and asset script txs, import ?

* Uncommented internal snapshot, import ok

* Fixed height problem with issue action and issue tx, import NO

* Issue action reverted

* Added log and issueCounter for issue action

* Commented invoke snapshots, import ok

---------

Co-authored-by: Nikolay Eskov <[email protected]>

---------

Co-authored-by: Anton Ilin <[email protected]>
Co-authored-by: Nikolay Eskov <[email protected]>
@nickeskov nickeskov changed the base branch from replace-to-snapshot-applier to node-transactions-snapshots-types October 30, 2023 09:34
Base automatically changed from node-transactions-snapshots-types to master November 15, 2023 23:01
Copy link
Member

@nickeskov nickeskov left a comment

Choose a reason for hiding this comment

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

StateVersion constant in pkg/state package must be incremented due to incompatibility with the previous version.

pkg/grpc/server/accounts_api.go Outdated Show resolved Hide resolved
pkg/proto/block_snapshot.go Outdated Show resolved Hide resolved
pkg/proto/block_snapshot.go Outdated Show resolved Hide resolved
pkg/proto/block_snapshot.go Outdated Show resolved Hide resolved
pkg/proto/block_snapshot.go Outdated Show resolved Hide resolved
pkg/proto/snapshot_types.go Outdated Show resolved Hide resolved
pkg/proto/types.go Show resolved Hide resolved
pkg/state/appender.go Outdated Show resolved Hide resolved
pkg/state/snapshot_storage.go Outdated Show resolved Hide resolved
pkg/state/snapshot_storage.go Show resolved Hide resolved
ScriptBytes: s.Bytes,
ScriptText: base64.StdEncoding.EncodeToString(s.Bytes),
Complexity: int64(s.Complexity),
PublicKey: nil,
Copy link
Member

Choose a reason for hiding this comment

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

Why is that nil? Is it intended?

Copy link
Member

Choose a reason for hiding this comment

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

See #1245

@nickeskov nickeskov merged commit dd552b5 into master Nov 21, 2023
15 checks passed
@nickeskov nickeskov deleted the add-snapshots-starage branch November 21, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants