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

[Meta] Test releases for the tests repository #531

Closed
holgerd77 opened this issue Oct 19, 2018 · 37 comments
Closed

[Meta] Test releases for the tests repository #531

holgerd77 opened this issue Oct 19, 2018 · 37 comments

Comments

@holgerd77
Copy link
Contributor

holgerd77 commented Oct 19, 2018

Hi @winsvega, have you ever thought about making releases on the tests repository, think these could already solve a lot of problems. This can be low-level, e.g. just doing tags on the GitHub release page and adding some CHANGELOG entry, we are doing this over on our proxy ethereumjs-testing library and have made good experiences with it.

This would have the effect that people stay a bit on board about what's going on (test format has changed, Constantinople tests for EIP xxx are ready,...), significantly reduces the risk of people using inconsistent states of the repository and would also help a lot to talk about problems ("What release are you using?" instead of "I am referring to the library in state with latest commit xxx").

What do you think? I could also take on this job this I am doing this anyhow for the JS library mentioned above, but I am also happy with you taking on it if you want to have control over the process.

@holgerd77
Copy link
Contributor Author

holgerd77 commented Oct 24, 2018

Hi everyone,
here is a proposal for release notes, I would leave this open for discussion and comments for 24 hours and then publish a tagged release. I think this will generally be a good way ensure to not do unintended releases and give @winsvega and others working on the tests the chance for some feedback ("please wait, develop branch not stable", "please wait, would like to merge PR xx",...), so I will stick to that concept and publish draft notes maybe here or within another dedicated issue.

After some more thoughts I also think that I would like to weaken the initially proposed strict bi-weekly release schedule a bit and instead still do regular releases but within a period of 1-4 weeks. In some more dense periods (like atm) there might be the need for more regular releases, e.g. if the last EIP tests are merged, in other periods with low work activity doing a release after 4 weeks might be enough.

Due to the nature of this library with more constant updates here and there on tests and less of really feature-centric events/large changes I would generally stick to a regular-release-concept.

Here is a draft for some first release notes:


Tag: v6.0.0-beta.1

Title:
v6.0.0-beta.1 Release CW 43

Description:

This is the first of a new regular series of test releases, which can be used to reference a static snapshot of the tests within your library. For a starter release notes will give an overall summary of the status of consensus Constantinople tests, a summary of recent noteworthy changes and an overview on release versioning. Subsequent releases will then provide a CHANGELOG towards the release before.

Constantinople Test Summary

  • EIP-145 (Bitwise shifting): Tests for SAR, SHL and SHR in GeneralStateTests/stShift directory, blockchain tests analogue
  • EIP-1014 (CREATE2): Various cases covered in GeneralStateTests/stCreate2 directory, blockchain tests analogue
  • EIP-1052 (EXTCODEHASH): Tests not merged yet, open PR #484
  • EIP-1283 (SSTORE): Dedicated tests in GeneralStateTests/stSStoreTest directory also covering Ropsten consensus issue cases, blockchain tests analogue, generally refilled state tests with new SSTORE gas metering rules in PR #511
  • EIP-1234 (difficulty): New difficultyConstantinople.json file and regenerated difficultyRopsten.json files in the BasicTests directory, see PR #518

Library Changes

Be aware that the format of BlockchainTests recently changed with the introduction of a new field sealEngine (values: NoProof | Ethash), see related JSON Schema change or BlockchainTest format docs for reference.

This means that you can faster-execute NoProof based tests skipping block validation. These tests nevertheless doesn't provide reliable values for PoW-based block header fields any more (mixHash, nonce), so make sure that you don't rely on the correctness of these values for the tests to pass.

Versioning

Library releases will follow semantic versioning:

  • major number updates every time there is a backwards incompatibility for test runners, eg~
    • new fork rules
    • backwards-incompatible change, like dropping the mixhash and setting sealEngine=NoProof (see these release notes)
  • minor number updates when new tests are added that are backwards compatible
  • patch number updates if an existing test is bugfixed

