This repository has been archived by the owner on Apr 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Merge staging into master #139
Open
altonen
wants to merge
55
commits into
master
Choose a base branch
from
staging
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a compilation-time feature to shorten the block interval to 3 seconds. Intended mainly for testing. Use the `--features short-block-time` switch to Cargo to enable.
runtime: Cargo feature to make block production faster and fix functional tests
Refactor staking-related queries to separate file
These tests take too long in debug mode, so decrease the number of randomly generated inputs by factor of 16, which gives us 16 tests run by default. This should be enough to cover all the interesting code paths most of the time.
Instead of allowing the smart contract caller to define the AccountId of the contract, fetch the value from the ChainExtension's runtime memory. This allows the programmable pool to force the smart contract to only spend its own funds.
When PP is constructing the final TX that spends the smart contract's funds, save the outpoint hashes of the vins to a separate storage. This indicates to the local node that the smart contract has spent its funds and when it receives a TX trying to spend CallPPs of a given smart contract, the outpoint hashes in the witness field can be queried from this storage and if they are found, the TX is valid (or at least the local node agrees with the TX and accepts it).
This allows the test framework to query UTXOs of the smart contract.
Prevent a contract from calling itself through the ChainExtension as the smart contract already has capabilities of calling its own functions even without the existence of the ChainExtension, makes it harder to handle contract balances correctly and makes it very easy for the user to shoot themselves in the foot by accidentally calling the function that called into the ChainExtension, effectively resulting in infite recursion (bounded by the amount of gas, obviously). If this is found to be needed, the issue can be revisited.
If the UTXO transfer from contract to P2PK or contract succeeds, zero the balance of the smart contract as the contract no longer holds any funds.
Implement functional tests for PP and create assets directory which contains all smart contract related files
Programmable pool functional tests
Make unlock_and_withdraw test deterministic
Add Dockerfile for mintlayer-core
Updated docs for node start-up, tokens, and transactions
staking functional tests: expect exception on testing failed transactions
Roy/docs b
Disable programmable pools
altonen
requested review from
erubboli,
iljakuklic,
muursh,
TheQuantumPhysicist and
zorvan
as code owners
November 29, 2021 10:15
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.