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

Commit f6578c4

Browse files
authored
Merge pull request #449 from EOSIO/merge-release-1.9.1-to-master
Version 1.9.1
2 parents 636406b + 39bec1b commit f6578c4

File tree

27 files changed

+2422
-199
lines changed

27 files changed

+2422
-199
lines changed

.cicd/build.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,21 @@ else
1515
export DOCKER_IMAGE
1616
fi
1717
ARGS=${ARGS:-"--rm -v $(pwd):$MOUNTED_DIR"}
18-
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"
18+
CDT_COMMANDS="dpkg -i $MOUNTED_DIR/eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/\\\$(ls /usr/opt/eosio.cdt/)/bin:\\\$PATH"
1919
PRE_COMMANDS="$CDT_COMMANDS && cd $MOUNTED_DIR/build"
2020
BUILD_COMMANDS="cmake -DBUILD_TESTS=true .. && make -j $JOBS"
2121
COMMANDS="$PRE_COMMANDS && $BUILD_COMMANDS"
22+
# Test CDT binary download to prevent failures due to eosio.cdt pipeline.
23+
INDEX='1'
24+
echo "$ curl -sSf $CDT_URL --output eosio.cdt.deb"
25+
while ! $(curl -sSf $CDT_URL --output eosio.cdt.deb); do
26+
echo "ERROR: Expected CDT binary for commit ${CDT_COMMIT:0:7} from $CDT_VERSION. It does not exist at $CDT_URL!"
27+
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"
28+
echo "Attempt $INDEX, retry in 60 seconds..."
29+
echo ''
30+
INDEX=$(( $INDEX + 1 ))
31+
sleep 60
32+
done
2233
# retry docker pull to protect against failures due to race conditions with eosio pipeline
2334
INDEX='1'
2435
echo "$ docker pull $DOCKER_IMAGE"

.cicd/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ steps:
88
buildkite-agent artifact upload build.tar.gz
99
agents:
1010
queue: "automation-eks-eos-builder-fleet"
11-
timeout: "${TIMEOUT:-40}"
11+
timeout: "${TIMEOUT:-60}"
1212
skip: "$SKIP_UBUNTU_18"
1313

1414
- wait

.cicd/test.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ if [[ "$BUILDKITE" == 'true' ]]; then
77
CDT_URL="$(buildkite-agent meta-data get cdt-url)"
88
CDT_VERSION="$(buildkite-agent meta-data get cdt-version)"
99
DOCKER_IMAGE="$(buildkite-agent meta-data get docker-image)"
10+
else # Actions
11+
. ./.cicd/helpers/dependency-info.sh
12+
DOCKER_IMAGE=${DOCKER_IMAGE:-eosio/ci-contracts-builder:base-ubuntu-18.04-$EOSIO_COMMIT}
1013
fi
1114
ARGS=${ARGS:-"--rm -v $(pwd):$MOUNTED_DIR"}
12-
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"
15+
CDT_COMMANDS="dpkg -i $MOUNTED_DIR/eosio.cdt.deb && export PATH=/usr/opt/eosio.cdt/$CDT_VERSION/bin:\\\$PATH"
1316
PRE_COMMANDS="$CDT_COMMANDS && cd $MOUNTED_DIR/build/tests"
1417
TEST_COMMANDS="ctest -j $JOBS --output-on-failure -T Test"
1518
COMMANDS="$PRE_COMMANDS && $TEST_COMMANDS"
19+
curl -sSf $CDT_URL --output eosio.cdt.deb
1620
set +e
1721
eval docker run $ARGS $(buildkite-intrinsics) $DOCKER_IMAGE bash -c \"$COMMANDS\"
1822
EXIT_STATUS=$?

.github/workflows/main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Pull Request
2+
on: [pull_request]
3+
4+
jobs:
5+
start-job:
6+
name: Start Job
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Start Job.
10+
run: echo "PR created. Builds will be triggered here for forked PRs or Buildkite for internal PRs."
11+
12+
13+
ubuntu-1804-build:
14+
if: github.event.pull_request.base.repo.id != github.event.pull_request.head.repo.id
15+
name: Ubuntu 18.04 | Build
16+
runs-on: ubuntu-latest
17+
needs: start-job
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
21+
with:
22+
submodules: recursive
23+
- name: Build
24+
run: |
25+
./.cicd/build.sh
26+
tar -pczf build.tar.gz build
27+
- name: Upload Build Artifact
28+
uses: actions/upload-artifact@v1
29+
with:
30+
name: ubuntu-1804-build
31+
path: build.tar.gz
32+
ubuntu-1804-parallel-test:
33+
name: Ubuntu 18.04 | Unit Test
34+
runs-on: ubuntu-latest
35+
needs: ubuntu-1804-build
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@50fbc622fc4ef5163becd7fab6573eac35f8462e
39+
with:
40+
submodules: recursive
41+
- name: Download Build Artifact
42+
uses: actions/download-artifact@v1
43+
with:
44+
name: ubuntu-1804-build
45+
- name: Parallel Test
46+
run: |
47+
tar -xzf ubuntu-1804-build/build.tar.gz
48+
./.cicd/test.sh