Here is an example how a follow-up release line could look like:

  • v6-alpha - starting to implement EIPs, but not all EIPs are finalized
  • v6-beta - all EIPs finalized, but some tests still in progress
  • v6.0.0 - all desired coverage for Constantinople tests to be considered "done enough"
  • v6.1.0 - more coverage added
  • v6.2.0 - more coverage added
  • v6.2.1 - bugfix on one of the tests
  • v7.0.0 - change in test format output (if backwards incompatible)

Put some more thoughts in what would make sense as a concept for the tags. I've now chosen to prefix this with a HF abbreviation (CO for Constantinople) and then do versioned releases up to a CO-1.0.0 version where tests are somewhat complete for the specific hardfork (in the Constantinople case probably once EXTCODEHASH tests are merged and tests for all EIPs have a somewhat sufficient level of coverage, not sure what the status is regarding this atm). Have no strong opinion on version number to start with, thought 0.8.0 might be appropriate but we can also do 0.9.0, don't mind.

Once work on the next HF has started one would switch to a new prefix and new starting version number, like XX-0.1.0 once first tests referencing the new hardfork are merged. Think this tag concept fits better the nature of the library than a simple v0.8, let me know if this (using a letter-based tag format) causes problems in versioning/caching/whatever I am not aware of.

As description this now has some overall description of late noteworthy changes + the Constantinople status, in subsequent releases I would give a summary of the stuff changed in between the releases, this is just as a starter.

Update: have changed versioning for the draft and added on the release description along with the comment from @carver down the line.

@cburgdorf
Copy link

@holgerd77 Thank you very much for jumping on this. 👍 As someone who has implemented the Constantinople EIPs for Trinity I really appreciate your effort to make the process of upgrading the tests more pleasant. Currently, for me, upgrading the tests usually involves lots of digging through other client implementations to find out about the changes they had to implement to make things work (e.g. sealEngine).

Your proposed release strategy, versioning scheme and release notes sound good to me. I will add though, that I think the process could be made even easier (for the maintainer) and more transparent (for everyone) if the commits to this repo would follow a commit message convention and then generate release notes automatically.

Here's a changelog from Angular that is 100 % generated based on the commits of the project. There's a simple commit message convention to be followed to allow the automatic generation of such changelogs. There are different tools that can generate these changelogs, one of them is clog (DISCLAIMER: I worked on that. Just recommending it because it has binaries, so no JS dependency)

I see the main benefit of using such a convention + auto changelog generation on the maintainer side as it removes the tedious job of creating such changelogs by hand. It also eliminates human error. Also, by enforcing clean commits that contain a commit message that goes into such a changelog comes at the benefit of making it much easier for everyone else to look up commits and read about the changes they caused.

Adopting such practice comes at the cost of putting a little bit more upfront work into forging meaningful commits and knowing Git well enough to not struggle with that (interactive rebasing etc) so I realize there may be hesitation to buy into such practice. I just wanted to bring it up though, as I think it would greatly improve the whole testing story for a lot of people.

Also, if there's buy-in for that, I'm happy to help with the integration of a changelog generator.

@holgerd77
Copy link
Contributor Author

Hi @cburgdorf, that's an interesting idea but I wouldn't over-engineer here for now. This requires very much discipline on the commit generation side and I wouldn't want to force everyone into some complete new work structure on a first round, think it's more important to get things off the ground.

This also very much requires meaningful PRs, if at the end this gets just a list of "refill tests", "refill tests", "fix typo in docs",... PRs benefit is really limited.

So for now I have a strong tendency to not (yet (?)) follow this path and stick to a manual summary. There is also some general overhaul of the complete tests repository in the works, see initial experiments and structure setup here, maybe this is something for mid-term introduction on a new setup.

@cburgdorf
Copy link

This requires very much discipline on the commit generation side and I wouldn't want to force everyone into some complete new work structure on a first round, think it's more important to get things off the ground.

I totally agree. I brought it up as a vision for how things could be as a long term goal. I'm totally on board that improvements need to come step by step.

This also very much requires meaningful PRs

