Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Commit

Permalink
Merge pull request #449 from EOSIO/merge-release-1.9.1-to-master
Browse files Browse the repository at this point in the history
Version 1.9.1
  • Loading branch information
arhag authored Feb 3, 2020
2 parents 636406b + 39bec1b commit f6578c4
Show file tree
Hide file tree
Showing 27 changed files with 2,422 additions and 199 deletions.
13 changes: 12 additions & 1 deletion .cicd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,21 @@ else
export DOCKER_IMAGE
fi
ARGS=${ARGS:-"--rm -v $(pwd):$MOUNTED_DIR"}
CDT_COMMANDS="apt-get install -y wget && wget -q $CDT_URL -O eosio.cdt.deb && dpkg -i eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/\\\$(ls /usr/opt/eosio.cdt/)/bin:\\\$PATH"
CDT_COMMANDS="dpkg -i $MOUNTED_DIR/eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/\\\$(ls /usr/opt/eosio.cdt/)/bin:\\\$PATH"
PRE_COMMANDS="$CDT_COMMANDS && cd $MOUNTED_DIR/build"
BUILD_COMMANDS="cmake -DBUILD_TESTS=true .. && make -j $JOBS"
COMMANDS="$PRE_COMMANDS && $BUILD_COMMANDS"
# Test CDT binary download to prevent failures due to eosio.cdt pipeline.
INDEX='1'
echo "$ curl -sSf $CDT_URL --output eosio.cdt.deb"
while ! $(curl -sSf $CDT_URL --output eosio.cdt.deb); do
echo "ERROR: Expected CDT binary for commit ${CDT_COMMIT:0:7} from $CDT_VERSION. It does not exist at $CDT_URL!"
printf "There must be a successful build against ${CDT_COMMIT:0:7} \033]1339;url=https://buildkite.com/EOSIO/eosio-dot-cdt/builds?commit=$CDT_COMMIT;content=here\a for this package to exist.\n"
echo "Attempt $INDEX, retry in 60 seconds..."
echo ''
INDEX=$(( $INDEX + 1 ))
sleep 60
done
# retry docker pull to protect against failures due to race conditions with eosio pipeline
INDEX='1'
echo "$ docker pull $DOCKER_IMAGE"
Expand Down
2 changes: 1 addition & 1 deletion .cicd/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
buildkite-agent artifact upload build.tar.gz
agents:
queue: "automation-eks-eos-builder-fleet"
timeout: "${TIMEOUT:-40}"
timeout: "${TIMEOUT:-60}"
skip: "$SKIP_UBUNTU_18"

- wait
Expand Down
6 changes: 5 additions & 1 deletion .cicd/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ if [[ "$BUILDKITE" == 'true' ]]; then
CDT_URL="$(buildkite-agent meta-data get cdt-url)"
CDT_VERSION="$(buildkite-agent meta-data get cdt-version)"
DOCKER_IMAGE="$(buildkite-agent meta-data get docker-image)"
else # Actions
. ./.cicd/helpers/dependency-info.sh
DOCKER_IMAGE=${DOCKER_IMAGE:-eosio/ci-contracts-builder:base-ubuntu-18.04-$EOSIO_COMMIT}
fi
ARGS=${ARGS:-"--rm -v $(pwd):$MOUNTED_DIR"}
CDT_COMMANDS="apt-get install -y wget && wget -q $CDT_URL -O eosio.cdt.deb && dpkg -i eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/$CDT_VERSION/bin:\\\$PATH"
CDT_COMMANDS="dpkg -i $MOUNTED_DIR/eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/$CDT_VERSION/bin:\\\$PATH"
PRE_COMMANDS="$CDT_COMMANDS && cd $MOUNTED_DIR/build/tests"
TEST_COMMANDS="ctest -j $JOBS --output-on-failure -T Test"
COMMANDS="$PRE_COMMANDS && $TEST_COMMANDS"
curl -sSf $CDT_URL --output eosio.cdt.deb
set +e
eval docker run $ARGS $(buildkite-intrinsics) $DOCKER_IMAGE bash -c \"$COMMANDS\"
EXIT_STATUS=$?
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Pull Request
on: [pull_request]