.travis.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(eosio_contracts)
44

55
set(VERSION_MAJOR 1)
66
set(VERSION_MINOR 9)
7-
set(VERSION_PATCH 0)
7+
set(VERSION_PATCH 1)
88
#set(VERSION_SUFFIX rc4)
99

1010
if (VERSION_SUFFIX)

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# eosio.contracts
22

3-
## Version : 1.9.0
3+
## Version : 1.9.1
44

55
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.
66

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

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

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

contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp

Lines changed: 17 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* EOSIO Contracts
1212
*
13-
* @details The design of the EOSIO blockchain calls for a number of smart contracts that are run at a
13+
* The design of the EOSIO blockchain calls for a number of smart contracts that are run at a
1414
* privileged permission level in order to support functions such as block producer registration and
1515
* voting, token staking for CPU and network bandwidth, RAM purchasing, multi-sig, etc. These smart
1616
* contracts are referred to as the system, token, msig and wrap (formerly known as sudo) contracts.
@@ -89,9 +89,7 @@ namespace eosiobios {
8989
public:
9090
using contract::contract;
9191
/**
92-
* New account action
93-
*
94-
* @details Called after a new account is created. This code enforces resource-limits rules
92+
* New account action, called after a new account is created. This code enforces resource-limits rules
9593
* for new accounts as well as new account naming conventions.
9694
*
9795
* 1. accounts cannot contain '.' symbols which forces all acccounts to be 12
@@ -108,9 +106,7 @@ namespace eosiobios {
108106
ignore<authority> owner,
109107
ignore<authority> active){}
110108
/**
111-
* Update authorization action.
112-
*
113-
* @details Updates pemission for an account.
109+
* Update authorization action updates pemission for an account.
114110
*
115111
* @param account - the account for which the permission is updated,
116112
* @param pemission - the permission name which is updated,
@@ -124,9 +120,7 @@ namespace eosiobios {
124120
ignore<authority> auth ) {}
125121

126122
/**
127-
* Delete authorization action.
128-
*
129-
* @details Deletes the authorization for an account's permision.
123+
* Delete authorization action deletes the authorization for an account's permission.
130124
*
131125
* @param account - the account for which the permission authorization is deleted,
132126
* @param permission - the permission name been deleted.
@@ -136,9 +130,7 @@ namespace eosiobios {
136130
ignore<name> permission ) {}
137131

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

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

175165
/**
176-
* Cancel delay action.
177-
*
178-
* @details Cancels a deferred transaction.
166+
* Cancel delay action cancels a deferred transaction.
179167
*
180168
* @param canceling_auth - the permission that authorizes this action,
181169
* @param trx_id - the deferred transaction id to be cancelled.
@@ -184,9 +172,7 @@ namespace eosiobios {
184172
void canceldelay( ignore<permission_level> canceling_auth, ignore<checksum256> trx_id ) {}
185173

186174
/**
187-
* Set code action.
188-
*
189-
* @details Sets the contract code for an account.
175+
* Set code action sets the contract code for an account.
190176
*
191177
* @param account - the account for which to set the contract code.
192178
* @param vmtype - reserved, set it to zero.
@@ -199,9 +185,7 @@ namespace eosiobios {
199185
/** @}*/
200186

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

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

227209
/**
228-
* Set privilege status for an account.
229-
*
230-
* @details Allows to set privilege status for an account (turn it on/off).
210+
* Set privilege action allows to set privilege status for an account (turn it on/off).
231211
* @param account - the account to set the privileged status for.
232212
* @param is_priv - 0 for false, > 0 for true.
233213
*/
234214
[[eosio::action]]
235215
void setpriv( name account, uint8_t is_priv );
236216

237217
/**
238-
* Set the resource limits of an account
239-
*
240-
* @details Set the resource limits of an account
218+
* Sets the resource limits of an account
241219
*
242220
* @param account - name of the account whose resource limit to be set
243221
* @param ram_bytes - ram limit in absolute bytes
@@ -248,9 +226,7 @@ namespace eosiobios {
248226
void setalimits( name account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight );
249227

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

263239
/**
264-
* Set the blockchain parameters
265-
*
266-
* @details Set the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
240+
* Set params action, sets the blockchain parameters. By tuning these parameters, various degrees of customization can be achieved.
267241
*
268242
* @param params - New blockchain parameters to set
269243
*/
270244
[[eosio::action]]
271245
void setparams( const eosio::blockchain_parameters& params );
272246

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

284256
/**
285-
* Activates a protocol feature.
286-
*
287-
* @details Activates a protocol feature
257+
* Activate action, activates a protocol feature
288258
*
289259
* @param feature_digest - hash of the protocol feature to activate.
290260
*/
291261
[[eosio::action]]
292262
void activate( const eosio::checksum256& feature_digest );
293263

294264
/**
295-
* Asserts that a protocol feature has been activated.
296-
*
297-
* @details Asserts that a protocol feature has been activated
265+
* Require activated action, asserts that a protocol feature has been activated
298266
*
299267
* @param feature_digest - hash of the protocol feature to check for activation.
300268
*/

contracts/eosio.msig/include/eosio.msig/eosio.msig.hpp

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ namespace eosio {
1818
using contract::contract;
1919

2020
/**
21-
* Create proposal
22-
*
23-
* @details Creates a proposal containing one transaction.
21+
* Propose action, creates a proposal containing one transaction.
2422
* Allows an account `proposer` to make a proposal `proposal_name` which has `requested`
2523
* permission levels expected to approve the proposal, and if approved by all expected
2624
* permission levels then `trx` transaction can we executed by this proposal.
@@ -39,10 +37,7 @@ namespace eosio {
3937
void propose(ignore<name> proposer, ignore<name> proposal_name,
4038
ignore<std::vector<permission_level>> requested, ignore<transaction> trx);
4139
/**
42-
* Approve proposal
43-
*
44-
* @details Approves an existing proposal
45-
* Allows an account, the owner of `level` permission, to approve a proposal `proposal_name`
40+
* Approve action approves an existing proposal. Allows an account, the owner of `level` permission, to approve a proposal `proposal_name`
4641
* proposed by `proposer`. If the proposal's requested approval list contains the `level`
4742
* permission then the `level` permission is moved from internal `requested_approvals` list to
4843
* internal `provided_approvals` list of the proposal, thus persisting the approval for
@@ -57,10 +52,7 @@ namespace eosio {
5752
void approve( name proposer, name proposal_name, permission_level level,
5853
const eosio::binary_extension<eosio::checksum256>& proposal_hash );
5954
/**
60-
* Revoke proposal
61-
*
62-
* @details Revokes an existing proposal
63-
* This action is the reverse of the `approve` action: if all validations pass
55+
* Unapprove action revokes an existing proposal. This action is the reverse of the `approve` action: if all validations pass
6456
* the `level` permission is erased from internal `provided_approvals` and added to the internal
6557
* `requested_approvals` list, and thus un-approve or revoke the proposal.
6658
*
@@ -71,9 +63,7 @@ namespace eosio {
7163
[[eosio::action]]
7264
void unapprove( name proposer, name proposal_name, permission_level level );
7365
/**
74-
* Cancel proposal
75-
*
76-
* @details Cancels an existing proposal
66+
* Cancel action cancels an existing proposal.
7767
*
7868
* @param proposer - The account proposing a transaction
7969
* @param proposal_name - The name of the proposal (should be an existing proposal)
@@ -86,9 +76,7 @@ namespace eosio {
8676
[[eosio::action]]
8777
void cancel( name proposer, name proposal_name, name canceler );
8878
/**
89-
* Execute proposal
90-
*
91-
* @details Allows an `executer` account to execute a proposal.
79+
* Exec action allows an `executer` account to execute a proposal.
9280
*
9381
* Preconditions:
9482
* - `executer` has authorization,
@@ -107,9 +95,7 @@ namespace eosio {
10795
[[eosio::action]]
10896
void exec( name proposer, name proposal_name, name executer );
10997
/**
110-
* Invalidate proposal
111-
*
112-
* @details Allows an `account` to invalidate itself, that is, its name is added to
98+
* Invalidate action allows an `account` to invalidate itself, that is, its name is added to
11399
* the invalidations table and this table will be cross referenced when exec is performed.
114100
*
115101
* @param account - The account invalidating the transaction

0 commit comments

Comments
 (0)