Yes, basically means either contributors need to learn how to do it or maintainer need to rebase PRs on behalf of those people. Making it harder for external contributors to contribute is basically the main reason why we reject such policy in Trinity for now. That said, I guess the test repo has a more steady circle of contributors and less drive by contributors anyway.

so for now I have a strong tendency to not (yet (?)) follow this path and stick to a manual summary.

I'm on board. I wasn't expecting this to be adopted any time soon. I do think though, clean semantic commits with description + a generated changelog would make a good long term goal for this project.

there is also some general overhaul of the complete tests repository in the works, see initial experiments and structure setup here, maybe this is something for mid-term introduction on a new setup.

Interesting! Paging in @pipermerriam and @carver as I know they have ideas to improve the testing setup as well. E.g. Having a structure for the expected account state (instead of just having a bare state_root hash) would be a great improvement to the test setup imho.

@winsvega
Copy link
Collaborator

winsvega commented Oct 24, 2018

Tests develop branch must always be stable. It is just that this time we created Constantinople tests way before the actuall EIPS were included into the test branch.
If you find a bug in test develop branch then smth is wrong either with the test or with your client. So I am not sure about this releases.

But I like the idea of meta description of what actually hash changed in the tests and where to expect potential bugs to happen.

@holgerd77
Copy link
Contributor Author

Yes, main reason for releases are to have descriptions of what has changed and to be better able to exchange about problems and potential bugs, this is not so much about stability. If develop branch is always stable, even better.

@carver
Copy link

carver commented Oct 24, 2018

Further, semantic versioning would be helpful here:

  • major number updates every time there is a backwards incompatibility for test runners, eg~
    • new fork rules
    • backwards-incompatible change, like dropping the mixhash and setting sealEngine=NoProof
  • minor number updates when new tests are added that are backwards compatible
  • patch number updates if an existing test is bugfixed

It is just that this time we created Constantinople tests way before the actuall EIPS were included into the test branch.

Yeah, this totally makes sense. It is a perfect example of how releases can help clients: they can update to the latest version that doesn't include Constantinople tests by upgrading up until just before the next major version number.

Also, it would be reasonable to do alpha/beta releases. So if Byzantium was v5, then next releases might be tagged like so:

  • v6-alpha - starting to implement EIPs, but not all EIPs are finalized
  • v6-beta - all EIPs finalized, but some tests still in progress <- I guess any current release would be here
  • v6.0.0 - all desired coverage for Constantinople tests to be considered "done enough"
  • v6.1.0 - more coverage added
  • v6.2.0 - more coverage added
  • v6.2.1 - bugfix on one of the tests
  • v7.0.0 - change in test format output (if backwards incompatible)

@holgerd77
Copy link
Contributor Author

Yes, I think the suggestion from @carver for versioning makes more sense than my stuff, will switch to that.

@holgerd77
Copy link
Contributor Author

Have updated the draft release notes from above with the changed versioning and notes from @carver.

@holgerd77
Copy link
Contributor Author

holgerd77 commented Oct 25, 2018

Have now published a first release v6.0.0-beta.1, have also cross-posted this on Reddit.

On a first round I will continue to use this thread on subsequent release note drafts, as I said, will always publish as a draft 24 hours before a release.

@holgerd77
Copy link
Contributor Author

(sorry, wrong Reddit link if you got this via mail, use the updated link directly from the post)

@holgerd77
Copy link
Contributor Author

@winsvega what is the status of the EXTCODEHASH implementation, are you already working on that and plan to finish yourself or are you still looking for someone to help out? Seems post on Reddit is getting some traction, maybe good occasion to ask over there if someone wants to contribute?

@pipermerriam
Copy link
Member

@holgerd77 might be good to bake some of this into the project README.md or the Sphinx docs.

@axic
Copy link
Member

axic commented Oct 25, 2018

Thanks @holgerd77 & @winsvega (and others) for all this work, this looks great!

@winsvega
Copy link
Collaborator

Extcodehash is not implemented yet. There is a test cases list

