Compare commits

...

319 Commits

Author SHA1 Message Date
Chris Gundlach efd3086af2 added prometheus-cpp as a submodule 2022-10-07 13:03:53 -05:00
Chris Gundlach 30f69ec758 Merge branch 'feature_prometheus_plugin' of https://github.com/AntelopeIO/leap into feature_prometheus_plugin 2022-10-06 10:28:32 -05:00
Chris Gundlach c673e984b0 Merge branch 'main' into feature_prometheus_plugin 2022-10-06 10:26:07 -05:00
Lin Huang a8d48d4060 Merge pull request #287 from AntelopeIO/bump_abieos_version
[3.2] bump abieos submodule to branch with warning fixes
2022-10-05 14:10:41 -04:00
Lin Huang 0c6ea09caf bump abieos submodule to branch with warning fixes 2022-10-05 13:40:21 -04:00
Areg Hayrapetian edbaedb989 Merge pull request #150 from AntelopeIO/leap-util
Build framework for leap-util
2022-10-04 11:19:03 -07:00
Lin Huang 28f8ac1704 Merge pull request #263 from AntelopeIO/reenable_warning_softfloat_wasmjit
[3.2] reenable warnings for softfloat and wasm-jit, and fix a warning in wasm-jit
2022-10-04 13:26:00 -04:00
Lin Huang c5543ffbc0 Merge branch 'main' into reenable_warning_softfloat_wasmjit 2022-10-04 12:58:48 -04:00
Matt Witherspoon f4227f6179 Merge pull request #277 from AntelopeIO/init_slice_index_header
[3.2] initialize slice_directory::index_header::version
2022-10-04 11:35:16 -04:00
Kevin Heifner 5dc9667ddf Merge pull request #275 from AntelopeIO/mandel-301
[3.1 -> main] Fix replay to correctly add trxs into the de-dup list
2022-10-04 08:02:15 -05:00
Matt Witherspoon f8e297943f initialize slice_directory::index_header::version 2022-10-03 23:07:25 -04:00
Lin Huang 5889037854 fix indentation 2022-10-03 22:23:12 -04:00
766C6164 94bee32151 Initialize all subcommands flags to false 2022-10-03 15:27:33 -04:00
Kevin Heifner 631b3bf914 Merge pull request #270 from AntelopeIO/GH-231-log-dup
[3.2] Do not log or subjective bill for duplicate trxs
2022-10-03 12:08:47 -05:00
Kevin Heifner d0874b1011 Merge remote-tracking branch 'origin/release/3.1' into mandel-301 2022-10-03 12:06:02 -05:00
Kevin Heifner 66f1d6184a Merge pull request #273 from AntelopeIO/mandel-301-3.1
[3.1] Fix replay to correctly add trxs into the de-dup list
2022-10-03 12:05:16 -05:00
Lin Huang 88266e4a79 Merge pull request #272 from AntelopeIO/update_libff_version
[3.2] update libff submodule to branch with warning fixes
2022-10-03 10:08:51 -04:00
Kevin Heifner 6d84717e3e Mandel-301 Fix replay to correctly add trxs into the de-dup list 2022-10-03 08:50:49 -05:00
Kevin Heifner 3b1f748bb9 Merge pull request #269 from AntelopeIO/kill-warn
[3.2] Fix some clang warnings
2022-10-03 08:46:36 -05:00
Lin Huang e288d80030 update libff submodule to branch with warning fixes 2022-10-03 09:35:34 -04:00
Lin Huang bf24a0c9f5 Merge branch 'reenable_warning_softfloat_wasmjit' of https://github.com/AntelopeIO/leap into reenable_warning_softfloat_wasmjit 2022-10-02 13:53:54 -04:00
Lin Huang 173d4077d2 add back a statement accidentally removed by commit 60e0ad1ec2 2022-10-02 13:52:42 -04:00
Lin Huang 8939ff9b0f Merge branch 'main' into reenable_warning_softfloat_wasmjit 2022-10-02 09:38:24 -04:00
Lin Huang 60e0ad1ec2 remove _DEBUG and related code
dumpNFAGraphViz and dumpDFAGraphViz are only used in _DEBUG mode.
But _DEBUG will never be used. Remove them for simpler code and one fewer warning
2022-10-02 09:37:53 -04:00
Kevin Heifner d5df14df11 GH-231 Do not log or subjective bill for duplicate trxs 2022-10-01 10:33:52 -05:00
Kevin Heifner 57338c0979 Fix some warnings 2022-10-01 10:10:48 -05:00
Lin Huang 44fdec7885 Merge pull request #265 from AntelopeIO/bump_softfloat_version
[3.2] bump softfloat submodule to branch with warning fixes
2022-09-30 15:32:59 -04:00
Lin Huang 81afb58554 bump softfloat submodule to branch with warning fixes 2022-09-30 15:01:20 -04:00
766C6164 94749d14d4 install path fix 2022-09-30 13:18:46 -04:00
766C6164 294fa457f5 +=constraint for sc 2022-09-30 10:52:55 -04:00
766C6164 efd953406a Cleaned-up some of block-log stuff 2022-09-30 10:47:02 -04:00
Lin Huang 3b83c1b835 reenable warnings for softfloat and wasm-jit, and fix a warning in wasm-jit 2022-09-30 10:10:17 -04:00
766C6164 d198de9ce6 Ditched ilog, added constraints 2022-09-30 10:05:37 -04:00
766C6164 bb462ef789 Replaced hardcoded leap-util name with var 2022-09-30 09:44:16 -04:00
766C6164 90ce207393 Addressing feedback, part one 2022-09-30 09:39:52 -04:00
Lin Huang ced3542da5 Merge pull request #262 from AntelopeIO/fix_warnings
[3.2] more compiler warnings cleanup
2022-09-29 20:52:18 -04:00
Lin Huang 17aada579e Merge branch 'main' into fix_warnings 2022-09-29 20:22:45 -04:00
Kevin Heifner 908cc0e516 Merge pull request #222 from AntelopeIO/GH-209-log-doc
[3.2] Add information about log levels [docs]
2022-09-29 18:38:31 -05:00
Lin Huang c0a20305d0 remove bad_alloc from FC_LOG_AND_DROP; use __builtin_unreachable to surpress warning in elliptic_webauthn.cpp to aviod potentially breaking consensus 2022-09-29 18:53:39 -04:00
Lin Huang 3a95707e6f more compiler warnings cleanup 2022-09-29 16:02:00 -04:00
Christopher Gundlach 26b8e59066 Merge pull request #258 from AntelopeIO/add_prometheus_library
Add Prometheus Library
2022-09-29 14:57:33 -05:00
Chris Gundlach b8b0e75513 removed PROMETHEUS_INSTALL_COMPONENT 2022-09-29 12:05:43 -05:00
Chris Gundlach 472ccc3929 took out cmake cruft 2022-09-29 12:01:36 -05:00
Chris Gundlach b16ed1de3b Merge branch 'main' into feature_prometheus_plugin 2022-09-29 10:22:19 -05:00
Chris Gundlach 167f9216be updated prometheus_plugin to be dependent on prometheus library 2022-09-29 10:14:14 -05:00
Chris Gundlach 1a9de428cb added prometheus library 2022-09-29 10:13:13 -05:00
Luis 2f201f4590 split log level info into bullets and minor edits :doc 2022-09-29 11:09:50 -04:00
Luis 0c203a7c14 make first sentence summary for each log level :doc 2022-09-29 10:49:30 -04:00
Luis 873c2b9dc1 remove line wraps, no need for docs :doc 2022-09-29 10:11:51 -04:00
Matt Witherspoon 24b23ab3b9 Merge pull request #255 from AntelopeIO/more_db_load_write_log_context
[3.2] add more context to chainbase logging during loading and writing in heap or locked more
2022-09-28 18:44:18 -04:00
Matt Witherspoon ef9ea24769 bump chainbase submod to main with more log context on load/write 2022-09-28 18:23:43 -04:00
Matt Witherspoon 6ee33c23e4 bump chainbase submod to branch with more log context on load/write 2022-09-28 16:30:39 -04:00
Lin Huang 2001477110 Merge pull request #253 from AntelopeIO/fix_secp256k1_warnings
[3.2] disable unused-function warning in secp256k1
2022-09-28 15:36:03 -04:00
Lin Huang 36ff69f941 disable unused-function warning in secp256k1 2022-09-28 14:49:38 -04:00
Kevin Heifner 4ce9a8ce60 Merge pull request #250 from AntelopeIO/GH-228-keosd
[3.1 -> main] Increase keosd http-max-response-time-ms for tests
2022-09-28 10:10:48 -05:00
Matt Witherspoon fad7891100 Merge pull request #246 from AntelopeIO/pkgconfig_crypto_mac
[3.2] manually set PKG_CONFIG_PATH for openssl on macOS
2022-09-28 11:04:30 -04:00
Kevin Heifner 5cce2cc12f Merge remote-tracking branch 'origin/release/3.1' into GH-228-keosd 2022-09-28 09:07:52 -05:00
Kevin Heifner 60781e26d4 Merge pull request #249 from AntelopeIO/GH-228-keosd-3.1
[3.1] Increase keosd http-max-response-time-ms for tests
2022-09-28 09:07:04 -05:00
Kevin Heifner 81f016bbfc Merge pull request #248 from AntelopeIO/GH-229-warn
[3.1 -> main] Remove #pragma(s) to ignore warnings
2022-09-28 09:06:03 -05:00
Kevin Heifner 6df8582f1a GH-228 Increase keosd http-max-response-time-ms for tests for slow cicd machines 2022-09-28 07:37:43 -05:00
Kevin Heifner 3011a2b2c5 GH-229 Remove additional unused variables in 3.2 2022-09-28 07:05:26 -05:00
Kevin Heifner 5153211f6e Merge remote-tracking branch 'origin/release/3.1' into GH-229-warn 2022-09-28 07:00:17 -05:00
Kevin Heifner 4186f5e4b8 Merge pull request #245 from AntelopeIO/GH-229-warn-3.1
[3.1] Remove #pragma(s) to ignore warnings
2022-09-28 06:54:44 -05:00
Matt Witherspoon 70129af847 manually set PKG_CONFIG_PATH for openssl on macOS 2022-09-27 21:39:19 -04:00
Matt Witherspoon bf1f40a4f5 Merge pull request #243 from AntelopeIO/remove_alt_k1_impls
[3.2] remove old, unused, and currently broken alternate k1 ECC impls
2022-09-27 20:12:16 -04:00
Kevin Heifner 78d04774d8 GH-229 Remove commented out code 2022-09-27 18:27:14 -05:00
Matt Witherspoon b99e842e93 Merge pull request #242 from AntelopeIO/mm_crc32_u64
[3.2] avoid redefining _mm_crc32_u64 which can lead to compile errors
2022-09-27 19:21:13 -04:00
Matt Witherspoon d1fd865c35 Merge pull request #241 from AntelopeIO/nullout_apple_zstdetc
[3.2] "null out" iostream's library dependencies on macOS
2022-09-27 19:21:06 -04:00
Matt Witherspoon ab8fdf7e57 Merge pull request #236 from AntelopeIO/desubmod_fc
[3.2] desubmodule fc
2022-09-27 19:20:55 -04:00
Matt Witherspoon ce68373277 Merge remote-tracking branch 'origin/main' into desubmod_fc 2022-09-27 19:08:49 -04:00
Matt Witherspoon b4992ab037 Merge pull request #111 from AntelopeIO/desubmod_wasm_spec_tests
[3.2] desubmodule wasm-spec-tests
2022-09-27 19:06:11 -04:00
Kevin Heifner 62e5800b67 GH-229 Fix GCC strict-alias warning 2022-09-27 16:55:51 -05:00
Eric Passmore d491f6adef Merge pull request #244 from AntelopeIO/docs-openapi-trace_api-from-3.1-commit-to-main
[3.1 -> main] Docs commits from 3.1 to main
2022-09-27 14:45:44 -07:00
Kevin Heifner 16cd06db1c GH-229 Remove #pragma to ignore strict-aliasing warning from chain_plugin. Also removed pragma to ignore unused-variable from config.hpp. All other changes were to address the removal the ignore unused-variable. 2022-09-27 16:28:08 -05:00
Eric Passmore 9dfeb086ba Merging docs trace_api fix from 3.1 into main
Merge remote-tracking branch 'origin/release/3.1' into docs-openapi-trace_api-from-3.1-commit-to-main
- single file plugins/trace_api_plugin/trace_api.swagger.yaml
2022-09-27 13:55:57 -07:00
Matt Witherspoon 56b52a1aa5 remove alternate k1 impls 2022-09-27 16:46:46 -04:00
Eric Passmore de8e62584e Merge pull request #240 from AntelopeIO/docs-openapi-trace_api
[3.1 -> main] updated trace_api openapi documentation
2022-09-27 12:06:44 -07:00
Matt Witherspoon 2d92aa9480 avoid redefining _mm_crc32_u64 2022-09-27 14:49:59 -04:00
Matt Witherspoon 957e24fd48 "null out" iostream's library dependencies on macOS 2022-09-27 14:23:22 -04:00
Eric Passmore e0da4671a7 Merge pull request #224 from AntelopeIO/docs-openapi-trace_api-3.1
[3.1] updated trace_api openapi documentation
2022-09-27 09:48:33 -07:00
Chris Gundlach eaeaf4ab3d Merge branch 'main' into feature_prometheus_plugin 2022-09-27 09:26:53 -05:00
Luis Paris bed1ac996e Merge pull request #238 from AntelopeIO/docs/devrel-24
[3.1] Sync docs with main (docs)
2022-09-27 09:51:45 -04:00
Eric Passmore ba983dba2a Merge remote-tracking branch 'origin/release/3.1' into docs-openapi-trace_api-3.1 2022-09-26 15:57:55 -07:00
Eric Passmore c0efca0617 trace_api docs show all schemas returned
- shorted description refered back to developer docs
- allow return types for get_blocks any of BlockTraceV0, BlockTraceV1, BlockTraceV2
   - BlockTraceV2 can return either Transaction Type V1 or Transaction Type V2
- allow return types for get_transaction_trace any of TransactionTraceV0, TransactionTraceV1, TransactionTraceV2
2022-09-26 15:56:28 -07:00
Eric Passmore dd3e6e01b1 Merge remote-tracking branch 'origin/main' into docs-openapi-trace_api 2022-09-26 15:51:25 -07:00
Eric Passmore dfbc9cda6d trace_api docs show all schemas returned
- shorted description refered back to developer docs
- allow return types for get_blocks any of BlockTraceV0, BlockTraceV1, BlockTraceV2
   - BlockTraceV2 can return either Transaction Type V1 or Transaction Type V2
- allow return types for get_transaction_trace any of TransactionTraceV0, TransactionTraceV1, TransactionTraceV2
2022-09-26 15:44:35 -07:00
Luis 55d9bb551c add manual links to plugins API reference 2022-09-26 18:15:08 -04:00
Luis fcafd0cb1f make html comment MDX-compatible for doc6s parsing :doc 2022-09-26 18:14:47 -04:00
Luis 9c8e0d0e76 replace applicable eosio refs to antelope :doc 2022-09-26 18:14:23 -04:00
Luis 2599b8d0d9 curate github and eosnetwork.com links :doc 2022-09-26 18:13:58 -04:00
Luis 1f0b40f1aa fix existing docs.eosnetwork.com links :doc 2022-09-26 18:13:37 -04:00
Luis cd5a76f49f replace EOSIO refs with Antelope if applicable :doc 2022-09-26 18:13:00 -04:00
Eric Passmore de0756acce small fixes per review comments 2022-09-26 18:11:31 -04:00
Eric Passmore 2bbcdae2f6 documentation fixes to power developer doc portal
* Support MDX parsing
* Replace github references to EOS Network Foundation
* Replace references to old documentation portal
* Fix broken links

Markdown files under `docs` and under `tutorial`

The developer documentation portal is powered by markdown files. These files are parsed to create a nice looking web site. We use MDX as the parsing engine. MDX requires all html tags are closed. We went through all the files removing unneeded '<hr>' tags, enclosing angle brackets in quotes, and closing img tags.

Many times we found documentation pointing to old repositories that had not been updated in years. We updated the links and pointed to repositories that are better maintained.

We made sure links to the documentation portal did not leak back to older, previous versions.

We found relative links that no longer existed. We made sure to point the links to best location. Sometimes the links broke because were missing a key file extension. We made sure to add back the file extenstion.

**Note:** This is essentially a no-op; however summarizing here for anyone following the commit history. Glossary and Protocol Guides were added and removed during the course of development. We had added a Glossary and Protocol Guides , and we decided to utilize the welcome repository as the source for both.

commit ba20420c42f2f8bbf3396102d3ac22261028af30
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 12:46:52 2022 -0700

    Testsnets anchor link was not working rm it

commit d5de39dbbe250d2a9878c82de990c086c3b7b122
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 10:27:42 2022 -0700

    adding missing .md ext

commit 9dbb885d2eb308e60a2db909c9aed7b5dcb4289a
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 10:24:49 2022 -0700

    found another eos.io reference to replace

commit 6a10c44b5863552c85c283db5b6d24e84b84f2cf
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 08:47:02 2022 -0700

    moved away from eos testnet

commit 023c8e50724b766b0b9c8ce859d106101bc90fc8
Merge: 9d486ab51 6514a7d63
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Thu Aug 4 08:33:00 2022 -0700

    Merge remote-tracking branch 'origin/main' into documentation-fixes

    Fixing docs by removing eosio references, need resync with main to catch merge issues early

commit 9d486ab51aa399a4e5c7a038c19531071a88e900
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Aug 2 08:19:36 2022 -0700

    updated protocol-guides links to include number

commit 907d9e2af8796087ba830f10f53df0063d0a621d
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Fri Jul 29 16:23:41 2022 -0700

    removed general_info replaced by welcome repository markdown

commit 07efa3fb831ef2d57f68be0ef3aa21e28c346a80
Merge: 056239ccc d36ca7a52
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Fri Jul 29 07:10:24 2022 -0700

    merging with upstream/main keeping up to date

commit 056239cccb5e3337b5598364190cd4dc9d16a281
Merge: b921bdf98 b378866ef
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 17:08:43 2022 -0700

    Merge remote-tracking branch 'refs/remotes/origin/documentation-fixes' into documentation-fixes

    Note pulled in "changes to lower bound description" 766C6164
    Resolved Conflicts No Changes:
    	docs/general_info/glossary.md
    	docs/general_info/protocol-guides/consensus_protocol.md
    	docs/general_info/protocol-guides/network_peer_protocol.md
    	docs/general_info/protocol-guides/transactions_protocol.md
    Changes to be committed:
    	modified:   docs/general_info/protocol-guides/accounts_and_permissions.md
    	modified:   libraries/chain/include/eosio/chain/webassembly/interface.hpp

commit b921bdf987c0206b6704968eaca3bc05c505d469
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 16:44:25 2022 -0700

    removed eos.io from markdown

    - Added docs/general_info/glossary.md
    - Added docs/general_info/protocol-guides
         - overview only for accounts_and_permissions.md
         - overview only for transactions_protocol.md
         - overview only for network_peer_protocol.md
         - overview only for consensus_protocol.md
    - Updated glossary.md to relative path (no more eos.io)
    - Fixed links adding missing .md extenstion
    - Updated protocol-guides to relative path (no more eos.io)
    - Included BiosBoot tutorial on main document portal
    - Fixed or removed broken links inside newly added glossary, guides, and tutorials

    Note: squashed commits on branch down to single commit, less noise, easier to cherry-pick

commit b378866eff4be5cd3986c88a6d6ff39a802fee57
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 15:36:42 2022 -0700

    adding back more missing .md extenstions, and simplying bios-boot-tutorial

commit 2f7c0e65cbf360ba13102c8a5341714c4ce1159d
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 15:14:16 2022 -0700

    fixing more missing .md ext

commit 07b1f16962921acdd35d24c87e6a87378c7a10fc
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 15:03:06 2022 -0700

    updated with .md ext

commit 002b01ddc81e67d09dba40fae9cc2303b4efed7b
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 14:29:33 2022 -0700

    updated formate for glossary links to include .md

commit bf344ae16c76ca1109672b8e9cccc5a69527e3d3
Merge: 3bbb956b5 0cb196b7f
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 08:48:05 2022 -0700

    merging main into documentation-fixes, after removing eso.io references adding glossary and guides

commit 3bbb956b524267c788dd9614011abeda1be96b93
Author: Eric Passmore <eric.passmore@gmail.com>
Date:   Tue Jul 26 08:47:12 2022 -0700

    remove eos.io references, added glossary, guides
2022-09-26 18:09:43 -04:00
766C6164 61176512ef Moved unsupported stuff in a separate file 2022-09-26 18:04:20 -04:00
766C6164 6cccdfa98c Added FreeBSD build instructions 2022-09-26 18:03:50 -04:00
Eric Passmore 847d114e62 general doc cleanup fixed broken links and unclosed '<' 2022-09-26 18:02:56 -04:00
766C6164 287a6e799a Fixed butchered by md plugin index 2022-09-26 17:52:54 -04:00
766C6164 27cb589ad9 Update "an EOSIO" 2022-09-26 17:52:29 -04:00
766C6164 0da59704a6 Mandel -> EOSIO 2022-09-26 17:51:54 -04:00
766C6164 4c8f1fd39f Fixes added link to DUNE 2022-09-26 17:50:51 -04:00
766C6164 05099f957a docs cleanup 2022-09-26 17:49:23 -04:00
Matt Witherspoon d5af1838fb misc cmake cleanup & discrete license removal to fc desubmod 2022-09-26 16:23:28 -04:00
766C6164 57cbae4ed9 Added bash-completions configs to leap-util and cleos 2022-09-26 12:08:13 -04:00
Matt Witherspoon 92b790b8e4 addtional minimal changes to get fc fully built & test after desubmod 2022-09-25 21:48:20 -04:00
Matt Witherspoon 74cd5fabdc desubmodule AntelopeIO/fc@6f9fc55
Co-authored-by: Kevin Heifner <heifnerk@objectcomputing.com>
Co-authored-by: Brian Johnson <johnsonb@objectcomputing.com>
Co-authored-by: Areg Hayrapetian <arhag@users.noreply.github.com>
Co-authored-by: Daniel Larimer <dan.larimer@block.one>
Co-authored-by: Bart Wyatt <bart.wyatt@block.one>
Co-authored-by: Matias Romeo <matias.romeo@gmail.com>
Co-authored-by: Timothy Banks <timothy.banks@block.one>
Co-authored-by: Huang-Ming Huang <huangh@objectcomputing.com>
Co-authored-by: Anton Perkov <anton.perkov@block.one>
Co-authored-by: Bucky Kittinger <larrykittinger@gmail.com>
Co-authored-by: Allen Han <allenhan2@gmail.com>
Co-authored-by: Steven Watanabe <steven.watanabe@block.one>
Co-authored-by: Nathan Hourt <nat.hourt@gmail.com>
Co-authored-by: Jonathan Giszczak <jonrg@hypercubepc.com>
Co-authored-by: Jeeyong Um <conr2d@gmail.com>
Co-authored-by: Matthieu Vachon <matt@dfuse.io>
Co-authored-by: Clayton Calabrese <calabresec@objectcomputing.com>
Co-authored-by: Khaled Al-Hassanieh <khaled.alhassanieh@gmail.com>
Co-authored-by: johndebord <i@johndebord.tk>
Co-authored-by: Todd Fleming <tbfleming@gmail.com>
Co-authored-by: Peter Oschwald <oschwaldp@objectcomputing.com>
Co-authored-by: Paul Calabrese <calabrep@objectcomputing.com>
Co-authored-by: littlekfc <309999096@qq.com>
Co-authored-by: Lin Huang <lin.huang@eosnetwork.com>
Co-authored-by: Jeffrey Smith II <jeffreyssmith2nd@gmail.com>
Co-authored-by: Adam Mitz <mitza@objectcomputing.com>
Co-authored-by: Thiago Souza <thiago@elastic.co>
Co-authored-by: Chris Gundlach <cgundlach@naughtydawgllc.com>
Co-authored-by: zaratustra <zrts@protonmail.com>
Co-authored-by: Yue Han <yue.han-ext@block.one>
Co-authored-by: Ted Cahall @ EOS Network Foundation <ted@eosn.foundation>
Co-authored-by: Tadas <taduxt@gmail.com>
Co-authored-by: Steven Strand <steven.strand@block.one>
Co-authored-by: Spartucus <spartucus@users.noreply.github.com>
Co-authored-by: Phil Mesnier <mesnierp@ociweb.com>
Co-authored-by: Pete Cheyne <pete.cheyne@gmail.com>
Co-authored-by: Patrick Raphael <patrick.raphael@block.one>
Co-authored-by: Kayan <taokayan13@gmail.com>
Co-authored-by: Harry Wong <harrywong@live.com>
Co-authored-by: anr09 <qiuyu.an@hotmail.com>
Co-authored-by: Andrianto Lie <andrianto.lie@block.one>
2022-09-25 21:28:28 -04:00
Kevin Heifner e401c23f0e Merge pull request #227 from AntelopeIO/GH-223-ctrl-c-test
[3.1 -> main] Test fix: wait for system init to be in block
2022-09-24 16:29:57 -05:00
Kevin Heifner 4449095716 Merge remote-tracking branch 'origin/release/3.1' into GH-223-ctrl-c-test 2022-09-24 15:59:57 -05:00
Kevin Heifner 0571a0a6c0 Merge pull request #226 from AntelopeIO/GH-223-ctrl-c-test-3.1
[3.1] Test fix: wait for system init to be in block
2022-09-24 15:59:22 -05:00
Eric Passmore 5c76188db3 Saying in sync. Merge 'origin/main' into docs-openapi-trace_api 2022-09-24 13:24:33 -07:00
Eric Passmore 86ea6b39e9 taking workflow.yaml updates to stay in sync 2022-09-24 13:20:04 -07:00
Matt Witherspoon c665605d5a Merge pull request #221 from AntelopeIO/always_test_lr
[3.2] always run the long running tests, including for pull requests
2022-09-24 11:26:50 -04:00
Kevin Heifner f2d077f70f GH-223 Wait for system init transaction to make it into a block. A test failed because it attempted to use the system contract before it was init-ed. 2022-09-24 08:52:56 -05:00
Kevin Heifner 68b2543557 GH-223 Remove hard-coded Test succeeded message 2022-09-24 08:52:04 -05:00
Matt Witherspoon 5086dee55b Merge pull request #225 from AntelopeIO/ignore_missing_files_tar_ci_main
[3.1 -> main] noop merge of #211 - when uploading failure logs, ignore missing files
2022-09-23 23:29:15 -04:00
Matt Witherspoon cb58bba324 Merge branch 'main' into always_test_lr 2022-09-23 18:40:07 -04:00
Matt Witherspoon 0d4b6a7aaf Merge remote-tracking branch 'origin/release/3.1' into ignore_missing_files_tar_ci_main 2022-09-23 18:22:58 -04:00
Matt Witherspoon f1d2ff57ca Merge pull request #211 from AntelopeIO/ignore_missing_files_tar_ci
[3.1] when uploading failure logs, ignore missing files
2022-09-23 18:17:22 -04:00
Eric Passmore 31e631473b updated trace_api openapi documentation
- added trace_transcation method
- added new component types
   - ERROR_DETAILS
   - TRACE
   - TRANSACTION_HEADER
   - TRANSACTION_TRACE
   - BLOCK_TRACE
