-
Notifications
You must be signed in to change notification settings - Fork 2.4k
TxSim: Transaction Simulator and Risk Detector for Polkadot #2575
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
base: master
Are you sure you want to change the base?
Conversation
I have read and hereby sign the Contributor License Agreement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @EmmanuelEklipse the PR correctly reflects a level 3 grant, but the application notes a level 2 grant. Can you update this on the application itself?
@keeganquigley Thanks for pointing it out. I have corrected it |
Thanks @EmmanuelEklipse we usually only allow one grant application to be open at a time per grantee. Would you prefer to keep this one open and close #2563 since it hasn't garnered enough approvals? |
@keeganquigley Yes, please. |
Thanks @EmmanuelEklipse I will mark as ready for review and ping the rest of the committee for comment. In the meantime, one more question: Would you be willing to support upcoming PVM (Asset Hub) as well as EVM and WASM? Please see this forum post regarding the latest news there. |
@keeganquigley Much appreciated. Yes, we’re absolutely willing to support the upcoming PVM developments on Asset Hub — including both the WASM-based PolkaVM and the potential EVM-compatible stack. TxSim will be built with a modular architecture, and we’ve already accounted for multi-VM support (EVM via Moonbeam, WASM via Astar, and PVM via Asset Hub). This makes it straightforward for us to extend compatibility to Polkadot Hub's evolving smart contract layers without requiring additional funding, it can be delivered as a natural extension within our current technical framework. We’re actively tracking the roadmap around PolkaVM, Solidity support, and EVM compatibility on the Hub. TxSim’s simulation and detection logic is designed to adapt to such changes, and we’re committed to ensuring it remains aligned with the most widely used execution environments in the Polkadot ecosystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @EmmanuelEklipse yes I know PVM on Asset Hub is still a ways off, and there are of course the ongoing compatibility issues as well, but we expect many of these to be resolved eventually. To make one correction though, PVM is actually RISC-V based, not WASM based. Maybe you could add some language about potentially supporting PVM in the contract, and note if you foresee any challenges regarding this.
@keeganquigley Thanks for the clarification. Just updated the proposal to reflect the planned phased support for the RISC-V–based PVM, including the challenges and our modular approach. Please let me know if you have further feedback. |
Hi @keeganquigley any update on this? |
Hi @EmmanuelEklipse it seems like so far it hasn't been able to garner enough approvals. in my opinion I think it's a bit expensive for mainly a tx simulator. It might be hard to get 5 approvals for this. Would you perhaps be willing to lower it to a $30k level 2 PoC, even if its just for one milestone? Maybe you could hold off on the risk detection module until a future M2. Then you would only need 3 approvals and would give us a chance to see the simulator in action before spending more money on it. |
@keeganquigley Thanks for the feedback! I've updated the budget to $28K and revised the milestones accordingly. Let me know what you think or if you'd like to see any other adjustments. |
There was a problem hiding this 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. It seems like you only focus on EVM as part of this grant. How are you planning to compete with established teams like https://www.hypernative.io/ that at this point also have a brand name and are used by various projects.
Thanks for the question @N0C2! While Milestone 1 focuses on Moonbeam’s EVM compatibility for speed of delivery, TxSim is designed as a multi-VM simulation framework, meaning from the start it will support WASM-based contracts on Astar and runtime calls on Asset Hub (PVM) as the tooling matures. This is one of our main differentiators from Hypernative, which is EVM-focused. Our competitive advantages are:
Our aim is not to replicate Hypernative’s EVM-only solution, but to fill the gap for Polkadot’s diverse execution environments and give users safer transaction previews across Moonbeam, Astar, and Asset Hub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this clearer as part of the milestone/deliverables or integrate something already regarding compatibility with pallets/wasm?
@N0C2 Thanks for the suggestion. We've updated the milestones to make the WASM and pallet compatibility explicit. TxSim is being built as a multi-VM simulation framework, so Milestone 1 will support Moonbeam (EVM) and Astar (WASM) from the start, with the architecture ready for Substrate pallet/runtime extrinsic simulation (e.g., Asset Hub). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx @EmmanuelEklipse for the changes, I'm now happy to approve it. While waiting for other reviews feel free to start the KYB verification process for the Build Union entity. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops sorry wrong account. Here is link to verification process
Thanks @quigl1kd @keeganquigley for reviewing and approving the updates! 🙏 I’ll get started on the KYB verification process while we wait for the final approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments. Thanks for the application.
Co-authored-by: Piet Wolff <[email protected]>
c616c96
@PieWol Done. Please check. I’m in the process of verifying the KYB and should have it all sorted by next tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-approving
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few more comments. Looking forward to your feedback.
| 0b. | Documentation | We will provide both inline documentation and a user guide explaining how to run the simulation engine, estimate fees, and interpret outputs. | | ||
| 0c. | Testing and Guide | Core functions will be covered by unit tests (≥80% coverage). We will include a guide to run and validate them. | | ||
| 0d. | Docker | A Dockerfile will be provided for quick testing and deployment of the simulation engine. | | ||
| 1. | Simulation Engine | Initial transaction simulation engine targeting Moonbeam (EVM) and Astar (WASM) networks, with an architecture designed for future compatibility with Substrate pallets and runtime calls (e.g., Asset Hub PVM). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more appropriate to not specify Astar in the deliverable, since they just use pallet-contracts
which is simply a pallet and well defines what we are talking about. Let me know what you think. This would also be more interesting, since it'll allow simulation of all ink! contracts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @PieWol Astar was just used as an example. This depends on pallet-contracts
, so the scope naturally extends to any chain supporting ink! contracts.
| 0c. | Testing and Guide | ≥90% test coverage with an expanded test suite to handle edge cases. | | ||
| 0d. | Docker | Updated Dockerfile for the enhanced version of the simulation engine. | | ||
| 1. | Fee Optimization | Advanced logic to recommend optimal transaction parameters (e.g., gas limits, max fees) based on simulation data. | | ||
| 2. | Performance Tuning | Enhancements in simulation speed and accuracy for an improved development experience. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these enhancements? Sounds very unspecific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I can clarify the “Performance Tuning” deliverable. It refers to
Reducing average simulation runtime, aiming for ≥30% compared to the M1 baseline
Improving fee estimation accuracy to within ±5% deviation on benchmark test cases
With M2, our main goal is to add advanced functionality and improve usability and integration.
| 0b. | Documentation | Updated documentation to reflect new features and enhancements. | | ||
| 0c. | Testing and Guide | ≥90% test coverage with an expanded test suite to handle edge cases. | | ||
| 0d. | Docker | Updated Dockerfile for the enhanced version of the simulation engine. | | ||
| 1. | Fee Optimization | Advanced logic to recommend optimal transaction parameters (e.g., gas limits, max fees) based on simulation data. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How can developers test their contracts with your tool, without already having them deployed on-chain somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great question on contract testing. Developers will be able to test their contracts before deploying them on-chain. The simulator will accept the compiled contract artifacts (bytecode + ABI for EVM, Wasm + metadata for ink!) and run them in a local execution environment. This will be verified with sample contracts from both ecosystems to demonstrate that pre-deployment testing works as expected. Deployed contracts will also be supported, but pre-deployment validation is a key use case we will enable.
Project Abstract
Grant level
Application Checklist
project_name.md
).@_______:matrix.org
(change the homeserver if you use a different one)