From 01e2eb457e85e2750d8927d90de3e82ceb60bc85 Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Mon, 15 Aug 2022 11:38:20 -0400 Subject: [PATCH] Remove EOSIO references, change eosio-cpp and eosio-ld to cdt-cpp and cdt-ld --- CONTRIBUTING.md | 148 ------------------ IMPORTANT.md | 27 ---- README.md | 23 +-- ...ompile_eosio_tests.py => compile_tests.py} | 4 +- generator/generate_eosio_tests.py | 2 +- generator/setup_eosio_tests.py | 6 +- 6 files changed, 11 insertions(+), 199 deletions(-) delete mode 100644 CONTRIBUTING.md delete mode 100644 IMPORTANT.md rename generator/{compile_eosio_tests.py => compile_tests.py} (85%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index d35ba4e..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,148 +0,0 @@ -# Contributing to eosio-wasm-spec-tests - -Interested in contributing? That's awesome! Here are some guidelines to get started quickly and easily: - -- [Reporting An Issue](#reporting-an-issue) - - [Bug Reports](#bug-reports) - - [Feature Requests](#feature-requests) - - [Change Requests](#change-requests) -- [Working on eosio-wasm-spec-tests](#working-on-eosio-wasm-spec-tests) - - [Feature Branches](#feature-branches) - - [Submitting Pull Requests](#submitting-pull-requests) - - [Testing and Quality Assurance](#testing-and-quality-assurance) -- [Conduct](#conduct) -- [Contributor License & Acknowledgments](#contributor-license--acknowledgments) -- [References](#references) - -## Reporting An Issue - -If you're about to raise an issue because you think you've found a problem with eosio-wasm-spec-tests, or you'd like to make a request for a new feature in the codebase, or any other reason… please read this first. - -The GitHub issue tracker is the preferred channel for [bug reports](#bug-reports), [feature requests](#feature-requests), and [submitting pull requests](#submitting-pull-requests), but please respect the following restrictions: - -* Please **search for existing issues**. Help us keep duplicate issues to a minimum by checking to see if someone has already reported your problem or requested your idea. - -* Please **be civil**. Keep the discussion on topic and respect the opinions of others. See also our [Contributor Code of Conduct](#conduct). - -### Bug Reports - -A bug is a _demonstrable problem_ that is caused by the code in the repository. Good bug reports are extremely helpful - thank you! - -Guidelines for bug reports: - -1. **Use the GitHub issue search** — check if the issue has already been - reported. - -1. **Check if the issue has been fixed** — look for [closed issues in the - current milestone](https://github.com/EOSIO/eosio-wasm-spec-tests/issues?q=is%3Aissue+is%3Aclosed) or try to reproduce it - using the latest `develop` branch. - -A good bug report shouldn't leave others needing to chase you up for more information. Be sure to include the details of your environment and relevant tests that demonstrate the failure. - -[Report a bug](https://github.com/EOSIO/eosio-wasm-spec-tests/issues/new?title=Bug%3A) - -### Feature Requests - -Feature requests are welcome. Before you submit one be sure to have: - -1. **Use the GitHub search** and check the feature hasn't already been requested. -1. Take a moment to think about whether your idea fits with the scope and aims of the project. -1. Remember, it's up to *you* to make a strong case to convince the project's leaders of the merits of this feature. Please provide as much detail and context as possible, this means explaining the use case and why it is likely to be common. - -### Change Requests - -Change requests cover both architectural and functional changes to how eosio-wasm-spec-tests works. If you have an idea for a new or different dependency, a refactor, or an improvement to a feature, etc - please be sure to: - -1. **Use the GitHub search** and check someone else didn't get there first -1. Take a moment to think about the best way to make a case for, and explain what you're thinking. Are you sure this shouldn't really be - a [bug report](#bug-reports) or a [feature request](#feature-requests)? Is it really one idea or is it many? What's the context? What problem are you solving? Why is what you are suggesting better than what's already there? - -## Working on eosio-wasm-spec-tests - -Code contributions are welcome and encouraged! If you are looking for a good place to start, check out the [good first issue](https://github.com/EOSIO/eosio-wasm-spec-tests/labels/good%20first%20issue) label in GitHub issues. - -Also, please follow these guidelines when submitting code: - -### Feature Branches - -To get it out of the way: - -- **[develop](https://github.com/EOSIO/eosio-wasm-spec-tests/tree/develop)** is the development branch. All work on the next release happens here so you should generally branch off `develop`. Do **NOT** use this branch for a production site. -- **[master](https://github.com/EOSIO/eosio-wasm-spec-tests/tree/master)** contains the latest release of eosio-wasm-spec-tests. This branch may be used in production. Do **NOT** use this branch to work on eosio-wasm-spec-tests's source. - -### Submitting Pull Requests - -Pull requests are awesome. If you're looking to raise a PR for something which doesn't have an open issue, please think carefully about [raising an issue](#reporting-an-issue) which your PR can close, especially if you're fixing a bug. This makes it more likely that there will be enough information available for your PR to be properly tested and merged. - -### Testing and Quality Assurance - -Never underestimate just how useful quality assurance is. If you're looking to get involved with the code base and don't know where to start, checking out and testing a pull request is one of the most useful things you could do. - -Essentially, [check out the latest develop branch](#working-on-eosio-wasm-spec-tests), take it for a spin, and if you find anything odd, please follow the [bug report guidelines](#bug-reports) and let us know! - -## Conduct - -While contributing, please be respectful and constructive, so that participation in our project is a positive experience for everyone. - -Examples of behavior that contributes to creating a positive environment include: -- Using welcoming and inclusive language -- Being respectful of differing viewpoints and experiences -- Gracefully accepting constructive criticism -- Focusing on what is best for the community -- Showing empathy towards other community members - -Examples of unacceptable behavior include: -- The use of sexualized language or imagery and unwelcome sexual attention or advances -- Trolling, insulting/derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others’ private information, such as a physical or electronic address, without explicit permission -- Other conduct which could reasonably be considered inappropriate in a professional setting - -## Contributor License & Acknowledgments - -Whenever you make a contribution to this project, you license your contribution under the same terms as set out in [LICENSE](./LICENSE), and you represent and warrant that you have the right to license your contribution under those terms. Whenever you make a contribution to this project, you also certify in the terms of the Developer’s Certificate of Origin set out below: - -``` -Developer Certificate of Origin -Version 1.1 - -Copyright (C) 2004, 2006 The Linux Foundation and its contributors. -1 Letterman Drive -Suite D4700 -San Francisco, CA, 94129 - -Everyone is permitted to copy and distribute verbatim copies of this -license document, but changing it is not allowed. - - -Developer's Certificate of Origin 1.1 - -By making a contribution to this project, I certify that: - -(a) The contribution was created in whole or in part by me and I - have the right to submit it under the open source license - indicated in the file; or - -(b) The contribution is based upon previous work that, to the best - of my knowledge, is covered under an appropriate open source - license and I have the right under that license to submit that - work with modifications, whether created in whole or in part - by me, under the same open source license (unless I am - permitted to submit under a different license), as indicated - in the file; or - -(c) The contribution was provided directly to me by some other - person who certified (a), (b) or (c) and I have not modified - it. - -(d) I understand and agree that this project and the contribution - are public and that a record of the contribution (including all - personal information I submit with it, including my sign-off) is - maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. -``` - -## References - -* Overall CONTRIB adapted from https://github.com/mathjax/MathJax/blob/master/CONTRIBUTING.md -* Conduct section adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html diff --git a/IMPORTANT.md b/IMPORTANT.md deleted file mode 100644 index ed43379..0000000 --- a/IMPORTANT.md +++ /dev/null @@ -1,27 +0,0 @@ -# Important Notice - -We (block.one and its affiliates) make available EOSIO and other software, updates, patches and documentation (collectively, Software) on a voluntary basis as a member of the EOSIO community. A condition of you accessing any Software, websites, articles, media, publications, documents or other material (collectively, Material) is your acceptance of the terms of this important notice. - -## Software -We are not responsible for ensuring the overall performance of Software or any related applications. Any test results or performance figures are indicative and will not reflect performance under all conditions. Software may contain components that are open sourced and subject to their own licenses; you are responsible for ensuring your compliance with those licenses. - -We make no representation, warranty, guarantee or undertaking in respect of Software, whether expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall we be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the Software or the use or other dealings in the Software. - -Wallets and related components are complex software that require the highest levels of security. If incorrectly built or used, they may compromise users’ private keys and digital assets. Wallet applications and related components should undergo thorough security evaluations before being used. Only experienced developers should work with such Software. - -Material is not made available to any person or entity that is the subject of sanctions administered or enforced by any country or government or otherwise designated on any list of prohibited or restricted parties (including but not limited to the lists maintained by the United Nations Security Council, the U.S. Government, the European Union or its Member States, or other applicable government authority) or organized or resident in a country or territory that is the subject of country-wide or territory-wide sanctions. You represent and warrant that neither you nor any party having a direct or indirect beneficial interest in you or on whose behalf you are acting as agent or nominee is such a person or entity and you will comply with all applicable import, re-import, sanctions, anti-boycott, export, and re-export control laws and regulations. If this is not accurate or you do not agree, then you must immediately cease accessing our Material and delete all copies of Software. - -Any person using or offering Software in connection with providing software, goods or services to third parties shall advise such third parties of this important notice, including all limitations, restrictions and exclusions of liability. - -## Trademarks -Block.one, EOSIO, EOS, the heptahedron and associated logos and related marks are our trademarks. Other trademarks referenced in Material are the property of their respective owners. - -## Third parties -Any reference in Material to any third party or third-party product, resource or service is not an endorsement or recommendation by Block.one. We are not responsible for, and disclaim any and all responsibility and liability for, your use of or reliance on any of these resources. Third-party resources may be updated, changed or terminated at any time, so information in Material may be out of date or inaccurate. - -## Forward-looking statements -Please note that in making statements expressing Block.one’s vision, we do not guarantee anything, and all aspects of our vision are subject to change at any time and in all respects at Block.one’s sole discretion, with or without notice. We call these “forward-looking statements”, which includes statements on our website and in other Material, other than statements of historical facts, such as statements regarding EOSIO’s development, expected performance, and future features, or our business strategy, plans, prospects, developments and objectives. These statements are only predictions and reflect Block.one’s current beliefs and expectations with respect to future events; they are based on assumptions and are subject to risk, uncertainties and change at any time. - -We operate in a rapidly changing environment and new risks emerge from time to time. Given these risks and uncertainties, you are cautioned not to rely on these forward-looking statements. Actual results, performance or events may differ materially from what is predicted in the forward-looking statements. Some of the factors that could cause actual results, performance or events to differ materially from the forward-looking statements include, without limitation: technical feasibility and barriers; market trends and volatility; continued availability of capital, financing and personnel; product acceptance; the commercial success of any new products or technologies; competition; government regulation and laws; and general economic, market or business conditions. - -All statements are valid only as of the date of first posting and Block.one is under no obligation to, and expressly disclaims any obligation to, update or alter any statements, whether as a result of new information, subsequent events or otherwise. Nothing in any Material constitutes technological, financial, investment, legal or other advice, either in general or with regard to any particular situation or implementation. Please consult with experts in appropriate areas before implementing or utilizing anything contained in Material. diff --git a/README.md b/README.md index 3f07623..eeaaaed 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# EOSIO WASM Spec Tests +# WASM Spec Tests -This repo provides a set of EOSIO unit tests that can be used to check a WASM Backend's conformance to the +This repo provides a set of unit tests that can be used to check a WASM Backend's conformance to the WebAssembly spec. ## Tests @@ -18,7 +18,7 @@ WebAssembly spec. - The imports and apply functions (and any helper functions) from the generated wasm are combined with the test function definitions from the spec test wasm. - Any necessary shifting of type/import/function/call/exports numbers is done. - This is where the generated map from above is used. -6. The newly created merged wasms and unit test C++ files are copied into the appropriate directory in the eos repo. +6. The newly created merged wasms and unit test C++ files are copied into the appropriate directory in the Leap repo. ### How tests are split up @@ -43,7 +43,7 @@ WebAssembly spec. - Unclear how to hand alter this to have memory properly zeroed where expected. - start.7 -- Will fail if not deleted from generated tests. - - Imports "print" from "spectest". Changing to any of the EOSIO print functions results in "start function must be nullary" due to their requiring a parameter. + - Imports "print" from "spectest". Changing to any of the `eosio::print` functions results in "start function must be nullary" due to their requiring a parameter. - globals.2 -- Delete from generated tests or it segfaults due to missing wasm. - `eosio-wasm2wast` error "mutable globals cannot be exported" when converting to wast. @@ -53,21 +53,8 @@ WebAssembly spec. - `wasm2wat` provided by WABT handles this correctly, implying an error in CDT. - globals.14 -- Delete from generated tests or it segfaults due to missing wasm. - Imports "global_i32" from "spectest". - - Unclear what an appropriate substition from EOSIO would be. - - -## Contributing - -[Contributing Guide](./CONTRIBUTING.md) - -[Code of Conduct](./CONTRIBUTING.md#conduct) + - Unclear what an appropriate substition would be. ## License [MIT](./LICENSE) - -## Important - -See [LICENSE](./LICENSE) for copyright and license terms. - -All repositories and other materials are provided subject to the terms of this [IMPORTANT](./IMPORTANT.md) notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources, and forward-looking statements. By accessing any of our repositories and other materials, you accept and agree to the terms of the notice. diff --git a/generator/compile_eosio_tests.py b/generator/compile_tests.py similarity index 85% rename from generator/compile_eosio_tests.py rename to generator/compile_tests.py index ee534fb..3ad8f40 100644 --- a/generator/compile_eosio_tests.py +++ b/generator/compile_tests.py @@ -12,7 +12,7 @@ def main(root, in_file, out_file): intermediate_file = 'intermediate.wasm' res = subprocess.run( - ['eosio-cpp', '-O0', '-c', in_file, '-o', intermediate_file], + ['cdt-cpp', '-O0', '-c', in_file, '-o', intermediate_file], capture_output=True ) if res.returncode > 0: @@ -20,7 +20,7 @@ def main(root, in_file, out_file): raise CompileError(res.stderr) res = subprocess.run( - ['eosio-ld', intermediate_file, '-o', out_file], + ['cdt-ld', intermediate_file, '-o', out_file], capture_output=True ) if res.returncode > 0: diff --git a/generator/generate_eosio_tests.py b/generator/generate_eosio_tests.py index 2e9f3bf..b3be1d7 100644 --- a/generator/generate_eosio_tests.py +++ b/generator/generate_eosio_tests.py @@ -8,7 +8,7 @@ from regexes import DATA_REGEX, EXPORT_REGEX, FUNC_REGEX from test_wasm import TestWASM -from compile_eosio_tests import CompileError +from compile_tests import CompileError def main(generated_wasm_file, test_wasm_file, out_wasm_file, map_file): def read_wasm_file(wasm_file): diff --git a/generator/setup_eosio_tests.py b/generator/setup_eosio_tests.py index 01f5569..2d10287 100644 --- a/generator/setup_eosio_tests.py +++ b/generator/setup_eosio_tests.py @@ -8,9 +8,9 @@ import sys import tempfile -from compile_eosio_tests import CompileError +from compile_tests import CompileError -import compile_eosio_tests +import compile_tests import generate_eosio_tests WASM_DIR = '' @@ -117,7 +117,7 @@ def compile_wasm(): def compile_eosio(f): d, name = f - compile_eosio_tests.main( + compile_tests.main( d, f'{name}.{d}.wasm.cpp', f'{name}.{d}-int.wasm',