-
Notifications
You must be signed in to change notification settings - Fork 102
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/modular inverse #1238
Feat/modular inverse #1238
Conversation
Hi! We appreciate the PR and the new contribution to Pact. That said, we have a process for feature requests like this. Please open a KIP first at https://github.com/kadena-io/kips for us to proceed with this PR. Logistics aside, this PR also needs a lot more gas analysis than simply charging 13 gas for the native and calling it a day, particularly because the input modulus and the input integer are arbitrarily large. For now, I think it would be fine to leave it open (Though preferably, draft it), but please proceed with a KIP first. |
Hi @jmcardon thanks for the comments. I submitted the PR here after talking to the grant's team about this milestone, wasn't aware of the KIP procedure, sorry for that. I am going to draft a document and submit it to the KIP repo. Before I send this to draft, can I just get some input on the gas testing best practices /requirements? I couldn't find any contribution guides for the repo so we just replicated what was found in some previously approved PRs that added Pact builtins (more specifically this). Here is the procedure we followed to determine the gas quantity and test it:
Are there any extra steps that we missed in the gas testing procedure? Or should we just try to simulate larger numbers? Are there any exemples of proper tests that you can point me to? |
Absolutely no worries here. We're internally migrating to a more community-oriented approach, so this fact isn't written down anyway, but we are steering any additional natives, including our own additions, to be proposed through the KIP process. As far as Gas testing goes, I defer to Jose 😄 |
@veigajoao Your gas testing looks correct to me. The next step would be to generate many valid inputs to your |
PR checklist:
cabal run tests
. If they pass locally, docs are generated.pact -t
), make sure pact-lsp is in sync.Additionally, please justify why you should or should not do the following:
No need, no functionalities were changed, just added and entire previous test suite runs smoothly