Skip to content

PoC Polkadot Conformance Tests#1956

Merged
Noc2 merged 5 commits intow3f:masterfrom
ainhoa-a:master
Sep 14, 2023
Merged

PoC Polkadot Conformance Tests#1956
Noc2 merged 5 commits intow3f:masterfrom
ainhoa-a:master

Conversation

@ainhoa-a
Copy link
Copy Markdown
Contributor

@ainhoa-a ainhoa-a commented Sep 6, 2023

Project Abstract

Our objective is to develop a proof of concept for a test suite that can be executed across various host implementations and executors.

Grant level

  • Level 1: Up to $10,000, 2 approvals
  • Level 2: Up to $30,000, 3 approvals
  • Level 3: Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied and aptly renamed (project_name.md).
  • I have read the application guidelines.
  • Payment details have been provided (bank details via email or BTC, Ethereum (USDC/DAI) or Polkadot/Kusama (USDT) address in the application).
  • The software delivered for this grant will be released under an open-source license specified in the application.
  • The initial PR contains only one commit (squash and force-push if needed).
  • The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
  • I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @ainhoa_a:matrix.org (change the homeserver if you use a different one)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Sep 6, 2023

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@ainhoa-a
Copy link
Copy Markdown
Contributor Author

ainhoa-a commented Sep 6, 2023

I have read and hereby sign the Contributor License Agreement.

removed URL to PR from previous grant
Correct level format
Copy link
Copy Markdown
Contributor

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the application. Are you aware of the following grant application: #1950? Potentially both teams could work together on the project or at least on separate tasks initially. Do you also want to use Zombienet for the PoC Tests? We could potentially put you in touch with the Zombienet team.

@Noc2 Noc2 added the changes requested The team needs to clarify a few things first. label Sep 7, 2023
@Noc2 Noc2 self-assigned this Sep 7, 2023
@Noc2 Noc2 requested a review from bhargavbh September 7, 2023 07:09
| 0e. | Article | We will publish an article explaining the research, design decisions and proof of concept |
| 1. | PoC code| General structure |
| 2a. | Code| PoC Tests: Host API: cryptography primitives |
| 2b. | Code| PoC Tests: Trie proof verification |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please elaborate on the test fixtures and how you decide the abstraction level for the interfaces so that the tests can be integrated with multiple hosts implementations?

| 1. | PoC code| General structure |
| 2a. | Code| PoC Tests: Host API: cryptography primitives |
| 2b. | Code| PoC Tests: Trie proof verification |
| 2c. | Code| PoC Tests: Scale encoding and decoding |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

there is already comprehensive tests available for SCALE codec here, which could be integrated in your testing framework to convince the feasibility of the architecture.

@jleni
Copy link
Copy Markdown
Contributor

jleni commented Sep 8, 2023

Thanks a lot for the application. Are you aware of the following grant application: #1950? Potentially both teams could work together on the project or at least on separate tasks initially. Do you also want to use Zombienet for the PoC Tests? We could potentially put you in touch with the Zombienet team.

Given that our primary objective is that of aligning with specifications, our initial focus is on Conformance Testing at the individual node level. Additionally, Integration testing plays a pivotal role, ensuring that interactions and compatibility within system components are seamless.

Zombienet is more adequate system tests or detailed network simulations that involve multiple nodes, and its introduction at this point results in some problems/challenges:

  • Noise: Introducing a full chain with various nodes increases the variables in play. This heightened complexity can hinder our efforts to isolate specific issues or confirm the conformance of individual nodes.

  • State Management: Achieving the precise state needed for effective testing becomes more challenging within Zombienet’s multi-node framework.
    Precision: Although natural language can be intuitive, some specifications are deeply technical. Our concern is that Zombienet might lack the expressiveness required to evaluate such nuanced conformance, especially when identifying spec gaps or areas that are underspecified.

Zombienet will undoubtedly be of great value in subsequent testing phases. However, our immediate priority is targeted and meticulous testing, ensuring the resilience of each node independently and laying a firm foundation for broader evaluations later on.

We definitely want to use Zombienet but we don't find it adequate in this early phase.

With respect to @bhargavbh questions:

Could you please elaborate on the test fixtures and how you decide the abstraction level for the interfaces so that the tests can be integrated with multiple hosts implementations?

Each node implementation consists of distinct components, each specified individually. Beyond just exposing interfaces, it's crucial to have adequate introspection and instrumentation for these components.

Our focus on elements such as Host API, trie proof, and scale codes is due to their varied levels of exposure. While it's essential to verify each group of specs, we aim to do so without exposing bare all implementation specifics. Therefore, we plan to prepare adapters tailored for each subset of components. These adapters will adhere to a future SpecVerificationAPI, ensuring each component is instrumented tested appropriately.

there is already comprehensive tests available for SCALE codec here, which could be integrated in your testing framework to convince the feasibility of the architecture.

While we plan to use these tests as a reference, they are unit tests that are being much tied to the code itself. In many cases, they depend on implementation details that are not part of the specs that we intend to confirm. We initially don't think that this specific source code can be directly repurposed to test other implementations.

Copy link
Copy Markdown
Contributor

@Noc2 Noc2 left a comment

Choose a reason for hiding this comment

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

Thanks for the quick reply. I'm happy to go ahead with it and share it with the rest of the team. Also based on my previous experience with your team. Apart from this, you might want to take a look polkafuzz which could be useful here. And it would be nice if you also contribute to the spec, in case you discover any issues.

@Noc2 Noc2 added ready for review The project is ready to be reviewed by the committee members. and removed changes requested The team needs to clarify a few things first. labels Sep 13, 2023
Copy link
Copy Markdown
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

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

Thanks @ainhoa-a it sounds like you have a firm vision for this, and based on your team's reputation I'm also happy to go ahead with it.

Copy link
Copy Markdown

@SBalaguer SBalaguer left a comment

Choose a reason for hiding this comment

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

I'm happy to proceed with this as well. Having a comprehensive set of different host implementations tested across to ensure same functionality makes sense. Looking forward to see how this PoC develops.

@Noc2 Noc2 merged commit eab3945 into w3f:master Sep 14, 2023
@github-actions
Copy link
Copy Markdown
Contributor

Congratulations and welcome to the Web3 Foundation Grants Program! Please refer to our Milestone Delivery repository for instructions on how to submit milestones and invoices, our FAQ for frequently asked questions and the support section of our README for more ways to find answers to your questions.

Before you start, take a moment to read through our announcement guidelines for all communications related to the grant or make them known to the right person in your organisation. In particular, please don't announce the grant publicly before at least the first milestone of your project has been approved. At that point or shortly before, you can get in touch with us at grantsPR@web3.foundation and we'll be happy to collaborate on an announcement about the work you’re doing.

Lastly, please remember to let us know in case you run into any delays or deviate from the deliverables in your application. You can either leave a comment here or directly request to amend your application via PR. We wish you luck with your project! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review The project is ready to be reviewed by the committee members.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants