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

Remove SMT logic for Zero Prover #1374

Merged
merged 6 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
3 changes: 3 additions & 0 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ func AccumulateRewards(config *chain.Config, header *types.Header, uncles []*typ

// accumulateRewards retrieves rewards for a block and applies them to the coinbase accounts for miner and uncle miners
func accumulateRewards(config *chain.Config, state *state.IntraBlockState, header *types.Header, uncles []*types.Header) {
if config.IsNormalcy(header.Number.Uint64()) {
cffls marked this conversation as resolved.
Show resolved Hide resolved
return
}
minerReward, uncleRewards := AccumulateRewards(config, header, uncles)
for i, uncle := range uncles {
if i < len(uncleRewards) {
Expand Down
2 changes: 1 addition & 1 deletion core/blockchain_zkevm.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func ExecuteBlockEphemerallyZk(
receipts = append(receipts, receipt)
}
}
if !chainConfig.IsForkID7Etrog(block.NumberU64()) {
if !chainConfig.IsForkID7Etrog(block.NumberU64()) && !chainConfig.IsNormalcy(block.NumberU64()) {
if err := ibs.ScalableSetSmtRootHash(roHermezDb); err != nil {
return nil, err
}
Expand Down
4 changes: 4 additions & 0 deletions smt/pkg/smt/entity_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ func (s *SMT) SetContractStorage(ethAddr string, storage map[string]string, prog
}

func (s *SMT) SetStorage(ctx context.Context, logPrefix string, accChanges map[libcommon.Address]*accounts.Account, codeChanges map[libcommon.Address]string, storageChanges map[libcommon.Address]map[string]string) ([]*utils.NodeKey, []*utils.NodeValue8, error) {
if len(storageChanges) == 0 && len(accChanges) == 0 && len(codeChanges) == 0 {
return nil, nil, nil
}

var isDelete bool
var err error

Expand Down
Loading