Skip to content
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

Merge Savanna Contract Updates into EOS #156

Merged
merged 296 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
296 commits
Select commit Hold shift + click to select a range
76197b4
Merge pull request #17 from AntelopeIO/unkown_misspell
spoonincode Jun 8, 2023
65783cb
rm deferred trx
ericpassmore Sep 22, 2023
a199ba0
Merge pull request #29 from AntelopeIO/ehp/GH-28-rm-deferred-from-system
ericpassmore Sep 22, 2023
e41ae0e
bump main to v3.3.0-dev
ericpassmore Sep 30, 2023
37e4b25
add setfinalizer to eosio.bios
linh2931 Dec 11, 2023
6eac8c2
add tests for eosio.bios setfinalizer action
linh2931 Dec 11, 2023
7181593
add more comments to eosio.bios setfinalizer tests
linh2931 Dec 11, 2023
0d5cc0d
update Leap and CDT versions for CICD
linh2931 Dec 11, 2023
f91b47f
use std::move for argument passing
linh2931 Dec 11, 2023
4e31832
correct a typo of privileged
linh2931 Dec 11, 2023
37c4dc3
update CDT asset-artifact-download-action from v2 to v3
linh2931 Dec 11, 2023
da83307
add apt-get update && apt-get upgrade -y before apt install
linh2931 Dec 11, 2023
d9dceab
change leap-dev asset-artifact-download-action to v3
linh2931 Dec 12, 2023
5b3c58e
remove token usage
linh2931 Dec 12, 2023
d7f7616
correct comments about setfinalizer and add max_finalizers and max_fi…
linh2931 Dec 13, 2023
312f46a
add checks for duplicate keys, too small threshold, weight sum overfl…
linh2931 Dec 13, 2023
d5bf241
add additional tests for setfinalizer input validation
linh2931 Dec 13, 2023
8676a92
simplify building long description in tests and add a test for descri…
linh2931 Dec 13, 2023
ac597ea
use affine raw format for key uniqueness check
linh2931 Dec 13, 2023
89672ac
move g1_hash and g1_equal inside function body and next to their use,…
linh2931 Dec 14, 2023
57218e4
Merge pull request #33 from AntelopeIO/setfinalizer
linh2931 Dec 14, 2023
afe749a
GH-34 Update set_finalizer errors
heifner Dec 19, 2023
247b5c4
Merge pull request #35 from AntelopeIO/GH-34-set-finalizer-errors
heifner Dec 19, 2023
aad1544
add SYSTEM_ENABLE_LEAP_VERSION_CHECK & SYSTEM_ENABLE_CDT_VERSION_CHECK
spoonincode Dec 22, 2023
10bab0c
Merge pull request #36 from AntelopeIO/add_cmake_leap&cdt_version_checks
spoonincode Dec 22, 2023
a3ee2ed
GH-37 Update to use controller active_producers(0 instead of accessin…
heifner Jan 5, 2024
5e95bc2
GH-37 Use cdt finalizer_authority
heifner Jan 5, 2024
e28a8ee
GH-37 Update to ubuntu-22.04
heifner Jan 5, 2024
54a0e1c
implement ramtransfer action
DenisCarriere Jan 6, 2024
c46257b
add system_contract
DenisCarriere Jan 6, 2024
1f2a274
add as_uint64 to tests
DenisCarriere Jan 6, 2024
1d8a12c
update ramtransfer tests
DenisCarriere Jan 6, 2024
3c26c76
fix tests
DenisCarriere Jan 6, 2024
693f110
fix ramtransfer
DenisCarriere Jan 6, 2024
58d7984
u22, libtester 5, update some action versions
spoonincode Jan 6, 2024
7e4fa3a
Merge pull request #39 from AntelopeIO/ubuntu22_libtester5
spoonincode Jan 6, 2024
c530aa5
add reduce_ram & add_ram helpers
DenisCarriere Jan 6, 2024
96509e7
update tests
DenisCarriere Jan 6, 2024
8bfc7d0
add logbuyram action
DenisCarriere Jan 6, 2024
03900bc
Implement `ramburn` action
DenisCarriere Jan 7, 2024
a0ff4e9
fix ramburn tests
DenisCarriere Jan 7, 2024
244768a
add memo field to ramtransfer & ramburn
DenisCarriere Jan 7, 2024
f13f15c
update RC with owner
DenisCarriere Jan 7, 2024
f159466
update ram tests
DenisCarriere Jan 7, 2024
4cab488
Merge remote-tracking branch 'origin/main' into merge-main-01-08-2023
heifner Jan 8, 2024
6a5be27
Merge branch 'merge-main-01-08-2023' into GH-37-update-for-if
heifner Jan 8, 2024
25d6b28
GH-37 New block extension for instant finality
heifner Jan 9, 2024
cae6ac4
Empty commit
heifner Jan 9, 2024
4d4c2bd
add require recipient from
DenisCarriere Jan 9, 2024
0703ea2
add logsellram
DenisCarriere Jan 9, 2024
889d3e9
GH-37 Rename variable to make clearer
heifner Jan 9, 2024
d1e6d97
add `logramchange` action
DenisCarriere Jan 9, 2024
0137e60
Merge pull request #38 from AntelopeIO/GH-37-update-for-if
heifner Jan 10, 2024
b1a152d
Merge pull request #40 from AntelopeIO/merge-main-01-08-2023
heifner Jan 10, 2024
fa4424b
Merge pull request #102 from EOS-Nation/feature/ramtransfer
ericpassmore Jan 16, 2024
a0062f6
Merge branch 'ram_actions' into feature/ramburn
DenisCarriere Jan 16, 2024
d83375e
Merge branch 'ram_actions' into feature/ram-notify-logging
DenisCarriere Jan 16, 2024
b211657
return ram_bytes
DenisCarriere Jan 16, 2024
4d51a17
Merge pull request #103 from EOS-Nation/feature/ram-notify-logging
ericpassmore Jan 16, 2024
71784b1
Merge pull request #104 from EOS-Nation/feature/ramburn
ericpassmore Jan 16, 2024
fd4eacd
merged ram_actions from eos-system-contracts
ericpassmore Jan 24, 2024
4e1eed9
add null account burn tests
DenisCarriere Jan 24, 2024
ea0835b
GH-41 Add verification that finalizer weight_sum is >= threshold
heifner Jan 25, 2024
a32800d
GH-41 Missed a couple of updates
heifner Jan 25, 2024
401c8b1
GH-41 Missed one
heifner Jan 25, 2024
ad67480
Merge pull request #42 from AntelopeIO/GH-41-enforce-fin-weight
heifner Jan 25, 2024
83f4a1e
split ram burn tests
DenisCarriere Jan 25, 2024
9dd2717
Implement `buyramself` action
DenisCarriere Jan 25, 2024
4a365bd
Add action return values
DenisCarriere Jan 25, 2024
0251690
ramtransfer: action trace to capture return struct
ericpassmore Jan 26, 2024
3fc1b47
ramtransfer trace filter on act name and account
ericpassmore Jan 26, 2024
1a75d4d
streamlined code to support return struct in ram_actions
ericpassmore Jan 29, 2024
e4a98d7
Added tests for ram_actions
ericpassmore Feb 1, 2024
1e6065d
added return struct tests for buyrambytes and sellram
ericpassmore Feb 2, 2024
9bce199
test coverage ram actions return values
ericpassmore Feb 2, 2024
b0d8c38
Merge pull request #45 from AntelopeIO/ehp/test_ram_actions
ericpassmore Feb 2, 2024
95c6cae
Merge pull request #31 from AntelopeIO/ehp/GH-30-bump-main-version
ericpassmore Feb 2, 2024
36d2964
update method name convert_ordinals_to_hex to match standards
ericpassmore Feb 2, 2024
6fe20be
Merge test branch with updated method name
ericpassmore Feb 2, 2024
8d45103
turn off version checks for leap and cdt
ericpassmore Feb 2, 2024
4b24bc1
rm platform specific openssl
ericpassmore Feb 2, 2024
2977500
signals are now accessors not members
heifner Feb 6, 2024
635ff86
Temporarily change target
heifner Feb 6, 2024
ea58e91
Merge pull request #50 from AntelopeIO/if-signals
heifner Feb 6, 2024
3816c69
Switch back to instant-finality now that it is updated
heifner Feb 6, 2024
2d30776
Should be hotstuff_integration
heifner Feb 6, 2024
9dad4d8
Merge pull request #51 from AntelopeIO/if-defaults
heifner Feb 6, 2024
3d86962
Merge pull request #49 from AntelopeIO/ehp/rm-platform-specific-openssl
ericpassmore Feb 6, 2024
2bde5a8
Merge pull request #48 from AntelopeIO/ehp/ci-build-disable-version-c…
ericpassmore Feb 6, 2024
2f575e8
explanation of how to computed expected values for
ericpassmore Feb 6, 2024
ef2bb7b
whoops, reversed bob and alice example amounts
ericpassmore Feb 6, 2024
ab0858b
updated to bytes_sold and bytes_purchased
ericpassmore Feb 6, 2024
60ed21f
Merge pull request #53 from AntelopeIO/ehp/gh-52-bytes_sold
ericpassmore Feb 6, 2024
8c85d8b
Merge pull request #47 from AntelopeIO/ram_actions
ericpassmore Feb 7, 2024
e105191
version bump to 3.4.0-dev
ericpassmore Feb 8, 2024
732fa98
Merge pull request #55 from AntelopeIO/ehp/gh-54-version-bump
ericpassmore Feb 8, 2024
63bd278
update bios finality tests using new keys and signatures in base64 ur…
linh2931 Feb 26, 2024
5ff038d
temporarily change leap-dev target to pubkey_base64url for build
linh2931 Feb 26, 2024
1049b2c
Merge pull request #56 from AntelopeIO/new_base64_encoding
linh2931 Feb 27, 2024
e09fd4e
change leap-dev target back to hotstuff_integration
linh2931 Feb 27, 2024
469e1b3
Merge pull request #57 from AntelopeIO/leap_dev_target
linh2931 Feb 27, 2024
5d7b0f2
Add core contract actions to support Savanna draft version
linh2931 Mar 27, 2024
96d4877
First working version of core contact actions for Savanna
linh2931 Apr 1, 2024
c929439
rename producer to finalizer in all finalizer key actions
linh2931 Apr 3, 2024
bdd7f8e
Check if finalizer has registered any keys earlier
linh2931 Apr 3, 2024
c4dbf90
Remove unused top_producer_names and change a check() to an assert()
linh2931 Apr 3, 2024
097cd79
Change er_authorities parameter in set_finalizers() to move semantics
linh2931 Apr 3, 2024
a70ea46
Use eosio::current_time_point() for _gstate.last_producer_schedule_up…
linh2931 Apr 3, 2024
5908fb9
Use producers.size() instead of top_producers.size() as that is what …
linh2931 Apr 3, 2024
47535c2
Update action descriptions
linh2931 Apr 3, 2024
21e8dcb
Use sha256 of base64url as the hash of the key, cache the hash to avo…
linh2931 Apr 3, 2024
cf14212
Rename finalizer to finalizer_name in actions and tables so it is mor…
linh2931 Apr 3, 2024
95cf0f9
Use a table to store last finalizer key IDs
linh2931 Apr 3, 2024
41e3a30
check if the finalizer_key starts with PUB_BLS in actfinkey action
linh2931 Apr 3, 2024
689a4ea
remove key id from last_finkey_ids table if the removed key is the la…
linh2931 Apr 3, 2024
95afd18
Simplify tests
linh2931 Apr 3, 2024
40d2daf
Add activating finalizer key tests
linh2931 Apr 4, 2024
8ee26c4
Partial delete finalizer key tests
linh2931 Apr 4, 2024
aede338
more delete finalizer key tests
linh2931 Apr 4, 2024
c676d31
more efficiently updating last finalizer keys table
linh2931 Apr 4, 2024
3b9c2c4
Add the first switch-to-Savanna action test
linh2931 Apr 4, 2024
0f5d3f7
Verify nodeos indeed switches to Savanna after switchtosvnn action is…
linh2931 Apr 4, 2024
b734453
use std::move when setting finalizer_authorities
linh2931 Apr 4, 2024
6bccc06
add missing finalizer_name in action descriptions
linh2931 Apr 4, 2024
00f5265
Add a test for not enough finalizer keys registered for switching to …
linh2931 Apr 4, 2024
59184cc
Add tests for update_elected_producers in both finalizer key changes …
linh2931 Apr 5, 2024
33e54f1
Fix primary key modified in replace_key_in_finalizer_policy()
linh2931 Apr 5, 2024
6a21d55
Add a test of deleting an active producer's finalizer key and another…
linh2931 Apr 5, 2024
8153e6e
Simplify tests using a new get_last_finkey_ids()
linh2931 Apr 5, 2024
f2d650c
minor editorial improvements
linh2931 Apr 5, 2024
c39bf62
Improve action descriptions
linh2931 Apr 5, 2024
d5510f1
Rename active_key_id to active_finalizer_key_id, active_key to active…
linh2931 Apr 5, 2024
5584a60
Move static keys and signatures out of finalizer_key_tester
linh2931 Apr 5, 2024
c0d4a8d
Rename last_finkey_ids with last_fin_keys; add comments to fields of …
linh2931 Apr 6, 2024
3ea54b1
refactor replace_key_in_finalizer_policy() into generate_finalizer_po…
linh2931 Apr 6, 2024
6bf5dc5
Add authority check tests
linh2931 Apr 6, 2024
c9b156d
Cache finalizer key binary form in finalizers table; improve descript…
linh2931 Apr 7, 2024
a2b44f4
Simplilfy the update_elected_producers test and small clean ups
linh2931 Apr 8, 2024
d5f68ad
Remove unnecessary set_proposed_producers related code in switosvnn()…
linh2931 Apr 8, 2024
bddb5ef
Provide detailed information for check() failures in actions
linh2931 Apr 8, 2024
9623905
Add deleting last finalizer key to update_elected_producers_finalizer…
linh2931 Apr 8, 2024
dba03ea
Do not limit number of producers consideered to be 30, to match with …
linh2931 Apr 9, 2024
c16b95c
Use binary format as hashing key for finalizers table and do not stor…
linh2931 Apr 9, 2024
7a12d93
Use a singlton to store last proposed finalizer keys to simplify code…
linh2931 Apr 10, 2024
99ae2e3
Allow unregistered producers to activate and delete their finalizer keys
linh2931 Apr 10, 2024
7f2e940
Define a customized operator == in proposed_finalizer_key_t to simpli…
linh2931 Apr 10, 2024
ada26ea
Change to use a caching mechanism to store last proposed finalizers t…
linh2931 Apr 11, 2024
242de13
Use a single entry table for next finalizer key ID generator
linh2931 Apr 11, 2024
9580f29
Add missing key_id update in the entry in last_proposed_finalizers fo…
linh2931 Apr 11, 2024
c2aa777
Provide a constructor for finalizer_auth_info to construct from final…
linh2931 Apr 11, 2024
ceda65c
Factor some common code
linh2931 Apr 11, 2024
8c72d60
Restore last proposed finalizers checks in tests
linh2931 Apr 12, 2024
f9d72e3
Add a test to activate 3 keys of a finalizer in a row
linh2931 Apr 12, 2024
a0acd15
Make get_last_proposed_finalizers() return a const& and avoid table l…
linh2931 Apr 12, 2024
7a0f1e1
Store _fin_key_id_generator.begin() in a variable to avoid multiple r…
linh2931 Apr 12, 2024
b1f0a81
Make set_proposed_finalizers argument a call-by-value
linh2931 Apr 12, 2024
65a54a4
Small changes from comments
linh2931 Apr 12, 2024
be79752
Rename active_finalizer_key_id to active_key_id and active_finalizer_…
linh2931 Apr 12, 2024
74f7a47
Provide a utility method is_active to finalizer_key struct; add more …
linh2931 Apr 12, 2024
e88b8ca
Make sure number of last proposed finalizers correct in tests
linh2931 Apr 12, 2024
021213a
Add public key check to last proposed finalizers in tests
linh2931 Apr 15, 2024
bc2e638
Fix a couple fo typos in comments
linh2931 Apr 15, 2024
34f6854
Merge pull request #60 from AntelopeIO/core-contracts
linh2931 Apr 15, 2024
c8f1317
Merge pull request #43 from AntelopeIO/instant-finality
arhag Apr 29, 2024
94d5044
Update to use Spring instead of Leap
heifner May 2, 2024
47e44bd
push fees upgrade changes
DenisCarriere May 2, 2024
e4c75b8
push token upgrade
DenisCarriere May 2, 2024
41a578c
Merge pull request #77 from AntelopeIO/update-refs
heifner May 2, 2024
b694722
Implement rex maturity changes
DenisCarriere May 3, 2024
a8afcee
Remove voting requirements for rex
DenisCarriere May 3, 2024
67c2429
Move to savings when buying REX
DenisCarriere May 3, 2024
6d791ad
Move to savings when buying REX & sell REX when matured
DenisCarriere May 3, 2024
d664b5a
implement unvest action
DenisCarriere May 3, 2024
7fb34dd
add supply tests
DenisCarriere May 3, 2024
812ffa6
Implement schedules
DenisCarriere May 4, 2024
6e79c48
add schedule with 0% annual rate
DenisCarriere May 4, 2024
669d966
add no schedule to execute tests
DenisCarriere May 4, 2024
ee2814d
Make test a little more generic to work with diff versions of instant…
heifner May 8, 2024
5c0256c
rename to "unallocated bucket"
DenisCarriere May 8, 2024
32f62ab
a few extra tests
May 8, 2024
2789fb1
Merge pull request #79 from AntelopeIO/tokenomics-token-upgrade
nsjames May 8, 2024
85ef99c
make rex maturity settings as actions
DenisCarriere May 8, 2024
4358d70
refactor process_sell_matured_rex
DenisCarriere May 8, 2024
a9a79e1
direct continuous rate modification, extending tests
May 8, 2024
5a9176d
year typo in versting schedule test
May 8, 2024
c550e95
year typo in versting schedule test
May 8, 2024
bf8f948
Merge branch 'tokenomics' into tokenomics-vesting-upgrade
nsjames May 8, 2024
cd645b5
Merge pull request #82 from AntelopeIO/more-generic-test
heifner May 8, 2024
ff27f8c
extend unvest tests, enforce only unvested amount, and allow claiming…
May 9, 2024
8028ff7
add matured rex tests
DenisCarriere May 9, 2024
4239d20
allow setting a schedule in the past or msigs will break
May 10, 2024
9e3ac02
expose new action to allow setting pay factors without affecting cont…
May 10, 2024
b188adc
fixes for setpayfactor tests
May 10, 2024
981608a
update rex tests
DenisCarriere May 11, 2024
6a175c0
set global state
May 13, 2024
046f5a0
Merge pull request #81 from AntelopeIO/tokenomics-vesting-upgrade
nsjames May 13, 2024
dbd2eb4
validate rex return in tests
May 13, 2024
3cfbbda
merge in tokenomics branch
May 13, 2024
45473c9
Merge pull request #78 from AntelopeIO/tokenomics-fees-upgrade
nsjames May 13, 2024
33ab294
fix for setschedule docs
May 15, 2024
3803fd9
Merge pull request #84 from AntelopeIO/tokenomics-doc-fix
nsjames May 16, 2024
ded2d7f
add ricardians for unvest and donatetorex
May 17, 2024
59736cf
Merge pull request #86 from AntelopeIO/tokenomics-ricardians
nsjames May 21, 2024
4dff31f
interface test for buyramburn
ericpassmore May 21, 2024
917d722
Merge pull request #87 from AntelopeIO/ehp/interface-test-buyramburn
ericpassmore May 21, 2024
ca1b6ce
merged schedule structs in includes
ericpassmore May 24, 2024
8ed7edd
Remove tester but keep validating_tester for eosio_system_tester; add…
linh2931 May 28, 2024
d4227b8
Start bios_inst_fin_tests with legacy tester
linh2931 May 28, 2024
4864476
Keep powerup_tests under legacy_tester for now
linh2931 May 28, 2024
cc812f8
Adjust proposer schedule change for producer_wtmsig tests
linh2931 May 28, 2024
43c76ea
Point spring-dev target to default_tester branch to get around circul…
linh2931 May 28, 2024
1741995
preliminary tests and code for eosio.bpay
Jun 3, 2024
8e469fe
use headers from contracts instead of duplicating, extend tests
Jun 4, 2024
9646c7e
add bpay ricardians to cmakelists
Jun 4, 2024
4ccfbbf
Use legacy_tester instead of tester_not_transition_to_savanna
linh2931 Jun 4, 2024
9d4d6cd
Change spring-dev/target back to main
linh2931 Jun 4, 2024
229dd4f
Merge pull request #95 from AntelopeIO/fix_failures_by_default_tester
linh2931 Jun 4, 2024
47599f0
Merge pull request #98 from AntelopeIO/eosio.bpay
nsjames Jun 5, 2024
fee936f
Merge branch 'main' into merge-savanna-tokenonmics
ericpassmore Jun 6, 2024
60f3683
merge tokenomics into rex updates
Jun 10, 2024
e21f721
Split system_tests into multiple suites such that each of them can fi…
linh2931 Jun 10, 2024
1157964
Merge remote-tracking branch 'origin/split_system_tests' into merge-s…
ericpassmore Jun 11, 2024
334414b
Fix fragile powerup_tests so that they can run under Savanna
linh2931 Jun 12, 2024
2e865e5
rex2 docs update, ricardians, tests, rename maturity setter
Jun 13, 2024
126d5f8
remove unecessary tests
Jun 13, 2024
10e9ce7
support multiple test suites in a single file
linh2931 Jun 13, 2024
0369bef
Avoid produce large number of blocks uncessarily in eosio.system_test…
linh2931 Jun 13, 2024
39249ae
Split system_tests into multiple suites so that they can run in parallel
linh2931 Jun 13, 2024
877f89f
Produce minimum 2*21 blocks for active_and_vote_producers()
linh2931 Jun 13, 2024
efb7d81
Merge pull request #103 from AntelopeIO/run_system_tests_in_parallel
linh2931 Jun 13, 2024
1a603bb
Merge pull request #80 from AntelopeIO/tokenomics-rex-upgrade
nsjames Jun 14, 2024
199bd22
Use pending_block_time for target_timestamp
linh2931 Jun 14, 2024
1ee39ff
Merge branch 'main' into fix_fragile_powerup_tests
linh2931 Jun 14, 2024
3908cfb
Merge pull request #101 from AntelopeIO/fix_fragile_powerup_tests
linh2931 Jun 14, 2024
d9db4b8
use antelope-spring-dev.deb
spoonincode Jun 14, 2024
09e8c4f
merged main incorporating token split tests
ericpassmore Jun 14, 2024
c30e89e
Merge pull request #105 from AntelopeIO/antelope-spring-dev.deb
spoonincode Jun 14, 2024
ea167cf
Merge remote-tracking branch 'origin' into merge-savanna-tokenonmics
ericpassmore Jun 14, 2024
de38a52
resolved conflict num of blocks to produce for test
ericpassmore Jun 17, 2024
c2fac1a
resolve dup test name
ericpassmore Jun 17, 2024
551fd9e
use actual producer list to split rewards instead of configured max
Jun 25, 2024
0218cbe
instant_finality_extension renamed to finality_extension
heifner Jul 15, 2024
759f801
instant_finality_extension renamed to finality_extension
heifner Jul 15, 2024
88f2eed
Merge pull request #107 from AntelopeIO/rename_instant_finality_exten…
heifner Jul 15, 2024
1836e5c
Merge remote-tracking branch 'origin/tokenomics' into merge-savanna-t…
ericpassmore Jul 18, 2024
3282ef6
Merge remote-tracking branch 'origin/main' into merge-savanna-tokenon…
ericpassmore Jul 18, 2024
33122b6
init merge tokenomics and savanna
ericpassmore Aug 9, 2024
7da610b
fixed status message to specific eos-system-contracts
ericpassmore Aug 9, 2024
9a893ab
target 3.6-rc1 using cdt 4.1-rc1
ericpassmore Aug 12, 2024
368573d
merge release/3.6 and set to next release
ericpassmore Aug 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .cicd/defaults.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"leap-dev":{
"target":"5",
"antelope-spring-dev":{
"target":"main",
"prerelease":false
},
"cdt":{
"target":"3",
"target":"main",
"prerelease":false
}
}
41 changes: 20 additions & 21 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:
pull_request:
workflow_dispatch:
inputs:
override-leap-dev:
description: Override leap-dev target
override-antelope-spring-dev:
description: Override antelope-spring-dev target
type: string
override-leap-dev-prerelease:
override-antelope-spring-dev-prerelease:
type: choice
description: Override leap-dev prelease
description: Override antelope-spring-dev prelease
options:
- default
- true
Expand All @@ -38,22 +38,22 @@ jobs:
name: Build & Test
runs-on: ubuntu-22.04
steps:
- name: Setup leap-dev & cdt versions
- name: Setup antelope-spring-dev & cdt versions
id: versions
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
echo leap-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".target') >> $GITHUB_OUTPUT
echo leap-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."leap-dev".prerelease') >> $GITHUB_OUTPUT
echo antelope-spring-dev-target=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".target') >> $GITHUB_OUTPUT
echo antelope-spring-dev-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '."antelope-spring-dev".prerelease') >> $GITHUB_OUTPUT
echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.target') >> $GITHUB_OUTPUT
echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.prerelease') >> $GITHUB_OUTPUT
if [[ "${{inputs.override-leap-dev}}" != "" ]]; then
echo leap-dev-target=${{inputs.override-leap-dev}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-antelope-spring-dev}}" != "" ]]; then
echo antelope-spring-dev-target=${{inputs.override-antelope-spring-dev}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-leap-dev-prerelease}}" == +(true|false) ]]; then
echo leap-dev-prerelease=${{inputs.override-leap-dev-prerelease}} >> $GITHUB_OUTPUT
if [[ "${{inputs.override-antelope-spring-dev-prerelease}}" == +(true|false) ]]; then
echo antelope-spring-dev-prerelease=${{inputs.override-antelope-spring-dev-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-cdt}}" != "" ]]; then
echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT
Expand All @@ -70,20 +70,19 @@ jobs:
target: '${{steps.versions.outputs.cdt-target}}'
prereleases: ${{fromJSON(steps.versions.outputs.cdt-prerelease)}}
artifact-name: cdt_ubuntu_package_amd64
token: ${{github.token}}
- name: Download leap-dev
- name: Download antelope-spring-dev
uses: AntelopeIO/asset-artifact-download-action@v3
with:
owner: AntelopeIO
repo: leap
file: 'leap-dev.*ubuntu22\.04_amd64.deb'
target: '${{steps.versions.outputs.leap-dev-target}}'
prereleases: ${{fromJSON(steps.versions.outputs.leap-dev-prerelease)}}
artifact-name: leap-dev-ubuntu22-amd64
container-package: experimental-binaries
token: ${{github.token}}
repo: spring
file: 'antelope-spring-dev.*ubuntu22\.04_amd64.deb'
target: '${{steps.versions.outputs.antelope-spring-dev-target}}'
prereleases: ${{fromJSON(steps.versions.outputs.antelope-spring-dev-prerelease)}}
artifact-name: antelope-spring-dev-ubuntu22-amd64
container-package: antelope-spring-experimental-binaries
- name: Install packages
run: |
sudo apt-get update && sudo apt-get upgrade -y
sudo apt install ./*.deb
sudo apt-get install cmake
rm ./*.deb
Expand All @@ -92,7 +91,7 @@ jobs:
path: src
- name: Build & Test
run: |
cmake -S src -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_LEAP_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off
cmake -S src -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_SPRING_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off
cmake --build build -- -j $(nproc)
tar zcf build.tar.gz build
ctest --test-dir build/tests --output-on-failure -j $(nproc)
Expand Down
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.5)
project(eosio_contracts)

set(VERSION_MAJOR 3)
set(VERSION_MINOR 6)
set(VERSION_MINOR 7)
set(VERSION_PATCH 0)
set(VERSION_SUFFIX dev)

Expand All @@ -25,8 +25,8 @@ option(SYSTEM_CONFIGURABLE_WASM_LIMITS
option(SYSTEM_BLOCKCHAIN_PARAMETERS
"Enables use of the host functions activated by the BLOCKCHAIN_PARAMETERS protocol feature" ON)

option(SYSTEM_ENABLE_LEAP_VERSION_CHECK
"Enables a configure-time check that the version of Leap's tester library is compatible with this project's unit tests" ON)
option(SYSTEM_ENABLE_SPRING_VERSION_CHECK
"Enables a configure-time check that the version of Spring's tester library is compatible with this project's unit tests" ON)

option(SYSTEM_ENABLE_CDT_VERSION_CHECK
"Enables a configure-time check that the version of CDT is compatible with this project's contracts" ON)
Expand All @@ -45,13 +45,6 @@ ExternalProject_Add(
INSTALL_COMMAND ""
BUILD_ALWAYS 1)

if(APPLE)
set(OPENSSL_ROOT "/usr/local/opt/openssl")
elseif(UNIX)
set(OPENSSL_ROOT "/usr/include/openssl")
endif()
set(SECP256K1_ROOT "/usr/local")

option(BUILD_TESTS "Build unit tests" OFF)

if(BUILD_TESTS)
Expand Down
20 changes: 10 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eo pipefail
function usage() {
printf "Usage: $0 OPTION...
-c DIR Path to CDT installation/build directory. (Optional if using CDT installled at standard system location.)
-l DIR Path to Leap build directory. Optional, but must be specified to build tests.
-l DIR Path to Spring build directory. Optional, but must be specified to build tests.
-h Print this help menu.
\\n" "$0" 1>&2
exit 1
Expand All @@ -19,7 +19,7 @@ if [ $# -ne 0 ]; then
CDT_INSTALL_DIR=$(realpath $OPTARG)
;;
l )
LEAP_BUILD_DIR=$(realpath $OPTARG)
SPRING_BUILD_DIR=$(realpath $OPTARG)
BUILD_TESTS=ON
;;
h )
Expand All @@ -40,19 +40,19 @@ if [ $# -ne 0 ]; then
done
fi

LEAP_DIR_CMAKE_OPTION=''
SPRING_DIR_CMAKE_OPTION=''

if [[ "${BUILD_TESTS}" == "ON" ]]; then
if [[ ! -f "$LEAP_BUILD_DIR/lib/cmake/leap/leap-config.cmake" ]]; then
echo "Invalid path to Leap build directory: $LEAP_BUILD_DIR"
echo "Leap build directory is required to build tests. If you do not wish to build tests, leave off the -l option."
if [[ ! -f "$SPRING_BUILD_DIR/lib/cmake/spring/spring-config.cmake" ]]; then
echo "Invalid path to Spring build directory: $SPRING_BUILD_DIR"
echo "Spring build directory is required to build tests. If you do not wish to build tests, leave off the -l option."
echo "Cannot proceed. Exiting..."
exit 1;
fi

echo "Using Leap build directory at: $LEAP_BUILD_DIR"
echo "Using Spring build directory at: $SPRING_BUILD_DIR"
echo ""
LEAP_DIR_CMAKE_OPTION="-Dleap_DIR=${LEAP_BUILD_DIR}/lib/cmake/leap"
SPRING_DIR_CMAKE_OPTION="-Dspring_DIR=${SPRING_BUILD_DIR}/lib/cmake/spring"
fi

CDT_DIR_CMAKE_OPTION=''
Expand All @@ -67,7 +67,7 @@ else
echo "Cannot proceed. Exiting..."
exit 1;
fi

echo "Using CDT installation/build at: $CDT_INSTALL_DIR"
echo ""
CDT_DIR_CMAKE_OPTION="-Dcdt_DIR=${CDT_INSTALL_DIR}/lib/cmake/cdt"
Expand All @@ -79,6 +79,6 @@ NC='\033[0m'
CPU_CORES=$(getconf _NPROCESSORS_ONLN)
mkdir -p build
pushd build &> /dev/null
cmake -DBUILD_TESTS=${BUILD_TESTS} ${LEAP_DIR_CMAKE_OPTION} ${CDT_DIR_CMAKE_OPTION} ../
cmake -DBUILD_TESTS=${BUILD_TESTS} ${SPRING_DIR_CMAKE_OPTION} ${CDT_DIR_CMAKE_OPTION} ../
make -j $CPU_CORES
popd &> /dev/null
8 changes: 4 additions & 4 deletions contracts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ option(SYSTEM_CONFIGURABLE_WASM_LIMITS
option(SYSTEM_BLOCKCHAIN_PARAMETERS
"Enables use of the host functions activated by the BLOCKCHAIN_PARAMETERS protocol feature" ON)

find_package(cdt REQUIRED)
find_package(cdt)

set(CDT_VERSION_MIN "3.0")
set(CDT_VERSION_SOFT_MAX "3.0")
set(CDT_VERSION_MIN "4.1")
set(CDT_VERSION_SOFT_MAX "4.1")
# set(CDT_VERSION_HARD_MAX "")

# Check the version of CDT
Expand All @@ -31,7 +31,7 @@ if(SYSTEM_ENABLE_CDT_VERSION_CHECK)
FATAL_ERROR
"Found CDT version ${CDT_VERSION} but it does not satisfy version requirements: ${VERSION_MATCH_ERROR_MSG}\nPlease use CDT version ${CDT_VERSION_SOFT_MAX}.x"
)
endif()
endif(VERSION_OUTPUT STREQUAL "MATCH")
endif()

set(ICON_BASE_URL "https://raw.githubusercontent.com/eosnetworkfoundation/eos-system-contracts/main/contracts/icons")
Expand Down
42 changes: 42 additions & 0 deletions contracts/eosio.bios/include/eosio.bios/eosio.bios.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <eosio/eosio.hpp>
#include <eosio/fixed_bytes.hpp>
#include <eosio/privileged.hpp>
#include <eosio/instant_finality.hpp>
#include <eosio/producer_schedule.hpp>

namespace eosiobios {
Expand Down Expand Up @@ -66,6 +67,38 @@ namespace eosiobios {
(schedule_version)(new_producers))
};

/**
* finalizer_authority
*
* The public bls key and proof of possession of private key signature,
* and vote weight of a finalizer.
*/
constexpr size_t max_finalizers = 64*1024;
constexpr size_t max_finalizer_description_size = 256;