@holgerd77
Copy link
Contributor Author

Hi everyone,
here is the draft for release notes for a new release, as announced previously I would leave this open for 24h and then do a release.

My idea for a release path towards a "good enough" v6.0.0 release would be the following:

  • This release (with additional EXTCODEHASH and SSTORE tests still in the works by @winsvega and @hugo-dc as open PRs) will be another beta.x release, clients can nevertheless use this to for the first time to test all opcodes/EIPs from Constantinople
  • Once these - and eventually some more tests - are merged, probably in 2 weeks or so, we can do a final beta.x release (we could also call this release candidate if we want to be super-precise), we can then give this a period of another 1-2 weeks to see if clients report problems with this
  • Then we can do a v6.0.0 release, probably somewhere around early/mid December

Does this make sense? Comments on the release notes are also very welcome!

Cheers
Holger


Tag: v6.0.0-beta.2

Title:
v6.0.0-beta.2 Release CW 46

Description:

This is the second of a new regular series of test releases, which can be used to reference a static snapshot of the tests within your library. First release has been v6.0.0-beta.1, see release notes from this release for an initial summary on the state of Constantinople tests.

Constantinople Test Updates

  • Added initial test cases for EXTCODEHASH EIP-1052, see PR #484
  • More EXTCODEHASH tests, see PR #544
  • New SSTORE state tests and blockchain tests where an external call is overwriting/colliding with new SSTORE gas calculation rules, see PR #535

Test Coverage

  • New tests to cover cases where the result of an EVM opcode is written to a specified memory range and the result is shorter than the specified range, see PR #538

Library Changes

  • Added .idea to .gitignore, see PR #546

Docs

Test generation docs have been consolidated and integrated in the central ReadTheDocs testing documentation.