jobs:
start-job:
name: Start Job
runs-on: ubuntu-latest
steps:
- name: Start Job.
run: echo "PR created. Builds will be triggered here for forked PRs or Buildkite for internal PRs."


ubuntu-1804-build:
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
name: Ubuntu 18.04 | Build
runs-on: ubuntu-latest
needs: start-job
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
- name: Build
run: |
./.cicd/build.sh
tar -pczf build.tar.gz build
- name: Upload Build Artifact
uses: actions/upload-artifact@v1
with:
name: ubuntu-1804-build
path: build.tar.gz
ubuntu-1804-parallel-test:
name: Ubuntu 18.04 | Unit Test
runs-on: ubuntu-latest
needs: ubuntu-1804-build
steps:
- name: Checkout
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
with:
submodules: recursive
- name: Download Build Artifact
uses: actions/download-artifact@v1
with:
name: ubuntu-1804-build
- name: Parallel Test
run: |
tar -xzf ubuntu-1804-build/build.tar.gz
./.cicd/test.sh
13 changes: 0 additions & 13 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ project(eosio_contracts)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 9)
set(VERSION_PATCH 0)
set(VERSION_PATCH 1)
#set(VERSION_SUFFIX rc4)

if (VERSION_SUFFIX)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eosio.contracts

## Version : 1.9.0
## Version : 1.9.1

The design of the EOSIO blockchain calls for a number of smart contracts that are run at a privileged permission level in order to support functions such as block producer registration and voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart contracts are referred to as the bios, system, msig, wrap (formerly known as sudo) and token contracts.

Expand All @@ -15,8 +15,8 @@ The following unprivileged contract(s) are also part of the system.
* [eosio.token](./contracts/eosio.token)

