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

[master] Remote State Reads #2452

Merged
merged 1 commit into from
Feb 25, 2021
Merged

[master] Remote State Reads #2452

merged 1 commit into from
Feb 25, 2021

Conversation

vaivaswatha
Copy link
Contributor

Description

This is a redo of #2167 without the MPT / Trie parts.

Backward Compatibility

  • This is not a breaking change
  • This is a breaking change

Review Suggestion

Status

It is ready for review, but requires more testing. I might need @kaikawaliu's and @renlulu's help for that.

Implementation

  • ready for review

Integration Test (Core Team)

  • local machine test
  • small-scale cloud test

@github-actions github-actions bot changed the title Remote State Reads [master] Remote State Reads Feb 19, 2021
@github-actions github-actions bot added this to PRs in development in Core Feb 19, 2021
@jjcnn
Copy link

jjcnn commented Feb 20, 2021

I've looked through the changes, and apart from the version issue it passes the smell test. I don't know enough about the blockchain layer to do a proper review, though.

@sandipbhoir sandipbhoir self-requested a review February 23, 2021 02:40
@vaivaswatha
Copy link
Contributor Author

Ping !. I have some more changes pending that I need to do on top of this change after its merged. So it would be nice to have this merged at the earliest.

Core automation moved this from PRs in development to PRs needing review Feb 24, 2021
src/cmd/data_migrate.cpp Outdated Show resolved Hide resolved
src/libData/AccountData/AccountStore.cpp Show resolved Hide resolved
src/libData/AccountData/AccountStoreBase.tpp Show resolved Hide resolved
@@ -579,6 +580,7 @@ bool AccountStoreSC<MAP>::UpdateAccounts(const uint64_t& blockNum,

if (ret && !ParseCallContract(gasRemained, runnerPrint, receipt,
tree_depth, scilla_version)) {
Contract::ContractStorage2::GetContractStorage().RevertPrevState();
Copy link
Contributor

Choose a reason for hiding this comment

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

may not need this since it called later at line 588.

Copy link
Contributor

Choose a reason for hiding this comment

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

agree

src/libData/AccountData/AccountStoreSC.tpp Outdated Show resolved Hide resolved
@@ -98,6 +98,7 @@ bool SerializeToArray(const T& protoMessage, bytes& dst,
string ContractStorage2::GenerateStorageKey(const dev::h160& addr,
const string& vname,
const vector<string>& indices) {
LOG_MARKER();
Copy link
Contributor

Choose a reason for hiding this comment

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

can be removed?

src/cmd/data_migrate.cpp Outdated Show resolved Hide resolved
src/cmd/data_migrate.cpp Outdated Show resolved Hide resolved
src/libPersistence/ContractStorage2Data.h Outdated Show resolved Hide resolved
src/common/Constants.h Show resolved Hide resolved
src/libData/AccountData/AccountStoreSC.tpp Outdated Show resolved Hide resolved
src/libPersistence/ContractStorage2.cpp Outdated Show resolved Hide resolved
src/libServer/ScillaIPCServer.cpp Show resolved Hide resolved
src/libData/AccountData/AccountStore.h Outdated Show resolved Hide resolved
src/libData/AccountData/AccountStoreBase.tpp Show resolved Hide resolved
@@ -579,6 +580,7 @@ bool AccountStoreSC<MAP>::UpdateAccounts(const uint64_t& blockNum,

if (ret && !ParseCallContract(gasRemained, runnerPrint, receipt,
tree_depth, scilla_version)) {
Contract::ContractStorage2::GetContractStorage().RevertPrevState();
Copy link
Contributor

Choose a reason for hiding this comment

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

agree

src/libData/AccountData/AccountStoreSC.h Show resolved Hide resolved
src/libPersistence/ContractStorage2.cpp Outdated Show resolved Hide resolved
src/libPersistence/ContractStorage2.cpp Show resolved Hide resolved
src/libPersistence/ContractStorage2.cpp Show resolved Hide resolved
src/libPersistence/ContractStorage2Data.h Outdated Show resolved Hide resolved
tests/depends/Trie/Test_StateTrie.cpp Outdated Show resolved Hide resolved
tests/depends/Trie/CMakeLists.txt Outdated Show resolved Hide resolved
tests/Data/Test_Contract.cpp Outdated Show resolved Hide resolved
tests/Data/AccountData/Test_AccountStore.cpp Outdated Show resolved Hide resolved
Core automation moved this from PRs needing review to PRs approved - ready to merge! Feb 25, 2021
@ansnunez ansnunez merged commit 49a6cb6 into master Feb 25, 2021
Core automation moved this from PRs approved - ready to merge! to PRs done (merged) Feb 25, 2021
@ansnunez ansnunez deleted the feature/remote_state_reads branch February 25, 2021 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Core
  
PRs done (merged)
Development

Successfully merging this pull request may close these issues.

None yet

5 participants