- updated return schema for both get_block and get_transaction
2022-09-23 13:09:00 -07:00
Kevin Heifner dec785155c GH-209 PR feedback 2022-09-23 14:33:47 -05:00
Eric Passmore fa87b159ed updated schema for trace_api openapi
- Added new component schemas
   - ERROR_DETAILS
   - TRACE
   - TRANSACTION_HEADER
   - TRANSACTION_TRACE
   - BLOCK_TRACE
- updated 4xx errors with shared ERROR_DETAILS component
- verification and updates for schema returned for get_block
- verifcation and updates for schema returned for get_transaction
2022-09-23 12:24:40 -07:00
Kevin Heifner 954ee42233 GH-209 log levels not debug levels 2022-09-23 14:10:32 -05:00
Kevin Heifner 2c877bae80 GH-209 Add information about log levels 2022-09-23 14:08:17 -05:00
Kevin Heifner 5d87e004d7 Merge pull request #220 from AntelopeIO/GH-217-fix-lr-test
[3.1 -> main] Fix nodeos_retry_transaction_test.py
2022-09-23 13:15:28 -05:00
766C6164 511f6dbc69 Removet leftovers of genesis from chain-state sc 2022-09-23 13:21:32 -04:00
766C6164 e592a4a584 Multiple changes 2022-09-23 13:19:15 -04:00
Matt Witherspoon 239bb348d1 always run the long running tests -- including for PRs 2022-09-23 12:50:54 -04:00
Kevin Heifner b288dacd75 Merge pull request #219 from AntelopeIO/GH-186-std-except-debug-log
[3.2] Log std::exception while handling API calls at debug level
2022-09-23 11:45:04 -05:00
Eric Passmore 8827ce38a4 updated trace_api openapi docs
- updated return schema for get_block
- updated description for get_transaction_trace
2022-09-23 08:24:57 -07:00
Eric Passmore 6393c07995 Updated docs for openapi /v1/trace_api
- updated description with notes on options needed at startup
- updated json returns for 400,404, and 500
- added get_transaction_trace method
2022-09-23 08:04:29 -07:00
Kevin Heifner efd6f0bd78 Merge remote-tracking branch 'origin/release/3.1' into GH-217-fix-lr-test 2022-09-23 09:32:45 -05:00
Kevin Heifner 62ae11f75a Merge pull request #218 from AntelopeIO/GH-217-fix-lr-test-3.1
[3.1] Fix nodeos_retry_transaction_test.py
2022-09-23 09:31:27 -05:00
Kevin Heifner a73b5236e6 GH-186 Log std::exception for http calls at debug level. 2022-09-23 08:58:11 -05:00
Kevin Heifner 57fa42d816 GH-217 transferFunds returns None on failure 2022-09-23 07:30:36 -05:00
Kevin Heifner 1cc2fce50f GH-217 Remove debug print causing log spam 2022-09-23 07:30:08 -05:00
Kevin Heifner da1d88c069 Merge pull request #214 from AntelopeIO/GH-139-cleanup
[3.2] Cleanup regression python test handling of CalledProcessError
2022-09-22 21:06:17 -05:00
Kevin Heifner 885d8faba1 GH-139 Use Python 3.5+ feature of capturing stderr in CalledProcessError 2022-09-22 18:39:54 -05:00
Kevin Heifner b888d9a3b3 GH-139 Use Python 3.5+ feature of capturing stderr in CalledProcessError 2022-09-22 18:34:00 -05:00
Kevin Heifner a465ecebfa Merge pull request #212 from AntelopeIO/GH-139-cleos-return-codes
[3.1 -> main] Update cleos to return an error code on failed trx processing
2022-09-22 15:18:36 -05:00
Kevin Heifner bf4267ef1a Merge remote-tracking branch 'origin/release/3.1' into GH-139-cleos-return-codes 2022-09-22 13:54:19 -05:00
Kevin Heifner 58102971ea Merge pull request #210 from AntelopeIO/bump-version-3.1.1
[3.1] Bump version 3.1.1
2022-09-22 13:47:30 -05:00
Matt Witherspoon 746cc81f29 tar --ignore-failed-read on uploaded failure logs 2022-09-22 14:46:28 -04:00
Kevin Heifner f12be2fdec bump version to 3.1.1 2022-09-22 13:14:15 -05:00
Matt Witherspoon 893e0ab424 Merge pull request #201 from AntelopeIO/incoming_persisted_type
[3.2] add missing incoming_persisted in unapplied transaction queue's get_trx_type
2022-09-22 12:18:08 -04:00
Matt Witherspoon c58668f3bb Merge pull request #202 from AntelopeIO/no_elog_on_exit
[3.2] remove elog when ship thread exits normally
2022-09-22 12:16:30 -04:00
Kevin Heifner 508ff97100 Merge pull request #199 from AntelopeIO/GH-139-cleos-return-codes-3.1
[3.1] Update cleos to return an error code on failed trx processing
2022-09-22 11:15:37 -05:00
Luis Paris 2bfddd467b Merge pull request #204 from AntelopeIO/docs/devrel#28-29-3.1
[3.1] Curate eosio refs, and github, eosnetwork links (docs)
2022-09-22 10:57:44 -04:00
Luis bf53b6334c add manual links to plugins API reference 2022-09-22 09:50:07 -04:00
Kevin Heifner ced3887878 GH-139 remove unneeded optional 2022-09-22 07:01:05 -05:00
Luis 2c7a00408b make html comment MDX-compatible for doc6s parsing :doc 2022-09-22 01:22:58 -04:00
Luis 6aae754d9c replace applicable eosio refs to antelope :doc 2022-09-22 01:13:26 -04:00
Luis 013ed37253 curate github and eosnetwork.com links :doc 2022-09-22 01:11:26 -04:00
Luis 1a47912020 fix existing docs.eosnetwork.com links :doc 2022-09-22 01:10:28 -04:00
Luis 8aca9cbd17 replace EOSIO refs with Antelope if applicable :doc 2022-09-22 01:09:56 -04:00
Kevin Heifner 8282cd5a90 GH-139 verify is an object before get_object 2022-09-21 22:48:38 -05:00
Matt Witherspoon 79d74aca1b remove elog when ship thread exits 2022-09-21 22:36:05 -04:00
Matt Witherspoon 77d4029a12 add missing incoming_persisted in get_trx_type 2022-09-21 22:24:39 -04:00
Kevin Heifner 89466843df GH-139 stdout,stderr are byte arrays 2022-09-21 15:06:54 -05:00
Kevin Heifner 04a831e77a GH-139 On cleos failure capture both stderr and stdout in output as some tests are expecting to find errors in the trace. 2022-09-21 14:48:59 -05:00
Kevin Heifner ea7e3a34ea GH-139 Fix for setting error code when no error actually happened. 2022-09-21 13:12:55 -05:00
Matt Witherspoon 25db760ad7 Merge pull request #198 from AntelopeIO/ship_recover_log_main
[3.1 -> main] promote ship log recovery logging from dlog to ilog
2022-09-21 13:53:35 -04:00
Matt Witherspoon 6c56cb823a Merge remote-tracking branch 'origin/release/3.1' into ship_recover_log_main 2022-09-21 12:25:44 -04:00
Matt Witherspoon b7f969d699 Merge pull request #194 from AntelopeIO/ship_recover_log
[3.1] promote ship log recovery logging from dlog to ilog
2022-09-21 12:25:10 -04:00
Kevin Heifner 3b57d5a258 GH-139 Update cleos to return an error code on failed trx processing similar to before --return-failure-trace was added. 2022-09-21 10:48:13 -05:00
Eric Passmore e06b19696b Merge pull request #197 from AntelopeIO/eosio-schema-ref
[3.2] updated schema references to eosnetwork host
2022-09-21 07:44:37 -07:00
Eric Passmore 84f6fed4ba updated schema references to eosnetwork host 2022-09-21 07:26:37 -07:00
Kevin Heifner 78aa0b1727 Merge pull request #182 from AntelopeIO/GH-109-get-unapplied
[3.2] Add /v1/chain/get_unapplied_transactions to producer_api_plugin
2022-09-21 07:13:49 -05:00
Matt Witherspoon 18d7287461 make ship recovery logging be at info level 2022-09-20 21:40:08 -04:00
Christopher Gundlach cf24fe9cbf Merge pull request #190 from AntelopeIO/add_prometheus_plugin
Add Prometheus Plugin
2022-09-20 14:10:21 -05:00
766C6164 08e0f22643 Added chain subcomand, refactoring, bugfixes 2022-09-20 14:21:13 -04:00
Chris Gundlach d351840a70 changed to make building prometheus plugin mandatory 2022-09-20 09:16:40 -05:00
Chris Gundlach 78c6c77c00 took out unecessary includes/dependencies 2022-09-19 14:58:20 -05:00
Chris Gundlach 46582601ea took out unnecessary include/lib paths 2022-09-19 14:57:53 -05:00
Chris Gundlach cdb4156702 added prometheus plugin skeleton code 2022-09-19 14:22:21 -05:00
Chris Gundlach 642653a37f cmake changes to add prometheus plugin 2022-09-19 14:21:08 -05:00
Kevin Heifner 6544a1aacd Merge pull request #189 from AntelopeIO/GH-178-lib-timeout-main
[3.1 -> main] trx_finality_status_forked_test fix
2022-09-19 12:38:43 -05:00
Kevin Heifner 3ef3e847cb Merge remote-tracking branch 'origin/release/3.1' into GH-178-lib-timeout-main 2022-09-19 12:20:46 -05:00
Kevin Heifner 296b797a39 Merge pull request #183 from AntelopeIO/GH-178-lib-timeout-3.1
[3.1] trx_finality_status_forked_test fix
2022-09-19 12:20:17 -05:00
Matt Witherspoon 43cfa0fe4c Merge pull request #185 from AntelopeIO/label_new_issues
[3.2] label new issues with 'triage' label and add them to the Team Backlog project as Todo
2022-09-19 10:18:46 -04:00
Matt Witherspoon 9718e52802 label new issues with 'triage' label and add them to org project 2022-09-18 22:43:14 -04:00
766C6164 75ffc6b6f4 Updated CLI11 header to the latest 2022-09-18 22:28:33 -04:00
Eric Passmore 02ef7fc6c7 fixed openapi doc, conflic in get_account_ram_corrections 2022-09-17 13:52:53 -07:00
Eric Passmore f548d3698b added get_unapplied_transactions to openapi docs 2022-09-17 13:37:12 -07:00
Kevin Heifner c7edfc6796 GH-178 Allow longer time for node to sync up after fork 2022-09-17 12:39:48 -05:00
Kevin Heifner 7a064a58ce GH-109 Add /v1/chain/get_unapplied_transactions endpoint to producer_api_plugin 2022-09-17 10:03:22 -05:00
Lin Huang 471b08ef22 Merge pull request #180 from AntelopeIO/fix_relative_path_main
[3.1 -> main] pinned_build.sh: make relative path work
2022-09-16 13:56:16 -04:00
Lin Huang 94378c4b4d Merge remote-tracking branch 'origin/release/3.1' into fix_relative_path_main 2022-09-16 13:34:43 -04:00
Lin Huang b316199f14 Merge pull request #179 from AntelopeIO/fix_relative_path
[3.1] pinned_build.sh: make relative path work
2022-09-16 13:30:07 -04:00
Lin Huang 20b3fe654c pinned_build.sh: make relative path work 2022-09-16 11:44:15 -04:00
Eric Passmore 9b49989ddc Merge pull request #171 from AntelopeIO/docs-plugin-producer
Docs:  http protocol spec for producer plugin
2022-09-16 07:53:18 -07:00
Kevin Heifner b767da350e GH-109 Add lower_bound(trx_id) 2022-09-16 08:57:51 -05:00
Kevin Heifner dfbe904db7 GH-109 No reason to store expiration 2022-09-16 07:26:54 -05:00
Matt Witherspoon 5564e9c325 Merge pull request #173 from AntelopeIO/enable_more_platform_tests
[3.2] enable all tests for Ubuntu 22; NP & LR tests for Ubuntu 18
2022-09-15 20:52:54 -04:00
Matt Witherspoon 781aae4cbd Merge pull request #172 from AntelopeIO/ptests_to_hightier
[3.2] switch parallel tests to new runner type
2022-09-15 20:52:40 -04:00
Kevin Heifner e3addf9da4 Merge branch 'main' into ptests_to_hightier 2022-09-15 19:41:29 -05:00
Kevin Heifner b98a223b01 Merge branch 'main' into docs-plugin-producer 2022-09-15 19:41:14 -05:00
Kevin Heifner 56f858d97a Merge pull request #175 from AntelopeIO/GH-174-read-only-fail
[3.2] Do not apply 3-strike rule when subjective billing is disabled
2022-09-15 19:40:50 -05:00
Kevin Heifner b47f3f5635 GH-174 Do not track failures when subjective enforcement disabled otherwise it can affect trxs outside of those failures 2022-09-15 18:53:18 -05:00
Kevin Heifner eaeaec0278 GH-174 Do not apply 3-strike rule when subjective billing is disabled or if read-only transaction. 2022-09-15 18:22:02 -05:00
Matt Witherspoon 85cab27623 enable CI testing on more platform combinations 2022-09-15 18:12:56 -04:00
Matt Witherspoon 5c38a6d8d8 only give package write permission to single job that requires it 2022-09-15 17:49:43 -04:00
Matt Witherspoon e9d99f71f5 move NP&LR test population into action; fix action zstd on u18 2022-09-15 17:49:35 -04:00
Eric Passmore 2aefa0d3c9 updated swagger for http production producer plugin 2022-09-15 13:30:36 -07:00
Kevin Heifner 44ec05bfce Merge pull request #151 from AntelopeIO/GH-149-sub-3-strike
[3.2] Add 3-strike rule to speculative blocks
2022-09-15 14:51:08 -05:00
Kevin Heifner 86ca76dbf1 Merge pull request #158 from AntelopeIO/GH-118-cleos-msig
[3.2] cleos: only unpack action data when explicitly asked
2022-09-15 14:50:53 -05:00
Matt Witherspoon b473d78aa0 commit package-lock.json to ensure reproducibility of dist/ generation 2022-09-15 15:08:59 -04:00
Matt Witherspoon 58a772f677 Merge pull request #167 from AntelopeIO/no_leaky_release-build
[3.1 -> main] use a temp dir for release-build test as it can leak creation of config.ini in to default location
2022-09-15 11:20:57 -04:00
Kevin Heifner 04c625bcbf Merge pull request #145 from AntelopeIO/GH-119-more-logging
[3.2] Log block trx summary for speculative and BP blocks
2022-09-15 09:18:05 -05:00
Matt Witherspoon 5074bea663 Merge remote-tracking branch 'origin/release/3.1' into no_leaky_release-build 2022-09-15 10:11:15 -04:00
Matt Witherspoon f0427832a9 Merge pull request #165 from AntelopeIO/no_leaky_release-build_31x
[3.1] use a temp dir for release-build test as it can leak creation of config.ini in to default location
2022-09-15 10:05:55 -04:00
Peter Oschwald 15472c4186 Merge pull request #166 from AntelopeIO/tutorial_genesis_update
[3.2] Remove initial_chain_id in genesis.json as it is not supported.
2022-09-15 07:54:05 -05:00
Peter Oschwald f66af885ab Remove initial_chain_id in genesis.json as it is not supported. A remnant of long ago... 2022-09-14 19:17:55 -05:00
Matt Witherspoon b189847825 use a temp dir for release-build test as it can leak creation of config 2022-09-14 19:09:38 -04:00
Kevin Heifner c0233fbc3c GH-119 Cleanup const use. 2022-09-14 16:27:12 -05:00
Matt Witherspoon 1911080876 move parallel tests to 'hightier' runner 2022-09-14 17:25:57 -04:00
766C6164 134c448d3a Linting and cleanup 2022-09-14 15:15:45 -04:00
766C6164 acc1a62ea1 Simplified makefile 2022-09-14 14:52:18 -04:00
766C6164 4829bcf17a Added bash-complete scripts for both leap-util and cleos 2022-09-14 14:33:39 -04:00
766C6164 45e33e594b Moved cli11 in interface only lib, adjusted cleos and leap-util to use it 2022-09-14 13:43:19 -04:00
Kevin Heifner cf70327975 GH-118 Update test case for unpacked-action-data option. Also add new test case expecting default of packed action data. 2022-09-14 09:57:59 -05:00
Kevin Heifner 7aa26d5dc3 GH-118 Revert back to not automatically unpacking action data. Instead only unpack action data when explicitly aksed via --unpack-action-data option. 2022-09-14 09:57:05 -05:00
Matt Witherspoon 3395c0dcaa Merge pull request #156 from AntelopeIO/pinned_script_dl_overwrite_main
[3.1 -> main] always overwrite old downloads in pinned build script
2022-09-14 08:15:46 -04:00
Matt Witherspoon ddfe2b6bb0 Merge pull request #154 from AntelopeIO/json_snapshot_warns
[3.2] fix two signed/unsigned warnings in json snapshot reader
2022-09-14 08:05:42 -04:00
Matt Witherspoon 8bef87fdd6 Merge remote-tracking branch 'origin/release/3.1' into pinned_script_dl_overwrite_main 2022-09-14 08:03:37 -04:00
Matt Witherspoon 9f66b0b0e5 Merge pull request #155 from AntelopeIO/pinned_script_dl_overwrite_31x
[3.1] always overwrite old downloads in pinned build script
2022-09-14 08:03:06 -04:00
Kevin Heifner ad84c3afa3 Merge pull request #153 from AntelopeIO/GH-115-no-blocks-main
[3.1 -> main] net_plugin fix startup issue when peer does not have requested blocks
2022-09-14 06:59:58 -05:00
Matt Witherspoon 8cd2e11610 always overwrite old downloads in pinned build script 2022-09-13 22:06:03 -04:00
Matt Witherspoon 3220de9527 fix two signed/unsigned warnings in json snapshot reader 2022-09-13 21:51:37 -04:00
Kevin Heifner 1cf95cf7c4 Merge remote-tracking branch 'origin/release/3.1' into GH-115-no-blocks-main 2022-09-13 16:06:29 -05:00
Kevin Heifner bf115f72ae Merge pull request #135 from AntelopeIO/GH-115-no-blocks-3.1
[3.1] net_plugin fix startup issue when peer does not have requested blocks
2022-09-13 16:05:22 -05:00
Kevin Heifner d6b3efebe3 GH-149 Add 3-strike rule to speculative blocks. 2022-09-13 11:51:19 -05:00
Matt Witherspoon b7bb2d3e94 move wasm-spec-tests to unittest directory 2022-09-13 12:14:20 -04:00
Matt Witherspoon 758a033c63 no longer need submodules during test 2022-09-13 12:10:10 -04:00
Matt Witherspoon e7457c83ec Merge pull request #120 from eosswedenorg/cpack-debian
CPACK: Improve deb package filenames
2022-09-13 11:34:31 -04:00
Henrik Hautakoski acd452e37b package.cmake: set CPACK_DEBIAN_PACKAGE_ARCHITECTURE instead of DEB_ARCH. 2022-09-13 15:44:52 +02:00
ClaytonCalabrese b650d0aa13 Merge pull request #146 from AntelopeIO/fix_multithreaded_snapshot_test
[3.2] Fix multithreaded Snapshot test Failure
2022-09-12 18:11:51 -05:00
Kevin Heifner 88e6f0dd10 GH-119 Move log of every failed trx to transaction_failure_tracing logger. 2022-09-12 16:16:18 -05:00
Kevin Heifner 636c0f5855 GH-134 Use file under temp dir. 2022-09-12 15:35:16 -05:00
Clayton Calabrese bdfba6720c use pid to avoid collision in snapshot tests when running multithreaded. 2022-09-12 15:34:47 -05:00
Kevin Heifner ac6fdb8ccd GH-119 Move idle reporting into on_incoming_transaction_async 2022-09-12 13:49:54 -05:00
Kevin Heifner 0b1c8ab293 Merge pull request #96 from AntelopeIO/http-max-response
[3.2] Remove hardcoded 10ms limit for chain_api_plugin calls
2022-09-12 12:52:16 -05:00
Kevin Heifner bfac689761 GH-119 Refactor trx idle time calculation. Track and report failed/successful trx #/time. 2022-09-12 12:08:50 -05:00
766C6164 613627f4e9 Added handling of return code 2022-09-11 21:32:57 -04:00
Kevin Heifner e56ea68db1 GH-119 Track and report block idle time and trx times per block for produced and speculative blocks 2022-09-10 14:19:49 -05:00
Matt Witherspoon 7175728e96 Merge pull request #137 from AntelopeIO/abieos_ship_fixes
[3.2] bump abieos submodule to branch with 2.0/3.1 ship_protocol.hpp fixes
2022-09-10 13:54:38 -04:00
Matt Witherspoon 1f1ec234ad bump abieos submodule to main with 2.0/3.1 ship fixes 2022-09-10 12:53:06 -04:00
Matt Witherspoon c714f8b235 Merge pull request #136 from AntelopeIO/restore_yubihsm
[3.2] Revert "remove YubiHSM support from keosd" (#66); restore this functionality for now
2022-09-09 22:35:34 -04:00
Matt Witherspoon a0747e7f91 bump abieos submodule to refreshed 2.0/3.1 fix branch 2022-09-09 18:23:59 -04:00
Matt Witherspoon 623477958b bump abieos submodule to branch with 2.0/3.1 ship fixes 2022-09-09 18:05:30 -04:00
Matt Witherspoon 474acaaf92 Revert "remove YubiHSM support from keosd" 2022-09-09 16:30:13 -04:00
Kevin Heifner 6bb5f503eb Merge pull request #133 from AntelopeIO/GH-127-trx-fork
[3.1 -> main] Test: verify on the correct fork before verifying trx status
2022-09-09 15:27:11 -05:00
Kevin Heifner 5c20fa3744 Merge remote-tracking branch 'origin/release/3.1' into GH-127-trx-fork 2022-09-09 15:03:11 -05:00
Kevin Heifner 1710441d57 Merge pull request #128 from AntelopeIO/GH-127-trx-fork-3.1
[3.1] Test: verify on the correct fork before verifying trx status
2022-09-09 15:02:38 -05:00
Kevin Heifner ac0cf77f5a GH-115 Only reset sync_source if actually used. Otherwise code is expecting a response from a different source than sync_source. 2022-09-09 14:37:33 -05:00
Kevin Heifner e46a6386df GH-127 Verify on the correct fork before verifying trx status 2022-09-09 12:29:54 -05:00
Kevin Heifner c489ba4c19 GH-115 No harm in sending a handshake when no block has ever been received. 2022-09-09 08:43:47 -05:00
Kevin Heifner be8f3c973c Merge pull request #125 from AntelopeIO/sub-bill-uint32-main
[3.1 -> main] Allow for larger subjective CPU billing amounts
2022-09-08 14:52:51 -05:00
Kevin Heifner cf4835170a Merge remote-tracking branch 'origin/release/3.1' into sub-bill-uint32-main 2022-09-08 14:21:39 -05:00
Kevin Heifner 06d6cf371d Merge pull request #124 from AntelopeIO/sub-bill-uint32
[3.1] Allow for larger subjective CPU billing amounts
2022-09-08 14:13:10 -05:00
ClaytonCalabrese c18ed8f63b Merge pull request #112 from AntelopeIO/json_snapshot_minus_nodeos
[3.2] Add Support For Json Snapshots sans Nodeos options
2022-09-08 13:40:39 -05:00
Kevin Heifner 78dc95e81e Merge branch 'release/3.1' into sub-bill-uint32 2022-09-08 13:39:53 -05:00
Kevin Heifner 086ba23c0c uint32_t for microseconds of subjective billing only allows for 1.2hrs before wrapping. Use int64_t instead which matches type used for objective billing. 2022-09-08 08:27:58 -05:00
Henrik Hautakoski c325c1746e package.cmake: use CPACK_DEBIAN_FILE_NAME when setting CPACK_DEBIAN_BASE_FILE_NAME 2022-09-08 14:41:13 +02:00
Henrik Hautakoski f3d9591453 package.cmake: Proper setup .deb filename in CPACK_DEBIAN_FILE_NAME variable. 2022-09-08 14:41:13 +02:00
Henrik Hautakoski 1364041fb6 .gitignore: Don't ignore package.cmake 2022-09-08 14:33:32 +02:00
766C6164 48d55efe31 Added boilerplate for snapshot subcommand 2022-09-07 21:01:33 -04:00
766C6164 60969166db Define cli option for displaying lots of help 2022-09-07 17:27:44 -04:00
Lin Huang 48caccb287 Merge pull request #114 from AntelopeIO/validate_set_whitelist_blacklist_input_main
[3.1 -> main] Validate set whitelist blacklist input main
2022-09-07 17:12:24 -04:00
Lin Huang fa6a9e1dad Merge remote-tracking branch 'origin/release/3.1' into validate_set_whitelist_blacklist_input_main 2022-09-07 16:17:19 -04:00
Lin Huang fc9643125c Merge pull request #113 from AntelopeIO/validate_set_blacklist_whitelist_input
[3.1] validate input of set_whitelist_blacklist, add_greylist_accounts and remove_greylist_accounts
2022-09-07 16:06:17 -04:00
Lin Huang 3784516086 validate input of set_whitelist_blacklist, add_greylist_accounts and remove_greylist_accounts 2022-09-07 15:13:24 -04:00
766C6164 8bc082636e remove accidental clang-format checkin lol 2022-09-06 23:31:09 -04:00
766C6164 1a0d3ef5d5 +=actions_blocklog 2022-09-06 23:29:26 -04:00
766C6164 54b7eac369 +=blocklog, initial raw port 2022-09-06 23:28:53 -04:00
Matt Witherspoon 457b12da91 tweaks to CMakeLists & removal of discrete LICENSE now that desubmoduled 2022-09-06 20:24:53 -04:00
Matt Witherspoon 9fce462de5 desubmodule AntelopeIO/wasm-spec-tests@112c682
Co-authored-by: Jeffrey Smith II <jeffreyssmith2nd@gmail.com>
Co-authored-by: Lin Huang <lin.huang@eosnetwork.com>
Co-authored-by: Damon Revoe <damon.revoe@block.one>
Co-authored-by: systemv <valterdaw@gmail.com>
Co-authored-by: Ted Cahall @ EOS Network Foundation <ted@eosn.foundation>
Co-authored-by: Scott Arnette <scott.a.arnette@gmail.com>
Co-authored-by: Jingjun Zhao <jingjun.zhao@block.one>
Co-authored-by: Christopher Gundlach <cgundlach@naughtydawgllc.com>
2022-09-06 20:23:18 -04:00
Clayton Calabrese 39d2830104 undo changes to nodeos for json snapshots. 2022-09-06 17:36:19 -05:00
Kevin Heifner 9a6bb11bf9 Merge pull request #107 from AntelopeIO/GH-105-finality-test
[3.1 -> main] Fix test failure due to trx hitting near end of block production time
2022-09-06 14:11:08 -05:00
Kevin Heifner 76ab6ccdef Merge remote-tracking branch 'origin/release/3.1' into GH-105-finality-test 2022-09-06 12:25:34 -05:00
Kevin Heifner 04469894b6 Merge pull request #106 from AntelopeIO/GH-105-finality-test-3.1
[3.1] Fix test failure due to trx hitting near end of block production time
2022-09-06 12:24:39 -05:00
Kevin Heifner 539f8a5107 GH-105 Fix for test failure when block reaches validation node very quickly by hitting the end of a block production window. 2022-09-06 10:20:56 -05:00
Kevin Heifner 30736e9b0c Support -1 for http-max-response-time-ms for unlimited. 2022-09-02 12:30:44 -05:00
Kevin Heifner da60fe3ec5 Add support for time_limit_ms to API endpoints: get_activated_protocol_features, get_table_rows, get_table_by_scope, get_producers, get_scheduled_transactions 2022-09-02 11:50:08 -05:00
Kevin Heifner 3a63ac5ccd Merge remote-tracking branch 'origin/main' into http-max-response 2022-09-02 11:01:36 -05:00
Kevin Heifner 06ac1bcc8c Use http-max-response-time for limit on complete run of http call including time for main thread and http thread. Puts limit on complete execution including conversion to JSON. 2022-09-02 10:41:30 -05:00
Matt Witherspoon 2d03e6526c Merge pull request #102 from AntelopeIO/fix_ship_client_b16x
[3.2] fix ship_client test on boost 1.67-1.69
2022-09-01 17:26:10 -04:00
Matt Witherspoon 9c43225f4c Merge pull request #101 from AntelopeIO/cli11_license
[3.1 -> main] add CLI11 license to install
2022-09-01 17:04:48 -04:00
Matt Witherspoon cbbe80dd07 fix ship_client on boost 1.67-1.69 2022-09-01 17:01:14 -04:00
Matt Witherspoon 705b54155b Merge remote-tracking branch 'origin/release/3.1' into cli11_license 2022-09-01 16:37:56 -04:00
Matt Witherspoon f36e59e554 Merge pull request #99 from AntelopeIO/cli11_license_31x
[3.1] add CLI11 license to install
2022-09-01 16:23:09 -04:00
Matt Witherspoon b5c43e1c9b missed removal of RENAME line in cmake 2022-09-01 14:55:49 -04:00
Matt Witherspoon 65f8b20b39 add CLI11 license to install 2022-09-01 14:32:43 -04:00
Kevin Heifner 76e3e418f4 Remove hardcoded 10ms limit for chain_api_plugin calls and instead honor http-max-response-time-ms. 2022-09-01 11:39:57 -05:00
Matt Witherspoon a4bef57acd Merge pull request #95 from AntelopeIO/fix_beast_ws_defect_main
[3.1 -> main] patch pinned build's boost 1.70 to fix websocket defect
2022-09-01 12:06:26 -04:00
Matt Witherspoon 5290de022e Merge remote-tracking branch 'origin/release/3.1' into fix_beast_ws_defect_main 2022-09-01 11:01:43 -04:00
Matt Witherspoon 7935ba8134 Merge pull request #85 from AntelopeIO/fix_beast_ws_defect_31x
[3.1] patch pinned build's boost 1.70 to fix websocket defect
2022-09-01 11:01:02 -04:00
Matt Witherspoon 7c9d1bd73b patch boost 1.70 to fix websocket defect 2022-08-31 22:44:24 -04:00
Clayton Calabrese 782dfafd45 pull in main from origin branch 2022-08-31 18:14:44 -05:00
Matt Witherspoon d3e8c4ab55 Merge pull request #84 from AntelopeIO/not_so_long_running
move tests that are sub 3 minutes out of long running classification
2022-08-31 19:11:19 -04:00
Matt Witherspoon 9f4f9a76bf Merge pull request #83 from AntelopeIO/parallel_nonparallel
[3.2] run nonparallel tests in parallel via separate docker containers
2022-08-31 19:10:17 -04:00
Matt Witherspoon ea86288f6a move tests that are sub 3 minutes out of long running classification 2022-08-31 14:24:13 -04:00
Clayton Calabrese 68827edfd6 delete snapshots from json_snapshot_validity_test 2022-08-31 13:10:31 -05:00
Matt Witherspoon 95321fc44e run non-parallel tests in parallel via containers 2022-08-31 13:00:13 -04:00
Clayton Calabrese 1061b94501 allow new snapshot json test to pass when using multiple threads 2022-08-31 11:07:24 -05:00
766C6164 97c19806d9 Added autocompletion for bash 2022-08-24 21:18:26 -04:00
Clayton Calabrese 21cb19d8ef Merge remote-tracking branch 'origin/snapshot_json_support' into cleanup_improve_json 2022-08-23 11:17:42 -05:00
Clayton Calabrese c42b1b4334 merge from main 2022-08-23 09:40:24 -05:00
766C6164 d961205788 Scaffold, putting cli11 subcommands in separate files 2022-08-22 22:24:35 -04:00
Clayton Calabrese 92dc116c8e move namespace collosion for rapidjson to top of include list to prevent possible collision. Rename rapidjson in libraries. 2022-08-19 17:04:11 -05:00
Clayton Calabrese 5fce72cb71 change rapidjson to interface library in cmakelist 2022-08-19 13:38:08 -05:00
Clayton Calabrese 408afb5817 write rapidjson snapshot validity test case. 2022-08-19 13:37:41 -05:00
Clayton Calabrese c54d0c2716 update save json for snapshot test due to design change. 2022-08-19 13:08:40 -05:00
Kevin Heifner 2520099f7f GH-771 Modify --snapshot option to determine json by extension instead of adding a new option. Improved memory usage so current WAX snapshot can be supported. Modified the JSON output so that table rows are an array which reduces file size and memory usage. Put rapidjson inside an eosio_rapidjson namespace to avoid ODR issues. Change CMakeLists to not compile rapidjson but only include it as it is a header only library. 2022-08-12 15:28:59 -05:00
Clayton Calabrese ea5ce7cc6d cleanup comment and newlines. 2022-08-10 13:35:09 -05:00
Clayton Calabrese aff122104e switch over to rapidjson from fc::json for the json snapshot reader. 2022-08-10 13:28:56 -05:00
Clayton Calabrese 30c833f701 change so json snapshot reader doesn't put entire stream in memory. merge snapshot and jsonsnapshot code handling 2022-08-03 18:41:42 -05:00
Clayton Calabrese 46445273ad add json_snapshot to snapshot_suites so that the json_snapshot is being tested. 2022-07-28 11:02:55 -05:00
Clayton Calabrese 1892a29891 remove vestigial function 'has_section' 2022-07-27 16:38:53 -05:00
Clayton Calabrese afa88ddaaf implement json snapshot reader 2022-07-27 10:51:27 -05:00
1320 changed files with 69965 additions and 2283 deletions
+3
View File
@@ -7,10 +7,13 @@ RUN apt-get update && apt-get upgrade -y && \
g++-8 \
git \
jq \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
libusb-1.0-0-dev \
llvm-7-dev \
ninja-build \
pkg-config \
python3 \
software-properties-common \
zlib1g-dev \
+3
View File
@@ -7,8 +7,11 @@ RUN apt-get update && apt-get upgrade -y && \
git \
jq \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
libusb-1.0-0-dev \
llvm-11-dev \
ninja-build \
pkg-config \
zstd
+3
View File
@@ -7,8 +7,11 @@ RUN apt-get update && apt-get upgrade -y && \
git \
jq \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
libusb-1.0-0-dev \
llvm-11-dev \
ninja-build \
pkg-config \
zstd
@@ -0,0 +1,14 @@
name: 'Parallel ctest'
description: 'Runs a set of labeled ctests in parallel via multiple docker containers'
inputs:
container:
required: true
error-log-paths:
required: true
log-tarball-prefix:
required: true
tests-label:
required: true
runs:
using: 'node16'
main: 'dist/index.mjs'
File diff suppressed because one or more lines are too long
@@ -0,0 +1,69 @@
import child_process from 'node:child_process';
import process from 'node:process';
import stream from 'node:stream';
import fs from 'node:fs';
import zlib from 'node:zlib';
import tar from 'tar-stream';
import core from '@actions/core'
const container = core.getInput('container', {required: true});
const error_log_paths = JSON.parse(core.getInput('error-log-paths', {required: true}));
const log_tarball_prefix = core.getInput('log-tarball-prefix', {required: true});
const tests_label = core.getInput('tests-label', {required: true});
try {
if(child_process.spawnSync("docker", ["run", "--name", "base", "-v", `${process.cwd()}/build.tar.zst:/build.tar.zst`, "--workdir", "/__w/leap/leap", container, "sh", "-c", "zstdcat /build.tar.zst | tar x"], {stdio:"inherit"}).status)
throw new Error("Failed to create base container");
if(child_process.spawnSync("docker", ["commit", "base", "baseimage"], {stdio:"inherit"}).status)
throw new Error("Failed to create base image");
if(child_process.spawnSync("docker", ["rm", "base"], {stdio:"inherit"}).status)
throw new Error("Failed to remove base container");
// the correct approach is by far "--show-only=json-v1" and then pluck out .tests[].name; but that doesn't work on U18's cmake 3.10 since it lacks json-v1 output
const test_query_result = child_process.spawnSync("docker", ["run", "--rm", "baseimage", "bash", "-e", "-o", "pipefail", "-c", `cd build; ctest -L '${tests_label}' --show-only | head -n -1 | cut -d ':' -f 2 -s | jq -cnR '[inputs | select(length>0)[1:]]'`]);
if(test_query_result.status)
throw new Error("Failed to discover tests with label")
const tests = JSON.parse(test_query_result.stdout);
let subprocesses = [];
tests.forEach(t => {
subprocesses.push(new Promise(resolve => {
child_process.spawn("docker", ["run", "--name", t, "--init", "baseimage", "bash", "-c", `cd build; ctest --output-on-failure -R '^${t}$'`], {stdio:"inherit"}).on('close', code => resolve(code));
}));
});
const results = await Promise.all(subprocesses);
for(let i = 0; i < results.length; ++i) {
if(results[i] === 0)
continue;
//failing test
core.setFailed("Some tests failed");
let extractor = tar.extract();
let packer = tar.pack();
extractor.on('entry', (header, stream, next) => {
if(!header.name.startsWith(`__w/leap/leap/build`)) {
stream.on('end', () => next());
stream.resume();
return;
}
header.name = header.name.substring(`__w/leap/leap/`.length);
if(header.name !== "build/" && error_log_paths.filter(p => header.name.startsWith(p)).length === 0) {
stream.on('end', () => next());
stream.resume();
return;
}
stream.pipe(packer.entry(header, next));
}).on('finish', () => {packer.finalize()});
child_process.spawn("docker", ["export", tests[i]]).stdout.pipe(extractor);
stream.promises.pipeline(packer, zlib.createGzip(), fs.createWriteStream(`${log_tarball_prefix}-${tests[i]}-logs.tar.gz`));
}
} catch(e) {
core.setFailed(`Uncaught exception ${e.message}`);
}
@@ -0,0 +1,351 @@
{
"name": "parallel-ctest-containers",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"@actions/core": "^1.9.1",
"@vercel/ncc": "^0.34.0",
"tar-stream": "^2.2.0"
}
},
"node_modules/@actions/core": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/http-client": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
"integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
"dependencies": {
"tunnel": "^0.0.6"
}
},
"node_modules/@vercel/ncc": {
"version": "0.34.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz",
"integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A==",
"bin": {
"ncc": "dist/ncc/cli.js"
}
},
"node_modules/base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"dependencies": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"node_modules/buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"node_modules/end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"dependencies": {
"once": "^1.4.0"
}
},
"node_modules/fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"node_modules/ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
]
},
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"dependencies": {
"safe-buffer": "~5.2.0"
}
},
"node_modules/tar-stream": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"dependencies": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
"fs-constants": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^3.1.1"
},
"engines": {
"node": ">=6"
}
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
},
"dependencies": {
"@actions/core": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.9.1.tgz",
"integrity": "sha512-5ad+U2YGrmmiw6du20AQW5XuWo7UKN2052FjSV7MX+Wfjf8sCqcsZe62NfgHys4QI4/Y+vQvLKYL8jWtA1ZBTA==",
"requires": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"@actions/http-client": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.0.1.tgz",
"integrity": "sha512-PIXiMVtz6VvyaRsGY268qvj57hXQEpsYogYOu2nrQhlf+XCGmZstmuZBbAybUl1nQGnvS1k1eEsQ69ZoD7xlSw==",
"requires": {
"tunnel": "^0.0.6"
}
},
"@vercel/ncc": {
"version": "0.34.0",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.34.0.tgz",
"integrity": "sha512-G9h5ZLBJ/V57Ou9vz5hI8pda/YQX5HQszCs3AmIus3XzsmRn/0Ptic5otD3xVST8QLKk7AMk7AqpsyQGN7MZ9A=="
},
"base64-js": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
},
"bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"requires": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
}
},
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"end-of-stream": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
"integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
"requires": {
"once": "^1.4.0"
}
},
"fs-constants": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
},
"ieee754": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"safe-buffer": {
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
},
"string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
"requires": {
"safe-buffer": "~5.2.0"
}
},
"tar-stream": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
"requires": {
"bl": "^4.0.3",
"end-of-stream": "^1.4.1",
"fs-constants": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^3.1.1"
}
},
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
},
"util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
}
}
@@ -0,0 +1,7 @@
{
"dependencies": {
"@actions/core": "^1.9.1",
"@vercel/ncc": "^0.34.0",
"tar-stream": "^2.2.0"
}
}
+33 -46
View File
@@ -7,13 +7,9 @@ on:
- "release/*"
pull_request:
workflow_dispatch:
inputs:
run-lr-tests:
description: 'Run long running tests'
type: boolean
permissions:
packages: write
packages: read
contents: read
defaults:
@@ -44,6 +40,9 @@ jobs:
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ["self-hosted", "enf-x86-beefy"]
permissions:
packages: write
contents: read
steps:
- name: Login to Container Registry
uses: docker/login-action@v2
@@ -65,8 +64,6 @@ jobs:
fail-fast: false
matrix:
platform: [ubuntu18, ubuntu20, ubuntu22]
outputs:
lr-tests: ${{steps.build.outputs.lr-tests}}
runs-on: ["self-hosted", "enf-x86-beefy"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
steps:
@@ -82,8 +79,6 @@ jobs:
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja ..
ninja
# the correct approach is by far "--show-only=json-v1 | jq '.tests[].name' | jq -sc" but that doesn't work on U18's cmake 3.10 since it lacks json-v1
echo ::set-output name=lr-tests::$(ctest -L "long_running_tests" --show-only | head -n -1 | cut -d ':' -f 2 -s | jq -cnR '[inputs | select(length>0)[1:]]')
tar -pc -C .. --exclude "*.o" build | zstd --long -T0 -9 > ../build.tar.zst
- name: Upload builddir
uses: AntelopeIO/upload-artifact-large-chunks-action@v1
@@ -123,13 +118,11 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu20]
runs-on: ["self-hosted", "enf-x86-beefy"]
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-hightier"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Download builddir
uses: actions/download-artifact@v3
with:
@@ -138,6 +131,9 @@ jobs:
run: |
# https://github.com/actions/runner/issues/2033 -- need this because of full version label test looking at git revs
chown -R $(id -u):$(id -g) $PWD
# jammy's boost 1.74 can stumble on an EXDEV via copy_file_range() it doesn't have a fallback for; re-eval once moving to std::filesystem
export TMPDIR="$PWD/tmp"
mkdir -p $TMPDIR
zstdcat build.tar.zst | tar x
cd build
ctest --output-on-failure -j $(nproc) -LE "(nonparallelizable_tests|long_running_tests)"
@@ -149,65 +145,56 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu20]
runs-on: ubuntu-latest
container:
image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
options: --init
platform: [ubuntu18, ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-midtier"]
steps:
- uses: actions/checkout@v3
- name: Download builddir
uses: actions/download-artifact@v3
with:
name: ${{matrix.platform}}-build
- name: Run NP Tests
run: |
zstdcat build.tar.zst | tar x
cd build
ctest --output-on-failure -L "nonparallelizable_tests"
- name: Bundle logs from failed tests
if: failure()
run: tar -czf ${{matrix.platform}}-serial-logs.tar.gz build/var build/etc build/leap-ignition-wd
- name: Run tests in parallel containers
uses: ./.github/actions/parallel-ctest-containers
with:
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd"]'
log-tarball-prefix: ${{matrix.platform}}
tests-label: nonparallelizable_tests
- name: Upload logs from failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{matrix.platform}}-serial-logs
path: ${{matrix.platform}}-serial-logs.tar.gz
name: ${{matrix.platform}}-np-logs
path: '*-logs.tar.gz'
lr-tests:
name: LR Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || inputs.run-lr-tests)
if: always() && needs.Build.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu20]
test-name: ${{fromJSON(needs.Build.outputs.lr-tests)}}
runs-on: ubuntu-latest
container:
image: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
options: --init
platform: [ubuntu18, ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-lowtier"]
steps:
- uses: actions/checkout@v3
- name: Download builddir
uses: actions/download-artifact@v3
with:
name: ${{matrix.platform}}-build
- name: Run ${{matrix.test-name}} Test
run: |
zstdcat build.tar.zst | tar x
cd build
ctest --output-on-failure -R ${{matrix.test-name}}
- name: Bundle logs from failed tests
if: failure()
run: tar -czf ${{matrix.platform}}-${{matrix.test-name}}-logs.tar.gz build/var build/etc build/leap-ignition-wd
- name: Upload logs from failed tests
- name: Run tests in parallel containers
uses: ./.github/actions/parallel-ctest-containers
with:
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd"]'
log-tarball-prefix: ${{matrix.platform}}
tests-label: long_running_tests
- name: Upload logs from failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{matrix.platform}}-${{matrix.test-name}}-logs
path: ${{matrix.platform}}-${{matrix.test-name}}-logs.tar.gz
name: ${{matrix.platform}}-lr-logs
path: '*-logs.tar.gz'
all-passing:
name: All Required Tests Passed
+17
View File
@@ -0,0 +1,17 @@
name: Label New Issue
on:
issues:
types: opened
jobs:
label_new_issue:
uses: AntelopeIO/issue-project-labeler-workflow/.github/workflows/issue-project-labeler.yaml@v1
with:
issue-id: ${{github.event.issue.node_id}}
label: triage
org-project: 'Team Backlog'
project-field: Status=Todo
secrets:
token: ${{secrets.ENFCIBOT_REPO_AND_PROJECTS}}
+1
View File
@@ -10,6 +10,7 @@
*.abi.hpp
*.cmake
!.cicd
!package.cmake
!CMakeModules/*.cmake
*.ninja
\#*
+18 -6
View File
@@ -7,15 +7,27 @@
[submodule "libraries/eos-vm"]
path = libraries/eos-vm
url = https://github.com/AntelopeIO/eos-vm
[submodule "libraries/fc"]
path = libraries/fc
url = https://github.com/AntelopeIO/fc
[submodule "libraries/softfloat"]
path = libraries/softfloat
url = https://github.com/AntelopeIO/berkeley-softfloat-3
[submodule "libraries/rapidjson"]
path = libraries/rapidjson
url = https://github.com/Tencent/rapidjson/
[submodule "libraries/yubihsm"]
path = libraries/yubihsm
url = https://github.com/Yubico/yubihsm-shell
[submodule "tests/abieos"]
path = tests/abieos
url = https://github.com/AntelopeIO/abieos
[submodule "wasm-spec-tests"]
path = wasm-spec-tests
url = https://github.com/AntelopeIO/wasm-spec-tests
[submodule "libraries/libfc/include/fc/crypto/webauthn_json"]
path = libraries/libfc/include/fc/crypto/webauthn_json
url = https://github.com/Tencent/rapidjson/
[submodule "libraries/libfc/secp256k1/secp256k1"]
path = libraries/libfc/secp256k1/secp256k1
url = https://github.com/bitcoin-core/secp256k1
[submodule "libraries/libfc/libraries/ff"]
path = libraries/libfc/libraries/ff
url = https://github.com/AntelopeIO/libff
[submodule "libraries/prometheus-cpp"]
path = libraries/prometheus-cpp
url = https://github.com/jupp0r/prometheus-cpp.git
+22 -12
View File
@@ -27,6 +27,7 @@ endif()
set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( NODE_EXECUTABLE_NAME nodeos )
set( KEY_STORE_EXECUTABLE_NAME keosd )
set( LEAP_UTIL_EXECUTABLE_NAME leap-util )
# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
@@ -185,10 +186,6 @@ add_subdirectory( benchmark )
option(DISABLE_WASM_SPEC_TESTS "disable building of wasm spec unit tests" OFF)
if (NOT DISABLE_WASM_SPEC_TESTS)
add_subdirectory( wasm-spec-tests/generated-tests )
endif()
install(FILES testnet.template DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/eosio/launcher COMPONENT dev EXCLUDE_FROM_ALL)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testnet.template ${CMAKE_CURRENT_BINARY_DIR}/etc/eosio/launcher/testnet.template COPYONLY)
@@ -218,17 +215,27 @@ install(FILES ${CMAKE_BINARY_DIR}/modules/leap-config.cmake DESTINATION ${CMAKE_
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/leap COMPONENT dev EXCLUDE_FROM_ALL)
install(FILES ${CMAKE_SOURCE_DIR}/CMakeModules/EosioCheckVersion.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/leap COMPONENT dev EXCLUDE_FROM_ALL)
configure_file(LICENSE licenses/leap/LICENSE COPYONLY)
configure_file(libraries/softfloat/COPYING.txt licenses/leap/LICENSE.softfloat COPYONLY)
configure_file(libraries/wasm-jit/LICENSE licenses/leap/LICENSE.wavm COPYONLY)
configure_file(libraries/fc/secp256k1/secp256k1/COPYING licenses/leap/LICENSE.secp256k1 COPYONLY)
configure_file(libraries/fc/include/fc/crypto/webauthn_json/license.txt licenses/leap/LICENSE.rapidjson COPYONLY)
configure_file(libraries/fc/src/network/LICENSE.go licenses/leap/LICENSE.go COPYONLY)
configure_file(libraries/eos-vm/LICENSE licenses/leap/LICENSE.eos-vm COPYONLY)
configure_file(libraries/fc/libraries/ff/LICENSE licenses/leap/LICENSE.libff COPYONLY)
configure_file(LICENSE licenses/leap/LICENSE COPYONLY)
configure_file(libraries/softfloat/COPYING.txt licenses/leap/LICENSE.softfloat COPYONLY)
configure_file(libraries/wasm-jit/LICENSE licenses/leap/LICENSE.wavm COPYONLY)
configure_file(libraries/libfc/secp256k1/secp256k1/COPYING licenses/leap/LICENSE.secp256k1 COPYONLY)
configure_file(libraries/libfc/include/fc/crypto/webauthn_json/license.txt licenses/leap/LICENSE.rapidjson COPYONLY)
configure_file(libraries/libfc/src/network/LICENSE.go licenses/leap/LICENSE.go COPYONLY)
configure_file(libraries/eos-vm/LICENSE licenses/leap/LICENSE.eos-vm COPYONLY)
configure_file(libraries/libfc/libraries/ff/LICENSE licenses/leap/LICENSE.libff COPYONLY)
configure_file(programs/cleos/LICENSE.CLI11 licenses/leap/LICENSE.CLI11 COPYONLY)
configure_file(libraries/yubihsm/LICENSE licenses/leap/LICENSE.yubihsm COPYONLY)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/licenses/leap" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/" COMPONENT base)
configure_file(${CMAKE_SOURCE_DIR}/libraries/cli11/bash-completion/completions/leap-util
${CMAKE_BINARY_DIR}/programs/leap-util/bash-completion/completions/leap-util COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/cli11/bash-completion/completions/cleos
${CMAKE_BINARY_DIR}/programs/cleos/bash-completion/completions/cleos COPYONLY)
install(FILES libraries/cli11/bash-completion/completions/leap-util DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/bash-completion/completions COMPONENT base)
install(FILES libraries/cli11/bash-completion/completions/cleos DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/bash-completion/completions COMPONENT base)
add_custom_target(dev-install
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}"
COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_BINARY_DIR}"
@@ -236,6 +243,9 @@ add_custom_target(dev-install
USES_TERMINAL
)
get_property(_CTEST_CUSTOM_TESTS_IGNORE GLOBAL PROPERTY CTEST_CUSTOM_TESTS_IGNORE)
file(WRITE "${CMAKE_BINARY_DIR}/CTestCustom.cmake" "SET(CTEST_CUSTOM_TESTS_IGNORE ${_CTEST_CUSTOM_TESTS_IGNORE})")
include(doxygen)
include(package.cmake)
+2 -7
View File
@@ -54,13 +54,8 @@ find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED CO
find_library(libtester eosio_testing @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libchain eosio_chain @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
find_library(libfc fc_debug @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1_debug @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
else()
find_library(libfc fc @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
endif()
find_library(libfc fc @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libff ff @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libwasm WASM @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
+5 -11
View File
@@ -51,16 +51,10 @@ find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED CO
find_library(libtester eosio_testing @CMAKE_BINARY_DIR@/libraries/testing NO_DEFAULT_PATH)
find_library(libchain eosio_chain @CMAKE_BINARY_DIR@/libraries/chain NO_DEFAULT_PATH)
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
find_library(libfc fc_debug @CMAKE_BINARY_DIR@/libraries/fc NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1_debug @CMAKE_BINARY_DIR@/libraries/fc/secp256k1 NO_DEFAULT_PATH)
find_library(libfc fc @CMAKE_BINARY_DIR@/libraries/fc NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_BINARY_DIR@/libraries/libfc/secp256k1 NO_DEFAULT_PATH)
else()
find_library(libfc fc @CMAKE_BINARY_DIR@/libraries/fc NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_BINARY_DIR@/libraries/fc/secp256k1 NO_DEFAULT_PATH)
endif()
find_library(libff ff @CMAKE_BINARY_DIR@/libraries/fc/libraries/ff/libff NO_DEFAULT_PATH)
find_library(libff ff @CMAKE_BINARY_DIR@/libraries/libfc/libraries/ff/libff NO_DEFAULT_PATH)
find_library(libwasm WASM @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/WASM NO_DEFAULT_PATH)
find_library(libwast WAST @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/WAST NO_DEFAULT_PATH)
find_library(libir IR @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/IR NO_DEFAULT_PATH)
@@ -129,7 +123,7 @@ macro(add_eosio_test_executable test_name)
@OPENSSL_INCLUDE_DIR@
@CMAKE_SOURCE_DIR@/libraries/chain/include
@CMAKE_BINARY_DIR@/libraries/chain/include
@CMAKE_SOURCE_DIR@/libraries/fc/include
@CMAKE_SOURCE_DIR@/libraries/libfc/include
@CMAKE_SOURCE_DIR@/libraries/softfloat/source/include
@CMAKE_SOURCE_DIR@/libraries/appbase/include
@CMAKE_SOURCE_DIR@/libraries/chainbase/include
@@ -176,7 +170,7 @@ if(ENABLE_COVERAGE_TESTING)
COMMAND ${LCOV_PATH} --directory . --capture --gcov-tool ${CMAKE_SOURCE_DIR}/tools/llvm-gcov.sh --output-file ${Coverage_NAME}.info
COMMAND ${LCOV_PATH} -remove ${Coverage_NAME}.info '*/boost/*' '/usr/lib/*' '/usr/include/*' '*/externals/*' '*/fc/*' '*/wasm-jit/*' --output-file ${Coverage_NAME}_filtered.info
COMMAND ${LCOV_PATH} -remove ${Coverage_NAME}.info '*/boost/*' '/usr/lib/*' '/usr/include/*' '*/externals/*' '*/libfc/*' '*/wasm-jit/*' --output-file ${Coverage_NAME}_filtered.info
COMMAND ${GENHTML_PATH} -o ${Coverage_NAME} ${PROJECT_BINARY_DIR}/${Coverage_NAME}_filtered.info
+8 -4
View File
@@ -18,7 +18,7 @@ Recent Ubuntu LTS releases are the only Linux distributions that we fully suppor
* CMake 3.8+
* (for Linux only) LLVM 7 - 11 (newer versions do not work)
A few other common libraries are tools also required such as openssl 1.1+, curl, GMP, Python 3, and zlib.
A few other common libraries are tools also required such as openssl 1.1+, libcurl, curl, libusb, GMP, Python 3, and zlib.
**A Warning On Parallel Compilation Jobs (`-j` flag)**: When building C/C++ software often the build is performed in parallel via a command such as `make -j $(nproc)` which uses the number of CPU cores as the number of compilation jobs to perform simultaneously. However, be aware that some compilation units (.cpp files) in Leap are extremely complex and will consume nearly 4GB of memory to compile. You may need to reduce the level of parallelization depending on the amount of memory on your build host. e.g. instead of `make -j $(nproc)` run `make -j2`. Failures due to memory exhaustion will typically but not always manifest as compiler crashes.
@@ -33,8 +33,6 @@ The binary package will be produced in the Leap build directory that was supplie
#### Manual (non "pinned") Build Instructions
These instructions are valid for this branch. Other release branches may have different requirements so ensure you follow the directions in the branch or release you intend to build.
<details>
<summary>Ubuntu 20.04 & 22.04 Build Instructions</summary>
@@ -46,9 +44,12 @@ apt-get update && apt-get install \
curl \
git \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev
libusb-1.0-0-dev \
llvm-11-dev \
pkg-config
```
and perform the build:
```
@@ -71,9 +72,12 @@ apt-get update && apt-get install \
curl \
g++-8 \
git \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
libusb-1.0-0-dev \
llvm-7-dev \
pkg-config \
python3 \
zlib1g-dev
@@ -1,12 +1,12 @@
---
content_title: Build EOSIO from Source on Other Unix-based OS
content_title: Build Antelope from Source on Other Unix-based OS
---
**Please keep in mind that instructions for building from source on other unsupported operating systems provided here should be considered experimental and provided AS-IS on a best-effort basis and may not be fully featured.**
### Using DUNE
For the official multi-platform support try [Docker Utilities for Node Execution](https://github.com/eosnetworkfoundation/DUNE) which runs in an ubuntu image via a docker container.
For the official multi-platform support try [Docker Utilities for Node Execution](https://github.com/AntelopeIO/DUNE) which runs in an ubuntu image via a docker container.
**A Warning On Parallel Compilation Jobs (`-j` flag)**: When building C/C++ software often the build is performed in parallel via a command such as `make -j $(nproc)` which uses the number of CPU cores as the number of compilation jobs to perform simultaneously. However, be aware that some compilation units (.cpp files) in mandel are extremely complex and will consume nearly 4GB of memory to compile. You may need to reduce the level of parallelization depending on the amount of memory on your build host. e.g. instead of `make -j $(nproc)` run `make -j2`. Failures due to memory exhaustion will typically but not always manifest as compiler crashes.
@@ -1,12 +1,12 @@
---
content_title: Build EOSIO from Source
content_title: Build Antelope from Source
---
The shell scripts previously recommended for building the software have been removed in favor of a build process entirely driven by CMake. Those wishing to build from source are now responsible for installing the necessary dependencies. The list of dependencies and the recommended build procedure are in the README.md file. Instructions are also included for efficiently running the tests.
### Using DUNE
As an alternative to building from source try [Docker Utilities for Node Execution](https://github.com/eosnetworkfoundation/DUNE) for the easiest way to get started, and for multi-platform support.
As an alternative to building from source try [Docker Utilities for Node Execution](https://github.com/AntelopeIO/DUNE) for the easiest way to get started, and for multi-platform support.
### Building From Source
+8 -8
View File
@@ -1,26 +1,26 @@
---
content_title: EOSIO Software Installation
content_title: Antelope Software Installation
---
The best way to install and use the EOSIO software is to build it from source:
The best way to install and use the Antelope software is to build it from source:
* [Build EOSIO from Source](01_build-from-source/index.md)
* [Build Antelope from Source](01_build-from-source/index.md)
## Supported Operating Systems
EOSIO currently supports the following operating systems:
Antelope currently supports the following operating systems:
1. Ubuntu 18.04
2. Ubuntu 20.04
3. Ubuntu 22.04
[[info | Note]]
| It may be possible to build and install EOSIO on other Unix-based operating systems. We gathered helpful information on the following page but please keep in mind that it is experimental and not officially supported.
| It may be possible to build and install Antelope on other Unix-based operating systems. We gathered helpful information on the following page but please keep in mind that it is experimental and not officially supported.
* [Build EOSIO on Other Unix-based Systems](01_build-from-source/00_build-unsupported-os.md)
* [Build Antelope on Other Unix-based Systems](01_build-from-source/00_build-unsupported-os.md)
## Docker Utilities for Node Execution (D.U.N.E.)
If you are using different operating system or prefer not to build EOSIO from source you can try our Docker - based set of utilities called DUNE that can get you started with exploring EOSIO and doing contract development pretty much instantly
If you are using different operating system or prefer not to build Antelope from source you can try our Docker - based set of utilities called DUNE that can get you started with exploring Antelope and doing contract development pretty much instantly
* [Docker Utilities for Node Execution (D.U.N.E.)](https://github.com/eosnetworkfoundation/DUNE)
* [Docker Utilities for Node Execution (D.U.N.E.)](https://github.com/AntelopeIO/DUNE)
@@ -7,15 +7,15 @@ content_title: Producing Node Setup
## Goal
This section describes how to set up a producing node within the EOSIO network. A producing node, as its name implies, is a node that is configured to produce blocks in an `EOSIO` based blockchain. This functionality if provided through the `producer_plugin` as well as other [Nodeos Plugins](../../03_plugins/index.md).
This section describes how to set up a producing node within the Antelope network. A producing node, as its name implies, is a node that is configured to produce blocks in an `Antelope` based blockchain. This functionality if provided through the `producer_plugin` as well as other [Nodeos Plugins](../../03_plugins/index.md).
## Before you begin
* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* [Install the Antelope software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.
[//]: # ( THIS IS A COMMENT LINK BELOW IS BROKEN )
[//]: # ( If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md )
[//]: # ( If you built Antelope using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-antelope-binaries.md )
* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.
@@ -53,7 +53,7 @@ producer-name = youraccount
You will need to set the private key for your producer. The public key should have an authority for the producer account defined above.
`signature-provider` is defined with a 3-field tuple:
* `public-key` - A valid EOSIO public key in form of a string.
* `public-key` - A valid Antelope public key in form of a string.
* `provider-spec` - It's a string formatted like `<provider-type>:<data>`
* `provider-type` - KEY or KEOSD
@@ -4,15 +4,15 @@ content_title: Non-producing Node Setup
## Goal
This section describes how to set up a non-producing node within the EOSIO network. A non-producing node is a node that is not configured to produce blocks, instead it is connected and synchronized with other peers from an `EOSIO` based blockchain, exposing one or more services publicly or privately by enabling one or more [Nodeos Plugins](../../03_plugins/index.md), except the `producer_plugin`.
This section describes how to set up a non-producing node within the Antelope network. A non-producing node is a node that is not configured to produce blocks, instead it is connected and synchronized with other peers from an `Antelope` based blockchain, exposing one or more services publicly or privately by enabling one or more [Nodeos Plugins](../../03_plugins/index.md), except the `producer_plugin`.
## Before you begin
* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* [Install the Antelope software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.
[//]: # ( THIS IS A COMMENT NEXT LINK CONTAINS A BROKEN LINK )
[//]: # ( If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md )
[//]: # ( If you built Antelope using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-antelope-binaries.md )
* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.
@@ -41,4 +41,4 @@ nodeos ... --p2p-peer-address=106.10.42.238:9876
### 2. Enable one or more available plugins
Each available plugin is listed and detailed in the [Nodeos Plugins](../../03_plugins/index.md) section. When `nodeos` starts, it will expose the functionality provided by the enabled plugins it was started with. For example, if you start `nodeos` with [`state_history_plugin`](../../03_plugins/state_history_plugin/index.md) enabled, you will have a non-producing node that offers full blockchain history. If you start `nodeos` with [`http_plugin`](../../03_plugins/http_plugin/index.md) enabled, you will have a non-producing node which exposes the EOSIO RPC API. Therefore, you can extend the basic functionality provided by a non-producing node by enabling any number of existing plugins on top of it. Another aspect to consider is that some plugins have dependencies to other plugins. Therefore, you need to satisfy all dependencies for a plugin in order to enable it.
Each available plugin is listed and detailed in the [Nodeos Plugins](../../03_plugins/index.md) section. When `nodeos` starts, it will expose the functionality provided by the enabled plugins it was started with. For example, if you start `nodeos` with [`state_history_plugin`](../../03_plugins/state_history_plugin/index.md) enabled, you will have a non-producing node that offers full blockchain history. If you start `nodeos` with [`http_plugin`](../../03_plugins/http_plugin/index.md) enabled, you will have a non-producing node which exposes the Antelope RPC API. Therefore, you can extend the basic functionality provided by a non-producing node by enabling any number of existing plugins on top of it. Another aspect to consider is that some plugins have dependencies to other plugins. Therefore, you need to satisfy all dependencies for a plugin in order to enable it.
@@ -12,11 +12,11 @@ This section describes how to set up a single-node blockchain configuration runn
## Before you begin
* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* [Install the Antelope software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.
[//]: # (THIS IS A COMMENT, NEXT LINK HAS BROKEN LINK)
[//]: # (If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md .)
[//]: # (If you built Antelope using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-antelope-binaries.md .)
* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.
@@ -10,7 +10,7 @@ This section describes how to set up a multi-node blockchain configuration runni
## Before you begin
* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* [Install the Antelope software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.
* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.
@@ -20,7 +20,7 @@ Open four "terminal" windows and perform the following steps:
1. [Start the Wallet Manager](#1-start-the-wallet-manager)
2. [Create a Default Wallet](#2-create-a-default-wallet)
3. [Loading the EOSIO Key](#3-loading-the-eosio-key)
3. [Loading the Antelope Key](#3-loading-the-antelope-key)
4. [Start the First Producer Node](#4-start-the-first-producer-node)
5. [Start the Second Producer Node](#5-start-the-second-producer-node)
6. [Get Nodes Info](#6-get-nodes-info)
@@ -66,7 +66,7 @@ Without password imported keys will not be retrievable.
`keosd` will generate some status output in its window. We will continue to use this second window for subsequent `cleos` commands.
### 3. Loading the EOSIO Key
### 3. Loading the Antelope Key
The private blockchain launched in the steps above is created with a default initial key which must be loaded into the wallet.
@@ -90,7 +90,8 @@ This creates a special producer, known as the "bios" producer. Assuming everythi
### 5. Start the Second Producer Node
The following commands assume that you are running this tutorial from the `eos\build` directory, from which you ran `./eosio_build.sh` to build the EOSIO binaries.
[//]: # (don't render for now)
[//]: # (The following commands assume that you are running this tutorial from the `eos\build` directory, from which you ran `./eosio_build.sh` to build the Antelope binaries.)
To start additional nodes, you must first load the `eosio.bios` contract. This contract enables you to have direct control over the resource allocation of other accounts and to access other privileged API calls. Return to the second terminal window and run the following command to load the contract:
@@ -19,11 +19,11 @@ While this option can technically be used for smart contract development, it may
## Official Testing Node
Try [Docker Utilities for Node Execution](https://github.com/eosnetworkfoundation/DUNE) for the easiest way to get started, and for multi-platform support.
Try [Docker Utilities for Node Execution](https://github.com/AntelopeIO/DUNE) for the easiest way to get started, and for multi-platform support.
## Third-Party Testnets
The following third-party testnets are available for testing EOSIO dApps and smart contracts:
The following third-party testnets are available for testing Antelope dApps and smart contracts:
* Jungle Testnet [monitor](https://monitor.jungletestnet.io/), [website](https://jungletestnet.io/)
* [CryptoKylin Testnet](https://www.cryptokylin.io/)
@@ -1 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
[Chain API Reference](https://docs.eosnetwork.com/leap-plugins/latest/chain.api/)
@@ -1,6 +1,6 @@
## Description
The `chain_plugin` is a core plugin required to process and aggregate chain data on an EOSIO node.
The `chain_plugin` is a core plugin required to process and aggregate chain data on an Antelope node.
## Usage
@@ -1 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
[DB Size API Reference](https://docs.eosnetwork.com/leap-plugins/latest/db_size.api/)
@@ -1,6 +1,6 @@
## Description
The `login_plugin` supports the concept of applications authenticating with the EOSIO blockchain. The `login_plugin` API allows an application to verify whether an account is allowed to sign in order to satisfy a specified authority.
The `login_plugin` supports the concept of applications authenticating with the Antelope blockchain. The `login_plugin` API allows an application to verify whether an account is allowed to sign in order to satisfy a specified authority.
## Usage
@@ -1 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
[Net API Reference](https://docs.eosnetwork.com/leap-plugins/latest/net.api/)
@@ -8,7 +8,7 @@ The `net_api_plugin` provides four RPC API endpoints:
* connections
* status
See [Net API Reference Documentation](https://docs.eosnetwork.com/reference/mandel-plugins/net_api.html).
See [Net API Reference Documentation](https://docs.eosnetwork.com/leap-plugins/latest/net.api/).
[[caution | Caution]]
| This plugin exposes endpoints that allow management of p2p connections. Running this plugin on a publicly accessible node is not recommended as it can be exploited.
@@ -1 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
[Producer API Reference](https://docs.eosnetwork.com/leap-plugins/latest/producer.api/)
@@ -49,7 +49,7 @@ Config Options for eosio::producer_plugin:
<public-key>=<provider-spec>
Where:
<public-key> is a string form of
a vaild EOSIO public
a vaild Antelope public
key
<provider-spec> is a string in the
@@ -59,7 +59,7 @@ Config Options for eosio::producer_plugin:
<provider-type> is KEY, or KEOSD
KEY:<data> is a string form of
a valid EOSIO
a valid Antelope
private key which
maps to the provided
public key
@@ -8,7 +8,7 @@ This procedure records the current chain state and future history, without previ
## Before you begin
* Make sure [EOSIO is installed](../../../00_install/index.md).
* Make sure [Antelope is installed](../../../00_install/index.md).
* Learn about [Using Nodeos](../../02_usage/index.md).
* Get familiar with [state_history_plugin](../../03_plugins/state_history_plugin/index.md).
@@ -8,7 +8,7 @@ This procedure records the entire chain history.
## Before you begin
* Make sure [EOSIO is installed](../../../00_install/index.md).
* Make sure [Antelope is installed](../../../00_install/index.md).
* Learn about [Using Nodeos](../../02_usage/index.md).
* Get familiar with [state_history_plugin](../../03_plugins/state_history_plugin/index.md).
@@ -8,7 +8,7 @@ This procedure creates a database containing the chain state, with full history
## Before you begin
* Make sure [EOSIO is installed](../../../00_install/index.md).
* Make sure [Antelope is installed](../../../00_install/index.md).
* Learn about [Using Nodeos](../../02_usage/index.md).
* Get familiar with [state_history_plugin](../../03_plugins/state_history_plugin/index.md).
@@ -8,7 +8,7 @@ This procedure restores an existing snapshot with full history, so the node can
## Before you begin
* Make sure [EOSIO is installed](../../../00_install/index.md).
* Make sure [Antelope is installed](../../../00_install/index.md).
* Learn about [Using Nodeos](../../02_usage/index.md).
* Get familiar with [state_history_plugin](../../03_plugins/state_history_plugin/index.md).
@@ -1 +1 @@
<!-- THIS IS A PLACEHOLDER, WILL BE REPLACED BY REDOC INSTANCE -->
[Trace API Reference](https://docs.eosnetwork.com/leap-plugins/latest/trace.api/)
@@ -5,11 +5,11 @@ The `trace_api_plugin` provides a consumer-focused long-term API for retrieving
## Purpose
While integrating applications such as block explorers and exchanges with an EOSIO blockchain, the user might require a complete transcript of actions processed by the blockchain, including those spawned from the execution of smart contracts and scheduled transactions. The `trace_api_plugin` serves this need. The purpose of the plugin is to provide:
While integrating applications such as block explorers and exchanges with an Antelope blockchain, the user might require a complete transcript of actions processed by the blockchain, including those spawned from the execution of smart contracts and scheduled transactions. The `trace_api_plugin` serves this need. The purpose of the plugin is to provide:
* A transcript of retired actions and related metadata
* A consumer-focused long-term API to retrieve blocks
* Maintainable resource commitments at the EOSIO nodes
* Maintainable resource commitments at the Antelope nodes
Therefore, one crucial goal of the `trace_api_plugin` is to improve the maintenance of node resources (file system, disk space, memory used, etc.). This goal is different from the existing `history_plugin` which provides far more configurable filtering and querying capabilities, or the existing `state_history_plugin` which provides a binary streaming interface to access structural chain data, action data, as well as state deltas.
@@ -101,7 +101,7 @@ nodeos ... --plugin eosio::chain_plugin [options] \
## Configuration Example
Here is a `nodeos` configuration example for the `trace_api_plugin` when tracing some EOSIO reference contracts:
Here is a `nodeos` configuration example for the `trace_api_plugin` when tracing some Antelope reference contracts:
```sh
nodeos --data-dir data_dir --config-dir config_dir --trace-dir traces_dir
@@ -191,7 +191,7 @@ If resource usage cannot be effectively managed via the `trace-minimum-irreversi
## Manual Maintenance
The `trace-dir` option defines the directory on the filesystem where the trace log files are stored by the `trace_api_plugin`. These files are stable once the LIB block has progressed past a given slice and then can be deleted at any time to reclaim filesystem space. The deployed EOSIO system will tolerate any out-of-process management system that removes some or all of these files in this directory regardless of what data they represent, or whether there is a running `nodeos` instance accessing them or not. Data which would nominally be available, but is no longer so due to manual maintenance, will result in a HTTP 404 response from the appropriate API endpoint(s).
The `trace-dir` option defines the directory on the filesystem where the trace log files are stored by the `trace_api_plugin`. These files are stable once the LIB block has progressed past a given slice and then can be deleted at any time to reclaim filesystem space. The deployed Antelope system will tolerate any out-of-process management system that removes some or all of these files in this directory regardless of what data they represent, or whether there is a running `nodeos` instance accessing them or not. Data which would nominally be available, but is no longer so due to manual maintenance, will result in a HTTP 404 response from the appropriate API endpoint(s).
[[info | For node operators]]
| Node operators can take full control over the lifetime of the historical data available in their nodes via the `trace-api-plugin` and the `trace-minimum-irreversible-history-blocks` and `trace-minimum-uncompressed-irreversible-history-blocks` options in conjunction with any external filesystem resource manager.
@@ -4,7 +4,7 @@
The `txn_test_gen_plugin` is used for transaction test purposes.
[[info | For More Information]]
For more information, check the [txn_test_gen_plugin/README.md](https://github.com/eosnetworkfoundation/mandel/tree/main/plugins/txn_test_gen_plugin) on the EOSIO/eos repository.
For more information, check the [txn_test_gen_plugin/README.md](https://github.com/AntelopeIO/leap/tree/main/plugins/txn_test_gen_plugin) on the `AntelopeIO/leap` repository.
## Usage
@@ -64,3 +64,24 @@ Sample `logging.json`:
]
}
```
## Expected Output of Log Levels
* `error` - Log output that likely requires operator intervention.
- Error level logging should be reserved for conditions that are completely unexpected or otherwise need human intervention.
- Also used to indicate software errors such as: impossible values for an `enum`, out of bounds array access, null pointers, or other conditions that likely will throw an exception.
- *Note*: Currently, there are numerous `error` level logging that likely should be `warn` as they do not require human intervention. The `net_plugin_impl`, for example, has a number of `error` level logs for bad network connections. This is handled and processed correctly. These should be changed to `warn` or `info`.
* `warn` - Log output indicating unexpected but recoverable errors.
- Although, `warn` level typically does not require human intervention, repeated output of `warn` level logs might indicate actions needed by an operator.
- `warn` should not be used simply for conveying information. A `warn` level log is something to take notice of, but not necessarily be concerned about.
* `info` (default) - Log output that provides useful information to an operator.
- Can be just progress indication or other useful data to a user. Care is taken not to create excessive log output with `info` level logging. For example, no `info` level logging should be produced for every transaction.
- For progress indication, some multiple of transactions should be processed between each log output; typically, every 1000 transactions.
* `debug` - Useful log output for when non-default logging is enabled.
- Answers the question: is this useful information for a user that is monitoring the log output. Care should be taken not to create excessive log output; similar to `info` level logging.
- Enabling `debug` level logging should provide greater insight into behavior without overwhelming the output with log entries.
- `debug` level should not be used for *trace* level logging; to that end, use `all` (see below).
- Like `info`, no `debug` level logging should be produced for every transaction. There are specific transaction level loggers dedicated to transaction level logging: `transaction`, `transaction_trace_failure`, `transaction_trace_success`, `transaction_failure_tracing`, `transaction_success_tracing`.
* `all` (trace) - For logging that would be overwhelming if `debug` level logging were used.
- Can be used for trace level logging. Only used in a few places and not completely supported.
- *Note*: In the future a different logging library may provide better trace level logging support. The current logging framework is not performant enough to enable excess trace level output.
+2 -2
View File
@@ -6,7 +6,7 @@ Logging for `nodeos` is controlled by the `logging.json` file. CLI options can b
## Appenders
The logging library built into EOSIO supports two appender types:
The logging library built into Antelope supports two appender types:
- [Console](#console)
- [GELF](#gelf) (Graylog Extended Log Format)
@@ -74,7 +74,7 @@ Example:
## Loggers
The logging library built into EOSIO currently supports the following loggers:
The logging library built into Antelope currently supports the following loggers:
- `default` - the default logger, always enabled.
- `net_plugin_impl` - detailed logging for the net plugin.
@@ -2,7 +2,7 @@
content_title: Storage and Read Modes
---
The EOSIO platform stores blockchain information in various data structures at various stages of a transaction's lifecycle. Some of these are described below. The producing node is the `nodeos` instance run by the block producer who is currently creating blocks for the blockchain (which changes every 6 seconds, producing 12 blocks in sequence before switching to another producer.)
The Antelope platform stores blockchain information in various data structures at various stages of a transaction's lifecycle. Some of these are described below. The producing node is the `nodeos` instance run by the block producer who is currently creating blocks for the blockchain (which changes every 6 seconds, producing 12 blocks in sequence before switching to another producer.)
## Blockchain State and Storage
@@ -15,9 +15,9 @@ Every `nodeos` instance creates some internal files to housekeep the blockchain
* The `pending block` is an in memory block containing transactions as they are processed and pushed into the block; this will/may eventually become the head block. If the `nodeos` instance is the producing node, the pending block is distributed to other `nodeos` instances.
* Outside the chain state, block data is cached in RAM until it becomes final/irreversible; especifically the signed block itself. After the last irreversible block (LIB) catches up to the block, that block is then retrieved from the irreversible blocks log.
## EOSIO Interfaces
## Antelope Interfaces
EOSIO provides a set of [services](../../) and [interfaces](https://docs.eosnetwork.com/reference/mandel-cdt/files.html) that enable contract developers to persist state across action, and consequently transaction, boundaries. Contracts may use these services and interfaces for various purposes. For example, `eosio.token` contract keeps balances for all users in the chain database. Each instance of `nodeos` keeps the database in memory, so contracts can read and write data with ease.
Antelope provides a set of [services](../../) and [interfaces](https://docs.eosnetwork.com/cdt/latest/reference/Files/) that enable contract developers to persist state across action, and consequently transaction, boundaries. Contracts may use these services and interfaces for various purposes. For example, `eosio.token` contract keeps balances for all users in the chain database. Each instance of `nodeos` keeps the database in memory, so contracts can read and write data with ease.
### Nodeos RPC API
@@ -4,7 +4,7 @@ link_text: Context-Free Data
---
## Overview
The immutable nature of the blockchain allows data to be stored securely while also enforcing the integrity of such data. However, this benefit also complicates the removal of non-essential data from the blockchain. Consequently, EOSIO blockchains contain a special section within the transaction, called the *context-free data*. As its name implies, data stored in the context-free data section is considered free of previous contexts or dependencies, which makes their potential removal possible. More importantly, such removal can be performed safely without compromising the integrity of the blockchain.
The immutable nature of the blockchain allows data to be stored securely while also enforcing the integrity of such data. However, this benefit also complicates the removal of non-essential data from the blockchain. Consequently, Antelope blockchains contain a special section within the transaction, called the *context-free data*. As its name implies, data stored in the context-free data section is considered free of previous contexts or dependencies, which makes their potential removal possible. More importantly, such removal can be performed safely without compromising the integrity of the blockchain.
## Concept
The goal of context-free data is to allow blockchain applications the option to store non-essential information within a transaction. Some examples of context-free data include:
+2 -2
View File
@@ -28,7 +28,7 @@ Command Line Options for eosio::chain_plugin:
Start `nodeos` with `--shared-memory-size-mb 1024`. A 1 GB shared memory file allows approximately half a million transactions.
### What version of EOSIO am I running/connecting to?
### What version of Antelope am I running/connecting to?
If defaults can be used, then `cleos get info` will output a block that contains a field called `server_version`. If your `nodeos` is not using the defaults, then you need to know the URL of the `nodeos`. In that case, use the following with your `nodeos` URL:
@@ -44,4 +44,4 @@ cleos --url http://localhost:8888 get info | grep server_version
### Error 3070000: WASM Exception Error
If you try to deploy the `eosio.bios` contract or `eosio.system` contract in an attempt to boot an EOSIO-based blockchain and you get the following error or similar: `Publishing contract... Error 3070000: WASM Exception Error Details: env.set_proposed_producers_ex unresolveable`, it is because you have to activate the `PREACTIVATE_FEATURE` protocol first.
If you try to deploy the `eosio.bios` contract or `eosio.system` contract in an attempt to boot an Antelope-based blockchain and you get the following error or similar: `Publishing contract... Error 3070000: WASM Exception Error Details: env.set_proposed_producers_ex unresolveable`, it is because you have to activate the `PREACTIVATE_FEATURE` protocol first.
+3 -3
View File
@@ -4,11 +4,11 @@ content_title: Nodeos
## Introduction
`nodeos` is the core service daemon that runs on every EOSIO node. It can be configured to process smart contracts, validate transactions, produce blocks containing valid transactions, and confirm blocks to record them on the blockchain.
`nodeos` is the core service daemon that runs on every Antelope node. It can be configured to process smart contracts, validate transactions, produce blocks containing valid transactions, and confirm blocks to record them on the blockchain.
## Installation
`nodeos` is distributed as part of the [EOSIO software suite](https://github.com/eosnetworkfoundation/mandel). To install `nodeos`, visit the [EOSIO Software Installation](../00_install/index.md) section.
`nodeos` is distributed as part of the [Antelope software suite](https://github.com/AntelopeIO/leap). To install `nodeos`, visit the [Antelope Software Installation](../00_install/index.md) section.
## Explore
@@ -23,4 +23,4 @@ Navigate the sections below to configure and use `nodeos`.
* [Troubleshooting](08_troubleshooting/index.md) - Common `nodeos` troubleshooting questions.
[[info | Access Node]]
| A local or remote EOSIO access node running `nodeos` is required for a client application or smart contract to interact with the blockchain.
| A local or remote Antelope access node running `nodeos` is required for a client application or smart contract to interact with the blockchain.
@@ -11,7 +11,7 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Understand what an [account](/glossary.md#account) is and its role in the blockchain.
* Understand [Accounts and Permissions](/protocol-guides/04_accounts_and_permissions.md) in the protocol documents.
@@ -1,6 +1,6 @@
## Overview
This how-to guide provides instructions on how to create a new EOSIO blockchain account using the `cleos` CLI tool. You can use accounts to deploy smart contracts and perform other related blockchain operations. Create one or multiple accounts as part of your development environment setup.
This how-to guide provides instructions on how to create a new Antelope blockchain account using the `cleos` CLI tool. You can use accounts to deploy smart contracts and perform other related blockchain operations. Create one or multiple accounts as part of your development environment setup.
The example in this how-to guide creates a new account named **bob**, authorized by the default system account **eosio**, using the `cleos` CLI tool.
@@ -10,8 +10,8 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
* Learn about [EOSIO Accounts and Permissions](/protocol-guides/04_accounts_and_permissions.md)
| The cleos tool is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install the cleos tool.
* Learn about [Antelope Accounts and Permissions](/protocol-guides/04_accounts_and_permissions.md)
* Learn about Asymmetric Cryptography - [public key](/glossary.md#public-key) and [private key](/glossary.md#private-key) pairs.
* Create public/private keypairs for the `owner` and `active` permissions of an account.
@@ -34,7 +34,7 @@ cleos create account eosio bob EOS87TQktA5RVse2EguhztfQVEh6XXxBmgkU8b4Y5YnGvtYAo
* `bob` = the name of the new account conforming to [account naming conventions](/protocol-guides/04_accounts_and_permissions.md#2-accounts)
* `EOS87TQ...AoLGNN` = the owner public key or permission level for the new account (**required**)
[[info | Note]]
| To create a new account in the EOSIO blockchain, an existing account, also referred to as a creator account, is required to authorize the creation of a new account. For a newly created EOSIO blockchain, the default system account used to create a new account is **eosio**.
| To create a new account in the Antelope blockchain, an existing account, also referred to as a creator account, is required to authorize the creation of a new account. For a newly created Antelope blockchain, the default system account used to create a new account is **eosio**.
**Example Output**
@@ -46,4 +46,4 @@ warning: transaction executed locally, but may not be confirmed by the network y
### Summary
By following these instructions, you are able to create a new EOSIO account in your blockchain environment.
By following these instructions, you are able to create a new Antelope account in your blockchain environment.
@@ -1,14 +1,14 @@
## Overview
This how-to guide provides instructions on how to create a keypair consisting of a public key and a private key for signing transactions in an EOSIO blockchain.
This how-to guide provides instructions on how to create a keypair consisting of a public key and a private key for signing transactions in an Antelope blockchain.
## Before you begin
Make sure you meet the following requirements:
* Install the currently supported version of `cleos`
[[info | Note]]
| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
* Learn about asymmetric cryptography (public and private keypair) in the context of an EOSIO blockchain.
| The cleos tool is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install the cleos tool.
* Learn about asymmetric cryptography (public and private keypair) in the context of an Antelope blockchain.
## Command Reference
@@ -10,12 +10,12 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/eosnetworkfoundation/mandel-contracts) repository is deployed and used to manage system resources.
* Ensure the reference system contracts from [`reference-contracts`](https://github.com/AntelopeIO/reference-contracts) repository is deployed and used to manage system resources.
* Understand what an [account](/glossary.md#account) is and its role in the blockchain.
* Understand [CPU bandwidth](/glossary.md#cpu) in an EOSIO blockchain.
* Understand [NET bandwidth](/glossary.md#net) in an EOSIO blockchain.
* Understand [CPU bandwidth](/glossary.md#cpu) in an Antelope blockchain.
* Understand [NET bandwidth](/glossary.md#net) in an Antelope blockchain.
## Steps
@@ -10,12 +10,12 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Ensure the reference system contracts from [`eosio.contracts`](https://github.com/eosnetworkfoundation/mandel-contracts) repository is deployed and used to manage system resources.
* Ensure the reference system contracts from [`reference-contracts`](https://github.com/AntelopeIO/reference-contracts) repository is deployed and used to manage system resources.
* Understand what an [account](/glossary.md#account) is and its role in the blockchain.
* Understand [NET bandwidth](/glossary.md#net) in an EOSIO blockchain.
* Understand [CPU bandwidth](/glossary.md#cpu) in an EOSIO blockchain.
* Understand [NET bandwidth](/glossary.md#net) in an Antelope blockchain.
* Understand [CPU bandwidth](/glossary.md#cpu) in an Antelope blockchain.
## Steps
@@ -1,6 +1,6 @@
## Goal
Deploy an EOSIO contract
Deploy an Antelope contract
## Before you begin
@@ -1,15 +1,15 @@
## Overview
This how-to guide provides instructions on how to query infomation of an EOSIO account. The example in this how-to guide retrieves information of the `eosio` account.
This how-to guide provides instructions on how to query infomation of an Antelope account. The example in this how-to guide retrieves information of the `eosio` account.
## Before you begin
* Install the currently supported version of `cleos`
[[info | Note]]
| The cleos tool is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install the cleos tool.
| The cleos tool is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install the cleos tool.
* Acquire functional understanding of [EOSIO Accounts and Permissions](/protocol-guides/04_accounts_and_permissions.md)
* Acquire functional understanding of [Antelope Accounts and Permissions](/protocol-guides/04_accounts_and_permissions.md)
## Command Reference
@@ -28,7 +28,7 @@ cleos get account eosio
```
**Where**:
* `eosio` = The name of the default system account in the EOSIO blockchain.
* `eosio` = The name of the default system account in the Antelope blockchain.
**Example Output**
@@ -53,4 +53,4 @@ cpu bandwidth:
```
[[info | Account Fields]]
| Depending on the EOSIO network you are connected, you might see different fields associated with an account. That depends on which system contract has been deployed on the network.
| Depending on the Antelope network you are connected, you might see different fields associated with an account. That depends on which system contract has been deployed on the network.
@@ -10,10 +10,10 @@ Make sure to meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Understand what a [block](/glossary.md#block) is and its role in the blockchain.
* Understand the [block lifecycle](/protocol-guides/01_consensus_protocol.md#5-block-lifecycle) in the EOSIO consensus protocol.
* Understand the [block lifecycle](/protocol-guides/01_consensus_protocol.md#5-block-lifecycle) in the Antelope consensus protocol.
## Steps
@@ -1,6 +1,6 @@
## Overview
This how-to guide provides instructions on how to retrieve infomation of an EOSIO transaction using a transaction ID.
This how-to guide provides instructions on how to retrieve infomation of an Antelope transaction using a transaction ID.
The example in this how-to retrieves transaction information associated with the creation of the account **bob**.
@@ -9,8 +9,8 @@ The example in this how-to retrieves transaction information associated with the
Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
* Understand how transactions work in an EOSIO blockchain. For more information on transactions, see the [Transactions Protocol](/protocol-guides/02_transactions_protocol.md) section.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Understand how transactions work in an Antelope blockchain. For more information on transactions, see the [Transactions Protocol](/protocol-guides/02_transactions_protocol.md) section.
## Command Reference
@@ -1,6 +1,6 @@
## Overview
This how-to guide provides instructions on how to import a private key into the `keosd` default wallet. You can use the private key to authorize transactions in an EOSIO blockchain.
This how-to guide provides instructions on how to import a private key into the `keosd` default wallet. You can use the private key to authorize transactions in an Antelope blockchain.
## Before you Begin
@@ -11,7 +11,7 @@ Make sure you meet the following requirements:
* Familiarize with the [`cleos wallet import`](../03_command-reference/wallet/import.md) command.
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Understand what a [public key](/glossary.md#public-key) and [private key](/glossary.md#private-key) is.
## Command Reference
@@ -1,6 +1,6 @@
## Overview
This how-to guide provides instructions on how to list all public keys and public/private key pairs within the `keosd` default wallet. You can use the public and private keys to authorize transactions in an EOSIO blockchain.
This how-to guide provides instructions on how to list all public keys and public/private key pairs within the `keosd` default wallet. You can use the public and private keys to authorize transactions in an Antelope blockchain.
The example in this how-to guide displays all public keys and public/private key pairs stored within the existing default wallet.
@@ -13,7 +13,7 @@ Make sure you meet the following requirements:
* Familiarize with the [`cleos wallet`](../03_command-reference/wallet/index.md) commands.
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../00_install/index.md) will also install `cleos`.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../00_install/index.md) will also install `cleos`.
* Understand what a [public key](/glossary.md#public-key) and [private key](/glossary.md#private-key) is.
## Command Reference
@@ -30,7 +30,7 @@ Options:
```
## Command
A set of EOSIO keys is required to create an account. The EOSIO keys can be generated by using `cleos create key`.
A set of Antelope keys is required to create an account. The Antelope keys can be generated by using `cleos create key`.
```sh
cleos create account inita tester EOS4toFS3YXEQCkuuw1aqDLrtHim86Gz9u3hBdcBw5KNPZcursVHq EOS7d9A3uLe6As66jzN8j44TXJUqJSK3bFjjEEqR4oTvNAB3iM9SA
@@ -30,7 +30,7 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
## Examples
@@ -28,7 +28,7 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
## Examples
@@ -27,7 +27,7 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
## Examples
@@ -30,7 +30,7 @@ Make sure you meet the following requirements:
* Install the currently supported version of `cleos`.
[[info | Note]]
| `cleos` is bundled with the EOSIO software. [Installing EOSIO](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
| `cleos` is bundled with the Antelope software. [Installing Antelope](../../../00_install/index.md) will also install the `cleos` and `keosd` command line tools.
* You have access to a producing node instance with the [`net_api_plugin`](../../../01_nodeos/03_plugins/net_api_plugin/index.md) loaded.
## Examples
@@ -2,7 +2,7 @@
set parameters dealing with account permissions
[[info | JSON input]]
| This command involves specifying JSON input which depends on underlying class definitions. Therefore, such JSON input is subject to change in future versions of the EOSIO software.
| This command involves specifying JSON input which depends on underlying class definitions. Therefore, such JSON input is subject to change in future versions of the Antelope software.
## Positionals
- `account` _TEXT_ - The account to set/delete a permission authority for
+1 -1
View File
@@ -20,4 +20,4 @@ Replace API_ENDPOINT and PORT with your remote `nodeos` API endpoint detail
## "Missing Authorizations"
That means you are not using the required authorizations. Most likely you are not using correct EOSIO account or permission level to sign the transaction
That means you are not using the required authorizations. Most likely you are not using correct Antelope account or permission level to sign the transaction
+3 -3
View File
@@ -4,11 +4,11 @@ content_title: Cleos
## Introduction
`cleos` is a command line tool that interfaces with the REST API exposed by `nodeos`. Developers can also use `cleos` to deploy and test EOSIO smart contracts.
`cleos` is a command line tool that interfaces with the REST API exposed by `nodeos`. Developers can also use `cleos` to deploy and test Antelope smart contracts.
## Installation
`cleos` is distributed as part of the [EOSIO software suite](https://github.com/eosnetworkfoundation/mandel). To install `cleos` just visit the [EOSIO Software Installation](../00_install/index.md) section.
`cleos` is distributed as part of the [Antelope software suite](https://github.com/AntelopeIO/leap). To install `cleos` just visit the [Antelope Software Installation](../00_install/index.md) section.
## Using Cleos
@@ -23,7 +23,7 @@ cleos --help
```
```console
Command Line Interface to EOSIO Client
Command Line Interface to Antelope Client
Usage: cleos [OPTIONS] SUBCOMMAND
Options:
+5
View File
@@ -91,6 +91,11 @@ Config Options for eosio::wallet_plugin:
number of seconds of inactivity.
Activity is defined as any wallet
command e.g. list-wallets.
--yubihsm-url URL Override default URL of
http://localhost:12345 for connecting
to yubihsm-connector
--yubihsm-authkey key_num Enables YubiHSM support using given
Authkey
Application Config Options:
--plugin arg Plugin(s) to enable, may be specified
@@ -0,0 +1,73 @@
---
content_title: How To Attach a YubiHSM Hard Wallet
link_text: How To Attach a YubiHSM Hard Wallet
---
## Goal
Attach a YubiHSM as a hard wallet
## Before you begin
* Install the currently supported version of `keosd`
* Install YubiHSM2 Software Toolkit (YubiHSM2 SDK)
* Create an AuthKey with at least the following Capabilities:
* sign-ecdsa
* generate-asymmetric-key
* export-wrapped
* **Delete the default AuthKey**
[[warning | Security]]
| It is extremely important to create a new AuthKey and remove the default AuthKey before proceed to the following steps.
## Steps
### Configure `keosd`
There are two options to connect `keosd` to YubiHSM:
#### Using a YubiHSM connector
By default, `keosd` will connect to the YubiHSM connector on the default host and port. If a non-default URL is used, set the `--yubihsm-url` option or `yubihsm-url` in `config.ini` with the correct connector URL
#### Directly connect via USB
`keosd` also can directly connect to YubiHSM via USB protocol
If this option is used, set `keosd` startup option as the below:
```sh
--yubihsm-url=ysb://
```
### Start `keosd` with AuthKey:
```sh
--yubihsm-authkey Your_AuthKey_Object_Number
```
if a YubiHSM connector is used, check the YubiHSM connector is up and running by visiting YubiHSM URL:
http://YubiHSM_HOST:YubiHSM_PORT/connector/status ((Default HOST and Port: http://127.0.0.1:12345)
You should see something like this:
```console
status=OK
serial=*
version=2.0.0
pid=666
address=localhost
port=12345
```
### Unlock YubiHSM wallet with the password of AuthKey using the following option:
```sh
cleos wallet unlock -n YubiHSM --password YOUR_AUTHKEY_PASSWORD
```
After unlocking the wallet, you can use `cleos wallet` commands as usual. Beware as a part of security mechanism, some wallet subcommands, such as retrieve private keys, or remove a key, are not supported when a YubiHSM is used
+5
View File
@@ -0,0 +1,5 @@
---
content_title: Keosd How-to Guides
---
* [How to attach a YubiHSM hard wallet](how-to-attach-a-yubihsm-hard-wallet.md)
+2 -2
View File
@@ -8,11 +8,11 @@ content_title: Keosd
## Installation
`keosd` is distributed as part of the [EOSIO software suite](https://github.com/eosnetworkfoundation/mandel). To install `keosd` just visit the [EOSIO Software Installation](../00_install/index.md) section.
`keosd` is distributed as part of the [Antelope software suite](https://github.com/AntelopeIO/leap). To install `keosd` just visit the [Antelope Software Installation](../00_install/index.md) section.
## Operation
When a wallet is unlocked with the corresponding password, `cleos` can request `keosd` to sign a transaction with the appropriate private keys. Also, `keosd` provides support for hardware-based wallets such as Secure Encalve and YubiHSM.
[[info | Audience]]
| `keosd` is intended to be used by EOSIO developers only.
| `keosd` is intended to be used by Antelope developers only.
+3 -3
View File
@@ -1,9 +1,9 @@
---
content_title: EOSIO Utilities
link_text: EOSIO Utilities
content_title: Antelope Utilities
link_text: Antelope Utilities
---
This section contains documentation for additional utilities that complement or extend `nodeos` and potentially other EOSIO software:
This section contains documentation for additional utilities that complement or extend `nodeos` and potentially other Antelope software:
* [eosio-blocklog](eosio-blocklog.md) - Low-level utility for node operators to interact with block log files.
* [trace_api_util](trace_api_util.md) - Low-level utility for performing tasks associated with the [Trace API](../01_nodeos/03_plugins/trace_api_plugin/index.md).
+9 -9
View File
@@ -1,23 +1,23 @@
---
content_title: EOSIO Overview
content_title: Antelope Overview
---
EOSIO is the next-generation blockchain platform for creating and deploying smart contracts and distributed applications. EOSIO comes with a number of programs. The primary ones included in EOSIO are the following:
Antelope is the next-generation blockchain platform for creating and deploying smart contracts and distributed applications. Antelope comes with a number of programs. The primary ones included in Antelope are the following:
* [Nodeos](01_nodeos/index.md) - Core service daemon that runs a node for block production, API endpoints, or local development.
* [Cleos](02_cleos/index.md) - Command line interface to interact with the blockchain (via `nodeos`) and manage wallets (via `keosd`).
* [Keosd](03_keosd/index.md) - Component that manages EOSIO keys in wallets and provides a secure enclave for digital signing.
* [Keosd](03_keosd/index.md) - Component that manages Antelope keys in wallets and provides a secure enclave for digital signing.
The basic relationship between these components is illustrated in the diagram below.
![EOSIO components](mandel_components.png)
![Antelope components](mandel_components.png)
Additional EOSIO Resources:
* [EOSIO Utilities](10_utilities/index.md) - Utilities that complement the EOSIO software.
Additional Antelope Resources:
* [Antelope Utilities](10_utilities/index.md) - Utilities that complement the Antelope software.
[//]: # (THIS IS A COMMENT REMOVING BROKEN LINKS)
[//]: # (Upgrade-Guide-20_upgrade-guide/index.md-EOSIO-version/protocol-upgrade-guide.)
[//]: # (Release Notes 30_release-notes/index.md - All release notes for this EOSIO version.)
[//]: # (Upgrade-Guide-20_upgrade-guide/index.md-antelope-version/protocol-upgrade-guide.)
[//]: # (Release Notes 30_release-notes/index.md - All release notes for this Antelope version.)
[[info | What's Next?]]
| [Install the EOSIO Software](00_install/index.md) before exploring the sections above.
| [Install the Antelope Software](00_install/index.md) before exploring the sections above.
+24 -6
View File
@@ -4,15 +4,10 @@ set(APPBASE_INSTALL_COMPONENT "dev")
set(SOFTFLOAT_INSTALL_COMPONENT "dev")
set(EOSVM_INSTALL_COMPONENT "dev")
add_subdirectory( fc )
add_subdirectory( libfc )
add_subdirectory( builtins )
# Suppress warnings on 3rdParty Library
add_definitions( -w )
add_subdirectory( softfloat )
add_subdirectory( wasm-jit )
remove_definitions( -w )
add_subdirectory( chainbase )
set(APPBASE_ENABLE_AUTO_VERSION OFF CACHE BOOL "enable automatic discovery of version via 'git describe'")
add_subdirectory( appbase )
@@ -20,6 +15,7 @@ add_subdirectory( chain )
add_subdirectory( testing )
add_subdirectory( version )
add_subdirectory( state_history )
add_subdirectory( cli11 )
set(USE_EXISTING_SOFTFLOAT ON CACHE BOOL "use pre-exisiting softfloat lib")
set(ENABLE_TOOLS OFF CACHE BOOL "Build tools")
@@ -30,3 +26,25 @@ set(ENABLE_PROFILE OFF CACHE BOOL "Enable for profile builds")
if(eos-vm IN_LIST EOSIO_WASM_RUNTIMES OR eos-vm-jit IN_LIST EOSIO_WASM_RUNTIMES)
add_subdirectory( eos-vm )
endif()
#yubihsm's openssl discovery is via pkg-config instead of find_package. Help it out on macOS otherwise openssl's pkgconfig
# files may not be found down in the /opt/homebrew/opt directory
if(APPLE)
get_filename_component(OPENSSL_LIB_PATH "${OPENSSL_CRYPTO_LIBRARY}" DIRECTORY)
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${OPENSSL_LIB_PATH}/pkgconfig")
endif()
set(ENABLE_STATIC ON)
set(CMAKE_MACOSX_RPATH OFF)
set(BUILD_ONLY_LIB ON CACHE BOOL "Library only build")
message(STATUS "Starting yubihsm configuration...")
add_subdirectory( yubihsm EXCLUDE_FROM_ALL )
target_compile_options(yubihsm_static PRIVATE -fno-lto -fcommon)
message(STATUS "yubihsm configuration complete")
get_property(_CTEST_CUSTOM_TESTS_IGNORE GLOBAL PROPERTY CTEST_CUSTOM_TESTS_IGNORE)
set_property(GLOBAL PROPERTY CTEST_CUSTOM_TESTS_IGNORE
"change_authkey import_ed decrypt_ec decrypt_rsa ssh logs generate_rsa import_ec echo\
yubico_otp wrap_data wrap info import_rsa import_authkey generate_hmac generate_ec\
attest pbkdf2 parsing ${_CTEST_CUSTOM_TESTS_IGNORE}")
add_subdirectory(prometheus)
+4 -1
View File
@@ -72,6 +72,9 @@ set(CHAIN_WEBASSEMBLY_SOURCES
webassembly/transaction.cpp
)
add_library(eosio_rapidjson INTERFACE)
target_include_directories(eosio_rapidjson INTERFACE ../rapidjson/include)
## SORT .cpp by most likely to change / break compile
add_library( eosio_chain
merkle.cpp
@@ -125,7 +128,7 @@ add_library( eosio_chain
${HEADERS}
)
target_link_libraries( eosio_chain PUBLIC fc chainbase Logging IR WAST WASM Runtime
target_link_libraries( eosio_chain PUBLIC fc chainbase eosio_rapidjson Logging IR WAST WASM Runtime
softfloat builtins ${CHAIN_EOSVM_LIBRARIES} ${LLVM_LIBS} ${CHAIN_RT_LINKAGE}
)
target_include_directories( eosio_chain
-1
View File
@@ -56,7 +56,6 @@ void apply_context::exec_one()
digest_type act_digest;
const auto& cfg = control.get_global_properties().configuration;
const account_metadata_object* receiver_account = nullptr;
auto handle_exception = [&](const auto& e)
+7 -5
View File
@@ -1088,11 +1088,12 @@ struct controller_impl {
active_permission.id,
active_producers_authority,
genesis.initial_timestamp );
const auto& minority_permission = authorization.create_permission( config::producers_account_name,
authorization.create_permission( config::producers_account_name,
config::minority_producers_permission_name,
majority_permission.id,
active_producers_authority,
genesis.initial_timestamp );
}
// The returned scoped_exit should not exceed the lifetime of the pending which existed when make_block_restore_point was called.
@@ -1481,7 +1482,7 @@ struct controller_impl {
fc::microseconds max_transaction_time,
uint32_t billed_cpu_time_us,
bool explicit_billed_cpu_time,
uint32_t subjective_cpu_bill_us )
int64_t subjective_cpu_bill_us )
{
EOS_ASSERT(block_deadline != fc::time_point(), transaction_exception, "deadline cannot be uninitialized");
@@ -1527,7 +1528,7 @@ struct controller_impl {
trx_context.init_for_implicit_trx();
trx_context.enforce_whiteblacklist = false;
} else {
bool skip_recording = replay_head_time && (time_point(trn.expiration) <= *replay_head_time);
bool skip_recording = replay_head_time && (time_point(trn.expiration) < *replay_head_time);
trx_context.init_for_input_trx( trx->packed_trx()->get_unprunable_size(),
trx->packed_trx()->get_prunable_size(),
skip_recording);
@@ -2403,7 +2404,8 @@ struct controller_impl {
break;
}
}
dlog("removed ${n} expired transactions of the ${t} input dedup list", ("n", num_removed)("t", total));
dlog("removed ${n} expired transactions of the ${t} input dedup list, pending block time ${pt}",
("n", num_removed)("t", total)("pt", now));
}
bool sender_avoids_whitelist_blacklist_enforcement( account_name sender )const {
@@ -2879,7 +2881,7 @@ void controller::push_block( controller::block_report& br,
transaction_trace_ptr controller::push_transaction( const transaction_metadata_ptr& trx,
fc::time_point block_deadline, fc::microseconds max_transaction_time,
uint32_t billed_cpu_time_us, bool explicit_billed_cpu_time,
uint32_t subjective_cpu_bill_us ) {
int64_t subjective_cpu_bill_us ) {
validate_db_available_size();
EOS_ASSERT( get_read_mode() != db_read_mode::IRREVERSIBLE, transaction_type_exception, "push transaction not allowed in irreversible mode" );
EOS_ASSERT( trx && !trx->implicit && !trx->scheduled, transaction_type_exception, "Implicit/Scheduled transaction not allowed" );
+1 -3
View File
@@ -93,7 +93,7 @@ void apply_eosio_newaccount(apply_context& context) {
"Cannot create account named ${name}, as that name is already taken",
("name", create.name));
const auto& new_account = db.create<account_object>([&](auto& a) {
db.create<account_object>([&](auto& a) {
a.name = create.name;
a.creation_date = context.control.pending_block_time();
});
@@ -127,8 +127,6 @@ void apply_eosio_newaccount(apply_context& context) {
} FC_CAPTURE_AND_RETHROW( (create) ) }
void apply_eosio_setcode(apply_context& context) {
const auto& cfg = context.control.get_global_properties().configuration;
auto& db = context.db;
auto act = context.get_action().data_as<setcode>();
context.require_authorization(act.account);
-2
View File
@@ -283,8 +283,6 @@ namespace eosio { namespace chain {
}
block_header_state_ptr fork_database::get_block_header( const block_id_type& id )const {
const auto& by_id_idx = my->index.get<by_block_id>();
if( my->root->id == id ) {
return my->root;
}
@@ -3,8 +3,6 @@
#include <fc/time.hpp>
#include <fc/utility.hpp>
#pragma GCC diagnostic ignored "-Wunused-variable"
namespace eosio { namespace chain { namespace config {
typedef __uint128_t uint128_t;
@@ -154,7 +154,7 @@ namespace eosio { namespace chain {
transaction_trace_ptr push_transaction( const transaction_metadata_ptr& trx,
fc::time_point deadline, fc::microseconds max_transaction_time,
uint32_t billed_cpu_time_us, bool explicit_billed_cpu_time,
uint32_t subjective_cpu_bill_us );
int64_t subjective_cpu_bill_us );
/**
* Attempt to execute a specific transaction in our deferred trx database
@@ -5,6 +5,7 @@
#include <fc/variant_object.hpp>
#include <boost/core/demangle.hpp>
#include <ostream>
#include <memory>
namespace eosio { namespace chain {
/**
@@ -272,11 +273,6 @@ namespace eosio { namespace chain {
read_section(detail::snapshot_section_traits<T>::section_name(), f);
}
template<typename T>
bool has_section(const std::string& suffix = std::string()) {
return has_section(suffix + detail::snapshot_section_traits<T>::section_name());
}
virtual void validate() const = 0;
virtual void return_to_header() = 0;
@@ -284,7 +280,6 @@ namespace eosio { namespace chain {
virtual ~snapshot_reader(){};
protected:
virtual bool has_section( const std::string& section_name ) = 0;
virtual void set_section( const std::string& section_name ) = 0;
virtual bool read_row( detail::abstract_snapshot_row_reader& row_reader ) = 0;
virtual bool empty( ) = 0;
@@ -313,7 +308,6 @@ namespace eosio { namespace chain {
explicit variant_snapshot_reader(const fc::variant& snapshot);
void validate() const override;
bool has_section( const string& section_name ) override;
void set_section( const string& section_name ) override;
bool read_row( detail::abstract_snapshot_row_reader& row_reader ) override;
bool empty ( ) override;
@@ -365,7 +359,6 @@ namespace eosio { namespace chain {
explicit istream_snapshot_reader(std::istream& snapshot);
void validate() const override;
bool has_section( const string& section_name ) override;
void set_section( const string& section_name ) override;
bool read_row( detail::abstract_snapshot_row_reader& row_reader ) override;
bool empty ( ) override;
@@ -381,6 +374,24 @@ namespace eosio { namespace chain {
uint64_t cur_row;
};
class istream_json_snapshot_reader : public snapshot_reader {
public:
explicit istream_json_snapshot_reader(const fc::path& p);
~istream_json_snapshot_reader();
void validate() const override;
void set_section( const string& section_name ) override;
bool read_row( detail::abstract_snapshot_row_reader& row_reader ) override;
bool empty ( ) override;
void clear_section() override;
void return_to_header() override;
private:
bool validate_section() const;
std::unique_ptr<struct istream_json_snapshot_reader_impl> impl;
};
class integrity_hash_snapshot_writer : public snapshot_writer {
public:
explicit integrity_hash_snapshot_writer(fc::sha256::encoder& enc);
@@ -144,7 +144,7 @@ namespace eosio { namespace chain {
fc::time_point block_deadline = fc::time_point::maximum();
fc::microseconds leeway = fc::microseconds( config::default_subjective_cpu_leeway_us );
int64_t billed_cpu_time_us = 0;
uint32_t subjective_cpu_bill_us = 0;
int64_t subjective_cpu_bill_us = 0;
bool explicit_billed_cpu_time = false;
transaction_checktime_timer transaction_timer;
@@ -32,12 +32,12 @@ using next_func_t = std::function<void(const std::variant<fc::exception_ptr, tra
struct unapplied_transaction {
const transaction_metadata_ptr trx_meta;
const fc::time_point expiry;
trx_enum_type trx_type = trx_enum_type::unknown;
bool return_failure_trace = false;
next_func_t next;
const transaction_id_type& id()const { return trx_meta->id(); }
fc::time_point_sec expiration()const { return trx_meta->packed_trx()->expiration(); }
unapplied_transaction(const unapplied_transaction&) = delete;
unapplied_transaction() = delete;
@@ -61,7 +61,7 @@ private:
const_mem_fun<unapplied_transaction, const transaction_id_type&, &unapplied_transaction::id>
>,
ordered_non_unique< tag<by_type>, member<unapplied_transaction, trx_enum_type, &unapplied_transaction::trx_type> >,
ordered_non_unique< tag<by_expiry>, member<unapplied_transaction, const fc::time_point, &unapplied_transaction::expiry> >
ordered_non_unique< tag<by_expiry>, const_mem_fun<unapplied_transaction, fc::time_point_sec, &unapplied_transaction::expiration> >
>
> unapplied_trx_queue_type;
@@ -101,7 +101,7 @@ public:
auto& persisted_by_expiry = queue.get<by_expiry>();
while( !persisted_by_expiry.empty() ) {
const auto& itr = persisted_by_expiry.begin();
if( itr->expiry > pending_block_time ) {
if( itr->expiration() > pending_block_time ) {
break;
}
if( deadline <= fc::time_point::now() ) {
@@ -146,8 +146,7 @@ public:
const block_state_ptr& bsptr = *ritr;
for( auto itr = bsptr->trxs_metas().begin(), end = bsptr->trxs_metas().end(); itr != end; ++itr ) {
const auto& trx = *itr;
fc::time_point expiry = trx->packed_trx()->expiration();
auto insert_itr = queue.insert( { trx, expiry, trx_enum_type::forked } );
auto insert_itr = queue.insert( { trx, trx_enum_type::forked } );
if( insert_itr.second ) added( insert_itr.first );
}
}
@@ -155,8 +154,7 @@ public:
void add_aborted( deque<transaction_metadata_ptr> aborted_trxs ) {
for( auto& trx : aborted_trxs ) {
fc::time_point expiry = trx->packed_trx()->expiration();
auto insert_itr = queue.insert( { std::move( trx ), expiry, trx_enum_type::aborted } );
auto insert_itr = queue.insert( { std::move( trx ), trx_enum_type::aborted } );
if( insert_itr.second ) added( insert_itr.first );
}
}
@@ -164,8 +162,7 @@ public:
void add_persisted( const transaction_metadata_ptr& trx ) {
auto itr = queue.get<by_trx_id>().find( trx->id() );
if( itr == queue.get<by_trx_id>().end() ) {
fc::time_point expiry = trx->packed_trx()->expiration();
auto insert_itr = queue.insert( { trx, expiry, trx_enum_type::persisted } );
auto insert_itr = queue.insert( { trx, trx_enum_type::persisted } );
if( insert_itr.second ) added( insert_itr.first );
} else if( itr->trx_type != trx_enum_type::persisted ) {
if (itr->trx_type == trx_enum_type::incoming || itr->trx_type == trx_enum_type::incoming_persisted)
@@ -180,9 +177,8 @@ public:
void add_incoming( const transaction_metadata_ptr& trx, bool persist_until_expired, bool return_failure_trace, next_func_t next ) {
auto itr = queue.get<by_trx_id>().find( trx->id() );
if( itr == queue.get<by_trx_id>().end() ) {
fc::time_point expiry = trx->packed_trx()->expiration();
auto insert_itr = queue.insert(
{ trx, expiry, persist_until_expired ? trx_enum_type::incoming_persisted : trx_enum_type::incoming, return_failure_trace, std::move( next ) } );
{ trx, persist_until_expired ? trx_enum_type::incoming_persisted : trx_enum_type::incoming, return_failure_trace, std::move( next ) } );
if( insert_itr.second ) added( insert_itr.first );
} else {
if( itr->trx_meta == trx ) return; // same trx meta pointer
@@ -208,6 +204,12 @@ public:
iterator incoming_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::incoming_persisted ); }
iterator incoming_end() { return queue.get<by_type>().end(); } // if changed to upper_bound, verify usage performance
iterator lower_bound( const transaction_id_type& id ) {
auto itr = queue.get<by_trx_id>().find( id );
if( itr == queue.get<by_trx_id>().end() ) return queue.get<by_type>().end();
return queue.project<by_type>(itr);
}
/// caller's responsibility to call next() if applicable
iterator erase( iterator itr ) {
removed( itr );
+97 -52
View File
@@ -1,8 +1,17 @@
#define RAPIDJSON_NAMESPACE eosio_rapidjson // This is ABSOLUTELY necessary anywhere that is using eosio_rapidjson
#include <eosio/chain/snapshot.hpp>
#include <eosio/chain/exceptions.hpp>
#include <fc/scoped_exit.hpp>
#include <fc/io/json.hpp>
#include <rapidjson/document.h>
#include <rapidjson/filereadstream.h>
#include <rapidjson/stringbuffer.h>
#include <rapidjson/writer.h>
using namespace eosio_rapidjson;
namespace eosio { namespace chain {
variant_snapshot_writer::variant_snapshot_writer(fc::mutable_variant_object& snapshot)
@@ -77,17 +86,6 @@ void variant_snapshot_reader::validate() const {
}
}
bool variant_snapshot_reader::has_section( const string& section_name ) {
const auto& sections = snapshot["sections"].get_array();
for( const auto& section: sections ) {
if (section["name"].as_string() == section_name) {
return true;
}
}
return false;
}
void variant_snapshot_reader::set_section( const string& section_name ) {
const auto& sections = snapshot["sections"].get_array();
for( const auto& section: sections ) {
@@ -208,19 +206,19 @@ ostream_json_snapshot_writer::ostream_json_snapshot_writer(std::ostream& snapsho
void ostream_json_snapshot_writer::write_start_section( const std::string& section_name )
{
row_count = 0;
snapshot.inner << "," << fc::json::to_string(section_name, fc::time_point::maximum()) << ":{\n";
snapshot.inner << "," << fc::json::to_string(section_name, fc::time_point::maximum()) << ":{\n\"rows\":[\n";
}
void ostream_json_snapshot_writer::write_row( const detail::abstract_snapshot_row_writer& row_writer ) {
const auto yield = [&](size_t s) {};
if(row_count != 0) snapshot.inner << ",";
snapshot.inner << "\"row_" << row_count << "\":" << fc::json::to_string(row_writer.to_variant(), yield) << "\n";
snapshot.inner << fc::json::to_string(row_writer.to_variant(), yield) << "\n";
++row_count;
}
void ostream_json_snapshot_writer::write_end_section( ) {
snapshot.inner << "}\n";
snapshot.inner << "],\n\"num_rows\":" << row_count << "\n}\n";
row_count = 0;
}
@@ -286,44 +284,6 @@ bool istream_snapshot_reader::validate_section() const {
return true;
}
bool istream_snapshot_reader::has_section( const string& section_name ) {
auto restore_pos = fc::make_scoped_exit([this,pos=snapshot.tellg()](){
snapshot.seekg(pos);
});
const std::streamoff header_size = sizeof(ostream_snapshot_writer::magic_number) + sizeof(current_snapshot_version);
auto next_section_pos = header_pos + header_size;
while (true) {
snapshot.seekg(next_section_pos);
uint64_t section_size = 0;
snapshot.read((char*)&section_size,sizeof(section_size));
if (section_size == std::numeric_limits<uint64_t>::max()) {
break;
}
next_section_pos = snapshot.tellg() + std::streamoff(section_size);
uint64_t ignore = 0;
snapshot.read((char*)&ignore,sizeof(ignore));
bool match = true;
for(auto c : section_name) {
if(snapshot.get() != c) {
match = false;
break;
}
}
if (match && snapshot.get() == 0) {
return true;
}
}
return false;
}
void istream_snapshot_reader::set_section( const string& section_name ) {
auto restore_pos = fc::make_scoped_exit([this,pos=snapshot.tellg()](){
snapshot.seekg(pos);
@@ -386,6 +346,91 @@ void istream_snapshot_reader::return_to_header() {
clear_section();
}
struct istream_json_snapshot_reader_impl {
uint64_t num_rows;
uint64_t cur_row;
eosio_rapidjson::Document doc;
std::string sec_name;
};
istream_json_snapshot_reader::~istream_json_snapshot_reader() = default;
istream_json_snapshot_reader::istream_json_snapshot_reader(const fc::path& p)
: impl{new istream_json_snapshot_reader_impl{0, 0, {}, {}}}
{
FILE* fp = fopen(p.string().c_str(), "rb");
EOS_ASSERT(fp, snapshot_exception, "Failed to open JSON snapshot: ${file}", ("file", p));
auto close = fc::make_scoped_exit( [&fp]() { fclose( fp ); } );
char readBuffer[65536];
eosio_rapidjson::FileReadStream is(fp, readBuffer, sizeof(readBuffer));
impl->doc.ParseStream(is);
}
void istream_json_snapshot_reader::validate() const {
try {
// validate totem
auto expected_totem = ostream_json_snapshot_writer::magic_number;
EOS_ASSERT(impl->doc.HasMember("magic_number"), snapshot_exception, "magic_number section not found" );
auto actual_totem = impl->doc["magic_number"].GetUint();
EOS_ASSERT( actual_totem == expected_totem, snapshot_exception, "JSON snapshot has unexpected magic number" );
// validate version
auto expected_version = current_snapshot_version;
EOS_ASSERT(impl->doc.HasMember("version"), snapshot_exception, "version section not found" );
auto actual_version = impl->doc["version"].GetUint();
EOS_ASSERT( actual_version == expected_version, snapshot_exception,
"JSON snapshot is an unsupported version. Expected : ${expected}, Got: ${actual}",
("expected", expected_version)( "actual", actual_version ) );
} catch( const std::exception& e ) { \
snapshot_exception fce(FC_LOG_MESSAGE( warn, "JSON snapshot validation threw IO exception (${what})",("what",e.what())));
throw fce;
}
}
bool istream_json_snapshot_reader::validate_section() const {
return true;
}
void istream_json_snapshot_reader::set_section( const string& section_name ) {
EOS_ASSERT( impl->doc.HasMember( section_name.c_str() ), snapshot_exception, "JSON snapshot has no section ${sec}", ("sec", section_name) );
EOS_ASSERT( impl->doc[section_name.c_str()].HasMember( "num_rows" ), snapshot_exception, "JSON snapshot ${sec} num_rows not found", ("sec", section_name) );
EOS_ASSERT( impl->doc[section_name.c_str()].HasMember( "rows" ), snapshot_exception, "JSON snapshot ${sec} rows not found", ("sec", section_name) );
EOS_ASSERT( impl->doc[section_name.c_str()]["rows"].IsArray(), snapshot_exception, "JSON snapshot ${sec} rows is not an array", ("sec_name", section_name) );
impl->sec_name = section_name;
impl->num_rows = impl->doc[section_name.c_str()]["num_rows"].GetInt();
ilog( "reading ${section_name}, num_rows: ${num_rows}", ("section_name", section_name)( "num_rows", impl->num_rows ) );
}
bool istream_json_snapshot_reader::read_row( detail::abstract_snapshot_row_reader& row_reader ) {
EOS_ASSERT( impl->cur_row < impl->num_rows, snapshot_exception, "JSON snapshot ${sect}'s cur_row ${cur_row} >= num_rows ${num_rows}",
("sect_name", impl->sec_name)( "cur_row", impl->cur_row )( "num_rows", impl->num_rows ) );
const eosio_rapidjson::Value& rows = impl->doc[impl->sec_name.c_str()]["rows"];
eosio_rapidjson::StringBuffer buffer;
eosio_rapidjson::Writer<eosio_rapidjson::StringBuffer> writer( buffer );
rows[impl->cur_row].Accept( writer );
const auto& row = fc::json::from_string( buffer.GetString() );
row_reader.provide( row );
return ++impl->cur_row < impl->num_rows;
}
bool istream_json_snapshot_reader::empty ( ) {
return impl->num_rows == 0;
}
void istream_json_snapshot_reader::clear_section() {
impl->num_rows = 0;
impl->cur_row = 0;
impl->sec_name = "";
}
void istream_json_snapshot_reader::return_to_header() {
clear_section();
}
integrity_hash_snapshot_writer::integrity_hash_snapshot_writer(fc::sha256::encoder& enc)
:enc(enc)
{
@@ -276,7 +276,6 @@ namespace eosio { namespace chain { namespace webassembly {
float64_t ret;
int e = a.v >> 52 & 0x7FF;
float64_t y;
double de = 1/DBL_EPSILON;
if ( a.v == 0x8000000000000000) {
return af;
}
+2
View File
@@ -0,0 +1,2 @@
add_library(leap-cli11 INTERFACE)
target_include_directories(leap-cli11 INTERFACE include)
+26
View File
@@ -0,0 +1,26 @@
## instructions for building custom leap-cli11 library
leap-cli11 interface only library created in order to simplify integration of modified version of command line parsing library cli11
to update included in this library include/cli11/CLI11.hpp file it needs to be (re)geenerated from repository containing forked/modified version of it, in particular:
```bash
git clone https://github.com/AntelopeIO/CLI11.git
cd CLI11
mkdir build
cd build
cmake -DCLI11_SINGLE_FILE=ON ..
make -j
```
Resulting single-header will be located in:
```cpp
build/include/CLI11.hpp
```
And is ready to be copied to include/cli11/CLI11.hpp of leap-cli11 library
Automated CLI11 subproject build / import of CLI11.hpp header will be added in future versions.
@@ -0,0 +1,26 @@
#/usr/bin/env bash
_cleos_complete()
{
# Get cmdline while ignoring the last word
cmdline=${COMP_LINE}
if [[ "${cmdline:(-1)}" != " " ]]; then
cmdline=${COMP_WORDS[@]:0:${COMP_CWORD}}
fi
# Get complete candidates
words=$(${cmdline} --_autocomplete "${COMP_WORDS[${COMP_CWORD}]}")
# Remove candidates that begins with `-` if `-` is not passed as the first character
# TODO: move this logic inside CLI11? including the compgen?
if [[ ! ${COMP_WORDS[${COMP_CWORD}]} = -* ]]; then
words=(${words})
for index in "${!words[@]}" ; do [[ ${words[$index]} =~ ^- ]] && unset -v 'words[$index]' ; done
words="${words[@]}"
fi
# Get matches
COMPREPLY=($(compgen -W "${words}" -- "${COMP_WORDS[${COMP_CWORD}]}"))
}
complete -F _cleos_complete cleos
@@ -0,0 +1,26 @@
#/usr/bin/env bash
_leap_complete()
{
# Get cmdline while ignoring the last word
cmdline=${COMP_LINE}
if [[ "${cmdline:(-1)}" != " " ]]; then
cmdline=${COMP_WORDS[@]:0:${COMP_CWORD}}
fi
# Get complete candidates
words=$(${cmdline} --_autocomplete "${COMP_WORDS[${COMP_CWORD}]}")
# Remove candidates that begins with `-` if `-` is not passed as the first character
# TODO: move this logic inside CLI11? including the compgen?
if [[ ! ${COMP_WORDS[${COMP_CWORD}]} = -* ]]; then
words=(${words})
for index in "${!words[@]}" ; do [[ ${words[$index]} =~ ^- ]] && unset -v 'words[$index]' ; done
words="${words[@]}"
fi
# Get matches
COMPREPLY=($(compgen -W "${words}" -- "${COMP_WORDS[${COMP_CWORD}]}"))
}
complete -F _leap_complete leap-util
File diff suppressed because it is too large Load Diff
Submodule libraries/fc deleted from 6f9fc55105
+155
View File
@@ -0,0 +1,155 @@
add_subdirectory( secp256k1 )
set( WITH_PROCPS OFF CACHE BOOL "" FORCE)
set( CURVE "ALT_BN128" CACHE STRING "" FORCE)
set( USE_ASM OFF CACHE BOOL "" FORCE)
set( IS_LIBFF_PARENT OFF CACHE BOOL "" FORCE)
set( FF_INSTALL_COMPONENT "${FC_INSTALL_COMPONENT}")
add_subdirectory( libraries/ff )
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads)
find_package(OpenSSL REQUIRED)
set( fc_sources
src/uint128.cpp
src/real128.cpp
src/variant.cpp
src/exception.cpp
src/variant_object.cpp
src/string.cpp
src/time.cpp
src/mock_time.cpp
src/utf8.cpp
src/io/datastream.cpp
src/io/json.cpp
src/io/varint.cpp
src/io/fstream.cpp
src/io/console.cpp
src/filesystem.cpp
src/interprocess/file_mapping.cpp
src/interprocess/mmap_struct.cpp
src/log/log_message.cpp
src/log/logger.cpp
src/log/appender.cpp
src/log/console_appender.cpp
src/log/dmlog_appender.cpp
src/log/logger_config.cpp
src/crypto/_digest_common.cpp
src/crypto/aes.cpp
src/crypto/crc.cpp
src/crypto/city.cpp
# src/crypto/base32.cpp
src/crypto/base36.cpp
src/crypto/base58.cpp
src/crypto/base64.cpp
src/crypto/bigint.cpp
src/crypto/hex.cpp
src/crypto/sha1.cpp
src/crypto/sha3.cpp
src/crypto/ripemd160.cpp
src/crypto/sha256.cpp
src/crypto/sha224.cpp
src/crypto/sha512.cpp
src/crypto/dh.cpp
src/crypto/blowfish.cpp
src/crypto/elliptic_common.cpp
src/crypto/elliptic_impl_priv.cpp
src/crypto/elliptic_secp256k1.cpp
src/crypto/elliptic_r1.cpp
src/crypto/elliptic_webauthn.cpp
src/crypto/rand.cpp
src/crypto/public_key.cpp
src/crypto/private_key.cpp
src/crypto/signature.cpp
src/crypto/alt_bn128.cpp
src/crypto/modular_arithmetic.cpp
src/crypto/blake2.cpp
src/crypto/k1_recover.cpp
src/network/ip.cpp
src/network/platform_root_ca.cpp
src/network/resolve.cpp
src/network/udp_socket.cpp
src/network/url.cpp
src/network/http/http_client.cpp
src/compress/smaz.cpp
src/compress/zlib.cpp
src/log/gelf_appender.cpp
src/log/zipkin.cpp
)
file( GLOB_RECURSE fc_headers ${CMAKE_CURRENT_SOURCE_DIR} *.hpp *.h )
add_library(fc ${fc_sources} ${fc_headers})
function(detect_thread_name)
include(CheckSymbolExists)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
list(APPEND CMAKE_REQUIRED_LIBRARIES "-pthread")
check_symbol_exists(pthread_setname_np pthread.h HAVE_PTHREAD_SETNAME_NP)
if(HAVE_PTHREAD_SETNAME_NP)
set_source_files_properties(src/log/logger_config.cpp PROPERTIES COMPILE_DEFINITIONS FC_USE_PTHREAD_NAME_NP)
endif()
endfunction()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
detect_thread_name()
endif()
# Yuck: newer CMake files from boost iostreams will effectively target_link_libraries(Boost::iostreams z;bz2;lzma;zstd)
# without first "finding" those libraries. This resolves to simple -lz -lbz2 etc: it'll look for those libraries in the linker's
# library search path. This is most problematic on macOS where something like libzstd isn't in the standard search path. Historically
# fc would just "-L/usr/local/lib" as a heavy handed way to make sure something like -lzstd can be found in brew's library path. But
# that isn't sufficient for something like ARM homebrew. Let's just "null" these libraries out since we're already linking to zlib
# explicitly anyways via a proper find_package(ZLIB) below.
if(APPLE)
add_library(z INTERFACE)
add_library(bz2 INTERFACE)
add_library(lzma INTERFACE)
add_library(zstd INTERFACE)
endif()
find_package(Boost 1.66 REQUIRED COMPONENTS
date_time
filesystem
chrono
unit_test_framework
iostreams)
# fc picks up a dependency on zlib via Boost::iostreams, however in some versions of cmake/boost (depending on if CMake config
# files are used) the Boost::iostreams target does not have a dependency on zlib itself so add it explicitly
find_package(ZLIB REQUIRED)
target_include_directories(fc PUBLIC include)
# try and make this very clear that this json parser is intended only for webauthn parsing..
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.11.0)
set_source_files_properties(src/crypto/elliptic_webauthn.cpp PROPERTIES INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include/fc/crypto/webauthn_json/include")
else()
set_source_files_properties(src/crypto/elliptic_webauthn.cpp PROPERTIES COMPILE_FLAGS "-I${CMAKE_CURRENT_SOURCE_DIR}/include/fc/crypto/webauthn_json/include")
endif()
if(WIN32)
target_link_libraries( fc PUBLIC ws2_32 mswsock userenv )
endif()
if(APPLE)
find_library(security_framework Security)
find_library(corefoundation_framework CoreFoundation)
endif()
target_link_libraries( fc PUBLIC ff
Boost::date_time Boost::filesystem Boost::chrono Boost::iostreams Threads::Threads
OpenSSL::Crypto OpenSSL::SSL ZLIB::ZLIB ${PLATFORM_SPECIFIC_LIBS} ${CMAKE_DL_LIBS} secp256k1 ${security_framework} ${corefoundation_framework} )
# Critically, this ensures that OpenSSL 1.1 & 3.0 both have a variant of BN_zero() with void return value. But it also allows access
# to some obsoleted AES functions in 3.0 too, since 3.0's API_COMPAT is effectively 3.0 by default
target_compile_definitions(fc PUBLIC "OPENSSL_API_COMPAT=0x10100000L" "OPENSSL_NO_DEPRECATED")
add_subdirectory( test )
install(TARGETS fc
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL
ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL)
install(DIRECTORY include/fc DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} COMPONENT dev EXCLUDE_FROM_ALL)
+65
View File
@@ -0,0 +1,65 @@
#pragma once
#include <fc/api.hpp>
#include <fc/thread/thread.hpp>
namespace fc {
namespace detail {
struct actor_member {
#if 1 // BOOST_NO_VARIADIC_TEMPLATES
#define RPC_MEMBER_FUNCTOR(z,n,IS_CONST) \
template<typename R, typename C, typename P BOOST_PP_ENUM_TRAILING_PARAMS( n, typename A)> \
static std::function<fc::future<R>( BOOST_PP_ENUM_PARAMS(n,A) ) > \
functor( P p, R (C::*mem_func)(BOOST_PP_ENUM_PARAMS(n,A)) IS_CONST, fc::thread* c = 0) { \
return [=](BOOST_PP_ENUM_BINARY_PARAMS(n,A,a))->fc::future<R>{ \
return c->async( [=](){ return (p->*mem_func)(BOOST_PP_ENUM_PARAMS(n,a)); } ); }; \
}
BOOST_PP_REPEAT( 8, RPC_MEMBER_FUNCTOR, const )
BOOST_PP_REPEAT( 8, RPC_MEMBER_FUNCTOR, BOOST_PP_EMPTY() )
#undef RPC_MEMBER_FUNCTOR
#else // g++ has a bug that prevents lambdas and varidic templates from working together (G++ Bug 41933)
template<typename R, typename C, typename P, typename... Args>
static std::function<fc::future<R>(Args...)> functor( P&& p, R (C::*mem_func)(Args...), fc::thread* c ) {
return [=](Args... args)->fc::future<R>{ c->async( [=]()->R { return p->*mem_func( fc::forward<Args>(args)... ); } ) };
}
template<typename R, typename C, typename P, typename... Args>
static std::function<fc::future<R>(Args...)> functor( P&& p, R (C::*mem_func)(Args...)const, fc::thread* c ){
return [=](Args... args)->fc::future<R>{ c->async( [=]()->R { return p->*mem_func( fc::forward<Args>(args)... ); } ) };
}
#endif
};
template<typename ThisPtr>
struct actor_vtable_visitor {
template<typename U>
actor_vtable_visitor( fc::thread* t, U&& u ):_thread(t),_this( fc::forward<U>(u) ){}
template<typename Function, typename MemberPtr>
void operator()( const char* name, Function& memb, MemberPtr m )const {
memb = actor_member::functor( _this, m, _thread );
}
fc::thread* _thread;
ThisPtr _this;
};
}
/**
* Posts all method calls to another thread and
* returns a future.
*/
template<typename Interface>
class actor : public api<Interface, detail::actor_member> {
public:
actor(){}
template<typename InterfaceType>
actor( InterfaceType* p, fc::thread* t = &fc::thread::current() )
{
this->_vtable.reset(new detail::vtable<Interface,detail::actor_member>() );
this->_vtable->template visit<InterfaceType>( detail::actor_vtable_visitor<InterfaceType*>(t, p) );
}
};
} // namespace fc
+14
View File
@@ -0,0 +1,14 @@
#pragma once
namespace fc {
template<unsigned int S, typename T=double>
struct aligned {
union {
T _align;
char _data[S];
} _store;
operator char*() { return _store._data; }
operator const char*()const { return _store._data; }
};
}
+7
View File
@@ -0,0 +1,7 @@
#pragma once
#include <boost/any.hpp>
namespace fc {
// TODO: define this without using boost
typedef boost::any any;
}
+134
View File
@@ -0,0 +1,134 @@
#pragma once
#include <fc/thread/future.hpp>
#include <fc/any.hpp>
#include <functional>
#include <boost/config.hpp>
// ms visual c++ (as of 2013) doesn't accept the standard syntax for calling a
// templated member function (foo->template bar();)
#ifdef _MSC_VER
# define FC_CALL_MEMBER_TEMPLATE_KEYWORD
#else
# define FC_CALL_MEMBER_TEMPLATE_KEYWORD template
#endif
namespace fc {
struct identity_member {
template<typename R, typename C, typename P, typename... Args>
static std::function<R(Args...)> functor( P&& p, R (C::*mem_func)(Args...) );
template<typename R, typename C, typename P, typename... Args>
static std::function<R(Args...)> functor( P&& p, R (C::*mem_func)(Args...)const );
};
template< typename Interface, typename Transform >
struct vtable : public std::enable_shared_from_this<vtable<Interface,Transform>>
{ private: vtable(); };
template<typename OtherType>
struct vtable_copy_visitor {
typedef OtherType other_type;
vtable_copy_visitor( OtherType& s):_source( s ){}
template<typename R, typename MemberPtr, typename... Args>
void operator()( const char* name, std::function<R(Args...)>& memb, MemberPtr m )const {
OtherType* src = &_source;
memb = [src,m]( Args... args ){ return (src->*m)(args...); };
}
OtherType& _source;
};
template<typename Interface, typename Transform >
class api;
class api_connection;
typedef uint32_t api_id_type;
class api_base
{
public:
api_base() {}
virtual ~api_base() {}
virtual uint64_t get_handle()const = 0;
virtual api_id_type register_api( api_connection& conn )const = 0;
// defined in api_connection.hpp
template< typename T >
api<T, identity_member> as();
};
typedef std::shared_ptr< api_base > api_ptr;
class api_connection;
template<typename Interface, typename Transform = identity_member >
class api : public api_base {
public:
typedef vtable<Interface,Transform> vtable_type;
api():_vtable( std::make_shared<vtable_type>() ) {}
/** T is anything with pointer semantics */
template<typename T >
api( const T& p )
:_vtable( std::make_shared<vtable_type>() )
{
_data = std::make_shared<fc::any>(p);
T& ptr = boost::any_cast<T&>(*_data);
auto& pointed_at = *ptr;
typedef typename std::remove_reference<decltype(pointed_at)>::type source_vtable_type;
_vtable->FC_CALL_MEMBER_TEMPLATE_KEYWORD visit_other( vtable_copy_visitor<source_vtable_type>(pointed_at) );
}
api( const api& cpy ):_vtable(cpy._vtable),_data(cpy._data) {}
virtual ~api() {}
friend bool operator == ( const api& a, const api& b ) { return a._data == b._data && a._vtable == b._vtable; }
friend bool operator != ( const api& a, const api& b ) { return !(a._data == b._data && a._vtable == b._vtable); }
virtual uint64_t get_handle()const override { return uint64_t(_data.get()); }
virtual api_id_type register_api( api_connection& conn )const override; // defined in api_connection.hpp
vtable_type& operator*()const { FC_ASSERT( _vtable ); return *_vtable; }
vtable_type* operator->()const { FC_ASSERT( _vtable ); return _vtable.get(); }
protected:
std::shared_ptr<vtable_type> _vtable;
std::shared_ptr<fc::any> _data;
};
} // namespace fc
#include <boost/preprocessor/repeat.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
#include <boost/preprocessor/facilities/empty.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/stringize.hpp>
#define FC_API_VTABLE_DEFINE_MEMBER( r, data, elem ) \
decltype(Transform::functor( (data*)nullptr, &data::elem)) elem;
#define FC_API_VTABLE_DEFINE_VISIT_OTHER( r, data, elem ) \
{ typedef typename Visitor::other_type OtherType; \
v( BOOST_PP_STRINGIZE(elem), elem, &OtherType::elem ); }
#define FC_API_VTABLE_DEFINE_VISIT( r, data, elem ) \
v( BOOST_PP_STRINGIZE(elem), elem );
#define FC_API( CLASS, METHODS ) \
namespace fc { \
template<typename Transform> \
struct vtable<CLASS,Transform> : public std::enable_shared_from_this<vtable<CLASS,Transform>> { \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_MEMBER, CLASS, METHODS ) \
template<typename Visitor> \
void visit_other( Visitor&& v ){ \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT_OTHER, CLASS, METHODS ) \
} \
template<typename Visitor> \
void visit( Visitor&& v ){ \
BOOST_PP_SEQ_FOR_EACH( FC_API_VTABLE_DEFINE_VISIT, CLASS, METHODS ) \
} \
}; \
}
+145
View File
@@ -0,0 +1,145 @@
#pragma once
#include <fc/crypto/base64.hpp>
#include <fc/variant.hpp>
#include <fc/reflect/reflect.hpp>
#include <fc/exception/exception.hpp>
namespace fc {
/**
* Provides a fixed size array that is easier for templates to specialize
* against or overload than T[N].
*/
template<typename T, size_t N>
class array {
public:
/**
* Checked indexing (when in debug build) that also simplifies dereferencing
* when you have an array<T,N>*.
*/
///@{
T& at( size_t pos ) { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
const T& at( size_t pos )const { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
///@}
T& operator[]( size_t pos ) { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
const T& operator[]( size_t pos )const { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
const T* begin()const { return &data[0]; }
const T* end()const { return &data[N]; }
T* begin() { return &data[0]; }
T* end() { return &data[N]; }
size_t size()const { return N; }
T data[N];
};
/** provided for default 0 init */
template<size_t N>
class array<unsigned char,N>
{
public:
typedef unsigned char T;
array(){ memset( data, 0, sizeof(data) ); }
/**
* Checked indexing (when in debug build) that also simplifies dereferencing
* when you have an array<T,N>*.
*/
///@{
T& at( size_t pos ) { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
const T& at( size_t pos )const { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
///@}
T* begin() { return &data[0]; }
const T* begin()const { return &data[0]; }
const T* end()const { return &data[N]; }
size_t size()const { return N; }
T data[N];
};
/** provided for default 0 init */
template<size_t N>
class array<char,N>
{
public:
typedef char T;
array(){ memset( data, 0, sizeof(data) ); }
/**
* Checked indexing (when in debug build) that also simplifies dereferencing
* when you have an array<T,N>*.
*/
///@{
T& at( size_t pos ) { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
const T& at( size_t pos )const { FC_ASSERT( pos < N, "array out-of-bounds" ); return data[pos]; }
///@}
T* begin() { return &data[0]; }
const T* begin()const { return &data[0]; }
const T* end()const { return &data[N]; }
size_t size()const { return N; }
T data[N];
};
template<typename T, size_t N>
bool operator == ( const array<T,N>& a, const array<T,N>& b )
{ return 0 == memcmp( a.data, b.data, N*sizeof(T) ); }
template<typename T, size_t N>
bool operator < ( const array<T,N>& a, const array<T,N>& b )
{ return memcmp( a.data, b.data, N*sizeof(T) ) < 0 ; }
template<typename T, size_t N>
bool operator > ( const array<T,N>& a, const array<T,N>& b )
{ return memcmp( a.data, b.data, N*sizeof(T) ) > 0 ; }
template<typename T, size_t N>
bool operator != ( const array<T,N>& a, const array<T,N>& b )
{ return 0 != memcmp( a.data, b.data, N*sizeof(T) ); }
template<typename T, size_t N>
void to_variant( const array<T,N>& bi, variant& v )
{
v = std::vector<char>( (const char*)&bi, ((const char*)&bi) + sizeof(bi) );
}
template<typename T, size_t N>
void from_variant( const variant& v, array<T,N>& bi )
{
std::vector<char> ve = v.as< std::vector<char> >();
if( ve.size() )
{
memcpy(bi.begin(), ve.data(), fc::min<size_t>(ve.size(),sizeof(bi)) );
}
else
memset( bi.begin(), char(0), sizeof(bi) );
}
template<typename T,size_t N> struct get_typename< fc::array<T,N> >
{
static const char* name()
{
static std::string _name = std::string("fc::array<")+std::string(fc::get_typename<T>::name())+","+ fc::to_string(N) + ">";
return _name.c_str();
}
};
}
#include <unordered_map>
#include <fc/crypto/city.hpp>
namespace std
{
template<typename T, size_t N>
struct hash<fc::array<T,N> >
{
size_t operator()( const fc::array<T,N>& e )const
{
return fc::city_hash_size_t( (char*)&e, sizeof(e) );
}
};
}
+28
View File
@@ -0,0 +1,28 @@
#pragma once
#include <stdint.h>
namespace fc {
inline uint64_t endian_reverse_u64( uint64_t x )
{
return (((x >> 0x38) & 0xFF) )
| (((x >> 0x30) & 0xFF) << 0x08)
| (((x >> 0x28) & 0xFF) << 0x10)
| (((x >> 0x20) & 0xFF) << 0x18)
| (((x >> 0x18) & 0xFF) << 0x20)
| (((x >> 0x10) & 0xFF) << 0x28)
| (((x >> 0x08) & 0xFF) << 0x30)
| (((x ) & 0xFF) << 0x38)
;
}
inline uint32_t endian_reverse_u32( uint32_t x )
{
return (((x >> 0x18) & 0xFF) )
| (((x >> 0x10) & 0xFF) << 0x08)
| (((x >> 0x08) & 0xFF) << 0x10)
| (((x ) & 0xFF) << 0x18)
;
}
} // namespace fc
+621
View File
@@ -0,0 +1,621 @@
#pragma once
/*
*********************************************************************
* *
* Open Bloom Filter *
* *
* Author: Arash Partow - 2000 *
* URL: http://www.partow.net *
* URL: http://www.partow.net/programming/hashfunctions/index.html *
* *
* Copyright notice: *
* Free use of the Open Bloom Filter Library is permitted under the *
* guidelines and in accordance with the most current version of the *
* Common Public License. *
* http://www.opensource.org/licenses/cpl1.0.php *
* *
*********************************************************************
*/
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <iterator>
#include <limits>
#include <string>
#include <vector>
#include <fc/reflect/reflect.hpp>
namespace fc {
static const std::size_t bits_per_char = 0x08; // 8 bits in 1 char(unsigned)
static const unsigned char bit_mask[bits_per_char] = {
0x01, //00000001
0x02, //00000010
0x04, //00000100
0x08, //00001000
0x10, //00010000
0x20, //00100000
0x40, //01000000
0x80 //10000000
};
class bloom_parameters
{
public:
bloom_parameters()
: minimum_size(1),
maximum_size(std::numeric_limits<unsigned long long int>::max()),
minimum_number_of_hashes(1),
maximum_number_of_hashes(std::numeric_limits<unsigned int>::max()),
projected_element_count(10000),
false_positive_probability(1.0 / projected_element_count),
random_seed(0xA5A5A5A55A5A5A5AULL)
{}
virtual ~bloom_parameters()
{}
inline bool operator!()
{
return (minimum_size > maximum_size) ||
(minimum_number_of_hashes > maximum_number_of_hashes) ||
(minimum_number_of_hashes < 1) ||
(0 == maximum_number_of_hashes) ||
(0 == projected_element_count) ||
(false_positive_probability < 0.0) ||
(std::numeric_limits<double>::infinity() == std::abs(false_positive_probability)) ||
(0 == random_seed) ||
(0xFFFFFFFFFFFFFFFFULL == random_seed);
}
//Allowed min/max size of the bloom filter in bits
unsigned long long int minimum_size;
unsigned long long int maximum_size;
//Allowed min/max number of hash functions
unsigned int minimum_number_of_hashes;
unsigned int maximum_number_of_hashes;
//The approximate number of elements to be inserted
//into the bloom filter, should be within one order
//of magnitude. The default is 10000.
unsigned long long int projected_element_count;
//The approximate false positive probability expected
//from the bloom filter. The default is the reciprocal
//of the projected_element_count.
double false_positive_probability;
unsigned long long int random_seed;
struct optimal_parameters_t
{
optimal_parameters_t()
: number_of_hashes(0),
table_size(0)
{}
unsigned int number_of_hashes;
unsigned long long int table_size;
};
optimal_parameters_t optimal_parameters;
virtual bool compute_optimal_parameters()
{
/*
Note:
The following will attempt to find the number of hash functions
and minimum amount of storage bits required to construct a bloom
filter consistent with the user defined false positive probability
and estimated element insertion count.
*/
if (!(*this))
return false;
double min_m = std::numeric_limits<double>::infinity();
double min_k = 0.0;
double curr_m = 0.0;
double k = 1.0;
while (k < 1000.0)
{
double numerator = (- k * projected_element_count);
double denominator = std::log(1.0 - std::pow(false_positive_probability, 1.0 / k));
curr_m = numerator / denominator;
if (curr_m < min_m)
{
min_m = curr_m;
min_k = k;
}
k += 1.0;
}
optimal_parameters_t& optp = optimal_parameters;
optp.number_of_hashes = static_cast<unsigned int>(min_k);
optp.table_size = static_cast<unsigned long long int>(min_m);
optp.table_size += (((optp.table_size % bits_per_char) != 0) ? (bits_per_char - (optp.table_size % bits_per_char)) : 0);
if (optp.number_of_hashes < minimum_number_of_hashes)
optp.number_of_hashes = minimum_number_of_hashes;
else if (optp.number_of_hashes > maximum_number_of_hashes)
optp.number_of_hashes = maximum_number_of_hashes;
if (optp.table_size < minimum_size)
optp.table_size = minimum_size;
else if (optp.table_size > maximum_size)
optp.table_size = maximum_size;
return true;
}
};
class bloom_filter
{
protected:
typedef unsigned int bloom_type;
typedef unsigned char cell_type;
public:
bloom_filter()
: salt_count_(0),
table_size_(0),
raw_table_size_(0),
projected_element_count_(0),
inserted_element_count_(0),
random_seed_(0),
desired_false_positive_probability_(0.0)
{}
bloom_filter(const bloom_parameters& p)
: projected_element_count_(p.projected_element_count),
inserted_element_count_(0),
random_seed_((p.random_seed * 0xA5A5A5A5) + 1),
desired_false_positive_probability_(p.false_positive_probability)
{
salt_count_ = p.optimal_parameters.number_of_hashes;
table_size_ = p.optimal_parameters.table_size;
generate_unique_salt();
raw_table_size_ = table_size_ / bits_per_char;
bit_table_.resize( static_cast<std::size_t>(raw_table_size_) );
//bit_table_ = new cell_type[static_cast<std::size_t>(raw_table_size_)];
std::fill_n(bit_table_.data(),raw_table_size_,0x00);
}
bloom_filter(const bloom_filter& filter)
{
this->operator=(filter);
}
inline bool operator == (const bloom_filter& f) const
{
if (this != &f)
{
return
(salt_count_ == f.salt_count_) &&
(table_size_ == f.table_size_) &&
(raw_table_size_ == f.raw_table_size_) &&
(projected_element_count_ == f.projected_element_count_) &&
(inserted_element_count_ == f.inserted_element_count_) &&
(random_seed_ == f.random_seed_) &&
(desired_false_positive_probability_ == f.desired_false_positive_probability_) &&
(salt_ == f.salt_) &&
std::equal(f.bit_table_.data(),f.bit_table_.data() + raw_table_size_,bit_table_.data());
}
else
return true;
}
inline bool operator != (const bloom_filter& f) const
{
return !operator==(f);
}
inline bloom_filter& operator = (const bloom_filter& f)
{
if (this != &f)
{
salt_count_ = f.salt_count_;
table_size_ = f.table_size_;
raw_table_size_ = f.raw_table_size_;
projected_element_count_ = f.projected_element_count_;
inserted_element_count_ = f.inserted_element_count_;
random_seed_ = f.random_seed_;
desired_false_positive_probability_ = f.desired_false_positive_probability_;
bit_table_.resize( raw_table_size_ );
std::copy(f.bit_table_.data(),f.bit_table_.data() + raw_table_size_,bit_table_.data());
salt_ = f.salt_;
}
return *this;
}
virtual ~bloom_filter()
{
}
inline bool operator!() const
{
return (0 == table_size_);
}
inline void clear()
{
std::fill_n(bit_table_.data(),raw_table_size_,0x00);
inserted_element_count_ = 0;
}
inline void insert(const unsigned char* key_begin, const std::size_t& length)
{
std::size_t bit_index = 0;
std::size_t bit = 0;
for (std::size_t i = 0; i < salt_.size(); ++i)
{
compute_indices(hash_ap(key_begin,length,salt_[i]),bit_index,bit);
bit_table_[bit_index / bits_per_char] |= bit_mask[bit];
}
++inserted_element_count_;
}
template<typename T>
inline void insert(const T& t)
{
// Note: T must be a C++ POD type.
insert(reinterpret_cast<const unsigned char*>(&t),sizeof(T));
}
inline void insert(const std::string& key)
{
insert(reinterpret_cast<const unsigned char*>(key.c_str()),key.size());
}
inline void insert(const char* data, const std::size_t& length)
{
insert(reinterpret_cast<const unsigned char*>(data),length);
}
template<typename InputIterator>
inline void insert(const InputIterator begin, const InputIterator end)
{
InputIterator itr = begin;
while (end != itr)
{
insert(*(itr++));
}
}
inline virtual bool contains(const unsigned char* key_begin, const std::size_t length) const
{
std::size_t bit_index = 0;
std::size_t bit = 0;
for (std::size_t i = 0; i < salt_.size(); ++i)
{
compute_indices(hash_ap(key_begin,length,salt_[i]),bit_index,bit);
if ((bit_table_[bit_index / bits_per_char] & bit_mask[bit]) != bit_mask[bit])
{
return false;
}
}
return true;
}
template<typename T>
inline bool contains(const T& t) const
{
return contains(reinterpret_cast<const unsigned char*>(&t),static_cast<std::size_t>(sizeof(T)));
}
inline bool contains(const std::string& key) const
{
return contains(reinterpret_cast<const unsigned char*>(key.c_str()),key.size());
}
inline bool contains(const char* data, const std::size_t& length) const
{
return contains(reinterpret_cast<const unsigned char*>(data),length);
}
template<typename InputIterator>
inline InputIterator contains_all(const InputIterator begin, const InputIterator end) const
{
InputIterator itr = begin;
while (end != itr)
{
if (!contains(*itr))
{
return itr;
}
++itr;
}
return end;
}
template<typename InputIterator>
inline InputIterator contains_none(const InputIterator begin, const InputIterator end) const
{
InputIterator itr = begin;
while (end != itr)
{
if (contains(*itr))
{
return itr;
}
++itr;
}
return end;
}
inline virtual unsigned long long int size() const
{
return table_size_;
}
inline std::size_t element_count() const
{
return inserted_element_count_;
}
inline double effective_fpp() const
{
/*
Note:
The effective false positive probability is calculated using the
designated table size and hash function count in conjunction with
the current number of inserted elements - not the user defined
predicated/expected number of inserted elements.
*/
return std::pow(1.0 - std::exp(-1.0 * salt_.size() * inserted_element_count_ / size()), 1.0 * salt_.size());
}
inline bloom_filter& operator &= (const bloom_filter& f)
{
/* intersection */
if (
(salt_count_ == f.salt_count_) &&
(table_size_ == f.table_size_) &&
(random_seed_ == f.random_seed_)
)
{
for (std::size_t i = 0; i < raw_table_size_; ++i)
{
bit_table_[i] &= f.bit_table_[i];
}
}
return *this;
}
inline bloom_filter& operator |= (const bloom_filter& f)
{
/* union */
if (
(salt_count_ == f.salt_count_) &&
(table_size_ == f.table_size_) &&
(random_seed_ == f.random_seed_)
)
{
for (std::size_t i = 0; i < raw_table_size_; ++i)
{
bit_table_[i] |= f.bit_table_[i];
}
}
return *this;
}
inline bloom_filter& operator ^= (const bloom_filter& f)
{
/* difference */
if (
(salt_count_ == f.salt_count_) &&
(table_size_ == f.table_size_) &&
(random_seed_ == f.random_seed_)
)
{
for (std::size_t i = 0; i < raw_table_size_; ++i)
{
bit_table_[i] ^= f.bit_table_[i];
}
}
return *this;
}
inline const cell_type* table() const
{
return bit_table_.data();
}
inline std::size_t hash_count()
{
return salt_.size();
}
protected:
inline virtual void compute_indices(const bloom_type& hash, std::size_t& bit_index, std::size_t& bit) const
{
bit_index = hash % table_size_;
bit = bit_index % bits_per_char;
}
void generate_unique_salt()
{
/*
Note:
A distinct hash function need not be implementation-wise
distinct. In the current implementation "seeding" a common
hash function with different values seems to be adequate.
*/
const unsigned int predef_salt_count = 128;
static const bloom_type predef_salt[predef_salt_count] =
{
0xAAAAAAAA, 0x55555555, 0x33333333, 0xCCCCCCCC,
0x66666666, 0x99999999, 0xB5B5B5B5, 0x4B4B4B4B,
0xAA55AA55, 0x55335533, 0x33CC33CC, 0xCC66CC66,
0x66996699, 0x99B599B5, 0xB54BB54B, 0x4BAA4BAA,
0xAA33AA33, 0x55CC55CC, 0x33663366, 0xCC99CC99,
0x66B566B5, 0x994B994B, 0xB5AAB5AA, 0xAAAAAA33,
0x555555CC, 0x33333366, 0xCCCCCC99, 0x666666B5,
0x9999994B, 0xB5B5B5AA, 0xFFFFFFFF, 0xFFFF0000,
0xB823D5EB, 0xC1191CDF, 0xF623AEB3, 0xDB58499F,
0xC8D42E70, 0xB173F616, 0xA91A5967, 0xDA427D63,
0xB1E8A2EA, 0xF6C0D155, 0x4909FEA3, 0xA68CC6A7,
0xC395E782, 0xA26057EB, 0x0CD5DA28, 0x467C5492,
0xF15E6982, 0x61C6FAD3, 0x9615E352, 0x6E9E355A,
0x689B563E, 0x0C9831A8, 0x6753C18B, 0xA622689B,
0x8CA63C47, 0x42CC2884, 0x8E89919B, 0x6EDBD7D3,
0x15B6796C, 0x1D6FDFE4, 0x63FF9092, 0xE7401432,
0xEFFE9412, 0xAEAEDF79, 0x9F245A31, 0x83C136FC,
0xC3DA4A8C, 0xA5112C8C, 0x5271F491, 0x9A948DAB,
0xCEE59A8D, 0xB5F525AB, 0x59D13217, 0x24E7C331,
0x697C2103, 0x84B0A460, 0x86156DA9, 0xAEF2AC68,
0x23243DA5, 0x3F649643, 0x5FA495A8, 0x67710DF8,
0x9A6C499E, 0xDCFB0227, 0x46A43433, 0x1832B07A,
0xC46AFF3C, 0xB9C8FFF0, 0xC9500467, 0x34431BDF,
0xB652432B, 0xE367F12B, 0x427F4C1B, 0x224C006E,
0x2E7E5A89, 0x96F99AA5, 0x0BEB452A, 0x2FD87C39,
0x74B2E1FB, 0x222EFD24, 0xF357F60C, 0x440FCB1E,
0x8BBE030F, 0x6704DC29, 0x1144D12F, 0x948B1355,
0x6D8FD7E9, 0x1C11A014, 0xADD1592F, 0xFB3C712E,
0xFC77642F, 0xF9C4CE8C, 0x31312FB9, 0x08B0DD79,
0x318FA6E7, 0xC040D23D, 0xC0589AA7, 0x0CA5C075,
0xF874B172, 0x0CF914D5, 0x784D3280, 0x4E8CFEBC,
0xC569F575, 0xCDB2A091, 0x2CC016B4, 0x5C5F4421
};
if (salt_count_ <= predef_salt_count)
{
std::copy(predef_salt,
predef_salt + salt_count_,
std::back_inserter(salt_));
for (unsigned int i = 0; i < salt_.size(); ++i)
{
/*
Note:
This is done to integrate the user defined random seed,
so as to allow for the generation of unique bloom filter
instances.
*/
salt_[i] = salt_[i] * salt_[(i + 3) % salt_.size()] + static_cast<bloom_type>(random_seed_);
}
}
else
{
std::copy(predef_salt,predef_salt + predef_salt_count,std::back_inserter(salt_));
srand(static_cast<unsigned int>(random_seed_));
while (salt_.size() < salt_count_)
{
bloom_type current_salt = static_cast<bloom_type>(rand()) * static_cast<bloom_type>(rand());
if (0 == current_salt) continue;
if (salt_.end() == std::find(salt_.begin(), salt_.end(), current_salt))
{
salt_.push_back(current_salt);
}
}
}
}
inline bloom_type hash_ap(const unsigned char* begin, std::size_t remaining_length, bloom_type hash) const
{
const unsigned char* itr = begin;
unsigned int loop = 0;
while (remaining_length >= 8)
{
const unsigned int& i1 = *(reinterpret_cast<const unsigned int*>(itr)); itr += sizeof(unsigned int);
const unsigned int& i2 = *(reinterpret_cast<const unsigned int*>(itr)); itr += sizeof(unsigned int);
hash ^= (hash << 7) ^ i1 * (hash >> 3) ^
(~((hash << 11) + (i2 ^ (hash >> 5))));
remaining_length -= 8;
}
if (remaining_length)
{
if (remaining_length >= 4)
{
const unsigned int& i = *(reinterpret_cast<const unsigned int*>(itr));
if (loop & 0x01)
hash ^= (hash << 7) ^ i * (hash >> 3);
else
hash ^= (~((hash << 11) + (i ^ (hash >> 5))));
++loop;
remaining_length -= 4;
itr += sizeof(unsigned int);
}
if (remaining_length >= 2)
{
const unsigned short& i = *(reinterpret_cast<const unsigned short*>(itr));
if (loop & 0x01)
hash ^= (hash << 7) ^ i * (hash >> 3);
else
hash ^= (~((hash << 11) + (i ^ (hash >> 5))));
++loop;
remaining_length -= 2;
itr += sizeof(unsigned short);
}
if (remaining_length)
{
hash += ((*itr) ^ (hash * 0xA5A5A5A5)) + loop;
}
}
return hash;
}
public:
std::vector<bloom_type> salt_;
std::vector<unsigned char> bit_table_;
unsigned int salt_count_;
unsigned long long int table_size_;
unsigned long long int raw_table_size_;
unsigned long long int projected_element_count_;
unsigned int inserted_element_count_;
unsigned long long int random_seed_;
double desired_false_positive_probability_;
};
inline bloom_filter operator & (const bloom_filter& a, const bloom_filter& b)
{
bloom_filter result = a;
result &= b;
return result;
}
inline bloom_filter operator | (const bloom_filter& a, const bloom_filter& b)
{
bloom_filter result = a;
result |= b;
return result;
}
inline bloom_filter operator ^ (const bloom_filter& a, const bloom_filter& b)
{
bloom_filter result = a;
result ^= b;
return result;
}
} // namespace fc
FC_REFLECT( fc::bloom_filter, (salt_)(bit_table_)(salt_count_)(table_size_)(raw_table_size_)(projected_element_count_)(inserted_element_count_)(random_seed_)(desired_false_positive_probability_) )
FC_REFLECT( fc::bloom_parameters::optimal_parameters_t, (number_of_hashes)(table_size) )
FC_REFLECT( fc::bloom_parameters, (minimum_size)(maximum_size)(minimum_number_of_hashes)(maximum_number_of_hashes)(projected_element_count)(false_positive_probability)(random_seed)(optimal_parameters) )
/*
Note 1:
If it can be guaranteed that bits_per_char will be of the form 2^n then
the following optimization can be used:
hash_table[bit_index >> n] |= bit_mask[bit_index & (bits_per_char - 1)];
Note 2:
For performance reasons where possible when allocating memory it should
be aligned (aligned_alloc) according to the architecture being used.
*/
@@ -0,0 +1,9 @@
#pragma once
#include <string>
namespace fc {
std::string smaz_compress( const std::string& in );
std::string smaz_decompress( const std::string& compressed );
} // namespace fc
@@ -0,0 +1,10 @@
#pragma once
#include <fc/string.hpp>
namespace fc
{
string zlib_compress(const string& in);
} // namespace fc

Some files were not shown because too many files have changed in this diff Show More