struct finalizer_authority {
std::string description;
uint64_t weight = 0; // weight that this finalizer's vote has for meeting threshold
std::string public_key; // public key of the finalizer in base64 format
std::string pop; // proof of possession of private key in base64 format

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE(finalizer_authority, (description)(weight)(public_key)(pop))
};

/**
* finalizer_policy
*
* List of finalizer authorties along with the threshold
*/
struct finalizer_policy {
uint64_t threshold = 0; // quorum threshold
std::vector<finalizer_authority> finalizers;

// explicit serialization macro is not necessary, used here only to improve compilation time
EOSLIB_SERIALIZE(finalizer_policy, (threshold)(finalizers));
};

/**
* The `eosio.bios` is the first sample of system contract provided by `block.one` through the EOSIO platform. It is a minimalist system contract because it only supplies the actions that are absolutely critical to bootstrap a chain and nothing more. This allows for a chain agnostic approach to bootstrapping a chain.
*
Expand Down Expand Up @@ -190,6 +223,15 @@ namespace eosiobios {
[[eosio::action]]
void onerror( ignore<uint128_t> sender_id, ignore<std::vector<char>> sent_trx );

/**
* Propose new finalizer policy that, unless superseded by a later
* finalizer policy, will eventually become the active finalizer policy.
*
* @param finalizer_policy - proposed finalizer policy
*/
[[eosio::action]]
void setfinalizer( const finalizer_policy& finalizer_policy );