Dependencies:
* [eosio.cdt v1.7.x](https://github.com/EOSIO/eosio.cdt/releases/tag/v1.7.0-rc1)
* [eosio v2.0.x](https://github.com/EOSIO/eos/releases/tag/v2.0.0-rc2) (optional dependency only needed to build unit tests)
* [eosio.cdt v1.7.x](https://github.com/EOSIO/eosio.cdt/releases/tag/v1.7.0)
* [eosio v2.0.x](https://github.com/EOSIO/eos/releases/tag/v2.0.1) (optional dependency only needed to build unit tests)

To build the contracts follow the instructions in [`Build and deploy` section](./docs/02_build-and-deploy.md).

Expand Down
66 changes: 17 additions & 49 deletions contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* EOSIO Contracts
*
* @details The design of the EOSIO blockchain calls for a number of smart contracts that are run at a
* The design of the EOSIO blockchain calls for a number of smart contracts that are run at a
* privileged permission level in order to support functions such as block producer registration and
* voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart
* contracts are referred to as the system, token, msig and wrap (formerly known as sudo) contracts.
Expand Down Expand Up @@ -89,9 +89,7 @@ namespace eosiobios {
public:
using contract::contract;
/**
* New account action
*
* @details Called after a new account is created. This code enforces resource-limits rules
* New account action, called after a new account is created. This code enforces resource-limits rules
* for new accounts as well as new account naming conventions.
*
* 1. accounts cannot contain '.' symbols which forces all acccounts to be 12
Expand All @@ -108,9 +106,7 @@ namespace eosiobios {
ignore<authority> owner,
ignore<authority> active){}
/**
* Update authorization action.
*
* @details Updates pemission for an account.
* Update authorization action updates pemission for an account.
*
* @param account - the account for which the permission is updated,
* @param pemission - the permission name which is updated,
Expand All @@ -124,9 +120,7 @@ namespace eosiobios {
ignore<authority> auth ) {}

/**
* Delete authorization action.
*
* @details Deletes the authorization for an account's permision.
* Delete authorization action deletes the authorization for an account's permission.
*
* @param account - the account for which the permission authorization is deleted,
* @param permission - the permission name been deleted.
Expand All @@ -136,9 +130,7 @@ namespace eosiobios {
ignore<name> permission ) {}

/**
* Link authorization action.
*
* @details Assigns a specific action from a contract to a permission you have created. Five system
* Link authorization action assigns a specific action from a contract to a permission you have created. Five system
* actions can not be linked `updateauth`, `deleteauth`, `linkauth`, `unlinkauth`, and `canceldelay`.
* This is useful because when doing authorization checks, the EOSIO based blockchain starts with the
* action needed to be authorized (and the contract belonging to), and looks up which permission
Expand All @@ -159,9 +151,7 @@ namespace eosiobios {
ignore<name> requirement ) {}

/**
* Unlink authorization action.
*
* @details It's doing the reverse of linkauth action, by unlinking the given action.
* Unlink authorization action it's doing the reverse of linkauth action, by unlinking the given action.
*
* @param account - the owner of the permission to be unlinked and the receiver of the freed RAM,
* @param code - the owner of the action to be unlinked,
Expand All @@ -173,9 +163,7 @@ namespace eosiobios {
ignore<name> type ) {}

/**
* Cancel delay action.
*
* @details Cancels a deferred transaction.
* Cancel delay action cancels a deferred transaction.
*
* @param canceling_auth - the permission that authorizes this action,
* @param trx_id - the deferred transaction id to be cancelled.
Expand All @@ -184,9 +172,7 @@ namespace eosiobios {
void canceldelay( ignore<permission_level> canceling_auth, ignore<checksum256> trx_id ) {}

/**
* Set code action.
*
* @details Sets the contract code for an account.
* Set code action sets the contract code for an account.
*
* @param account - the account for which to set the contract code.
* @param vmtype - reserved, set it to zero.
Expand All @@ -199,9 +185,7 @@ namespace eosiobios {
/** @}*/

/**
* Set abi for contract.
*
* @details Set the abi for contract identified by `account` name. Creates an entry in the abi_hash_table
* Set abi action sets the abi for contract identified by `account` name. Creates an entry in the abi_hash_table
* index, with `account` name as key, if it is not already present and sets its value with the abi hash.
* Otherwise it is updating the current abi hash value for the existing `account` key.
*
Expand All @@ -212,9 +196,7 @@ namespace eosiobios {
void setabi( name account, const std::vector<char>& abi );

/**
* On error action.
*
* @details Notification of this action is delivered to the sender of a deferred transaction
* On error action, notification of this action is delivered to the sender of a deferred transaction
* when an objective error occurs while executing the deferred transaction.
* This action is not meant to be called directly.
*
Expand All @@ -225,19 +207,15 @@ namespace eosiobios {
void onerror( ignore<uint128_t> sender_id, ignore<std::vector<char>> sent_trx );

/**
* Set privilege status for an account.
*
* @details Allows to set privilege status for an account (turn it on/off).
* Set privilege action allows to set privilege status for an account (turn it on/off).
* @param account - the account to set the privileged status for.
* @param is_priv - 0 for false, > 0 for true.
*/
[[eosio::action]]
void setpriv( name account, uint8_t is_priv );

/**
* Set the resource limits of an account
*
* @details Set the resource limits of an account
* Sets the resource limits of an account
*
* @param account - name of the account whose resource limit to be set
* @param ram_bytes - ram limit in absolute bytes
Expand All @@ -248,9 +226,7 @@ namespace eosiobios {
void setalimits( name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );

/**
* Set a new list of active producers, that is, a new producers' schedule.
*
* @details Set a new list of active producers, by proposing a schedule change, once the block that
* Set producers action, sets a new list of active producers, by proposing a schedule change, once the block that
* contains the proposal becomes irreversible, the schedule is promoted to "pending"
* automatically. Once the block that promotes the schedule is irreversible, the schedule will
* become "active".
Expand All @@ -261,19 +237,15 @@ namespace eosiobios {
void setprods( const std::vector<eosio::producer_authority>& schedule );

/**
* Set the blockchain parameters
*
* @details Set the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
* Set params action, sets the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
*
* @param params - New blockchain parameters to set
*/
[[eosio::action]]
void setparams( const eosio::blockchain_parameters& params );

/**
* Check if an account has authorization to access current action.
*
* @details Checks if the account name `from` passed in as param has authorization to access
* Require authorization action, checks if the account name `from` passed in as param has authorization to access
* current action, that is, if it is listed in the action’s allowed permissions vector.
*
* @param from - the account name to authorize
Expand All @@ -282,19 +254,15 @@ namespace eosiobios {
void reqauth( name from );

/**
* Activates a protocol feature.
*
* @details Activates a protocol feature
* Activate action, activates a protocol feature
*
* @param feature_digest - hash of the protocol feature to activate.
*/
[[eosio::action]]
void activate( const eosio::checksum256& feature_digest );

/**
* Asserts that a protocol feature has been activated.
*
* @details Asserts that a protocol feature has been activated
* Require activated action, asserts that a protocol feature has been activated
*
* @param feature_digest - hash of the protocol feature to check for activation.
*/
Expand Down
26 changes: 6 additions & 20 deletions contracts/eosio.msig/include/eosio.msig/eosio.msig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ namespace eosio {
using contract::contract;

/**
* Create proposal
*
* @details Creates a proposal containing one transaction.
* Propose action, creates a proposal containing one transaction.
* Allows an account `proposer` to make a proposal `proposal_name` which has `requested`
* permission levels expected to approve the proposal, and if approved by all expected
* permission levels then `trx` transaction can we executed by this proposal.
Expand All @@ -39,10 +37,7 @@ namespace eosio {
void propose(ignore<name> proposer, ignore<name> proposal_name,
ignore<std::vector<permission_level>> requested, ignore<transaction> trx);
/**
* Approve proposal
*
* @details Approves an existing proposal
* Allows an account, the owner of `level` permission, to approve a proposal `proposal_name`
* Approve action approves an existing proposal. Allows an account, the owner of `level` permission, to approve a proposal `proposal_name`
* proposed by `proposer`. If the proposal's requested approval list contains the `level`
* permission then the `level` permission is moved from internal `requested_approvals` list to
* internal `provided_approvals` list of the proposal, thus persisting the approval for
Expand All @@ -57,10 +52,7 @@ namespace eosio {
void approve( name proposer, name proposal_name, permission_level level,
const eosio::binary_extension<eosio::checksum256>& proposal_hash );
/**
* Revoke proposal
*
* @details Revokes an existing proposal
* This action is the reverse of the `approve` action: if all validations pass
* Unapprove action revokes an existing proposal. This action is the reverse of the `approve` action: if all validations pass
* the `level` permission is erased from internal `provided_approvals` and added to the internal
* `requested_approvals` list, and thus un-approve or revoke the proposal.
*
Expand All @@ -71,9 +63,7 @@ namespace eosio {
[[eosio::action]]
void unapprove( name proposer, name proposal_name, permission_level level );
/**
* Cancel proposal
*
* @details Cancels an existing proposal
* Cancel action cancels an existing proposal.
*
* @param proposer - The account proposing a transaction
* @param proposal_name - The name of the proposal (should be an existing proposal)
Expand All @@ -86,9 +76,7 @@ namespace eosio {
[[eosio::action]]
void cancel( name proposer, name proposal_name, name canceler );
/**
* Execute proposal
*
* @details Allows an `executer` account to execute a proposal.
* Exec action allows an `executer` account to execute a proposal.
*
* Preconditions:
* - `executer` has authorization,
Expand All @@ -107,9 +95,7 @@ namespace eosio {
[[eosio::action]]
void exec( name proposer, name proposal_name, name executer );
/**
* Invalidate proposal
*
* @details Allows an `account` to invalidate itself, that is, its name is added to
* Invalidate action allows an `account` to invalidate itself, that is, its name is added to
* the invalidations table and this table will be cross referenced when exec is performed.
*
* @param account - The account invalidating the transaction
Expand Down
Loading

0 comments on commit f6578c4

Please sign in to comment.