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

feat: enforce type field of a cellbase output cell must be absent #335

Merged

Conversation

zhangsoledad
Copy link
Member

@zhangsoledad zhangsoledad commented Mar 15, 2019

  • remove redundant EmptyVerifier
  • enforce type field of a cellbase output cell must be absent

@@ -99,6 +90,16 @@ impl<CP: ChainProvider + Clone> CellbaseVerifier<CP> {
{
return Err(Error::Cellbase(CellbaseError::InvalidInput));
}

// currently, we enforce`type` field of a cellbase output cell must be absent
Copy link
Member

Choose a reason for hiding this comment

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

why do we enforce this?

Copy link
Member Author

@zhangsoledad zhangsoledad Mar 15, 2019

Choose a reason for hiding this comment

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

Currently, we have an involuntary issue that CKB-VM execution skipped cellbase. It's a temporary solution until we implement cellbase type script validation.

Copy link
Member

Choose a reason for hiding this comment

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

Feels like something we should fix before testnet.

@@ -75,9 +69,6 @@ impl<CP: ChainProvider + Clone> CellbaseVerifier<CP> {
}

pub fn verify(&self, block: &Block) -> Result<(), Error> {
if block.commit_transactions().is_empty() {
Copy link
Member

Choose a reason for hiding this comment

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

Is cellbase required now? Has it been added in the verification RFC doc?

Copy link
Member Author

@zhangsoledad zhangsoledad Mar 19, 2019

Choose a reason for hiding this comment

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

Cellbase is always required. RFC updated.

@doitian doitian requested a review from xxuejie March 15, 2019 15:15
@doitian doitian added the s:waiting-on-reviewers Status: Waiting for Review label Mar 15, 2019
@doitian
Copy link
Member

doitian commented Mar 19, 2019

bors r+

@doitian doitian removed the s:waiting-on-reviewers Status: Waiting for Review label Mar 19, 2019
bors bot added a commit that referenced this pull request Mar 19, 2019
335: feat: enforce `type` field of a cellbase output cell must be absent r=doitian a=zhangsoledad

* remove redundant EmptyVerifier
* enforce `type` field of a cellbase output cell must be absent

Co-authored-by: zhangsoledad <[email protected]>
@bors
Copy link
Contributor

bors bot commented Mar 19, 2019

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit eb1539d into nervosnetwork:develop Mar 19, 2019
@doitian doitian mentioned this pull request Mar 27, 2019
@zhangsoledad zhangsoledad deleted the zhangsoledad/fix_verification branch August 16, 2019 02:53
bors bot added a commit that referenced this pull request Sep 14, 2019
1583: chore(deps): bump chrono from 0.4.8 to 0.4.9 r=zhangsoledad a=dependabot-preview[bot]

Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.8 to 0.4.9.
<details>
<summary>Changelog</summary>

*Sourced from [chrono's changelog](https://github.com/chronotope/chrono/blob/master/CHANGELOG.md).*

> ## 0.4.9
> 
> ### Fixes
> 
> * Make Datetime arithmatic adjust their offsets after discovering their new
>   timestamps ([@&#8203;quodlibetor](https://github.com/quodlibetor) [#337](https://github-redirect.dependabot.com/chronotope/chrono/issues/337))
> * Put wasm-bindgen related code and dependencies behind a `wasmbind` feature
>   gate. ([@&#8203;quodlibetor](https://github.com/quodlibetor) [#335](https://github-redirect.dependabot.com/chronotope/chrono/issues/335))
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/chronotope/chrono/commits/v0.4.9)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.8&new-version=0.4.9)](https://dependabot.com/compatibility-score.html?dependency-name=chrono&package-manager=cargo&previous-version=0.4.8&new-version=0.4.9)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
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