We also updated outdated parts on this doc section (see PR #539), so it should in principle now be possible to follow the guide and end up with a working test creation setup. There might still be some glitches, please let us know or submit a PR on ethereum/tests to if you stumble over something.

Other changes:

@holgerd77 holgerd77 changed the title Test releases for the tests repository [Meta] Test releases for the tests repository Nov 14, 2018
@holgerd77
Copy link
Contributor Author

Just did the v6.0.0-beta.2 release, here the associated post on Reddit.

Since I fuddled around with this myself a bit, here some installation instructions, this should probably also be included in the documentation:

cd [SUBMODULE_FOLDER]
git fetch --tags origin develop
git tag -l
git checkout tags/[RELEASE_VERSION]
cd ..
git add [SUBMODULE_FOLDER]
git commit -m "[MESSAGE_ON_TEST_RELEASE_UPDATE]"

@winsvega
Copy link
Collaborator

What submodule folder?

@carver
Copy link

carver commented Nov 14, 2018

What submodule folder?

Depends on the project: https://github.com/ethereum/tests#clients-using-the-library

It's called fixtures/ in trinity.

@winsvega
Copy link
Collaborator

would be good to have a text file in test repo called changes.txt
so with each PR you manually add there descriptions of which test cases you covered with your PR.
then once a release bundle is constructed it reads changes from that file and combine them into an info.
like this:

Change LOG:

Summary:
-----
Refilled blockchain test cases for constantinople

Fixes:
-----
Fixed python json scheme check for blockchain tests


New tests covered: 
-----
Extcodehash of nonexistent account
Extocodesize of deleted account

But all those records you just add manually while commiting PRs to the test repo.
Then after release bundle, this changes are copied and stamped into a release change file.
And original file is nulled so you can fill it up again untill the next bundle release.

@carver
Copy link

carver commented Nov 19, 2018

We've discussed doing something like that in trinity (auto-generating the changelog from the merge commits since the last release). AngularJS does something similar, apparently.

It seems like it might be a good idea for trinity to do someday, but the reality is that it is very difficult to get contributors to write good, publicly-readable commit messages. (maybe even tougher to have them make manual entries in a changelog) So we punted on the idea until we can figure out that problem. For now, a manual changelog writeup is the best solution we have.

I imagine the tests repo would be in a similar position. (Even if there are fewer contributors currently, we might aspire to have more, and end up with the same challenges)

@winsvega
Copy link
Collaborator

Thats what I say. manually write changes to the file. but automatically mergeit to the change log.

@winsvega
Copy link
Collaborator

and if I manage to get contributers to write testFiller.json files it should be easy to have them write reasonable change log entries.

@holgerd77
Copy link
Contributor Author

holgerd77 commented Nov 28, 2018

Good idea, I will directly create a PR with a collection of the previous release notes within a changelog file. I would then also abandon this release preparation concept of posting release note drafts here but directly open a PR with proposed finalized changelog entry against the changelog file. Then this gets in the normal review process and can be reviewed and approved by @winsvega or someone else and it becomes more transparent for everyone to get noticed and eventually discussed.

As one suggestion to simplify things I would suggest to not keep two separate files for this but open a new IN PROGRESS section on the main changelog file on every release and add in-progress changes directly there, then we don't have to maintain two separate files.

@lithp
Copy link
Contributor

lithp commented Dec 17, 2018

It's time for the third release!

I've opened #571 which adds a CHANGELOG, and I've also made a draft release, here are the release notes:

This is the third release, which can be used to reference a static snapshot of the tests within your library.

Potentially breaking changes

EIP 1234

  • constantinople transition test #547 added a test for the difficulty changes. This adds the network ByzantiumToConstantinopleAt5, which is analogous to existing networks such as FrontierToHomesteadAt5 and EIP158ToByzantiumAt5.

EIP 1052

Misc

@winsvega
Copy link
Collaborator

this looks really great! now we could track and refere to a specific pr and tests that covered a specific issue and such much easier. thanks!

but please note that this are not all tests we have merged for constantinople.

@lithp
Copy link
Contributor

lithp commented Dec 18, 2018

Thanks!

but please note that this are not all tests we have merged for constantinople.

By this, do you mean that you want me to add a note saying that these are not all the Constantinople tests, just the ones added during this release cycle? Or do you mean that more tests were added during this cycle and I missed them when making these notes?

@winsvega
Copy link
Collaborator

I mean there will be more before the hardfork

@lithp
Copy link
Contributor

lithp commented Dec 18, 2018

Dropping a link to https://github.com/ethereum/py-evm/issues/1587, there are some good comments in there on ideas for what a changelog should look like.

@lithp
Copy link
Contributor

lithp commented Dec 18, 2018

@winsvega I added a longer description to the release:

This is the third release, which can be used to reference a static snapshot of the tests. It adds a lot of tests for EIP-1052 (EXTCODEHASH) and makes a few small breaking changes. Note that this release does not represent full Constantinople test coverage, there are more Constantinople tests incoming.

and published it here: https://github.com/ethereum/tests/releases/tag/v6.0.0-beta.3

@lithp
Copy link
Contributor

lithp commented Dec 18, 2018

I also updated #571, please merge it when you get a chance :)

@winsvega
Copy link
Collaborator

Please notify me if you need specific commit description for auto changelog script. Cause right now I just type a few words in commit title.

@lithp
Copy link
Contributor

lithp commented Dec 21, 2018

Sure thing @winsvega 👍

I don't have strong opinions on commit message titles for now. I made this release by going through all the PRs and reading their descriptions. As long as all commits go through a PR and they include some kind of description of what they're doing (preferably in a comment in the filler) these notes will be pretty easy to generate.

@winsvega
Copy link
Collaborator

Are there any preferences for github merge type? (Merge commit, rebase commit, ..)
I just push merge. By default it seems to create merge commit

@winsvega
Copy link
Collaborator

winsvega commented Sep 1, 2019

Are this releases still supported?

@winsvega
Copy link
Collaborator

winsvega commented Apr 7, 2021

test releases are now done by github releases

@winsvega winsvega closed this as completed Apr 7, 2021
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

No branches or pull requests

8 participants
@axic @carver @lithp @cburgdorf @pipermerriam @holgerd77 @winsvega and others