/**
* 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.
Expand Down
67 changes: 67 additions & 0 deletions contracts/eosio.bios/src/eosio.bios.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include <eosio.bios/eosio.bios.hpp>
#include <eosio/crypto_bls_ext.hpp>

#include <unordered_set>

namespace eosiobios {

Expand All @@ -17,6 +20,70 @@ void bios::setabi( name account, const std::vector<char>& abi ) {
}
}

void bios::setfinalizer( const finalizer_policy& finalizer_policy ) {
// exensive checks are performed to make sure setfinalizer host function
// will never fail

require_auth( get_self() );

check(finalizer_policy.finalizers.size() <= max_finalizers, "number of finalizers exceeds the maximum allowed");
check(finalizer_policy.finalizers.size() > 0, "require at least one finalizer");

eosio::finalizer_policy fin_policy;
fin_policy.threshold = finalizer_policy.threshold;
fin_policy.finalizers.reserve(finalizer_policy.finalizers.size());

const std::string pk_prefix = "PUB_BLS";
const std::string sig_prefix = "SIG_BLS";

// use raw affine format (bls_g1 is std::array<char, 96>) for uniqueness check
struct g1_hash {
std::size_t operator()(const eosio::bls_g1& g1) const {
std::hash<const char*> hash_func;
return hash_func(g1.data());
}
};
struct g1_equal {
bool operator()(const eosio::bls_g1& lhs, const eosio::bls_g1& rhs) const {
return std::memcmp(lhs.data(), rhs.data(), lhs.size()) == 0;
}
};
std::unordered_set<eosio::bls_g1, g1_hash, g1_equal> unique_finalizer_keys;

uint64_t weight_sum = 0;

for (const auto& f: finalizer_policy.finalizers) {
check(f.description.size() <= max_finalizer_description_size, "Finalizer description greater than max allowed size");

// basic key format checks
check(f.public_key.substr(0, pk_prefix.length()) == pk_prefix, "public key shoud start with PUB_BLS");
check(f.pop.substr(0, sig_prefix.length()) == sig_prefix, "proof of possession signature should start with SIG_BLS");

// check overflow
check(std::numeric_limits<uint64_t>::max() - weight_sum >= f.weight, "sum of weights causes uint64_t overflow");
weight_sum += f.weight;

// decode_bls_public_key_to_g1 will fail ("check" function fails)
// if the key is invalid
const auto pk = eosio::decode_bls_public_key_to_g1(f.public_key);
// duplicate key check
check(unique_finalizer_keys.insert(pk).second, "duplicate public key");

const auto signature = eosio::decode_bls_signature_to_g2(f.pop);

// proof of possession of private key check
check(eosio::bls_pop_verify(pk, signature), "proof of possession failed");

std::vector<char> pk_vector(pk.begin(), pk.end());
fin_policy.finalizers.emplace_back(eosio::finalizer_authority{f.description, f.weight, std::move(pk_vector)});
}

check( weight_sum >= finalizer_policy.threshold && finalizer_policy.threshold > weight_sum / 2,
"Finalizer policy threshold must be greater than half of the sum of the weights, and less than or equal to the sum of the weights");

set_finalizers(std::move(fin_policy));
}

void bios::onerror( ignore<uint128_t>, ignore<std::vector<char>> ) {
check( false, "the onerror action cannot be called directly" );
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/eosio.fees/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ set_target_properties(eosio.fees
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

target_compile_options( eosio.fees PUBLIC )
target_compile_options( eosio.fees PUBLIC )
2 changes: 1 addition & 1 deletion contracts/eosio.fees/include/eosio.fees/eosio.fees.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ namespace eosio {
void noop();
};

}
}
2 changes: 1 addition & 1 deletion contracts/eosio.fees/src/eosio.fees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ void fees::noop()
require_auth( get_self() );
}

} /// namespace eosio
} /// namespace eosio
1 change: 1 addition & 0 deletions contracts/eosio.system/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ add_contract(
${CMAKE_CURRENT_SOURCE_DIR}/src/eosio.system.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/delegate_bandwidth.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/exchange_state.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/finalizer_key.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/name_bidding.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/native.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/producer_pay.cpp
Expand Down
Loading
Loading