Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Remove RwTableTag #1406

Merged
merged 3 commits into from
May 17, 2023
Merged

Remove RwTableTag #1406

merged 3 commits into from
May 17, 2023

Conversation

ChihChengLiang
Copy link
Collaborator

Description

RwTableTag can be fully replaced by Target.

Issue Link

Part of #1391

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Contents

We add EnumIter, Hash, Expr to Target to let it serve different needs.

Note to reviewers: the impl From<Target> for usize is required by BinaryNumberConfig.

@github-actions github-actions bot added crate-bus-mapping Issues related to the bus-mapping workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member labels May 12, 2023
Copy link
Member

@ed255 ed255 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work on the ongoing deduplication of types!

An effect of this PR is that the name RwTableTag is replaced by Target. We still use RwTableTag in the specs repo: https://github.com/search?q=repo%3Aprivacy-scaling-explorations%2Fzkevm-specs%20RwTableTag&type=code
Maybe we should update the specs to replace all instances of RwTableTag by Target to be consistent with this?

@ChihChengLiang
Copy link
Collaborator Author

ChihChengLiang commented May 16, 2023

@ed255, thanks for the review! Replacing all instances of RwTableTag by Target in the spec makes sense to me. Let me file an issue.

Update: the issue is filed here privacy-scaling-explorations/zkevm-specs#422

@KimiWu123
Copy link
Contributor

LGTM! Great work!

@ChihChengLiang ChihChengLiang merged commit 69cb8a9 into main May 17, 2023
@ChihChengLiang ChihChengLiang deleted the rm-RwTableTag branch May 17, 2023 14:20
@ed255 ed255 mentioned this pull request May 19, 2023
1 task
ChihChengLiang pushed a commit that referenced this pull request May 19, 2023
### Description

Fix an infinite loop from a `From` implementation calling itself.

### Issue Link

Resolve
#1420
Related
#1417

### Type of change

- [x] Bug fix (non-breaking change which fixes an issue)

### Contents

@ChihChengLiang found that this issue was introduced in
#1406
and by debugging on the debug build I found the infinite loop (which
caused the stack to overflow which terminated the program with a
segfault). The segfault is not observed in the release build, I guess
the compiler optimizes the recursive call into an infinite loop, so the
stack is never exhausted.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
crate-bus-mapping Issues related to the bus-mapping workspace member crate-zkevm-circuits Issues related to the zkevm-circuits workspace member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants