Compare commits

...

3602 Commits

Author SHA1 Message Date
Matt Witherspoon 7dbb3b9f66 testing 2023-07-18 17:22:55 -04:00
Kevin Heifner 98bbe9d342 Merge pull request #1412 from AntelopeIO/GH-1279-print-options
Print non-default options on startup/shutdown
2023-07-18 07:23:01 -05:00
Kevin Heifner 81a3a77398 GH-1279 Use string literals 2023-07-17 18:23:27 -05:00
Kevin Heifner 73e6abea61 GH-1279 Update appbase to main 2023-07-17 18:00:12 -05:00
Kevin Heifner 0d514c67a1 GH-1279 Print non-default options 2023-07-17 11:55:42 -05:00
Peter Oschwald d243f8569d Merge pull request #1356 from AntelopeIO/GH-1156-ph-cicd-nodeos-versions
[PH] Create workflow to test backward compatibility of performance harness
2023-07-14 14:43:02 -05:00
Peter Oschwald bfa1685672 Add names to jobs for better UI experience. 2023-07-14 13:46:12 -05:00
Peter Oschwald b59fede2ba Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-13 16:29:08 -05:00
Peter Oschwald 56c00275db fix permission. 2023-07-13 16:14:55 -05:00
jgiszczak ac55419d8a Merge pull request #1400 from AntelopeIO/launcher-fix-genesis-json-max-cpu
Update max_block_cpu_usage and max_transaction_cpu_usage properly.
2023-07-13 16:11:26 -05:00
Jonathan Giszczak 3807a62fc6 Merge branch 'launcher-fix-genesis-json-max-cpu' of github.com:AntelopeIO/leap into launcher-fix-genesis-json-max-cpu 2023-07-12 16:42:02 -05:00
Jonathan Giszczak a56efcdc1a In the right order. 2023-07-12 16:40:24 -05:00
Peter Oschwald 4e19e36362 Somehow put the wrong permission here. 2023-07-12 16:04:23 -05:00
Peter Oschwald c3db754e89 Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-12 15:46:40 -05:00
jgiszczak c280508b8a Merge branch 'main' into launcher-fix-genesis-json-max-cpu 2023-07-12 15:44:08 -05:00
Lin Huang b338c04525 Merge pull request #1402 from AntelopeIO/merge_version_bump_from_4_0_4_to_main
[4.0 -> main] Merge version bump from 4.0.4 to main
2023-07-12 16:39:32 -04:00
Peter Oschwald 0da3e7b36e Fix path to workflow. 2023-07-12 15:24:44 -05:00
Peter Oschwald 495d6eab30 Try to rework permissions to leave top level read, but pass write to build-base. 2023-07-12 15:20:36 -05:00
Peter Oschwald e0b3caad3d Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-12 15:15:35 -05:00
Peter Oschwald 477f62c857 Remove hardcoded org and repo and ref. 2023-07-12 15:15:14 -05:00
Lin Huang 2f5f521165 merge release/4.0.4 version bump 2023-07-12 15:35:29 -04:00
Kevin Heifner a3b2b77eb5 Merge pull request #1401 from AntelopeIO/GH-1390-perf-test
Test Fix: performance test - use 475ms for max_transaction_cpu_usage
2023-07-12 15:25:32 -04:00
Lin Huang f93b7f7fdd Merge pull request #1398 from AntelopeIO/merge_memory_issue_fix_from_4_0_to_main
[4.0 -> main] Merge memory issue fix from release/4.0 to main
2023-07-12 15:22:08 -04:00
Kevin Heifner 58b2e9e8a8 GH-1390 Use 475ms for max_transaction_cpu_usage to match value used in other integration tests. 2023-07-12 13:49:49 -05:00
Jonathan Giszczak ca4de7c9a2 Update max_block_cpu_usage and max_transaction_cpu_usage properly. 2023-07-12 13:42:53 -05:00
Lin Huang 7e1ad13e1e Merge pull request #1399 from AntelopeIO/version_bump_to_4_0_4
[3.2 -> 4.0] Merge 3.2.4 version bump and update version to release/4.0.4
2023-07-12 13:49:23 -04:00
Lin Huang 8aca28965a bump Leap version to 4.0.4 in addition to merging 3.2.4 version bump 2023-07-12 13:09:48 -04:00
Lin Huang 273e378de0 update eos-vm to point to main 2023-07-12 13:00:45 -04:00
Lin Huang 6558f99515 Merge pull request #1397 from AntelopeIO/merge_memory_issue_fix_from_3_2
[3.2 -> 4.0] Merge memory issue fix from release/3.2 to release/4.0
2023-07-12 12:54:18 -04:00
Lin Huang 00b045ca2c Merge pull request #1396 from AntelopeIO/version_bump_to_3_2_4
[3.1 -> 3.2] Merge version bump from 3.1.5 and bump to 3.2.4
2023-07-12 12:34:44 -04:00
Lin Huang 3d8c4e345a Merge 3.1.5 version bump and bump to 3.2.4 2023-07-12 11:59:12 -04:00
Lin Huang 2986df849f update eos-vm to point to release/4.0 2023-07-12 11:49:41 -04:00
Lin Huang 2bce4e6407 Merge pull request #1395 from AntelopeIO/version_bump_to_3_1_5
[3.1] Version bump to release/3.1.5
2023-07-12 11:34:19 -04:00
Lin Huang 6beea8a61f Merge pull request #1394 from AntelopeIO/merge_memory_issue_fix_from_3_1
[3.1 -> 3.2] Merge memory issue fix from release/3.1
2023-07-12 11:18:00 -04:00
Lin Huang 0821c7f7e6 Bump Leap version to release/3.1.5 2023-07-12 10:59:33 -04:00
Lin Huang 6ec530e2de Merge remote-tracking branch 'origin/release/3.1' into merge_memory_issue_fix_from_3_1 2023-07-12 10:41:27 -04:00
Lin Huang 3e576c5f92 Merge pull request #1393 from AntelopeIO/memory_issue_fix
[3.1] Memory issue fix
2023-07-12 10:36:20 -04:00
Lin Huang c8327b51bb update eos-vm to point to release/3x 2023-07-12 09:57:26 -04:00
Lin Huang 7bcebcaa0f A companion Leap changes for fixing WASM memory exhaustion 2023-07-12 09:54:20 -04:00
Peter Oschwald 8eb51fc2b9 Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-12 07:49:47 -05:00
Kevin Heifner 0dad71d379 Merge pull request #1386 from AntelopeIO/GH-1275-signal
Signal accepted_block after it is marked valid
2023-07-12 08:19:25 -04:00
Peter Oschwald d46a16a105 Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-11 16:04:42 -05:00
Peter Oschwald 7be77cd745 Convert build.yaml to use reusable build-base workflow. 2023-07-11 15:24:50 -05:00
Peter Oschwald cf7ae29952 Give packages write permissions. 2023-07-11 14:47:58 -05:00
Peter Oschwald 7df3af711e Provide packages write permission for Build Platforms job. 2023-07-11 14:40:35 -05:00
Peter Oschwald de40f8a4bb Inherit secrets. 2023-07-11 14:38:46 -05:00
Peter Oschwald 8044aa16ba Needs to use this branch's reusable workflow for now, not main 2023-07-11 14:33:07 -05:00
Peter Oschwald 4f158ded97 Try breaking out build steps into reusable workflow.
Make use of reusable workflow in ph_backward_compatibility workflow.
2023-07-11 14:31:15 -05:00
Kevin Heifner 08c2b81b51 Merge pull request #1391 from AntelopeIO/GH-1383-ship-test-main
[4.0 -> main] Test: Fix ship test to wait on correct transaction
2023-07-11 15:03:06 -04:00
Kevin Heifner 925b6421ce Merge remote-tracking branch 'origin/release/4.0' into GH-1383-ship-test-main 2023-07-11 13:08:09 -05:00
Kevin Heifner 49212f098b Merge pull request #1388 from AntelopeIO/GH-1383-ship-test-4.0
[4.0] Test: Fix ship test to wait on correct transaction
2023-07-11 14:06:44 -04:00
Kevin Heifner 9469b56374 Merge pull request #1389 from AntelopeIO/GH-1357-test-main
[4.0 -> main] Test: Reduce load on ci/cd
2023-07-11 14:06:03 -04:00
Kevin Heifner 8417aecafa Merge remote-tracking branch 'origin/release/4.0' into GH-1357-test-main 2023-07-11 10:55:07 -05:00
Kevin Heifner ef61b06a22 Merge pull request #1387 from AntelopeIO/GH-1357-test-4.0
[4.0] Test: Reduce load on ci/cd
2023-07-11 11:54:39 -04:00
Kevin Heifner 149f76b6c5 GH-1383 Fix ship test to wait on correct transaction 2023-07-11 10:37:28 -05:00
Kevin Heifner 19d99f5913 GH-1357 Reduced number of generated trxs to reduce load on ci/cd 2023-07-11 10:03:47 -05:00
Kevin Heifner 8b43915f95 Merge pull request #1385 from AntelopeIO/GH-1331-slow-main
[4.0 -> main] SHiP: Improve startup when large number of SHiP logs in retain directory
2023-07-11 09:38:34 -04:00
Kevin Heifner df0791c1d0 GH-1275 Signal accepted_block after it is marked valid 2023-07-11 08:33:24 -05:00
Kevin Heifner 05a5153470 GH-1331 Replace boost filesystem include with std 2023-07-11 08:06:10 -05:00
Kevin Heifner a3a7281846 Merge remote-tracking branch 'origin/release/4.0' into GH-1331-slow-main 2023-07-10 18:47:39 -05:00
Kevin Heifner cf29b356df Merge pull request #1384 from AntelopeIO/GH-1331-slow-4.0
[4.0] SHiP: Improve startup when large number of SHiP logs in retain directory
2023-07-10 19:31:27 -04:00
Peter Oschwald 1a3ef7da83 Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-07-10 14:19:34 -05:00
Peter Oschwald 265ee66b53 Sanity check nodeos version. 2023-07-10 14:15:54 -05:00
Peter Oschwald b2b22ab990 Cleanup. 2023-07-10 14:09:19 -05:00
Peter Oschwald bc46133ef8 Working to fix install of leap deb pkg. 2023-07-10 13:43:08 -05:00
Kevin Heifner 9e55f1ad0b GH-1331 Remove unneeded include 2023-07-10 13:42:40 -05:00
Peter Oschwald b7dea9bfde Install the leap deb package to bring along dependencies and then use those nodeos and cleos versions. 2023-07-10 13:29:38 -05:00
Kevin Heifner 40d6b1f3e2 GH-1331 Use better variable name 2023-07-10 13:23:13 -05:00
Peter Oschwald cb447c579d Try removing workaround, as it shouldn't be necessary here. 2023-07-10 13:11:32 -05:00
Peter Oschwald c63042bb93 Try reducing steps using regex for deb name matching across versions. 2023-07-10 13:10:32 -05:00
Peter Oschwald 800a37e605 Collapse perf tests back into regular expressions to simplifly and reduce future maintenance 2023-07-10 13:03:49 -05:00
Kevin Heifner 776d675715 GH-1331 Use LogIndex for verification of index to log data. Simpler and faster. 2023-07-10 12:27:13 -05:00
Kevin Heifner 8651553d8a GH-1331 Avoid copies for performance 2023-07-10 12:26:21 -05:00
Kevin Heifner bb98e4d78d GH-1331 Use std::map instead of flat_map as flat_map insert perf is terrible for large maps 2023-07-10 12:25:34 -05:00
Peter Oschwald ff1a83761f Shouldn't run read only tests in if < v4.0 2023-07-10 11:33:20 -05:00
Peter Oschwald 8cb771a710 Fix multiple if statements in steps. 2023-07-10 10:54:19 -05:00
Peter Oschwald e6ea54b817 Read only transaction feature support was added in 4.0, remove unsupported command line options in earlier versions. 2023-07-10 10:51:21 -05:00
Peter Oschwald 441f5d308c Read only transaction feature support was added in 4.0, don't test in prior releases. 2023-07-10 10:50:40 -05:00
Peter Oschwald 3a0960e004 Use full nodeosVersion.
cleos time-limit option was added in 3.2 but is not in 3.1 so need to be able to differentiate on minor version number.
2023-07-10 09:00:57 -05:00
Kevin Heifner 1b79caa0b6 Merge pull request #1382 from AntelopeIO/GH-1354-deferred-id-m
[4.0 -> main] Emit correct trace id for deferred trx before replace_deferred protocol feature activation
2023-07-07 16:36:48 -04:00
Kevin Heifner 0c18762028 Merge remote-tracking branch 'origin/release/4.0' into GH-1354-deferred-id-m 2023-07-07 14:41:33 -05:00
Kevin Heifner 9cada469c2 Merge pull request #1381 from AntelopeIO/GH-1354-deferred-id-4.0
[3.2 -> 4.0] Emit correct trace id for deferred trx before replace_deferred protocol feature activation
2023-07-07 15:39:46 -04:00
Kevin Heifner 923904f0dd Merge pull request #1380 from AntelopeIO/GH-1354-deferred-id-4.0
[3.2 -> 4.0] Emit correct trace id for deferred trx before replace_deferred protocol feature activation
2023-07-07 15:05:40 -04:00
Kevin Heifner 399ca84c93 Merge remote-tracking branch 'origin/release/3.2' into GH-1354-deferred-id-4.0 2023-07-07 12:57:48 -05:00
Matt Witherspoon 18617a5044 Merge pull request #1363 from AntelopeIO/no_eager_tcmalloc
no longer eagerly use tcmalloc if it's found
2023-07-07 13:56:54 -04:00
Kevin Heifner 4c1226e69c Merge pull request #1379 from AntelopeIO/GH-1354-deferred-id-3.2
[3.2] Emit correct trace id for deferred trx before replace_deferred protocol feature activation
2023-07-07 13:54:24 -04:00
Kevin Heifner 71ecec44f8 GH-1354 Provide transaction_context trx id for trace since it can differ from provided packed_transaction for deferred trxs before replace_deferred protocol feature is activated. 2023-07-07 11:20:58 -05:00
Kevin Heifner 97aa4b8031 GH-1354 Add test case for deferred trx id before/after protocol feature replace_deferred 2023-07-07 11:17:05 -05:00
Kevin Heifner 189a6ac955 Merge pull request #1377 from AntelopeIO/GH-1340-ship-main
[4.0 -> main] SHiP: Support snapshot start with full deltas
2023-07-07 08:11:00 -04:00
Kevin Heifner 9570203c98 Merge remote-tracking branch 'origin/release/4.0' into GH-1340-ship-main 2023-07-06 20:06:58 -05:00
Kevin Heifner f3afc81a83 Merge pull request #1375 from AntelopeIO/GH-1340-ship-4.0
[4.0] SHiP: Support snapshot start with full deltas
2023-07-06 20:59:48 -04:00
Kevin Heifner 224ae213fc Merge pull request #1376 from AntelopeIO/GH-1349-p2p-conn-main
[4.0 -> main] Close connection on aysnc_read with a closed socket
2023-07-06 20:58:27 -04:00
Kevin Heifner 446a752dd9 Merge remote-tracking branch 'origin/release/4.0' into GH-1349-p2p-conn-main 2023-07-06 17:38:54 -05:00
Kevin Heifner 16608570ea Merge pull request #1366 from AntelopeIO/GH-1349-p2p-conn-4.0
[4.0] Close connection on aysnc_read with a closed socket
2023-07-06 18:33:45 -04:00
Kevin Heifner 0d7d2fd798 GH-1340 Code cleanup 2023-07-06 15:58:42 -05:00
Gregory Popovitch 507ec6ed37 Merge pull request #1367 from AntelopeIO/greg-gitignore
add `*.gdb_history` to `.gitignore`
2023-07-06 16:34:49 -04:00
Gregory Popovitch 9f194675f4 Merge branch 'main' into greg-gitignore 2023-07-06 15:59:49 -04:00
Kevin Heifner 6c14f56ebe GH-1340 Make SHiP data available after a snapshot load even if no new blocks applied. Also do not repeatable send empty get_blocks_response messages but rather start sending first available block data. 2023-07-06 13:34:09 -05:00
Kevin Heifner 30161af688 GH-1340 Add integration test that verifies ship delta data available immediately after loading a snapshot 2023-07-06 13:26:27 -05:00
Kevin Heifner 633fda695c GH-1340 Correctly handle possibly missing prev_block 2023-07-06 13:23:59 -05:00
Gregory Popovitch d4ed800327 Merge pull request #1374 from AntelopeIO/gh-1189
[4.0 -> main] Fix incorrect serializing of std::optional when value is not provided - (GH #1189)
2023-07-05 15:19:05 -04:00
greg7mdp 8b7f9f7faf Address PR comment and small cleanup in safe_add(). 2023-07-05 14:16:49 -04:00
greg7mdp 0d486d3020 Merge branch 'release/4.0' of github.com:AntelopeIO/leap into gh-1189 2023-07-05 13:50:11 -04:00
Gregory Popovitch 85c58ade36 Merge pull request #1373 from AntelopeIO/gh-1189-4.0
[3.2 -> 4.0] Fix incorrect serializing of std::optional when value is not provided - (GH #1189)
2023-07-05 13:30:48 -04:00
greg7mdp e5325bf3e7 Merge branch 'release/3.2' of github.com:AntelopeIO/leap into gh-1189-4.0 2023-07-05 13:11:42 -04:00
Gregory Popovitch c456d17833 Merge pull request #1364 from AntelopeIO/gh-1189-3.2
[3.2] Fix incorrect serializing of std::optional when value is not provided - (GH #1189)
2023-07-05 11:14:54 -04:00
greg7mdp f41ca84851 Update comments. 2023-07-05 10:58:08 -04:00
Kevin Heifner 1ba4f2fd05 Merge pull request #1371 from AntelopeIO/GH-980-speculative-main
[4.0 -> main] Removed "deprecated" from help for speculative read-mode
2023-07-05 10:47:37 -04:00
Kevin Heifner 59b0d08749 GH-1349 close mismatched socket 2023-07-05 07:42:17 -05:00
Kevin Heifner e991b9ef0d Merge remote-tracking branch 'origin/release/4.0' into GH-980-speculative-main 2023-07-05 07:22:49 -05:00
Kevin Heifner d45cd96882 Merge pull request #1368 from AntelopeIO/GH-980-speculative-4.0
[4.0] Removed "deprecated" from help for speculative read-mode
2023-07-05 08:22:20 -04:00
Kevin Heifner 6dbe74c892 GH-980 Update docs 2023-07-03 21:57:21 -05:00
Kevin Heifner d5d78a6321 GH-980 Removed deprecated from help for speculative mode 2023-07-03 21:52:41 -05:00
Kevin Heifner bd7ff14a61 GH-1349 If socket closed, but close not call, call close 2023-07-03 20:15:08 -05:00
greg7mdp 6dd606d3dc add *.gdb_history to .gitignore 2023-07-03 16:12:04 -04:00
Peter Oschwald 095e6bae35 Merge pull request #1365 from AntelopeIO/ph-manual-workflow-stub
[PH] Create stub workflow for manual dispatch performance harness runs
2023-07-03 13:40:00 -05:00
Peter Oschwald 8ae2447710 Creating a shell of the initial performance harness run workflow to be merged quickly allowing development of actual workflow in follow-on branch.
Need to have workflow file merged before github will allow triggering it in a development branch.
2023-07-03 12:48:51 -05:00
greg7mdp 79885499da Address PR comment (removed change unneeded in backport). 2023-07-03 13:15:15 -04:00
Peter Oschwald ea37b69738 make sure to change to the build dir. 2023-07-03 11:21:14 -05:00
Peter Oschwald 5499dd010e Always run test scenarios. 2023-07-03 10:52:06 -05:00
Peter Oschwald 58b0f32894 Revert "Split test scenarios into separate jobs."
This reverts commit d42f0e784a.
2023-07-03 10:49:56 -05:00
greg7mdp 1111fee4bc Merge branch 'release/3.2' of github.com:AntelopeIO/leap into gh-1189-3.2 2023-07-03 11:38:24 -04:00
Peter Oschwald d42f0e784a Split test scenarios into separate jobs. 2023-07-03 10:34:33 -05:00
Matt Witherspoon a8f35c7355 no longer eagerly use tcmalloc if it's found 2023-07-03 11:27:13 -04:00
Peter Oschwald 91cf4db380 Give tests a little longer to complete. 2023-07-03 10:07:12 -05:00
Kevin Heifner d46d7e903a GH-1349 Cleanup duplicate check 2023-07-03 10:05:23 -05:00
Kevin Heifner 5a3cd673e9 GH-1349 Close on async_read closed socket. Always shutdown socket. 2023-07-03 10:04:57 -05:00
Peter Oschwald 99d23168ba Add regex flag to ctest. 2023-07-03 09:47:35 -05:00
Peter Oschwald 258fefc41d Tests not found - move change dir build into first test. 2023-06-30 17:39:41 -05:00
Peter Oschwald a2aa513e46 Split up tests into individual runs. 2023-06-30 17:23:46 -05:00
Peter Oschwald cd6926567c Use low-tier for longer run time 2023-06-30 14:28:28 -05:00
Peter Oschwald 2e90e39f79 Do not run tests in parallel. 2023-06-30 14:09:41 -05:00
Peter Oschwald 3a720421e0 missed the extract step 2023-06-30 14:01:12 -05:00
Peter Oschwald f848de5bd6 Try to placate different version artifact naming conventions. 2023-06-30 13:52:22 -05:00
Peter Oschwald c42f25b914 Merge branch 'main' into GH-1156-ph-cicd-nodeos-versions 2023-06-30 13:21:19 -05:00
Peter Oschwald 762c074d1c Merge pull request #1355 from AntelopeIO/GH-1156-initial-ph-cicd-workflow
Create stub workflow ph_backward_compatibility.yaml
2023-06-30 13:18:49 -05:00
Peter Oschwald fe0533236d Create workflow to test backward compatibility of performance harness with prior leap releases. 2023-06-30 09:47:55 -05:00
Peter Oschwald 126b62db68 Creating a shell of the initial ph_backward_compatibility.yaml workflow to be merged quickly allowing development of actual workflow in follow-on branch.
Need to have workflow file merged before github will allow triggering it in a development branch.
2023-06-30 09:44:48 -05:00
Kevin Heifner aed53c00bc Merge pull request #1342 from AntelopeIO/GH-1251-auto-oc-opt
OC tierup compile in order
2023-06-29 14:18:47 -04:00
Kevin Heifner 91d192bb69 Merge pull request #1322 from AntelopeIO/GH-1251-auto-oc
Add eos-vm-oc-enable auto mode
2023-06-29 14:18:16 -04:00
Kevin Heifner 8c64e08160 Merge pull request #1352 from AntelopeIO/GH-1302-docs-main
[4.0 -> main] Docs: Additional nodeos --help info
2023-06-29 12:04:04 -04:00
Kevin Heifner b27f0a0dae Merge pull request #1351 from AntelopeIO/GH-1289-block-log
Blocklog: Return std::optional for head_id
2023-06-29 08:37:49 -04:00
Kevin Heifner 58deb5b512 Merge pull request #1350 from AntelopeIO/GH-1302-docs-4.0
[4.0] Docs: Additional nodeos --help info
2023-06-29 07:03:40 -04:00
Kevin Heifner 24f251125d Merge pull request #1347 from AntelopeIO/GH-1328-p2p-main
[4.0 -> main] P2P: fix head_num reporting
2023-06-29 06:58:43 -04:00
Kevin Heifner cd744f5052 GH-1251 Fix tests to not destroy temp dir before controller which uses it 2023-06-29 03:22:48 -04:00
Kevin Heifner 7c43e0064a GH-1251 Add comment that log statement used in test 2023-06-29 02:06:34 -04:00
Kevin Heifner 01fc14a013 Merge remote-tracking branch 'origin/release/4.0' into GH-1302-docs-main 2023-06-29 01:43:00 -04:00
Kevin Heifner 46037d5840 GH-1289 Use struct instead of std::pair 2023-06-29 01:35:23 -04:00
Kevin Heifner 9012e7f8f9 GH-1289 Combine head and head_id into one optional 2023-06-28 16:56:27 -04:00
Kevin Heifner 3971ff6159 GH-1289 Return std::optional for head_id to make it clearer when head not available 2023-06-28 15:31:55 -04:00
Kevin Heifner 1d0aef60c0 GH-1302 Add more info to help 2023-06-28 14:23:54 -04:00
Kevin Heifner a8f20cebf4 GH-1251 Restore #ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED removed in refactor 2023-06-28 12:06:15 -04:00
Kevin Heifner b260447db5 GH-1251 Remove improper check for vm_type::eos_vm_oc 2023-06-28 11:30:44 -04:00
Kevin Heifner 774fd21156 GH-1251 Move setting of eosvmoc_tierup outside of loop 2023-06-28 08:11:43 -04:00
Kevin Heifner 975ad1340c GH-1251 Support case-insensitive options 2023-06-28 08:03:47 -04:00
Kevin Heifner da236cbd46 GH-1251 Update auto description 2023-06-28 07:55:10 -04:00
Kevin Heifner ef910f7953 Merge pull request #1345 from AntelopeIO/GH-1328-p2p-4.0
[4.0] P2P: fix head_num reporting
2023-06-28 07:06:09 -04:00
Kevin Heifner d373b1db52 GH-1251 No need to link to boost unit_test_framework, using header-only 2023-06-28 03:10:43 -04:00
Kevin Heifner 1abee9ae49 GH-1328 fix merge issue 2023-06-28 02:43:17 -04:00
Kevin Heifner fededf193f Merge remote-tracking branch 'origin/release/4.0' into GH-1328-p2p-main 2023-06-28 02:40:56 -04:00
Kevin Heifner 1a92c80d35 Merge pull request #1346 from AntelopeIO/GH-1176-test
Test: plugin_http_api_test.py
2023-06-27 17:43:01 -04:00
Kevin Heifner e4aeee11cc GH-1176 Add --keep-logs option and do not clean logs on test failure 2023-06-27 13:12:47 -04:00
Kevin Heifner 3bea7339e1 Merge pull request #1344 from AntelopeIO/GH-1246-test
Test fix: large-lib-test
2023-06-27 11:42:16 -04:00
Kevin Heifner 13196783d4 GH-1328 catch_up notice_message has 0 for known_blocks.pending 2023-06-27 05:03:04 -04:00
Kevin Heifner 9d1c673188 GH-1244 Test cluster now uses defproducera as the producer after cluster launch 2023-06-27 01:45:14 -04:00
Kevin Heifner 716e293639 Merge pull request #1343 from AntelopeIO/GH-1244-retry-test
Test fix: nodeos_retry_transaction_test
2023-06-26 18:58:26 -05:00
Kevin Heifner 66b2047686 GH-1244 Verify bios relaunch and add a pause between relaunch of relay nodes for a better test 2023-06-26 16:45:00 -04:00
Kevin Heifner f51599cbfa GH-1251 Remove chain::config use from eos-vm-oc 2023-06-26 15:19:06 -04:00
Kevin Heifner f870aa3ae3 Merge pull request #1218 from AntelopeIO/huangminghuang/ipv6
refactor listener
2023-06-26 13:59:50 -05:00
Kevin Heifner 9cdcef8dcb GH-1251 Remove MRU, just go with FIFO 2023-06-26 14:36:08 -04:00
Kevin Heifner d4fb84efd1 Make members private 2023-06-26 14:27:25 -04:00
Kevin Heifner 168940e3ec Merge remote-tracking branch 'origin/main' into huangminghuang/ipv6 2023-06-26 14:01:18 -04:00
Kevin Heifner 57a1d719e8 GH-1251 Use multiindex, process in order of last used, prioritize eosio.* 2023-06-26 13:37:28 -04:00
Kevin Heifner d53864232f Merge pull request #1341 from AntelopeIO/main-warn
Fix unused warning
2023-06-26 08:13:27 -05:00
Kevin Heifner fec0a7a879 GH-1251 pass by reference 2023-06-26 08:03:44 -05:00
Kevin Heifner 9e2bab5cdf Fix unused warning 2023-06-26 07:39:45 -05:00
Kevin Heifner 0997826de8 GH-1251 Use deque instead of unordered_set to process contracts in order. Prioritize eosio.*. 2023-06-23 23:02:44 -05:00
greg7mdp 05fe45a4e6 Add a couple more test patterns. 2023-06-23 17:28:38 -04:00
greg7mdp f1eb13a02d Add test case for using std::optional in abi type definitions. 2023-06-23 16:47:21 -04:00
greg7mdp 93fe429bbc Update abi_tests.cpp to not enforce deadline in debug mode. 2023-06-23 16:46:43 -04:00
greg7mdp f9e91f19be Use value from numeric_limits rather than hard coded hex value. 2023-06-23 16:45:28 -04:00
greg7mdp 86c38831ff Output flag marking empty std::optional in abi_serializer::_variant_to_binary 2023-06-23 16:43:33 -04:00
jgiszczak 32e546cbf3 Merge pull request #1249 from AntelopeIO/test-harness-retry-num-blocks
Use retry-num-blocks where possible to avoid polling in tests
2023-06-23 14:56:24 -05:00
Kevin Heifner 6008c72892 GH-1251 Use eosio.token as eosio.system contract can not tierup in time to be found in logs on slow ci/cd machine 2023-06-23 13:06:37 -05:00
Kevin Heifner dc00e24c98 GH-1251 Add integration test that verifies auto oc tierup 2023-06-23 11:38:11 -05:00
Kevin Heifner d4ee46b7a1 GH-1251 Add is_applying_block() method 2023-06-23 11:37:10 -05:00
Peter Oschwald 36f16b9455 Merge pull request #1259 from AntelopeIO/libtester-usage-in-ci
test libtester usage as part of CI
2023-06-23 09:06:36 -05:00
Peter Oschwald f1513d8c0e Merge pull request #1339 from AntelopeIO/pinned-builds-workflow-in-ci-main
[4.0 -> main] Pinned Builds manual dispatch workflow in CI
2023-06-23 09:05:04 -05:00
Peter Oschwald 0b28380f40 Merge branch 'main' into libtester-usage-in-ci 2023-06-22 19:21:08 -05:00
Peter Oschwald 933c550ce9 Remove ubuntu18 support in pinned builds. 2023-06-22 19:11:35 -05:00
Peter Oschwald a6743e7efb Merge branch 'release/4.0' into pinned-builds-workflow-in-ci-main 2023-06-22 19:06:43 -05:00
Peter Oschwald 546e37dd38 Merge pull request #1338 from AntelopeIO/pinned-builds-workflow-in-ci-4.0
[3.2 -> 4.0] Pinned Builds manual dispatch workflow in CI
2023-06-22 19:04:40 -05:00
Gregory Popovitch 51902a59ba Merge pull request #1268 from AntelopeIO/gh-1230
Update net_plugin to support clang Thread Safety Analysis features
2023-06-22 18:11:51 -04:00
Peter Oschwald 929f84b9b5 Merge branch 'main' into libtester-usage-in-ci 2023-06-22 16:22:52 -05:00
Peter Oschwald 0861ef660a Update cdt target to version 4.x 2023-06-22 16:22:09 -05:00
greg7mdp 28f6e59b3a Merge branch 'main' of github.com:AntelopeIO/leap into gh-1230 2023-06-22 17:17:15 -04:00
Peter Oschwald 67b43790bb Fix lost quotes in merge. 2023-06-22 16:12:50 -05:00
Peter Oschwald a3b6cfbbd8 Merge branch 'release/3.2' into pinned-builds-workflow-in-ci-4.0 2023-06-22 16:08:19 -05:00
Peter Oschwald 2a13774d66 Merge pull request #1335 from AntelopeIO/pinned-builds-workflow-in-ci-3.2
[3.1 -> 3.2] Pinned Builds manual dispatch workflow in CI
2023-06-22 16:00:09 -05:00
Gregory Popovitch 782ceb1a55 Merge pull request #1337 from AntelopeIO/gh-1247
[4.0 -> main] Report transaction failed if trx was exhausted in non-producing mode (GH 1247)
2023-06-22 15:59:44 -04:00
Kevin Heifner 98e3b81c21 GH-1251 Address peer review comments 2023-06-22 14:50:22 -05:00
greg7mdp ec4918f115 Merge branch 'release/4.0' of github.com:AntelopeIO/leap into gh-1247 2023-06-22 15:20:04 -04:00
Gregory Popovitch f55097a439 Merge pull request #1329 from AntelopeIO/gh-1247-4.0
[3.2 -> 4.0] Report transaction failed if trx was exhausted in non-producing mode (GH 1247)
2023-06-22 14:13:32 -04:00
Peter Oschwald b194862aa2 Skip parallel tests on ubuntu18 (as done in build.yaml). 2023-06-22 13:08:06 -05:00
Peter Oschwald 9e82b160c7 Update artifact name that was changed in 3.2 2023-06-22 11:45:48 -05:00
Peter Oschwald c74fde2a27 Merge branch 'release/3.1' into pinned-builds-workflow-in-ci-3.2 2023-06-22 11:40:23 -05:00
Peter Oschwald ed854f2bbd Merge pull request #1291 from AntelopeIO/pinned-builds-workflow-in-ci
[3.1] Pinned Builds manual dispatch workflow in CI
2023-06-22 11:38:59 -05:00
jgiszczak e3250f9834 Merge pull request #1314 from AntelopeIO/test-harness-cluster-launcher-plugin-support
Add support for '--plugin' to cluster_launcher.py
2023-06-22 11:17:56 -05:00
Peter Oschwald e3976b8dc1 Merge pull request #1310 from AntelopeIO/pinned_build_install_prefix_knob
[3.1] `CMAKE_INSTALL_PREFIX=/usr` for pinned builds in CI
2023-06-22 10:59:43 -05:00
Peter Oschwald 16bbbbea3a Merge pull request #1313 from AntelopeIO/libtester-ci-config-knobs
Add configuration knobs and defaults for cdt and eos-system-contracts
2023-06-22 10:05:05 -05:00
Peter Oschwald efbb4c634f Merge pull request #1312 from AntelopeIO/libtester-ci-matrix
libtester ci matrix
2023-06-22 10:04:50 -05:00
Peter Oschwald 02c43ca656 Use enf-x86-beefy-long runner 2023-06-22 09:30:09 -05:00
Kevin Heifner 870673840b GH-1251 Add additional comments 2023-06-22 08:22:40 -05:00
Kevin Heifner 8fc11f0041 GH-1251 Add additional allowed true/false alternatives 2023-06-22 08:08:58 -05:00
Kevin Heifner 9faefa2629 GH-1251 Increase perf harness genesis to have 150ms max transaction time to match genesis used in other tests. This allows for setcode in slow ci/cd env. 2023-06-22 07:49:12 -05:00
Peter Oschwald 38439b3e69 Use option to diable SYSTEM_ENABLE_LEAP_VERSION_CHECK 2023-06-21 14:29:35 -05:00
greg7mdp 76de72a3a9 Merge branch 'release/3.2' of github.com:AntelopeIO/leap into gh-1247-4.0 2023-06-21 14:32:53 -04:00
Gregory Popovitch 5f763daa4c Merge pull request #1319 from AntelopeIO/gh-1247-3.2
[3.2] Report transaction failed if trx was exhausted in non-producing mode
2023-06-21 14:08:28 -04:00
Peter Oschwald 4c7772f096 Currently eos-system-contracts 3.1 sets a CDT_VERSION_SOFT_MAX to 3, so update to compatible version for default. 2023-06-21 12:11:45 -05:00
Peter Oschwald 41bf136a6e Disable leap version check to allow running with whatever leap is currently at. 2023-06-21 12:10:24 -05:00
greg7mdp c293d332f7 Remove comment as per PR review. 2023-06-21 11:34:38 -04:00
Lin Huang 3e3f8e327c Merge pull request #1327 from AntelopeIO/merge_4_0_3_version_bump
[4.0 -> main] Merge release/4.0.3 version bump
2023-06-21 08:45:25 -04:00
Peter Oschwald 0b56986bba Remove dash from json for jq. 2023-06-20 17:35:20 -05:00
Peter Oschwald a3b84cec5e Add eos-system-contractgs override input. 2023-06-20 17:13:39 -05:00
Lin Huang e53ba8df0f correct version after merging 4.0.3 version bump 2023-06-20 17:49:06 -04:00
Peter Oschwald a44ca9b0cd Add control knob for selecting eos-system-contracts ref. Defaults to release/3.1 2023-06-20 16:47:33 -05:00
Peter Oschwald dc9901203e Update to use eos-system-contracts instead of reference-contracts. 2023-06-20 16:37:20 -05:00
Kevin Heifner 6f4584ce83 Merge pull request #1321 from AntelopeIO/GH-1315-time-main
[4.0 -> main] P2P: Use magnitude safe time types
2023-06-20 16:04:03 -05:00
greg7mdp 2d3e78619c Add in_producing_mode() and in_speculating_mode() members. 2023-06-20 15:53:54 -04:00
greg7mdp 3e11f790c6 name/terminology update according to PR comments 2023-06-20 15:38:00 -04:00
Kevin Heifner f2123eae5b GH-1251 Disable oc on producer when applying blocks 2023-06-20 14:36:25 -05:00
Lin Huang 6e2bc2ee3e Merge pull request #1320 from AntelopeIO/bump_to_4_0_3
[4.0] Bump Leap version to 4.0.3
2023-06-20 15:29:32 -04:00
Kevin Heifner 197d37e92c GH-1315 Fix merge issue 2023-06-20 14:06:57 -05:00
Kevin Heifner c8c6c5e44f Merge remote-tracking branch 'origin/release/4.0' into GH-1315-time-main 2023-06-20 14:00:11 -05:00
Lin Huang a7364dc3b6 Bump Leap version to 4.0.3 2023-06-20 14:49:40 -04:00
Kevin Heifner e9016b0560 Merge pull request #1316 from AntelopeIO/GH-1315-time-4.0
[4.0] P2P: Use magnitude safe time types
2023-06-20 13:43:03 -05:00
Matt Witherspoon 46d7535370 Merge pull request #1318 from AntelopeIO/listener_macos_EINVAL_nonfatal
on macOS do not consider `EINVAL` a fatal accept error in fc's listener; fixing keosd on macOS
2023-06-20 14:13:43 -04:00
greg7mdp 41eaeef80e Report transaction failed if trx was exhausted in non-producing mode
So we restart a speculative block to retry it immediately, instead of waiting to receive a new block
2023-06-20 14:05:53 -04:00
jgiszczak 8327ad6d93 Merge branch 'main' into test-harness-cluster-launcher-plugin-support 2023-06-20 11:02:36 -05:00
Matt Witherspoon 8afd0ae0a5 Merge pull request #1317 from AntelopeIO/remove_getthreadname
remove `FC_USE_PTHREAD_NAME_NP` & `pthread_getname_np()` usage
2023-06-20 10:34:03 -04:00
Matt Witherspoon 0e08cecdac on macOS do not consider EINVAL a fatal accept error 2023-06-20 08:50:31 -04:00
Matt Witherspoon 4cc666efd6 remove FC_USE_PTHREAD_NAME_NP & pthread_getname_np() 2023-06-20 08:31:46 -04:00
Kevin Heifner 025bc22dbf GH-1251 Add initial implementation of should_use_eos_vm_oc() 2023-06-19 18:15:19 -05:00
Kevin Heifner 1cc64a0cc3 GH-1251 Update docs 2023-06-19 18:13:59 -05:00
Kevin Heifner 23f6db5f87 GH-1251 Remove unused 2023-06-19 18:13:36 -05:00
Kevin Heifner 360ffb5d7f GH-1251 Fix test 2023-06-19 18:12:30 -05:00
Kevin Heifner 34fa470be0 GH-1251 Add prefix() method to name 2023-06-19 18:11:45 -05:00
Kevin Heifner e7f1406694 GH-1251 Fix tests to be able to run with default of --eos-vm-oc-enable=auto 2023-06-19 14:48:59 -05:00
Kevin Heifner c1673735cc GH-1251 Fix failing tests 2023-06-19 12:42:41 -05:00
Jonathan Giszczak 326aa03098 extraNodeosArgs should be empty string when not used, not list. 2023-06-19 12:11:21 -05:00
Kevin Heifner 0b3b3b61f9 GH-1315 Completely remove problematic tstamp type. 2023-06-19 10:52:54 -05:00
Kevin Heifner a05077a16b GH-1251 Refactor wasm_interface map into a wasm_interface_collection 2023-06-19 09:45:04 -05:00
Kevin Heifner b221c12fcf GH-1315 Reset latest_msg_time and latest_blk_time so re-connect doesn't trip heartbeat timer 2023-06-19 08:41:30 -05:00
Jonathan Giszczak 4bda591042 Use empty list instead of None for unused extraNodeosArgs. 2023-06-17 15:47:50 -05:00
Jonathan Giszczak 6254908957 cluster_launcher needs to work without a plugin argument. 2023-06-17 11:57:17 -05:00
Kevin Heifner 5dbcdc54c6 GH-1315 Use magnitude safe time types 2023-06-17 09:12:02 -05:00
Jonathan Giszczak 045a7e296a Add support for '--plugin' to cluster_launcher.py
Required completing support for AppArgs 'action'.
2023-06-16 19:16:58 -05:00
Kevin Heifner 9229b349b3 GH-1251 Use enum for eosvmoc_tierup instead of bool. 2023-06-16 16:29:16 -05:00
jgiszczak e3a160c1c8 Merge branch 'main' into test-harness-retry-num-blocks 2023-06-16 15:47:12 -05:00
Jonathan Giszczak 237c235114 Use non-production node for transferring funds in voting test. 2023-06-16 15:46:02 -05:00
Peter Oschwald 8ac0b690d6 Merge branch 'main' into libtester-usage-in-ci 2023-06-16 15:23:32 -05:00
Jonathan Giszczak e865853415 Omit repeatable args from specificNodeosArg replacement. 2023-06-16 14:52:49 -05:00
Peter Oschwald 1ec98976b1 Try newly added self hosted runner for pinned builds. 2023-06-16 14:42:43 -05:00
Peter Oschwald 93833b8e03 Simplify naming and path matching for artifact. 2023-06-16 14:14:55 -05:00
Peter Oschwald c419644df9 Add missing newline at eof. 2023-06-16 14:10:26 -05:00
Peter Oschwald fa5edb27b3 Break version check out into its own job. 2023-06-16 14:08:14 -05:00
Peter Oschwald ec89e07bb4 Fix indentation. 2023-06-16 13:36:41 -05:00
Peter Oschwald 26122578cb Merge branch 'libtester-ci-matrix' into libtester-ci-config-knobs 2023-06-16 13:34:17 -05:00
Peter Oschwald 429589b148 Fix all-passing job dependency list. 2023-06-16 13:33:01 -05:00
Peter Oschwald c106b23188 Fix libtester tests name in all-passing job now that all combined in matrix. 2023-06-16 13:32:08 -05:00
Peter Oschwald 1b78c4ab46 Remove dangling close paren. 2023-06-16 13:30:48 -05:00
Peter Oschwald ddc341a835 Fix use of double and single quotes. 2023-06-16 13:28:03 -05:00
Peter Oschwald fd18f94586 Add configuration knobs and defaults for cdt. 2023-06-16 13:21:36 -05:00
Peter Oschwald 481a958f97 Try to combine 3 libtester test cases into one using matrix. 2023-06-16 12:58:50 -05:00
Lin Huang 6bfdd62a9c Merge pull request #1311 from AntelopeIO/merge_4_0_2_version_bump
[4.0 -> main] Merge release/4.0.2 version bump to main
2023-06-16 12:32:53 -04:00
Peter Oschwald 1939c7c0b1 Merge branch 'main' into libtester-usage-in-ci 2023-06-16 09:58:28 -05:00
Peter Oschwald cb61f1caa8 Bump to midtier. Remove comments. Make libtester tests required for passing.
Trying libtester tests at midtier to see how it affect runtime to judge whether they can be made required.
2023-06-16 09:57:31 -05:00
Lin Huang 189b1b8bcf correct version after merging 4.0.2 version bump 2023-06-16 07:34:20 -04:00
Matt Witherspoon d6cd2c9a7d LEAP_PINNED_INSTALL_PREFIX knob to set pinned_build.sh CMAKE_INSTALL_PREFIX 2023-06-15 22:37:09 -04:00
Matt Witherspoon 7e51f02b6a Merge pull request #1309 from AntelopeIO/fixup_listener_log
fix error log message in fc network listener
2023-06-15 21:06:51 -04:00
Jonathan Giszczak 5ecdf44471 Allow some specificExtraArgs to override existing nodeos args. 2023-06-15 19:11:16 -05:00
jgiszczak 8e78347f4c Merge branch 'main' into test-harness-retry-num-blocks 2023-06-15 17:23:40 -05:00
Jonathan Giszczak 7f479b7d43 Use non-production node for account creation in forked_chain_test. 2023-06-15 17:22:40 -05:00
Jonathan Giszczak 1ab17d06f3 Use retry node in under_min_avail_ram test. 2023-06-15 16:58:23 -05:00
Matt Witherspoon 10e86a877e fix log message in listener 2023-06-15 17:18:32 -04:00
Peter Oschwald ae2679e164 Cleanup. 2023-06-15 16:13:03 -05:00
Vlad 641ccfefd1 Merge pull request #1308 from AntelopeIO/GH-1286-snap-scheduler-fix
Improve snapshot test reliability
2023-06-15 16:50:28 -04:00
jgiszczak 34d95e58db Merge branch 'main' into test-harness-retry-num-blocks 2023-06-15 15:48:21 -05:00
Jonathan Giszczak 7bc12b1948 Propagate waitForTransBlock through to transferFunds during account creation.
Don't bother to revalidate eosio and producer accounts in subjective
billing tests.
2023-06-15 15:47:53 -05:00
766C6164 49b2763e0c changed to std::abs 2023-06-15 16:28:29 -04:00
Jonathan Giszczak f46e922cc7 Add retry node and remove explicit sleeps from trace_plugin_test. 2023-06-15 15:22:14 -05:00
Jonathan Giszczak d8d46399e1 Use default validation node in startup_catchup test. 2023-06-15 15:07:30 -05:00
Peter Oschwald 0f25eaa33a Remove quotes from path for upload. 2023-06-15 14:13:06 -05:00
766C6164 e310746817 ups 2023-06-15 15:03:26 -04:00
766C6164 8fd91526d6 improve test reliability 2023-06-15 14:57:44 -04:00
Lin Huang 6aca8a47db Merge pull request #1307 from AntelopeIO/bump_to_4_0_2
[4.0] Bump Leap version to 4.0.2
2023-06-15 13:52:23 -04:00
Peter Oschwald b7b4554a18 Fix spelling causing issue with GITHUB_ENV. And trying again to get artifact name correctly. 2023-06-15 12:35:43 -05:00
Lin Huang b90a843acc [4.0] Bump Leap version to 4.0.2 2023-06-15 13:18:18 -04:00
Kevin Heifner d0d53c0620 Merge pull request #1305 from AntelopeIO/GH-1284-log-spam-main
[4.0 -> main] P2P: Do not log small clock skew
2023-06-15 12:12:12 -05:00
Kevin Heifner 3b108de276 Merge remote-tracking branch 'origin/release/4.0' into GH-1284-log-spam-main 2023-06-15 11:14:14 -05:00
Kevin Heifner a3f37d9ecd Merge pull request #1303 from AntelopeIO/GH-1284-log-spam-4.0
[4.0] P2P: Do not log small clock skew
2023-06-15 11:11:44 -05:00
Kevin Heifner 6a44686d25 Merge pull request #1304 from AntelopeIO/GH-1228-empty-blocklog-main
[4.0 -> main] Fix for loading a snapshot with an empty block log but an existing fork database
2023-06-15 11:11:04 -05:00
Peter Oschwald 20e59a92bc Not finding deb packages. check dir structure some more. 2023-06-15 10:49:04 -05:00
Peter Oschwald 969867af86 Merge branch 'main' into libtester-usage-in-ci 2023-06-15 10:42:57 -05:00
Kevin Heifner baccb32d2d Merge remote-tracking branch 'origin/release/4.0' into GH-1228-empty-blocklog-main 2023-06-15 10:38:20 -05:00
Kevin Heifner ce6f2cfb30 Merge pull request #1299 from AntelopeIO/GH-1228-empty-block-log-4.0
[4.0] Fix for loading a snapshot with an empty block log but an existing fork database
2023-06-15 10:37:24 -05:00
Vlad 294997d734 Merge pull request #1283 from AntelopeIO/bsd-13-2-build-fix
Fix for a build on FreeBSD 13.2
2023-06-15 11:37:09 -04:00
Vlad 24ac4cf19e Merge pull request #1301 from AntelopeIO/GH-1197-get-transaction-id-hex-data-main
[4.0 -> main] if actions.data & actions.hex_data provided, use the hex_data in api call get_transaction_id
2023-06-15 11:36:32 -04:00
Kevin Heifner 6991a718b3 GH-1284 Do not log small clock skew 2023-06-15 08:30:40 -05:00
Peter Oschwald 31fd1361aa Something is not matching up with expected dir or file structure. 2023-06-15 08:00:00 -05:00
766C6164 a3dad02c78 Merge branch 'release/4.0' into GH-1197-get-transaction-id-hex-data-main 2023-06-15 08:16:54 -04:00
Jonathan Giszczak 83c0bfc6af Adapt cluster create account to use non-producing node if available.
Add non-producing nodes to several tests to allow transaction retry.
Adjust individual tests to use non-producing nodes for trx retry.
2023-06-14 23:55:47 -05:00
Vlad 88c9d3f089 Merge pull request #1280 from AntelopeIO/GH-1197-get-transaction-id-hex-data
[4.0] if actions.data & actions.hex_data provided, use the hex_data in api call get_transaction_id
2023-06-14 22:17:42 -04:00
Kevin Heifner 308a985ef8 GH-1228 Correctly handle forks 2023-06-14 21:04:07 -05:00
Kevin Heifner 79535c6109 GH-1228 Increase the block_range to include fork 2023-06-14 21:03:42 -05:00
Kevin Heifner 1dca359a8e GH-1228 Log snapshot loaded for both cases 2023-06-14 20:47:39 -05:00
Peter Oschwald 449f37133b Skip wildcards in upload-artifact and capture artifact name with regex grep and store in env variable. 2023-06-14 16:44:42 -05:00
Kevin Heifner 3f196088e4 GH-1228 Include invalid get_blocks_result_v0 in the streamer output for debugging 2023-06-14 15:56:10 -05:00
Peter Oschwald 9c0c1aa906 See if setting leap_DIR just once on GITHUB_ENV will suffice.
Remove LEAP_BUILD_DIR as it is not used any longer.
2023-06-14 15:42:15 -05:00
Peter Oschwald feeee5eb8f Say yes. 2023-06-14 15:37:38 -05:00
Peter Oschwald 32de87b185 Update package lists first. 2023-06-14 15:35:28 -05:00
Peter Oschwald 78dd785035 Need software-properties-common and a apt-get update to get add-apt-repository to work. 2023-06-14 15:34:06 -05:00
Peter Oschwald f4b39ea29e Use single quotes. 2023-06-14 15:30:35 -05:00
Peter Oschwald 20f45e5923 Add conditional step to add updated apt repository for git.
Ubuntu 18.04 installs  git 2.17.1, but need 2.18+ for git submodules to work.
2023-06-14 15:27:18 -05:00
Peter Oschwald 06373d2cfc Merge branch 'main' into libtester-usage-in-ci 2023-06-14 15:12:19 -05:00
Kevin Heifner 804d3a4df4 Merge pull request #1298 from AntelopeIO/GH-1228-empty-block-log-main
[4.0 -> main] Fix for loading snapshot with empty block log
2023-06-14 15:10:12 -05:00
766C6164 e165ba91af Added two more validation exceptions from cleos 2023-06-14 16:09:40 -04:00
Peter Oschwald 12de1d9337 Merge pull request #1297 from AntelopeIO/init-pinned-build-workflow
Create initial workflow file for Pinned Builds.
2023-06-14 15:08:31 -05:00
Kevin Heifner 9599669956 GH-1228 Fix for reading a snapshot without a block log but with a fork database 2023-06-14 14:42:28 -05:00
Kevin Heifner 2a3c0c3da9 GH-1228 Additional tests for empty block log 2023-06-14 14:41:58 -05:00
Kevin Heifner 53d4847c38 Merge remote-tracking branch 'origin/release/4.0' into GH-1228-empty-block-log-main 2023-06-14 14:34:42 -05:00
Kevin Heifner b9c2e739eb Merge pull request #1285 from AntelopeIO/GH-1228-empty-block-log-4.0
[4.0] Fix for loading snapshot with empty block log
2023-06-14 14:32:13 -05:00
Peter Oschwald b016822c57 Not using cached build environments so removing this job. Replace with temp job for now. 2023-06-14 14:18:14 -05:00
Peter Oschwald aa5ef2a668 Try single method of discovering leap dir.
Use environment variable for leap_DIR. Remove use of cache variables.
2023-06-14 14:08:50 -05:00
Peter Oschwald fc2166a46d Merge branch 'init-pinned-builds-workflow-in-ci' into pinned-builds-workflow-in-ci 2023-06-14 13:58:18 -05:00
Peter Oschwald 39a5ba846a Have to have a job for github. Add temp job. 2023-06-14 13:57:00 -05:00
Peter Oschwald e4b28a7854 Remove empty jobs section. 2023-06-14 13:54:13 -05:00
Peter Oschwald e4819c35e1 Merge branch 'init-pinned-builds-workflow-in-ci' into pinned-builds-workflow-in-ci 2023-06-14 13:51:11 -05:00
Peter Oschwald 7b7027cbee Not using cached build environments so removing this job. 2023-06-14 13:49:33 -05:00
Peter Oschwald 74fb1615d8 Add pinned to artifact name and don't upload dev artifact by filtering out in regex. 2023-06-14 13:02:32 -05:00
Peter Oschwald 5523010cfd Fix syntax and forgotten run command. 2023-06-14 13:00:00 -05:00
Peter Oschwald 7c106605cc Not using cached build environments so removing this job. 2023-06-14 12:16:11 -05:00
766C6164 72f87b87a5 use EOS_RETHROW_EXCEPTIONS 2023-06-14 13:13:07 -04:00
Peter Oschwald 9047d1175b For now run on github runner. 2023-06-14 12:05:12 -05:00
Peter Oschwald da6a068639 Script already runs cpack, remove. Break artifact check into own step for easier removal in future. 2023-06-14 12:03:27 -05:00
766C6164 a46b8bbbb5 Merge branch 'GH-1197-get-transaction-id-hex-data' of github.com:AntelopeIO/leap into GH-1197-get-transaction-id-hex-data 2023-06-14 12:56:26 -04:00
766C6164 6446f4a9e4 Updated exceptions 2023-06-14 12:56:17 -04:00
Peter Oschwald a886743005 Initial work to run pinned_build script on base images.
Build package and upload artifacts.
2023-06-14 11:44:53 -05:00
Peter Oschwald 0dbfb1a6ed Creating a shell of the initial pinned_build.yaml workflow to be merged quickly allowing development of actual workflow in follow on branch.
Need to have workflow file merged before github will allow triggering it in a development branch.
2023-06-14 11:26:08 -05:00
Peter Oschwald a8fb85c854 Create initial workflow file for Pinned Builds.
Creating a shell of the initial pinned_build.yaml workflow to be merged quickly into main to allow development of actual workflow in follow on branch.  Need to have workflow file in main before github will allow triggering it in a development branch.
2023-06-14 09:49:50 -05:00
Kevin Heifner 3406b68857 GH-1228 Improve assert message 2023-06-14 09:25:02 -05:00
Peter Oschwald 4ec1aba9a6 Probably doesn't need hightier any longer. Move down to lowtier. 2023-06-14 08:54:21 -05:00
Peter Oschwald f069ef42df Try to install from cmake. 2023-06-14 08:39:32 -05:00
Kevin Heifner 4734d36b55 GH-1228 Fix empty block log to support loading from a snapshot 2023-06-14 06:35:54 -05:00
Kevin Heifner 02dd569d35 GH-1228 Better assertion message 2023-06-14 06:35:31 -05:00
Kevin Heifner 40332eccb7 GH-1228 Add test for reading a snapshot with no block log option. 2023-06-14 06:35:04 -05:00
766C6164 e809eec2bf fc::to_string -> std::to_string 2023-06-13 21:49:49 -04:00
Vlad 40bf6c2d59 Merge branch 'release/4.0' into GH-1197-get-transaction-id-hex-data 2023-06-13 20:06:33 -04:00
766C6164 167820fcd7 Addresing feedback - tests, asserts 2023-06-13 18:52:33 -04:00
Peter Oschwald da2e36fd8d midtier seems to be failing, up it to hightier and try. Fix documentation. 2023-06-13 17:02:00 -05:00
Peter Oschwald 6ef42555d8 Use midtier runner instead of beefy. 2023-06-13 16:18:01 -05:00
Peter Oschwald 86ad348b6a Merge branch 'main' into libtester-usage-in-ci 2023-06-13 14:49:16 -05:00
Vlad 53ac7e8f62 Merge pull request #1274 from AntelopeIO/GH-1273-improve-snapshot-tst
Made snapshot test more robust in case of asap scheduling
2023-06-13 15:39:26 -04:00
Peter Oschwald 1a2f38ded6 Begin cleanup of build.yaml 2023-06-13 14:23:26 -05:00
Peter Oschwald 781bf34868 Up the runner for the dev-install test. 2023-06-13 14:21:49 -05:00
766C6164 53a94a68bc if actions.data & actions.hex_data provided, use the hex_data 2023-06-13 14:41:38 -04:00
Peter Oschwald 4fb6c05667 Set some env variables for install. 2023-06-13 13:35:33 -05:00
Kevin Heifner b951f747a8 Merge pull request #1278 from AntelopeIO/GH-1272-ship-main
[4.0 -> main] SHiP: fix intermittent empty get_block_result
2023-06-13 13:34:32 -05:00
Peter Oschwald cb707a526c Don't upgrade, just update list. 2023-06-13 13:20:30 -05:00
Peter Oschwald 6eeb12b0ca apt reported as not having stable CLI interface. Try using apt-get instead. 2023-06-13 13:00:52 -05:00
Kevin Heifner ea9b988f56 GH-1272 Fix merge 2023-06-13 12:42:54 -05:00
Peter Oschwald 213eff9341 Move apt install step down to reference-contracts where it is required. Also install build-essential. 2023-06-13 12:36:46 -05:00
Kevin Heifner b8d64a5399 Merge remote-tracking branch 'origin/release/4.0' into GH-1272-ship-main 2023-06-13 12:29:41 -05:00
Kevin Heifner 9bba26a2c3 Merge pull request #1276 from AntelopeIO/GH-1272-ship-4.0
[4.0] SHiP: fix intermittent empty get_block_result
2023-06-13 12:27:10 -05:00
Peter Oschwald d5bc51732e Run apt update and upgrade on base images before installing. 2023-06-13 12:14:28 -05:00
Peter Oschwald cb18aea20c Attempt to build up from ubuntu base images to check dependency installation in deb packages. 2023-06-13 11:46:13 -05:00
Peter Oschwald 903a8d71e0 Try with lowtier machines. 2023-06-13 11:18:18 -05:00
Peter Oschwald 1b9a4a1978 Fix path not supported for artifact download action.
Introduce removal of leap artifacts after install.
2023-06-13 10:35:06 -05:00
Peter Oschwald 70d7fa0422 Update dependency now that it is using the artifact. 2023-06-13 10:18:34 -05:00
Peter Oschwald 3d1b726450 Try using clone and builddir combo for dev-install variant. 2023-06-13 08:09:47 -05:00
Peter Oschwald 6265cdbf06 Clone leap to have src avail for build tree test. 2023-06-13 07:46:05 -05:00
766C6164 845a5e4e2f more readable ps_start 2023-06-13 07:43:41 -04:00
Kevin Heifner d4d8839be5 GH-1272 Fix merge issue 2023-06-12 20:06:53 -05:00
Kevin Heifner 93b357dc11 GH-1272 Use block_state if it is current block instead of trying to find the block in forkdb 2023-06-12 19:31:18 -05:00
Kevin Heifner 23c57bf1f2 GH-1272 Add ship and streamer client to verify blocks received over fork 2023-06-12 19:30:30 -05:00
766C6164 9589cbee34 Made test more robust in case of asap scheduling 2023-06-12 18:08:08 -04:00
jgiszczak 5b00e0597f Merge branch 'main' into test-harness-retry-num-blocks 2023-06-12 15:48:54 -05:00
Jonathan Giszczak 4abcae09c9 Support --retry-num-blocks in regression tests.
Enable --transaction-retry-max-storage-size-gb on all non-producer nodes
in regression tests.
2023-06-12 15:48:25 -05:00
greg7mdp a4c07cf27c Merge branch 'main' of github.com:AntelopeIO/leap into gh-1230 2023-06-12 16:38:51 -04:00
Kevin Heifner d86ba3aa41 Merge pull request #1271 from AntelopeIO/GH-1240-net-loop-main
[4.0 -> main] P2P excessive logging caused by message spamming
2023-06-12 14:59:22 -05:00
Peter Oschwald 1e78934af6 Move reference-contracts build into the reference-contracts dir. 2023-06-12 14:36:02 -05:00
Peter Oschwald 6f2ab3c589 Trying if the dir structure has to match that from the leap Build job when using the build archive. 2023-06-12 14:25:03 -05:00
Peter Oschwald 2df6005091 Try adding CMAKE_PREFIX_PATH. 2023-06-12 14:10:44 -05:00
Peter Oschwald d32f1f77cd Try specifying LEAP_BUILD_DIR 2023-06-12 13:59:40 -05:00
Kevin Heifner 45429a3e34 Merge remote-tracking branch 'origin/release/4.0' into GH-1240-net-loop-main 2023-06-12 13:59:18 -05:00
Kevin Heifner bccfa160f8 Merge pull request #1267 from AntelopeIO/GH-1240-net-loop-4.0
[4.0] P2P excessive logging caused by message spamming
2023-06-12 13:55:23 -05:00
jgiszczak 883770575f Merge branch 'main' into test-harness-retry-num-blocks 2023-06-12 13:43:36 -05:00
Peter Oschwald 756d884d61 Instead of bulding cdt from source, for this just install from deb package as well. 2023-06-12 13:36:17 -05:00
Peter Oschwald 0529db6b3d Export the env variable in cdt build. 2023-06-12 13:25:00 -05:00
greg7mdp 45844e019b Fix a couple issues from the previous merge. 2023-06-12 13:40:15 -04:00
greg7mdp 07e2a9b237 Merge branch 'main' of github.com:AntelopeIO/leap into gh-1230 2023-06-12 13:34:37 -04:00
greg7mdp 994b547642 Remove fc::unique_lock copy constructor which I am not sure how to get right 2023-06-12 13:27:16 -04:00
greg7mdp 76129fd10f Revert unnecessary logic changes. 2023-06-12 13:26:34 -04:00
greg7mdp 3a8584cf1e Hold the lock during request_next_chunk method as suggested 2023-06-12 13:23:23 -04:00
Peter Oschwald 72702596d2 Spelling correction. 2023-06-12 12:15:15 -05:00
greg7mdp 30ffccc59b Do not pass the mutex * as suggested in PR comment. 2023-06-12 13:12:29 -04:00
Peter Oschwald 8c73690b01 Use github environment file and variable to pass env variable between steps. 2023-06-12 11:58:31 -05:00
Kevin Heifner 6c5e1564b8 Merge pull request #1269 from AntelopeIO/fix-i256-main
[4.0 -> main] fix i256 key type conversion by initialize buffer before usage
2023-06-12 11:30:08 -05:00
Kevin Heifner de9c8f0c7a Merge remote-tracking branch 'origin/release/4.0' into fix-i256-main 2023-06-12 10:53:19 -05:00
Kevin Heifner 1b14fc9c1d Merge pull request #1266 from AntelopeIO/fix-i256-4.0
[3.2 -> 4.0] fix i256 key type conversion by initialize buffer before usage
2023-06-12 10:52:50 -05:00
greg7mdp 61242561d7 Restore exception safety as discussed with Kevin. 2023-06-12 11:51:07 -04:00
Peter Oschwald 73f326f395 Env variables not carrying over between steps. Reset leap_DIR and cdt_DIR here. 2023-06-12 10:46:33 -05:00
Peter Oschwald ae03420dba Install CDT from deb package instead of src build and install. 2023-06-12 10:46:00 -05:00
Peter Oschwald 61b3d2e494 Still trying to get cdt_DIR and leap_DIR to work. 2023-06-12 09:44:45 -05:00
greg7mdp 28ad1c34e4 Address PR comments 2023-06-12 10:39:06 -04:00
greg7mdp a0a1effbdd Address PR comments 2023-06-12 10:21:18 -04:00
Peter Oschwald d055c409ed Try exporting lead and cdt dir to env variable for use in ref-contracts build. 2023-06-12 09:17:56 -05:00
Peter Oschwald 8df02aa8a3 Try install first then dev-install. 2023-06-12 09:17:25 -05:00
greg7mdp d954698e31 Whitespace cleanup 2023-06-12 10:13:08 -04:00
Peter Oschwald a8d176796b double check dir structure 2023-06-12 08:50:44 -05:00
Peter Oschwald 60d62888db double check dir structure 2023-06-12 08:37:58 -05:00
greg7mdp 6fdb21d79b Add version check for enabling -Wthread-safety (version >= 14) 2023-06-12 09:27:30 -04:00
Peter Oschwald 33a4496105 double check dir structure 2023-06-12 08:18:51 -05:00
Peter Oschwald 4635c6c4a4 Use absolute paths. 2023-06-12 07:54:38 -05:00
Kevin Heifner c2026ced33 Merge pull request #1243 from AntelopeIO/GH-1072-send-time-latency
P2P use round trip of time_message to calculate latency
2023-06-12 07:47:13 -05:00
Kevin Heifner 84fa137298 Merge branch 'main' into GH-1072-send-time-latency 2023-06-12 06:56:42 -05:00
Kevin Heifner d495b4094c Merge remote-tracking branch 'origin/release/3.2' into fix-i256-4.0 2023-06-12 06:32:36 -05:00
Kevin Heifner e06fc98e81 Merge pull request #1264 from AntelopeIO/fix-i256-3.2
[3.2] fix `i256` key type conversion by initialize buffer before usage
2023-06-12 06:31:41 -05:00
Vlad 9cfcbf0b30 Merge pull request #1265 from AntelopeIO/GH-1239-make-output-dir-required-main
[4.0 -> main] Output-dir should be required for block-log subcommands of leap-util
2023-06-11 18:34:43 -04:00
Gregory Popovitch 990d2eacf8 Merge pull request #1253 from AntelopeIO/cleanup_net_plugin_pimpl
Cleanup pimpl idiom for `net_plugin`
2023-06-11 11:41:05 -04:00
766C6164 a3f863fa7b Merge branch 'release/4.0' into GH-1239-make-output-dir-required-main 2023-06-11 11:30:26 -04:00
Vlad 3677c3c80f Merge pull request #1263 from AntelopeIO/GH-1239-make-output-dir-required-40
[3.2 -> 4.0] Output-dir should be required for block-log subcommands of leap-util
2023-06-11 11:27:06 -04:00
learnforpractice db657e5082 fix i256 key type conversion by initialize buffer before usage 2023-06-10 15:30:22 -05:00
Matt Witherspoon f8930f4bc2 Merge pull request #1252 from learnforpractice/main
fix `i256` key type conversion by initialize buffer before usage
2023-06-10 16:22:39 -04:00
greg7mdp 563bbbad1f whitespace 2023-06-10 15:57:26 -04:00
greg7mdp 836856204d Add thread safety directives for conn_mtx 2023-06-10 15:45:10 -04:00
greg7mdp 902fdaa07f Remove explicit template parameters <std::mutex>. 2023-06-10 15:35:32 -04:00
greg7mdp 25bb1554cf Add thread safety directives for queued_buffer class. 2023-06-10 15:31:47 -04:00
greg7mdp 5ec8c2a775 Add thread safety directives to some other mutexes. 2023-06-10 15:27:54 -04:00
greg7mdp 337e96ca84 Add thread safety directives for two other mutexes. 2023-06-10 15:18:51 -04:00
Kevin Heifner 8ffb1b4412 GH-1240 Better handling of close when not syncing 2023-06-10 10:06:09 -05:00
Kevin Heifner affbbd087f GH-1240 get_time is supposed to be nanoseconds 2023-06-10 08:46:45 -05:00
Kevin Heifner 2409db22d8 GH-1027 catch_up message with head was being ignored. This was likely not noticed before because handshake would provide it eventually. 2023-06-10 08:29:58 -05:00
greg7mdp 1508378ec1 Fix thread safety warnings for sync_mtx 2023-06-09 22:20:42 -04:00
learnforpractice c5f0eae2a4 Merge branch 'main' into main 2023-06-10 07:00:49 +08:00
766C6164 48b3beef41 make output-dir required for leap-util block-log subcommands 2023-06-09 17:37:49 -04:00
766C6164 1b043c75de Merge branch 'release/3.2' into GH-1239-make-output-dir-required-40 2023-06-09 17:34:40 -04:00
greg7mdp 7a8be73f51 Fix one warning 2023-06-09 17:31:54 -04:00
Vlad 4a640d422e Merge pull request #1262 from AntelopeIO/GH-1239-make-output-dir-required-32
[3.2] Output-dir should be required for extract-blocks subcommand of leap-util
2023-06-09 17:30:54 -04:00
Peter Oschwald f21cd85960 update archive listings before trying to install. 2023-06-09 16:25:19 -05:00
Peter Oschwald e32ee2413e This job no longer depends on Build job. 2023-06-09 16:15:32 -05:00
Peter Oschwald 00640d79fd install missing CDT dependencies. 2023-06-09 16:09:57 -05:00
Peter Oschwald d024d9018c Upgrade to beefy machine for these double builds. 2023-06-09 16:07:20 -05:00
Peter Oschwald bde575eccc install missing CDT dependencies. 2023-06-09 16:06:48 -05:00
greg7mdp d897dfeb4f Thread Safety Analysis - wip 2023-06-09 17:04:18 -04:00
Peter Oschwald 3954d1eec6 For make dev-install need to rebuild leap. 2023-06-09 15:43:10 -05:00
Peter Oschwald 36eaa0aef9 Fix expected dir structure for builddir 2023-06-09 15:27:16 -05:00
Peter Oschwald 82d03eeb74 Attempt to make dev-packages for ubunut20 and ubuntu22 and update libtester-deb-install-test to use both images. 2023-06-09 15:14:23 -05:00
Kevin Heifner bb289379eb GH-1240 Prevent infinite loop in net_plugin by not sending back a handshake for a catch_up notice if nothing new to report. 2023-06-09 15:12:52 -05:00
Peter Oschwald 04d9410b9e Update build tool for using leap builddir. Fix/update build tree test. 2023-06-09 15:02:45 -05:00
Peter Oschwald a7d472f3f2 Add libtester-build-tree-test 2023-06-09 14:34:04 -05:00
Peter Oschwald 10d3cdd36a Merge branch 'main' into libtester-usage-in-ci 2023-06-09 14:30:12 -05:00
Peter Oschwald 361d5a68b2 Add libtester-make-dev-install-test 2023-06-09 14:29:37 -05:00
Kevin Heifner b2e7857642 GH-1027 Since we now sync ahead the sync_next_expected_num needs reset if we get an unlinkable block 2023-06-09 14:24:16 -05:00
Peter Oschwald 1b1909af1c Installed cmake doesn't support --test-dir so cd and then run tests. 2023-06-09 13:44:24 -05:00
Peter Oschwald 33c446c708 Use cached base image's already installed cmake. 2023-06-09 13:43:36 -05:00
766C6164 852f1bb285 output-dir should be required for extract-blocks 2023-06-09 13:20:17 -04:00
Kevin Heifner c86ca4726d GH-1027 catch_up message with head was being ignored. This was likely not noticed before because handshake would provide it eventually. 2023-06-09 11:37:57 -05:00
Gregory Popovitch 651d21f2a3 Merge pull request #1234 from AntelopeIO/gh-1057
Remove fc/string.hpp to_string impls
2023-06-09 12:25:21 -04:00
jgiszczak 6e99273ac2 Merge branch 'main' into test-harness-retry-num-blocks 2023-06-09 11:23:34 -05:00
Peter Oschwald 542b4e778e Add -y flag 2023-06-09 09:13:57 -05:00
Kevin Heifner ea230ce353 GH-1027 Simplify time_message logic 2023-06-09 09:07:32 -05:00
Kevin Heifner d74af81c8a GH-1027 Simplify time_message logic 2023-06-09 08:42:57 -05:00
Kevin Heifner 2c43180043 GH-1027 Reduce handshake storm by only sending handshake if head changed or 50ms has passed 2023-06-09 08:03:49 -05:00
Kevin Heifner aa25f11201 GH-1027 Remove notice_message that is a no-op 2023-06-09 07:13:05 -05:00
learnforpractice 0974eac7cf fix i256 key type conversion by initialize buffer before usage 2023-06-09 08:27:57 +08:00
Gregory Popovitch 7c0694b4c9 Merge pull request #1258 from AntelopeIO/gh-1238
Add harden flags to pinned builds
2023-06-08 20:21:22 -04:00
Jonathan Giszczak 8f8da58139 Merge branch 'test-harness-retry-num-blocks' of github.com:AntelopeIO/leap into test-harness-retry-num-blocks 2023-06-08 18:38:50 -05:00
Jonathan Giszczak 607fe06199 Revert attempt to add retry to transactions.py since all are read/write.
Expose silentErrors parameter for some transactions.py calls.
Improve tests to exercise waitForTransBlock on createAccount,
createInitializeAccount, transferFunds, regproducer, and delegatebw.
Add exercising undelegatebw to a regression test (previously only tested
in unit tests).
2023-06-08 18:37:54 -05:00
Kevin Heifner 9fe62d5f1c GH-1027 Reset sync_source when unable to request range 2023-06-08 18:37:38 -05:00
Kevin Heifner 39df8b5a10 GH-1027 Rename net_latency_ns to peer_ping_time_ns 2023-06-08 18:36:50 -05:00
Peter Oschwald 52431b90cc Try without sudo. 2023-06-08 16:36:09 -05:00
Peter Oschwald c9185d623a Fix spelling. 2023-06-08 16:21:36 -05:00
Peter Oschwald 850969e0d1 gh-1104 First attempt to run libtester CI test from dev installs. 2023-06-08 16:19:03 -05:00
greg7mdp 07b0586c32 Add harden flags to pinned builds
see: https://www.redhat.com/en/blog/hardening-elf-binaries-using-relocation-read-only-relro
2023-06-08 16:31:45 -04:00
Kevin Heifner 5b34d53348 GH-1027 If two time_message loops in progress, drop all but the expected one. 2023-06-08 14:15:36 -05:00
Kevin Heifner 438d1251ac GH-1027 Use constants for normalize 2023-06-08 11:23:24 -05:00
Kevin Heifner ef1b486896 GH-1027 No need to normalize msg.org 2023-06-08 10:20:18 -05:00
greg7mdp 62d8543ddc Clean up connection::_close() which doesn't need to be static. 2023-06-08 11:15:28 -04:00
Kevin Heifner 7032cdac99 GH-1027 Prevent infinite time_message loops by making sure only one in progress at a time 2023-06-08 09:52:48 -05:00
greg7mdp c1cb2bc0b6 forgot to remove a try/catch. 2023-06-08 10:38:39 -04:00
greg7mdp 78dc9cddc5 Cleanup net_plugin pimpl idiom. 2023-06-08 10:30:23 -04:00
greg7mdp 6ec9bf3479 Merge branch 'main' of github.com:AntelopeIO/leap into gh-1057 2023-06-08 09:50:53 -04:00
jgiszczak 3a47111bbb Merge branch 'main' into test-harness-retry-num-blocks 2023-06-07 18:37:35 -05:00
Jonathan Giszczak daaf76d7f9 Use retry-num-blocks where possible to avoid polling in tests. 2023-06-07 18:31:12 -05:00
Kevin Heifner 1c607bd880 Merge pull request #1248 from AntelopeIO/GH-1217-ship-main
[4.0 -> main] SHiP: Fix state-history-log-retain-blocks option handling
2023-06-07 15:32:59 -05:00
Kevin Heifner 3778e33c6e Merge remote-tracking branch 'origin/release/4.0' into GH-1217-ship-main 2023-06-07 14:58:21 -05:00
Kevin Heifner a79f306ec7 Merge pull request #1241 from AntelopeIO/GH-1217-ship-4.0
[4.0] SHiP: Fix state-history-log-retain-blocks option handling
2023-06-07 14:57:45 -05:00
Kevin Heifner 91346b10f2 GH-1027 start_sync will determine if sync needed 2023-06-07 14:54:58 -05:00
Matt Witherspoon 60eb61b7f8 Merge pull request #1242 from AntelopeIO/unlimited_rotrx_thread_start
[4.0 -> main] allow ROtrx threads unlimited time to start
2023-06-07 15:35:58 -04:00
greg7mdp d399f5d74a Forgot to add symbol.cpp 2023-06-07 14:16:01 -04:00
greg7mdp addef1ff56 Merge branch 'main' of github.com:AntelopeIO/leap into gh-1057 2023-06-07 14:13:54 -04:00
greg7mdp 1c2c0ea8bd Remove trim from fc/string.hpp (use boost trim_copy directly). 2023-06-07 14:04:33 -04:00
Kevin Heifner fa5eeb7b0a GH-1027 Remove unneeded handshake 2023-06-07 11:30:02 -05:00
Kevin Heifner 1600c88124 GH-1027 No need to sync or send handshake if already syncing 2023-06-07 11:24:16 -05:00
Matt Witherspoon 952e4065ed Merge remote-tracking branch 'origin/release/4.0' into unlimited_rotrx_thread_start 2023-06-07 11:58:51 -04:00
Kevin Heifner 27d049b3b1 GH-1217 Fix process of state-history-log-retain-blocks option 2023-06-07 10:52:11 -05:00
Matt Witherspoon ce99dc18ab Merge pull request #1221 from AntelopeIO/unlimited_rotrx_thread_start_40x
[4.0] allow ROtrx threads unlimited time to start
2023-06-07 11:49:24 -04:00
Kevin Heifner fed0e8a363 Merge branch 'main' into GH-1072-latency 2023-06-07 10:30:56 -05:00
Kevin Heifner 73644fd0af GH-1072 Revert: No reason to post if syncing from peer. 2023-06-07 09:54:11 -05:00
Vlad d23cb169ee Merge pull request #1236 from AntelopeIO/snapshot-scheduler-test-fix
Improve robustness of snapshot unit test
2023-06-07 10:28:14 -04:00
Kevin Heifner 2fab062269 GH-1072 Revert check for in sync as we need to always attempt a start sync on a lib notice. 2023-06-06 23:01:20 -05:00
Kevin Heifner 668d2a4aaf GH-1072 Update comments 2023-06-06 21:58:07 -05:00
Kevin Heifner cdd05a8351 GH-1072 Do not print out complete blocklog on failure as it is way too much output for ci/cd. 2023-06-06 16:40:00 -05:00
Peter Oschwald 6ad30814c5 Merge pull request #1229 from AntelopeIO/ph-read-only-trxs
[PH] Read-Only transaction support
2023-06-06 16:25:27 -05:00
Peter Oschwald a8f559cf9f Address peer review comments.
Rename and simplify test naming for clarity.
Rename endpoint api type to simply be endpoint mode for clarity.
2023-06-06 15:27:04 -05:00
Kevin Heifner 1341215ff3 GH-1072 Fix for net_latency_ns not being calculated yet. 2023-06-06 12:46:20 -05:00
Peter Oschwald 85ea6ff296 Merge branch 'main' into ph-read-only-trxs 2023-06-06 11:37:36 -05:00
766C6164 620964759c Desensitize test in case of auto determining start block 2023-06-06 12:26:17 -04:00
jgiszczak ba919c7941 Merge pull request #1232 from AntelopeIO/test-harness-double-kill-fix
Avoid trying to kill a node twice to prevent orphaned processes.
2023-06-06 10:51:36 -05:00
Kevin Heifner 703f8eb322 GH-1072 Use round trip time_message for calculation of latency. 2023-06-06 10:44:24 -05:00
greg7mdp 15ae38669d Removed last to_string() overloads from the fc string.hpp header. 2023-06-06 11:18:30 -04:00
greg7mdp 1c5a555419 replace uses of fc::to_string for integer types with std::to_string 2023-06-06 11:05:45 -04:00
Peter Oschwald ff2d795f8e Merge branch 'main' into ph-read-only-trxs 2023-06-06 09:51:51 -05:00
greg7mdp 5abbc3c811 remove fc::to_string for integer types 2023-06-06 10:38:24 -04:00
Peter Oschwald 776040ac41 Another round of peer review comments addressed. 2023-06-06 09:33:38 -05:00
jgiszczak 3537d22340 Merge branch 'main' into test-harness-double-kill-fix 2023-06-05 19:08:57 -05:00
Jonathan Giszczak 8f865a93ef Avoid trying to kill a node twice to prevent orphaned processes. 2023-06-05 18:07:01 -05:00
Vlad 15c6727954 Merge pull request #1220 from AntelopeIO/GH-1152-zero-values
Extended snapshot scheduler to better handle missing and zero params
2023-06-05 17:43:31 -04:00
Peter Oschwald 566e12fa8d Address peer review comments & move function implementations into cpp files.
Address possibility of optional receipt not having data if a transaction fails.
2023-06-05 16:34:53 -05:00
Peter Oschwald f16786ecb5 Merge branch 'main' into ph-read-only-trxs 2023-06-05 15:26:14 -05:00
Peter Oschwald f9838a118b Address peer review comments. 2023-06-05 15:25:32 -05:00
Peter Oschwald 265ae7f236 Update documentation. 2023-06-05 14:52:19 -05:00
Peter Oschwald edd768beed Make configuration of validation and api nodes condititional. 2023-06-05 14:52:01 -05:00
Kevin Heifner c776ac9412 GH-1072 No reason to post if syncing from peer 2023-06-05 14:34:22 -05:00
Kevin Heifner d04757a8b0 Merge pull request #1225 from AntelopeIO/GH-1072-sync-ahead
P2P sync ahead while applying received blocks
2023-06-05 13:57:04 -05:00
Peter Oschwald ed5333b716 Fix endpointApiType which moved from TpsTrxGensConfig onto the TransactionGeneratorsLauncher itself. 2023-06-05 13:14:23 -05:00
Peter Oschwald f7f487d75b Refactor endpointApiType and apiEndpoint a little. 2023-06-05 12:53:37 -05:00
Kevin Heifner 87564199b5 GH-1072 Simplify logic 2023-06-05 12:47:29 -05:00
Kevin Heifner 644ded8a7f GH-1072 Comment sync_ members 2023-06-05 12:47:09 -05:00
Peter Oschwald a41b2ff2f0 Add performance load test with read-only trxs
Add apiEndpoint and userTrxData to test report for reference.

Simplify createReport argument list.
2023-06-05 11:29:52 -05:00
Peter Oschwald b803af646a Forgot to add test to group. 2023-06-05 11:28:04 -05:00
Peter Oschwald bec972a015 Merge branch 'main' into ph-read-only-trxs 2023-06-05 10:15:14 -05:00
Peter Oschwald 29bdea6adf Add read-only transaction support through user defined transaction config.
Add configuration option for api-endpoint to allow targeting specific http endpoint with transactions.

Configurable number of read-only threads for the api nodes.

Allow for empty authorizations in transaction action for read-only trx support.
2023-06-05 10:14:19 -05:00
Huang-Ming Huang bb9c1c923d address PR comments 2023-06-05 09:14:44 -05:00
Matt Witherspoon c6972500ac Merge pull request #1227 from AntelopeIO/fix_nplr_nonleap
[4.0 -> main] fix NP & LR CI workflow for forked/mirrored repos that are not named leap
2023-06-03 15:15:53 -04:00
Matt Witherspoon 8335c5576e Merge remote-tracking branch 'origin/release/4.0' into fix_nplr_nonleap 2023-06-02 17:29:05 -04:00
Matt Witherspoon 05ce10c375 Merge pull request #1226 from AntelopeIO/fix_nplr_nonleap_40x
[4.0] fix NP & LR CI workflow for forked/mirrored repos that are not named `leap`
2023-06-02 17:20:09 -04:00
Matt Witherspoon 19af68829b don't hardcode leap in parallel-ctest-containers action 2023-06-02 15:33:24 -04:00
Gregory Popovitch 96ab7afd32 Merge pull request #1224 from AntelopeIO/cleanup_ship_pimpl
Cleanup pimpl idiom for ship.
2023-06-02 15:25:01 -04:00
766C6164 f7ebd6c1c5 Addressed feedback 2023-06-02 15:07:58 -04:00
Peter Oschwald 1da6a8373b Erase map entry if resulting locate of key words turns up empty.
Previously it was leaving the empty placeholder in the map which made it trigger the map as non empty and do unnecessary work in the generator.
2023-06-02 13:07:17 -05:00
Peter Oschwald 3902a9e0e1 Rename to include 'type' for the endpoint api to differentiate with upcoming additions including specifying actual api endpoints for use. 2023-06-02 12:59:49 -05:00
Matt Witherspoon be76e1085d catch and handle exceptions from std::thread's ctor 2023-06-02 13:21:37 -04:00
Kevin Heifner ce78703563 GH-1072 Update log message 2023-06-02 12:03:26 -05:00
greg7mdp 61ff2fdafa Fix compilation issue with g++. 2023-06-02 11:26:42 -04:00
greg7mdp d3e7b01aaf Cleanup pimpl idion for ship. 2023-06-02 11:06:25 -04:00
Gregory Popovitch ccd732f322 Merge pull request #1222 from AntelopeIO/cleanup_chain_plugin_pimpl
Cleanup pimpl idiom on chain_plugin
2023-06-02 10:30:04 -04:00
Huang-Ming Huang 26d1869c25 address PR comments 2023-06-02 09:01:11 -05:00
Matt Witherspoon 2389bc1cd7 move blocking start&init to named_thread_pool's start() 2023-06-01 23:07:01 -04:00
Kevin Heifner 90486af748 GH-1072 Sync ahead while processing current range of blocks 2023-06-01 20:17:17 -05:00
greg7mdp 2f82b1e993 Merge branch 'main' of github.com:AntelopeIO/leap into cleanup_chain_plugin_pimpl 2023-06-01 12:47:42 -04:00
greg7mdp c4f997d79a Cleanup pimpl idiom on chain_plugin
Avoid excessive access to `_impl` class through `my->`
2023-06-01 12:12:44 -04:00
Kevin Heifner 645ad8b207 GH-1072 Sync ahead while applying blocks 2023-06-01 08:44:17 -05:00
Matt Witherspoon 618915c30f allow ROtrx threads unlimited time to start 2023-05-31 18:34:02 -04:00
Kevin Heifner 0eba3914b9 Merge remote-tracking branch 'origin/main' into GH-1072-sync-ahead 2023-05-31 16:20:39 -05:00
Kevin Heifner db132c5fd4 Merge pull request #1215 from AntelopeIO/GH-1072-sync
P2P sync improvements
2023-05-31 16:18:06 -05:00
Kevin Heifner 7c7f2eb2ae Merge branch 'GH-1072-sync' into GH-1072-sync-ahead 2023-05-31 15:48:22 -05:00
766C6164 3382c49530 fix 2023-05-31 16:42:36 -04:00
Kevin Heifner 94df7279b9 GH-1072 Need to send handshake when connecting 2023-05-31 15:29:32 -05:00
766C6164 b42df934d7 Added better handling ow zero/empty params 2023-05-31 16:21:11 -04:00
Kevin Heifner c0a0b72e51 GH-1072 Resize list since those outside range are not needed. 2023-05-31 14:50:23 -05:00
Kevin Heifner d99c7daf31 GH-1072 Use a connection_state enum for connection state instead of bool variables. Rename syncing to peer_syncing_from_us. Rename syncing_with_peer() to syncing_from_peer(). 2023-05-31 14:40:34 -05:00
Kevin Heifner f3c57978e1 GH-1072 Add is_transactions_connection and is_blocks_connection to simply logic 2023-05-31 12:22:17 -05:00
Kevin Heifner 04a5143529 GH-1072 simplify 2023-05-31 11:17:18 -05:00
Kevin Heifner 99bf7bc018 GH-1072 += not needed 2023-05-31 11:07:07 -05:00
Gregory Popovitch f53faff7a9 Merge pull request #1213 from AntelopeIO/producer_plugin_cleanup
Cleanup producer_plugin pimpl idiom.
2023-05-30 18:12:30 -04:00
Huang-Ming Huang d11da7cf9c simplify listener 2023-05-30 08:10:22 -05:00
Kevin Heifner df042c2fd3 GH-1072 WIP test of sync ahead 2023-05-27 08:23:59 -05:00
Kevin Heifner 386f00bdc5 GH-1072 Use absolute value latency and improve logging 2023-05-26 13:35:16 -05:00
greg7mdp 626b437b7f More whitespace fix according to PR review. 2023-05-26 13:22:15 -04:00
greg7mdp fa07fd84f7 More whitespace cleanup 2023-05-26 10:29:17 -04:00
greg7mdp cefd98b186 cleanup EOS_ASSERT whitespace 2023-05-26 10:24:18 -04:00
greg7mdp ecedaca967 reduce backslash indentation 2023-05-26 10:12:01 -04:00
greg7mdp ce82a0b882 More whitespace cleanup 2023-05-26 10:09:54 -04:00
greg7mdp dd8a05e36d More whitespace cleanup according to PR comments 2023-05-26 10:07:00 -04:00
greg7mdp 2487ac651e More whitespace cleanup according to PR comments 2023-05-26 10:04:06 -04:00
greg7mdp 6fcf9a9fc9 More whitespace cleanup 2023-05-26 09:48:31 -04:00
greg7mdp a423d40554 run clang-format and do some manual cleanup (mostly fc_dlog) 2023-05-26 09:38:46 -04:00
greg7mdp ceab818352 More whitespace cleanup 2023-05-26 09:23:37 -04:00
greg7mdp eaff6c165e Address PR comments, fix indentation/spacing in plugin_initialize. 2023-05-26 09:05:51 -04:00
Kevin Heifner 851af76905 GH-1072 Move trx sync check 2023-05-26 07:59:26 -05:00
greg7mdp d90f5b6d19 Merge branch 'main' of github.com:AntelopeIO/leap into producer_plugin_cleanup 2023-05-25 17:26:35 -04:00
greg7mdp 04eab3feae More producer_plugin cleanup towards proper pimpl idiom 2023-05-25 16:57:01 -04:00
greg7mdp fd3d54f42a More producer_plugin cleanup towards proper pimpl idiom 2023-05-25 16:49:10 -04:00
greg7mdp f4d067e9d8 Fix incorrect indentation in producer_plugin::plugin_initialize 2023-05-25 16:17:50 -04:00
greg7mdp b3b131f991 cleanup plugin_initialize() 2023-05-25 16:11:29 -04:00
Matt Witherspoon 794066ee2a Merge pull request #1211 from AntelopeIO/stray}
[4.0 -> main] remove innocuous stray `}` in log statement
2023-05-25 15:36:48 -04:00
Kevin Heifner 24f5986eef GH-1072 Drop incoming trx when syncing 2023-05-25 13:15:02 -05:00
Kevin Heifner 7b1e62cd9f GH-1072 Use peer_head_block_num for should_sync_from instead of lib 2023-05-25 13:14:20 -05:00
greg7mdp 2952bfb264 Cleanup use of my-> in plugin_startup() and plugin_shutdown(). 2023-05-25 11:16:26 -04:00
Kevin Heifner a632f751a6 GH-1072 milliseconds not microseconds 2023-05-24 19:16:16 -05:00
Kevin Heifner 3ad3b7775c GH-1072 Use latency and peer block range to determine who to sync from 2023-05-24 18:21:50 -05:00
Kevin Heifner 0615a25447 Merge pull request #1209 from AntelopeIO/GH-1173-rm-option
Remove disable-subjective-billing option
2023-05-24 16:03:21 -05:00
Matt Witherspoon 782f5ed66c Merge remote-tracking branch 'origin/release/4.0' into HEAD 2023-05-24 10:15:13 -04:00
Matt Witherspoon 125df80b4e Merge pull request #1207 from AntelopeIO/stray}_40x
[4.0] remove innocuous stray `}` in log statement
2023-05-24 10:13:57 -04:00
Kevin Heifner 2ebb2be892 GH-1072 Add tracking of latency 2023-05-23 18:52:53 -05:00
Kevin Heifner e49997d939 Merge branch 'GH-1072-sync' of https://github.com/AntelopeIO/leap into GH-1072-sync 2023-05-23 15:18:11 -05:00
Kevin Heifner 5027edaa58 Add sync-peer-limit option 2023-05-23 14:20:31 -05:00
jgiszczak d215122c07 Merge pull request #1210 from AntelopeIO/test-harness-urllib-configurable-limit
Add prettyPrint and printReturnLimit to processUrllibRequest()
2023-05-23 13:41:14 -05:00
Kevin Heifner 3f59cc85af GH-1072 Change default sync_fetch_span from 100 to 1000 2023-05-23 09:23:45 -05:00
Jonathan Giszczak 5d0ee1fb42 Add prettyPrint and printReturnLimit to processUrllibRequest() 2023-05-22 19:18:06 -05:00
Kevin Heifner 552ae0dde0 Merge remote-tracking branch 'origin/main' into GH-1072-sync 2023-05-22 17:17:17 -05:00
Kevin Heifner 2d06cfbcfd Merge pull request #1187 from AntelopeIO/GH-1072-refactor
P2P Refactor connections management
2023-05-22 16:44:44 -05:00
Kevin Heifner bad4bb49eb GH-1173 Remove disable-subjective-billing option 2023-05-22 16:21:15 -05:00
Peter Oschwald ef9c176be7 Merge pull request #1195 from AntelopeIO/ph-perf-test-improvements
[PH] Performance Harness improvements
2023-05-22 16:16:21 -05:00
Peter Oschwald 8d5d04aa0e Merge branch 'main' into ph-perf-test-improvements 2023-05-22 15:44:38 -05:00
jgiszczak a62bbdda76 Merge pull request #1182 from AntelopeIO/test-harness-process-control
Test harness process control
2023-05-22 15:34:47 -05:00
jgiszczak dfc8128912 Merge branch 'main' into test-harness-process-control 2023-05-22 15:02:25 -05:00
Peter Oschwald 4e89f7bef3 Merge branch 'main' into ph-perf-test-improvements 2023-05-22 14:53:12 -05:00
Kevin Heifner 44820e9c9c Merge remote-tracking branch 'origin/main' into GH-1072-refactor 2023-05-22 14:41:51 -05:00
Huang-Ming Huang 605f600cb7 Merge pull request #1203 from AntelopeIO/huangminghuang/ipv6
IPv6 support
2023-05-22 14:29:09 -05:00
Kevin Heifner 0af651b1e2 Merge remote-tracking branch 'origin/main' into GH-1072-refactor 2023-05-22 13:55:56 -05:00
Kevin Heifner 01dae4ef0b GH-1072 Fix any_of_block_connections to verify not transaction only connection 2023-05-22 13:03:36 -05:00
Peter Oschwald e37a1a65b1 Merge branch 'main' into ph-perf-test-improvements 2023-05-22 12:45:17 -05:00
Kevin Heifner 6a5bf21d8d GH-1072 Add any_of_block_connections and change for_each_connection and for_each_block_connection to not short circuit 2023-05-22 12:43:49 -05:00
Huang-Ming Huang 880c9739ea use reference 2023-05-22 11:39:14 -05:00
Huang-Ming Huang 7ae4a97335 Merge branch 'main' into huangminghuang/ipv6 2023-05-22 11:23:47 -05:00
Huang-Ming Huang a342d0d9cd move include header 2023-05-22 11:18:11 -05:00
Kevin Heifner 7470c68b4a GH-1072 Remove unneeded check 2023-05-22 10:51:50 -05:00
Kevin Heifner a6b5259b34 GH-1072 Add any_of_connection and use it for duplicate implementation 2023-05-22 10:48:41 -05:00
Kevin Heifner a80f5bc227 GH-1072 Fix indentation 2023-05-22 10:17:56 -05:00
Peter Oschwald b0d2e602a3 Fix spacing. 2023-05-22 10:17:38 -05:00
Kevin Heifner 30d6fd5b42 GH-1072 Rename _impl methods to _i to distinguish from _impl types. 2023-05-22 10:15:29 -05:00
Kevin Heifner 0efab27e1c GH-1072 Use flat_set and some other misc cleanup 2023-05-22 10:09:02 -05:00
iamveritas 4667a381e0 Merge pull request #1208 from AntelopeIO/4.0_to_main_fix-devrel#248-document-chain-api-endpoints
[4.0 -> main] [docs] fix devrel#248 document chain api endpoints
2023-05-22 16:37:10 +03:00
iamveritas 88d71ccf5d Merge pull request #1204 from AntelopeIO/4.0_fix-devrel#248-document-chain-api-endpoints
[4.0] add docs/yaml content for missing chain api endpoints
2023-05-22 16:18:49 +03:00
Peter Oschwald a29763448a Fix type to timedelta. 2023-05-22 08:01:26 -05:00
iamveritas 3515b83970 correct description for read-only 2023-05-22 15:49:22 +03:00
iamveritas 561da880ef release 4.0 add docs/yaml content for missing chain api endpoints:
/get_code_hash
/get_producer_schedule
/get_transaction_id
/send_read_only_transaction
/push_block
2023-05-22 08:54:01 +03:00
Matt Witherspoon ae7107bde0 remove innocuous stray } in log statement 2023-05-20 18:10:17 -04:00
Huang-Ming Huang 1979f8da16 remove unix socket file on exit 2023-05-19 16:36:15 -05:00
Huang-Ming Huang 8039427e09 log_listening fix 2023-05-19 15:51:09 -05:00
Huang-Ming Huang 1c7ed0d137 fix test 2023-05-19 15:10:46 -05:00
Jonathan Giszczak ed754170ad Remove CMake install of launcher.py. 2023-05-19 14:41:45 -05:00
jgiszczak a9e0a06acd Merge branch 'main' into test-harness-process-control 2023-05-19 14:04:01 -05:00
Jonathan Giszczak 12706fd3f0 Remove unused variables from performance_test_basic ClusterConfig. 2023-05-19 14:02:28 -05:00
Jonathan Giszczak 2ff0243d34 Remove last vestiges of launcher tool, fixing all bridge topology tests. 2023-05-19 14:00:14 -05:00
Jonathan Giszczak d72a52ec68 Fix copy paste redundancy. 2023-05-19 13:54:22 -05:00
Huang-Ming Huang ebe824164e address PR comments 2023-05-19 13:30:31 -05:00
Peter Oschwald 324b99808d Merge branch 'main' into ph-perf-test-improvements 2023-05-19 10:59:37 -05:00
Gregory Popovitch cc523ee3b1 Merge pull request #1199 from AntelopeIO/gh-1025
Improve packed_transaction parsing performance
2023-05-19 11:16:45 -04:00
Peter Oschwald 16a1981e1f Merge branch 'main' into ph-perf-test-improvements 2023-05-19 09:32:46 -05:00
Jonathan Giszczak 687b0bb155 Remove deprecated launcher tool. Add cluster launch smoke test. 2023-05-18 19:18:06 -05:00
Jonathan Giszczak dbbf0bbba3 Fix merge error. 2023-05-18 17:46:46 -05:00
Jonathan Giszczak f345dd395a Revert getTransaction timings, per Kevin. 2023-05-18 17:15:13 -05:00
Jonathan Giszczak b6038dbbae Restore node shutdown in distributed_transactions_test. 2023-05-18 17:13:39 -05:00
Jonathan Giszczak b60eafb1f4 Formatting. 2023-05-18 17:10:40 -05:00
Jonathan Giszczak 59e22df433 Added check of self.popenProc in Node verifyAlive. 2023-05-18 16:57:20 -05:00
Jonathan Giszczak 5f3a8d7d81 Formatting. 2023-05-18 16:40:01 -05:00
Jonathan Giszczak 8b45cf4e3e Fix merge error. 2023-05-18 16:39:20 -05:00
Jonathan Giszczak ae890e8ec0 Restore gelf_test, lost in an unrelated prior merge. 2023-05-18 16:31:37 -05:00
greg7mdp 3ae59db3ed Remove unneeded try/catch. 2023-05-18 17:29:50 -04:00
Jonathan Giszczak 74b9300089 Formatting. 2023-05-18 16:06:56 -05:00
Jonathan Giszczak fddef77964 Remove --clean-run from performance_test documentation. 2023-05-18 16:05:41 -05:00
Jonathan Giszczak 1739c377d5 Relocate dontKill and keepLogs from TestHelperConfig to ClusterConfig
in performance_test_basic's configuration classes.
2023-05-18 16:05:07 -05:00
Jonathan Giszczak e503383c47 Add comment to biosNodeId magic number. 2023-05-18 15:24:34 -05:00
Jonathan Giszczak b839caea68 Replace a string modified with a % operator with an f-string. 2023-05-18 15:24:13 -05:00
Jonathan Giszczak 8f654585dd Give bios node magic number a name.
Remove commented code.
2023-05-18 15:10:28 -05:00
jgiszczak 73588bce69 Merge branch 'main' into test-harness-process-control 2023-05-18 14:53:40 -05:00
Jonathan Giszczak 77a5a260ea Reduce launcher_test to one producer account. 2023-05-18 14:51:16 -05:00
Huang-Ming Huang a873457da5 fix tcp_socket 2023-05-18 14:35:27 -05:00
Lin Huang a1c8806619 Merge pull request #1202 from AntelopeIO/merge_4_0_1_version_bump
[4.0 -> Main] Merge 4.0.1 version bump
2023-05-18 15:30:34 -04:00
greg7mdp 7b4b55ae33 Merge branch 'main' of github.com:AntelopeIO/leap into gh-1025 2023-05-18 14:59:45 -04:00
Huang-Ming Huang 68c69226af Merge remote-tracking branch 'origin/main' into huangminghuang/ipv6
# Conflicts:
#	plugins/state_history_plugin/state_history_plugin.cpp
2023-05-18 13:59:31 -05:00
Huang-Ming Huang b6368138dc ipv6 support 2023-05-18 13:57:03 -05:00
greg7mdp 2fe5079e3e Fix crash. 2023-05-18 14:49:26 -04:00
Kevin Heifner 548692ee5f GH-1072 Use better heuristic for determing who to sync from 2023-05-18 13:39:17 -05:00
Lin Huang 8ea496bcb9 Merge 4.0.1 version bump to Main 2023-05-18 14:25:14 -04:00
Lin Huang 0d8de6cc5d Merge pull request #1201 from AntelopeIO/bump_leap_to_4_0_1
[4.0] Bump Leap to 4.0.1
2023-05-18 13:51:26 -04:00
Lin Huang 8a6e3e68e6 Bump Leap to 4.0.1 2023-05-18 13:16:00 -04:00
Vlad 09470dc06c Merge pull request #1200 from AntelopeIO/GH-1130-replay-memory-consumption-main
[4.0 -> main] Fix for nodeos large memory consumption during a blocks log replay
2023-05-18 12:26:50 -04:00
Huang-Ming Huang 530c9f13a9 Merge pull request #1180 from AntelopeIO/huangminghuang/gelf-test-fix
fix unstable gelf test
2023-05-18 11:05:36 -05:00
766C6164 d657dc2aa7 Merge branch 'release/4.0' into GH-1130-replay-memory-consumption-main 2023-05-18 11:40:21 -04:00
Vlad 9bc44bf9f3 Merge pull request #1191 from AntelopeIO/GH-1130-replay-memory-consumption-40
[4.0] Fix for nodeos large memory consumption during a blocks log replay
2023-05-18 11:36:22 -04:00
Huang-Ming Huang 9fd2706fda grammar fix 2023-05-18 10:25:26 -05:00
766C6164 3dcaf77b75 Added additional comments 2023-05-18 11:00:32 -04:00
greg7mdp 972f8df642 Address PR comments 2023-05-18 10:07:05 -04:00
greg7mdp 92144f5431 Merge branch 'main' of github.com:AntelopeIO/leap into gh-1025 2023-05-18 09:15:26 -04:00
greg7mdp e1add68dd4 Use caching_resolver in more locations where we serialize/deserialize transactions 2023-05-18 09:14:30 -04:00
Peter Oschwald c8313145b0 Merge branch 'main' into ph-perf-test-improvements 2023-05-18 07:54:46 -05:00
Kevin Heifner caf601d6d5 Merge branch 'main' into GH-1072-refactor 2023-05-18 07:52:20 -05:00
greg7mdp ad84e9d757 Add caching_resolver to cache abi_serializers when deserializing transactions. 2023-05-18 08:28:11 -04:00
Gregory Popovitch e9d1b3afad Merge pull request #1188 from AntelopeIO/fix_warning_no_return
Fix compilation warning (does not return a value in all control paths)
2023-05-17 23:45:17 -04:00
Jonathan Giszczak 6119f2f2f9 Fix defect in trx_finality_status_forked_test.
Depending on timing, LIB may not advance far enough the first time after
the bridge node comes back up to fork out the block with the transaction
in it.
2023-05-17 19:46:22 -05:00
Jonathan Giszczak 3508cc488d Remove unused import. 2023-05-17 19:43:35 -05:00
Peter Oschwald 129c3da3f6 Merge branch 'main' into ph-perf-test-improvements 2023-05-17 19:29:25 -05:00
Peter Oschwald 89a97598de Refactor to add test results to PerformanceTestBasic.
Move report creation out of log_reader into the more appropriate performance test basic. Now only parse and analyze logs in log_reader and leave report creation to the test itself.

Add Search Scenarios Summary of results to the performance test report to give a quick overview of the scenarios and success/failure for each.

Consolidate json report creation and exporting into a single location in JsonReportHandler.

Added test duration calculation to report for easy reference.
2023-05-17 19:24:26 -05:00
Areg Hayrapetian 1ce956e1ae Merge pull request #1194 from AntelopeIO/arhag/forward-pr-1193
[4.0 -> main] Revert "Simplify Pinned Build Scripts"
2023-05-17 16:23:38 -07:00
Areg Hayrapetian e02695003a Merge branch 'release/4.0' into arhag/forward-pr-1193 2023-05-17 15:48:49 -07:00
Areg Hayrapetian 5a277b4f99 Merge pull request #1193 from AntelopeIO/revert-857-zach-install-deps
[4.0] Revert "Simplify Pinned Build Scripts"
2023-05-17 15:46:49 -07:00
Areg Hayrapetian 70ec11d055 Revert "Simplify Pinned Build Scripts" 2023-05-17 14:17:25 -07:00
766C6164 70276ce275 typo 2023-05-17 17:15:16 -04:00
766C6164 d69cef0cdc Update 2023-05-17 17:04:28 -04:00
766C6164 137c93a998 Do not post any updates if thread pool not started yet 2023-05-17 16:46:16 -04:00
greg7mdp dc917f2f0c Merge branch 'main' of github.com:AntelopeIO/leap into fix_warning_no_return 2023-05-17 16:09:20 -04:00
jgiszczak 197396debe Merge branch 'main' into test-harness-process-control 2023-05-17 14:16:59 -05:00
766C6164 b7a9ff5213 Capture block_state by ref 2023-05-17 14:59:30 -04:00
Huang-Ming Huang 70035268eb Merge pull request #1190 from AntelopeIO/huangminghuang/replay-fix-main
[4.0->main] fix replay for partitioned block log
2023-05-17 13:32:50 -05:00
Peter Oschwald 601548a58d Refactor evaluation of success out of performance_test into performance_test_basic.
This allows knowledge of objective and subjective test scenario success outcomes at the basic test level.

Add reporting of summary of search scenarios for quick reference.

Add test duration calculation to report for quick reference.
2023-05-17 13:10:38 -05:00
Peter Oschwald 04a94567fc Give tests unique test names to allow easier individual running of tests. 2023-05-17 13:00:48 -05:00
greg7mdp a50d82ed70 Add get_serializers_cache() template and use it. 2023-05-17 13:46:45 -04:00
Huang-Ming Huang 29e553f4c5 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/replay-fix-main 2023-05-17 12:00:24 -05:00
Huang-Ming Huang f36725e1fa Merge pull request #1164 from AntelopeIO/huangminghuang/replay-fix
[4.0] fix replay for partitioned block log
2023-05-17 11:14:47 -05:00
Huang-Ming Huang ef49d306d2 Merge pull request #1184 from AntelopeIO/huangminghuang/update-appbase
update appbase submodule
2023-05-17 11:13:08 -05:00
greg7mdp 40ec0e0220 Fix compilation warning (does not return a value in all control paths)
leap/plugins/http_plugin/http_plugin.cpp:76:4: warning: non-void function does not return a value in all control paths [-Wreturn-type]
2023-05-17 11:21:09 -04:00
Gregory Popovitch 2b216acee6 Merge pull request #1183 from AntelopeIO/gh-1067
Move log line for `onblock` and update saved log file for tests
2023-05-17 10:19:19 -04:00
Huang-Ming Huang 13521b2569 fix typo 2023-05-17 08:16:07 -05:00
Kevin Heifner 4ef2981e05 app->initialize now throws 2023-05-17 07:46:22 -05:00
Kevin Heifner 31983be931 GH-1072 Use uint32_t for max-clients 2023-05-17 07:07:54 -05:00
greg7mdp f3e715657e Fix whitespace. 2023-05-16 22:27:39 -04:00
Kevin Heifner 75ee2e2a79 GH-1072 Refactor connections set into a connections_manager class 2023-05-16 20:00:41 -05:00
greg7mdp a5ef2d23c0 Simplify change as per PR comments. 2023-05-16 16:59:54 -04:00
Jonathan Giszczak 1aed737278 Update gelf_test. 2023-05-16 15:25:58 -05:00
Peter Oschwald e2418be3e9 Add min-tps-to-test option to control floor of search range. 2023-05-16 14:54:25 -05:00
Jonathan Giszczak 4874cc2f1c Update plugin_http_api_test for changes from main. 2023-05-16 14:31:47 -05:00
Huang-Ming Huang 34f4b62e7a update appbase submodule 2023-05-16 14:04:45 -05:00
jgiszczak c6b74a3591 Merge branch 'main' into test-harness-process-control 2023-05-16 13:46:39 -05:00
greg7mdp 20b60c354d Move log line for onblock and update saved log file for tests 2023-05-16 13:54:18 -04:00
Jonathan Giszczak 7fc3fba92d Remove commented code. 2023-05-16 12:02:30 -05:00
Jonathan Giszczak 33443c0123 Also kill bios node in validate-dirty-db. 2023-05-16 11:58:02 -05:00
Peter Oschwald b160a5ef61 remove using. 2023-05-16 10:54:50 -05:00
Peter Oschwald 95c2c1697d Fix warning. 2023-05-16 10:54:31 -05:00
Huang-Ming Huang d49c6a9bdf fix gelf test 2023-05-16 09:05:21 -05:00
Huang-Ming Huang f7d28a492f address PR review 2023-05-16 08:36:53 -05:00
Kevin Heifner 3579eb9dd9 Merge pull request #1178 from AntelopeIO/GH-1170-unlinkable-m
[4.0 -> main] Correctly handle close while syncing
2023-05-16 08:09:56 -05:00
Kevin Heifner feb73c8e88 Merge remote-tracking branch 'origin/release/4.0' into GH-1170-unlinkable-m 2023-05-16 07:03:03 -05:00
Kevin Heifner 7a2285dbda Merge pull request #1177 from AntelopeIO/GH-1149-http-shutdown-main
[4.0 -> main] Ignore http error on remote_endpoint() causing shutdown
2023-05-16 07:01:30 -05:00
Kevin Heifner 8ebac13d22 Merge pull request #1171 from AntelopeIO/GH-1170-unlinkable-4.0
[4.0] Correctly handle close while syncing
2023-05-16 06:59:49 -05:00
Kevin Heifner 203309b88d Merge pull request #1139 from AntelopeIO/GH-1062-time-limits
Update API/serialization time constraints
2023-05-15 19:28:48 -05:00
Jonathan Giszczak eb0d6f1b6e Fix Cluster's list of unstarted nodes to not include the bios node. 2023-05-15 17:48:10 -05:00
Kevin Heifner dd801e37bf Merge remote-tracking branch 'origin/release/4.0' into GH-1149-http-shutdown-main 2023-05-15 14:14:08 -05:00
Kevin Heifner c764d00a6f Merge pull request #1175 from AntelopeIO/GH-1149-http-shutdown-4.0
[4.0] Ignore http error on remote_endpoint() causing shutdown
2023-05-15 14:11:17 -05:00
Kevin Heifner 0465384e31 GH-1062 If time_limit_ms not specified use http-max-response-time-ms instead of 10ms 2023-05-15 12:09:26 -05:00
Kevin Heifner bd896c7a81 GH-1062 Change default http-max-response-time-ms from 30 to 15 2023-05-15 12:08:17 -05:00
Huang-Ming Huang 90a519fcb9 Merge pull request #1145 from AntelopeIO/huangminghuang/gelf-test
add gelf test
2023-05-15 11:29:55 -05:00
Huang-Ming Huang 37b1499b62 Merge branch 'main' into huangminghuang/gelf-test 2023-05-15 10:46:22 -05:00
Kevin Heifner 2df745999f GH-1062 Update test to reflect get_activate_protocol_features ignored limit and time limit 2023-05-15 10:39:13 -05:00
Kevin Heifner 3dc18415b5 GH-1062 Make get_activated_protocol_features atomic 2023-05-15 09:56:42 -05:00
Kevin Heifner 87e598a4ad GH-1062 Simplify deadline calculation. 2023-05-15 09:46:08 -05:00
Kevin Heifner 6d0a06b00f GH-1062 Add back check for correct table 2023-05-15 09:42:13 -05:00
Kevin Heifner 8ade32783d GH-1062 Fix merge issues 2023-05-15 09:35:00 -05:00
Kevin Heifner 079c650f9a Merge remote-tracking branch 'origin/main' into GH-1062-time-limits 2023-05-15 09:27:10 -05:00
Huang-Ming Huang e429ba6024 Merge pull request #1137 from AntelopeIO/huangminghuang/http
Support multiple http endpoints
2023-05-15 09:16:28 -05:00
Huang-Ming Huang eb0f174aaf address PR comments 2023-05-15 08:46:36 -05:00
Kevin Heifner 6489dd2289 GH-1170 Update comment 2023-05-13 13:08:27 -05:00
Jonathan Giszczak cfec0c3b3c Change language of debug message in Cluster parseProducerKeys. 2023-05-13 01:52:46 -05:00
Jonathan Giszczak 1755aef616 Fix bugs in resource_monitor_plugin_test. 2023-05-13 01:41:51 -05:00
Jonathan Giszczak 03c991ce15 Update Node launchUnstarted method. 2023-05-13 01:07:02 -05:00
Kevin Heifner c45d3dfefc GH-1170 Correctly handle close while syncing 2023-05-12 22:07:49 -05:00
Kevin Heifner 07d5a7476a GH-1062 assert on exclusive ownership of variant_object 2023-05-12 19:43:11 -05:00
Jonathan Giszczak 557a855f49 Remove last vestiges of cachePopen arguments. 2023-05-12 19:22:09 -05:00
Jonathan Giszczak faa5f8cbd6 Merge remote-tracking branch 'origin/test-harness-process-control-main' into test-harness-process-control 2023-05-12 18:29:07 -05:00
Jonathan Giszczak 3802203de2 Merge remote-tracking branch 'origin/test-harness-process-control-main' into test-harness-process-control 2023-05-12 17:48:57 -05:00
Jonathan Giszczak 51f8e000c9 Add address and port to net_plugin's listener logging. 2023-05-12 17:48:48 -05:00
Jonathan Giszczak a953a43c1f Include transaction IDs in transaction exception messages. 2023-05-12 17:48:13 -05:00
Jonathan Giszczak 1245c37019 Add explicit wallet and cluster shutdown to performance_test_basic. 2023-05-12 17:45:24 -05:00
Jonathan Giszczak 9791997f1f When constructing a new testnet, reset node class variables.
Required for performance_test binary search mode.
2023-05-12 17:44:28 -05:00
Jonathan Giszczak 3b0645387d Avoid spurious errors during cluster shutdown. 2023-05-12 17:42:36 -05:00
Jonathan Giszczak b02dc1ad04 Make all parent dirs when creating wallet dir.
Required for performance_test binary tree search mode.
2023-05-12 17:42:10 -05:00
Peter Oschwald cc354955fc Merge pull request #1165 from AntelopeIO/ph-feature-api-op-mode-reporting
[PH] Initial reporting updates for API Node and http transaction generator
2023-05-12 16:21:53 -05:00
Kevin Heifner 89729c0cf1 Test only works with a small number of producers, default now is 21. 2023-05-12 16:21:11 -05:00
Huang-Ming Huang 5d29893aee fix grammar 2023-05-12 16:18:20 -05:00
Huang-Ming Huang e73fd5a20a log categories for listening addresses 2023-05-12 16:12:36 -05:00
Huang-Ming Huang fc91ef758d remove unused include 2023-05-12 16:01:10 -05:00
Huang-Ming Huang 7133a66f47 Merge remote-tracking branch 'origin/main' into huangminghuang/http 2023-05-12 15:12:18 -05:00
Huang-Ming Huang 032e6102b4 fix leap util 2023-05-12 15:06:51 -05:00
Huang-Ming Huang 72be7c93c1 refactor extract_chain_context 2023-05-12 14:23:58 -05:00
Kevin Heifner af766dc80e GH-1062 Simplify recursion_depth lambda 2023-05-12 14:19:37 -05:00
Peter Oschwald 3bac4d8f7c Merge pull request #1161 from AntelopeIO/reopen-subprocess-results
Keep `subprocess_results.log` around when test fails
2023-05-12 14:11:08 -05:00
Kevin Heifner 7b1b90f17d Remove unneeded/unused cachePopen 2023-05-12 14:09:06 -05:00
Peter Oschwald 400c5b891a Address peer review comments. 2023-05-12 14:03:04 -05:00
Kevin Heifner c7bf139eba GH-1062 Refactor start_action_serialization into constructor of context 2023-05-12 13:36:04 -05:00
Peter Oschwald 3343f2521c Merge branch 'main' into ph-feature-api-op-mode-reporting 2023-05-12 13:27:59 -05:00
Peter Oschwald e3b2c0cd6e Initial reporting updates for API Node and http transaction generator 2023-05-12 13:12:59 -05:00
Kevin Heifner d2563d4cdb Sleep for 1 sec instead of 3 2023-05-12 12:41:41 -05:00
Kevin Heifner f0a7821cc4 Pause for 250ms instead of 3 seconds 2023-05-12 12:41:29 -05:00
Kevin Heifner 5c999d2bf2 Use block num trx was included in instead of trx ref_block_num 2023-05-12 12:40:59 -05:00
Huang-Ming Huang a206cf1ce8 fix supplied genesis 2023-05-12 09:57:34 -05:00
Huang-Ming Huang 7cde470ad1 address PR comments 2023-05-12 09:22:04 -05:00
Kevin Heifner 090910abbb Fix merge issue 2023-05-12 08:37:49 -05:00
Huang-Ming Huang 399b616a00 fix file permission 2023-05-12 08:03:50 -05:00
Kevin Heifner aae35e1ba6 Merge remote-tracking branch 'origin/main' into test-harness-process-control-main 2023-05-12 07:54:51 -05:00
Huang-Ming Huang 893ae24774 Merge pull request #1163 from AntelopeIO/huangminghuang/retain-files-main
[4.0->main] change max-retained-history-files default
2023-05-12 07:53:18 -05:00
Kevin Heifner 1394cc7512 GH-1149 Ignore error of remote_endpoint 2023-05-12 07:07:17 -05:00
Kevin Heifner d3a00fcc4e GH-1149 Do not allow remote_endpoint() to throw 2023-05-11 19:39:27 -05:00
Huang-Ming Huang 303e1706b7 fix retained_dir not existed 2023-05-11 15:57:48 -05:00
Huang-Ming Huang ab609f2066 address PR comment 2023-05-11 15:43:31 -05:00
Huang-Ming Huang 1c781358b0 fix replay 2023-05-11 15:11:48 -05:00
Peter Oschwald 9a52e330f8 Make directory detection and creation default behavior. 2023-05-11 13:52:00 -05:00
Huang-Ming Huang 6c765c1337 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/retain-files-main 2023-05-11 13:20:45 -05:00
Huang-Ming Huang 8a9c4b505a address PR comments 2023-05-11 13:00:42 -05:00
Huang-Ming Huang ab7a120d9e Merge pull request #1141 from AntelopeIO/huangminghuang/retained-file
[4.0] change max-retained-history-files default
2023-05-11 12:51:39 -05:00
Huang-Ming Huang 0880013262 more PR comment fix 2023-05-11 12:47:31 -05:00
Matt Witherspoon 5a685c7331 Merge pull request #1160 from AntelopeIO/bn256_c++20_stdint
bump bn256 to main head with gcc13 + c++20 include fix
2023-05-11 12:47:43 -04:00
Peter Oschwald 92d497e1a4 Reopen checkOutputFilename in case where file may have been deleted, but attr was already set.
Allows for cases where Cluster cleanup is called initially in tests to remove old test data, which should no longer be a problem, however in doing so it now deletes subprocess_results.log while attr for checkOutputFile has already been set.  This allows reopening/recreating the file and continuing to log to it to capture all commands after the initial cleanup.
2023-05-11 11:43:51 -05:00
Kevin Heifner 91ba9e3da0 Merge pull request #1157 from AntelopeIO/virtual-warn
Fix clang warning
2023-05-11 11:29:53 -05:00
Matt Witherspoon ca3ba1fc4f bump bn256 to main head w/ gcc13 + c++20 include fix 2023-05-11 12:18:56 -04:00
Kevin Heifner ffab68b93f Fix clang warning 2023-05-11 10:58:46 -05:00
Vlad 6804cf2b3b Merge pull request #1155 from AntelopeIO/GH-1146-smoke-test-main
[4.0 -> main] Added block log version and num of blocks to output of leap-util block-log smoke-test
2023-05-11 10:15:01 -04:00
Huang-Ming Huang 1d06df34df fix keosd 2023-05-11 08:54:51 -05:00
Kevin Heifner 99f93200ac GH-1062 Use new fc time_point::safe_add 2023-05-10 17:44:07 -05:00
Kevin Heifner e666cd000e GH-1062 Revert unneeded changes to yield call 2023-05-10 17:38:34 -05:00
Kevin Heifner 6096c0bfc1 GH-1062 Refactor abi_serializer to accept a max_action_data_serialization_time which applies only to action data deserialization 2023-05-10 17:31:46 -05:00
Kevin Heifner 724be07d50 GH-1062 Also guard against underflow 2023-05-10 17:21:37 -05:00
Vlad bd75cf0e3b Merge pull request #1059 from AntelopeIO/bsd-stability-issues
Stability issues and improvements on BSD
2023-05-10 17:37:33 -04:00
Huang-Ming Huang 216a96d91a address PR comments 2023-05-10 16:31:39 -05:00
Huang-Ming Huang 0c2fbe9bc8 address PR comments 2023-05-10 15:56:31 -05:00
766C6164 1b885f011f Removed unrelated files from pull request 2023-05-10 16:36:43 -04:00
766C6164 ca4d0e18eb Merge branch 'release/4.0' into GH-1146-smoke-test-main 2023-05-10 16:29:29 -04:00
Vlad b694ae1a88 Merge pull request #1154 from AntelopeIO/GH-1146-smoke-test-40
[4.0] Added block log version and num of blocks to output of leap-util block-log smoke-test
2023-05-10 14:03:35 -04:00
Vlad 6f5ab9bf43 Merge branch 'release/4.0' into GH-1146-smoke-test-40 2023-05-10 12:13:25 -04:00
Vlad 858aad7905 Merge pull request #1147 from AntelopeIO/GH-1042-snapshots-test-coverage
Increase test coverage of snapshot-scheduler
2023-05-10 11:41:45 -04:00
766C6164 9e1edc0601 Added additional logging for smoke-test 2023-05-10 11:36:23 -04:00
Kevin Heifner 1d33a6885e GH-1062 Add variant_object to the exclude list of universal reference constructor of mutable_variant_object since there is an explicit constructor for it. 2023-05-10 06:57:06 -05:00
Lin Huang 8240816c04 Merge pull request #1148 from AntelopeIO/additional_contract_for_readonly_trx_test
Additional test contract for readonly trx test
2023-05-09 20:27:51 -04:00
Lin Huang 3c0ee240dc reduce excessive read-only-trx-parallel-test time from 640 seconds to 311 seconds 2023-05-09 19:16:34 -04:00
766C6164 353f0f315c appbase::app() -> scoped_app 2023-05-09 18:41:11 -04:00
Lin Huang 8b581156c5 add an additional test contract 2023-05-09 16:46:16 -04:00
Lin Huang dfa8b67b04 restructure test startup 2023-05-09 16:37:19 -04:00
Peter Oschwald fcd721115a Merge pull request #1138 from AntelopeIO/ph-feature-api-op-mode-trx-gen
[PH] Feature API Operational Mode and HTTP Transaction Generator
2023-05-09 13:18:49 -05:00
Peter Oschwald 28e8d55189 Address peer review comments. 2023-05-09 12:50:00 -05:00
766C6164 c68a82e5d4 Merge branch 'main' into bsd-stability-issues 2023-05-09 13:37:21 -04:00
766C6164 180bdd1f31 Added additional corner cases and some cleanup 2023-05-09 13:29:17 -04:00
Huang-Ming Huang 4d30e50b42 address PR comments 2023-05-09 08:49:13 -05:00
Huang-Ming Huang 448cbd137e fix config_dir 2023-05-09 08:05:41 -05:00
Jonathan Giszczak 5e04d627ad Use new Node name to fix an error message in under_min_avail_ram. 2023-05-08 19:03:15 -05:00
Jonathan Giszczak c9b028ff4a For some inexplicable reason, Nodes didn't know their own name.
Now they do.
2023-05-08 19:02:20 -05:00
Jonathan Giszczak 79e691b1a5 Don't append empty values in Node relaunch. 2023-05-08 18:15:27 -05:00
Jonathan Giszczak 9839af1fcd Reduce ship streamer runtime and fix logic error. 2023-05-08 16:45:48 -05:00
Jonathan Giszczak 2fecddffb0 Move keosd data directory into the unique per test directory. 2023-05-08 16:44:23 -05:00
Jonathan Giszczak 8ef2129048 In Node relaunch, use a new timestamp for launch time in relaunch. 2023-05-08 16:43:38 -05:00
Jonathan Giszczak d0e5fa009f In Cluster bootstrap, only use first 21 available producer accounts in schedule.
Increase default start delay between nodes from 1s to 2s.
Rework producer schedule command-line to use JSON module instead of
manual punctuation.
2023-05-08 16:41:32 -05:00
Huang-Ming Huang f17380b912 add gelf test 2023-05-08 15:46:13 -05:00
Huang-Ming Huang 841896f873 fix local_address 2023-05-08 15:31:58 -05:00
Kevin Heifner 0eec87e9e6 GH-1062 small optimization 2023-05-08 14:33:46 -05:00
Matt Witherspoon 0f79a5f467 Merge pull request #1143 from AntelopeIO/app&chainbase_ci_bump
bump chainbase & appbase submodules to main w/ CI tweaks
2023-05-08 14:27:16 -04:00
Matt Witherspoon bf1c80e4bf Merge pull request #1140 from 7flash/main
Update ship_client.cpp
2023-05-08 13:36:49 -04:00
Matt Witherspoon 210b88ac07 bump chainbase & appbase submodules to main w/ CI tweaks 2023-05-08 12:54:28 -04:00
Huang-Ming Huang 8b5645ab17 revise host validation 2023-05-08 10:47:53 -05:00
Kevin Heifner 0ef8b0960b GH-1062 Only reset deadline when explicitly asked to do so. 2023-05-08 09:45:28 -05:00
Kevin Heifner 05ff75236d GH-1062 Need to copy yield function since it is a const& 2023-05-08 09:38:58 -05:00
Kevin Heifner 0966651a9c GH-1062 Fix issue with variant internal variant_object being shared 2023-05-08 09:37:46 -05:00
Huang-Ming Huang 4022ed12ae change state-history-stride default 2023-05-08 08:45:16 -05:00
Igor Berlenko 29d97d2a70 Update ship_client.cpp 2023-05-08 19:33:28 +08:00
Kevin Heifner a7c5d3c048 GH-1062 Avoid unneeded copies 2023-05-06 08:17:37 -05:00
Huang-Ming Huang 444edc68cb conditional enable ipv6 test 2023-05-05 16:18:22 -05:00
Zach bb928c9cab Merge pull request #857 from AntelopeIO/zach-install-deps
Simplify Pinned Build Scripts
2023-05-05 16:40:12 -04:00
Peter Oschwald 69748fc993 Cleanup. Use std::variant for connections. 2023-05-05 15:27:57 -05:00
Peter Oschwald 815ac6e55f Fix tests. 2023-05-05 15:00:39 -05:00
Peter Oschwald 2bd0f23cd5 Fixes from peer review. 2023-05-05 14:55:29 -05:00
Peter Oschwald 53a720bc15 Peer review comments. 2023-05-05 14:19:35 -05:00
Huang-Ming Huang cfbd1e5504 fix host header 2023-05-05 14:11:16 -05:00
Peter Oschwald d64ccd7d40 Move elog outside of while loop. 2023-05-05 13:59:44 -05:00
Peter Oschwald 7b41fe2050 Address peer review comment. Missed method removal. 2023-05-05 13:55:24 -05:00
Peter Oschwald f342f5e3ca Address peer review comments. 2023-05-05 13:40:32 -05:00
Kevin Heifner 7e2bd04ef8 GH-1062 Enforce processing on the main thread to http-max-response-time up to a max of 1000 items or http-max-response-time is -1. 2023-05-05 13:30:26 -05:00
Kevin Heifner d480a26815 GH-1062 mutable_variant_object constructor for variant_object now explicit 2023-05-05 13:28:30 -05:00
Kevin Heifner cb1b52de82 GH-1062 Remove deadline since we no longer want to interrupt json creation on the http thread 2023-05-05 13:28:02 -05:00
Kevin Heifner 0e8739efc7 GH-1062 Remove deadline since we no longer want to interrupt json creation on the http thread 2023-05-05 13:26:14 -05:00
Kevin Heifner 086f1fb367 GH-1062 Add a safe_add that does not overflow. 2023-05-05 13:25:08 -05:00
Kevin Heifner 4e176a137c GH-1062 Change default abi_serializer yield function to enforce max_serialization_time per serialization step. 2023-05-05 13:24:11 -05:00
Kevin Heifner 9bcbb44624 GH-1062 Add move constructor for variant_object to mutable_variant_object 2023-05-05 13:22:15 -05:00
Huang-Ming Huang be4d98f0da fix for ubuntu 22.04 2023-05-05 12:14:37 -05:00
Peter Oschwald 77a215ab17 Put new tests in proper test categories. 2023-05-05 11:17:05 -05:00
Peter Oschwald 541cbd2413 Merge branch 'main' into ph-feature-api-op-mode-trx-gen 2023-05-05 09:59:21 -05:00
Peter Oschwald 0c055f3a79 Add API Node and Http Transaction Generator to performance harness. 2023-05-05 09:53:30 -05:00
Huang-Ming Huang 6fb23ca8e4 support multiple http endpoints 2023-05-05 09:31:05 -05:00
Lin Huang 31ae4cbe7a Merge pull request #1134 from AntelopeIO/read_only_trx_config_fix_main
[4.0 -> main] Check read-only trx options only when read-only-thread enabled, and present better error message
2023-05-04 14:03:28 -04:00
Lin Huang 4fc70c3994 Merge remote-tracking branch 'origin/release/4.0' into read_only_trx_config_fix_main 2023-05-04 12:58:50 -04:00
Lin Huang 117f022889 Merge pull request #1129 from AntelopeIO/read_only_trx_config_fix_4_0
[4.0] Check read-only trx options only when read-only-thread enabled, and present better error message
2023-05-04 12:56:23 -04:00
Lin Huang 11ad31e62c log configuration options and other values from the user perspective 2023-05-04 11:40:24 -04:00
Vlad 12543bb366 Merge branch 'main' into bsd-stability-issues 2023-05-04 10:31:24 -05:00
766C6164 459570dd7c Generalized macos specific timer to work on FreeBSD 2023-05-04 11:25:46 -04:00
Lin Huang 2b5095736d use enum instead of bool for better status indication 2023-05-04 10:03:37 -04:00
Lin Huang 4e98b2e9de make sure _ro_max_trx_time_us is always initialized 2023-05-04 09:32:42 -04:00
Kevin Heifner da28bc91e3 Merge remote-tracking branch 'origin/main' into GH-1062-time-limits 2023-05-04 06:18:03 -05:00
Kevin Heifner a36113873e Merge pull request #1125 from AntelopeIO/GH-1062-time-cleanup
Remove time_point implicit conversions
2023-05-04 06:15:50 -05:00
Lin Huang ce0260f810 test case for read-only trx related options not validated if read-only-threads is 0 2023-05-03 21:02:06 -04:00
Lin Huang fe64b22d6b Do not check execution window related configurations if --read-only-threads is not configured; better error message for invalid --read-only-write-window-time-us 2023-05-03 20:58:47 -04:00
766C6164 0af823f49b Bump chainbase to c4718cb 2023-05-03 16:47:59 -04:00
Kevin Heifner 1f60ff9143 GH-1062 Rename time_point to_string to to_iso_string 2023-05-03 13:53:40 -05:00
Kevin Heifner 6b10d8053a GH-1062 Remove possibly confusing arithmetic operators for time_point_sec. Remove implicit conversion from time_point to time_point_sec via operator=. 2023-05-03 13:41:10 -05:00
Kevin Heifner 18190c138a GH-1062 Remove time_point implicit conversions 2023-05-03 11:39:29 -05:00
Peter Oschwald d74d96e7fb Missed one location of Remove parameter in favor of using member variable directly. 2023-05-03 11:08:51 -05:00
Peter Oschwald b7286f7198 Remove duplication. Use port as unsigned short instead of string. 2023-05-03 11:06:36 -05:00
Peter Oschwald b818e68ae6 Simplify. Remove parameter in favor of using member variable directly. 2023-05-03 11:05:24 -05:00
Vlad 206d67adda Merge branch 'main' into bsd-stability-issues 2023-05-03 08:48:39 -04:00
Gregory Popovitch 174e8ff269 Merge pull request #1118 from AntelopeIO/update_pinned_build_dep_versions
Update pinned build versions for boost and llvm-src
2023-05-02 17:21:40 -04:00
Kevin Heifner 8cb572cab0 GH-1062 Add 1000 limit 2023-05-02 15:44:36 -05:00
Kevin Heifner 6c831db8f3 GH-1062 Use maximum() instead of 365 days for max 2023-05-02 15:32:57 -05:00
greg7mdp 7b682031eb Merge branch 'main' of github.com:AntelopeIO/leap into update_pinned_build_dep_versions 2023-05-02 15:15:36 -04:00
greg7mdp 8e66a744a7 Remove unneeded #ifdef in chain/types.hpp now that boost >= 1.71 2023-05-02 14:13:41 -04:00
Kevin Heifner 2eb261c592 GH-1062 Enforce http_max_response_time on main thread only and always return at least one. 2023-05-02 13:07:56 -05:00
Kevin Heifner 4692fd819b GH-1062 Remove unused struct 2023-05-02 13:06:32 -05:00
greg7mdp f91fff6cd4 Remove unneeded patch file 2023-05-02 14:02:58 -04:00
greg7mdp 88597fb03b Remove patched suffix 2023-05-02 13:49:46 -04:00
greg7mdp 6e1703dcd6 Get rid of the "patched" postfix 2023-05-02 13:40:38 -04:00
greg7mdp 2dcb42f3ef Update boost version in CMakeLists.txt to 1.71 2023-05-02 13:40:18 -04:00
Kevin Heifner bbeafe9eff GH-1062 Remove deadline from trace_api_plugin 2023-05-02 11:40:43 -05:00
iamveritas 2ad3148e27 Merge pull request #1110 from AntelopeIO/fix-devrel#205-4.0
[main] Update swagger files to include missing documentation
2023-05-02 19:20:39 +03:00
greg7mdp 26fe87e461 Remove typo 2023-05-02 12:16:02 -04:00
greg7mdp 0ca97bb612 Revert back to using clang build for ubuntu 16.04 2023-05-02 12:04:14 -04:00
greg7mdp d7dba628e3 llvm -> 11.0.1, boost -> 1.82 2023-05-02 11:35:54 -04:00
iamveritas 5a0f78f924 Merge pull request #1087 from AntelopeIO/fix-devrel#205-4.0
[4.0] Update swagger files to include missing doc
2023-05-02 10:56:01 +03:00
iamveritas 079935ed4e improvements based on peer review feedback 2023-05-02 10:29:35 +03:00
766C6164 1ab5a22606 Point to updated cb 2023-05-01 23:44:46 -04:00
Vlad 2029ce0d3d Merge branch 'main' into bsd-stability-issues 2023-05-01 20:40:12 -04:00
Vlad 3bdf68effc Merge pull request #1115 from AntelopeIO/GH-586-reorg-tests-plugins
Reorganize tests for plugins
2023-05-01 20:38:09 -04:00
Kevin Heifner 324ff339be Merge pull request #1112 from AntelopeIO/GH-259-test-cleanup
Tests: misc cleanup
2023-05-01 15:14:47 -05:00
Kevin Heifner 32ce2728eb GH-259 Add default case for setup_policy operator<<. 2023-05-01 13:53:31 -05:00
766C6164 f83ea63058 Trace api plugin convert to one test executable 2023-05-01 13:33:26 -04:00
766C6164 baf90e5005 Made chain plugin unit tests single executable 2023-05-01 12:40:18 -04:00
766C6164 d2833e6bca Cleaned up producer_plugin tests 2023-05-01 12:28:40 -04:00
Kevin Heifner 4b85f4ee6d GH-259 Add back TESTER macro since used in all generated tests. 2023-05-01 10:05:06 -05:00
Kevin Heifner 20cea10050 GH-259 Removed unused NON_VALIDATING_TEST 2023-05-01 09:33:27 -05:00
Peter Oschwald 3c261c85b6 remove unused function. 2023-05-01 09:15:03 -05:00
Kevin Heifner 51c71c662d GH-259 Remove old_wasm_tester and add test cases for different protocol featurs enabled. 2023-05-01 07:58:43 -05:00
Kevin Heifner a056b77b18 GH-259 Update tester to allow setup_policy to be used as boost data in tests 2023-05-01 07:58:02 -05:00
iamveritas 18d79f4cf3 take out <size> cause is not rendered correctly in final docs 2023-04-30 23:21:55 +03:00
Jonathan Giszczak fc94d3ab7d Update performance_test_basic. 2023-04-28 18:36:04 -05:00
Jonathan Giszczak e84f1479d9 Update restart-scenarios-test. 2023-04-28 17:53:21 -05:00
Jonathan Giszczak f76d4356d8 Rewrite node relaunch command line manipulation. 2023-04-28 16:22:53 -05:00
Kevin Heifner 57d5546b7b Merge pull request #1108 from AntelopeIO/GH-641-escape-opt
Optimization: New escape_str function for sanitizing strings
2023-04-28 13:26:31 -05:00
Kevin Heifner bbeaf9893c Merge pull request #1095 from AntelopeIO/GH-641-libfc-tests
Refactor libfc tests into one executable
2023-04-28 13:25:56 -05:00
Kevin Heifner 44355def2a GH-641 Remove unneeded if check 2023-04-28 12:37:45 -05:00
Gregory Popovitch b8be7391a0 Merge pull request #1103 from AntelopeIO/fix_gcc_10_link_issue
Fix g++-10 link issue when building with -std=c++20.
2023-04-28 13:23:03 -04:00
Kevin Heifner 0cee264774 GH-641 std::string_view instead of const char* 2023-04-28 12:10:12 -05:00
Kevin Heifner 332e22e931 GH-641 Use enum instead of bool 2023-04-28 11:48:01 -05:00
Kevin Heifner 4bbb4910fc GH-641 Add new test file 2023-04-28 11:47:39 -05:00
iamveritas 4f87a1b050 corect ref links 2023-04-28 18:48:55 +03:00
iamveritas c4f383ae2b Update swagger files to include: get_transaction_status, compute_transaction, send_transaction2 2023-04-28 18:48:55 +03:00
Kevin Heifner 122ad36b7d GH-641 Add parens so precedence is clearer 2023-04-28 10:28:19 -05:00
Matt Witherspoon 1bb997d030 Merge pull request #1097 from AntelopeIO/fix_test_container_log_upload
fix parallel-ctest-containers creation of log tarballs on failure
2023-04-28 11:06:16 -04:00
Kevin Heifner 9cbb09d0f5 GH-641 Optimize print_debug 2023-04-28 09:36:50 -05:00
Gregory Popovitch 59b519a103 Merge pull request #1107 from AntelopeIO/libc++_build_issues
`std::result_of` was deprecated in C++17, removed in C++20.
2023-04-28 10:36:46 -04:00
Kevin Heifner 94e7bd0696 GH-641 Use more efficient escape_str instead of format_string 2023-04-28 09:36:15 -05:00
Kevin Heifner 8375d5e634 GH-641 Add escape_str function 2023-04-28 09:35:35 -05:00
Huang-Ming Huang a8c34044f4 Merge pull request #1074 from AntelopeIO/huangminghuang/refactor-prometheus
refactor prometheus plugin
2023-04-28 09:31:24 -05:00
greg7mdp ac2c37c349 std::result_of was deprecated in C++17, removed in C++20. 2023-04-28 10:17:42 -04:00
Eric Passmore b0290bb60e Merge pull request #1105 from AntelopeIO/ehp/GH-1094-fix-swagger-component-path
4.0: Documentation fixed Error path in producer plugin swagger
2023-04-28 06:19:46 -07:00
Kevin Heifner ca7e9b1ae4 GH-641 Add an explicit main 2023-04-28 07:12:00 -05:00
Jonathan Giszczak d9eee885fa Python documentation never mentions FileNotFoundError in subprocess.run 2023-04-27 20:45:45 -05:00
Vlad 09e1b90de7 Merge pull request #1037 from AntelopeIO/snapshot-scheduler-refactoring
Snapshot code refactoring
2023-04-27 21:38:36 -04:00
Jonathan Giszczak 0997737b27 Don't wait for token issue action during bootstrap to be finalized. 2023-04-27 19:02:10 -05:00
Jonathan Giszczak 22c2105b03 Write network topology visualization file to each test directory.
Render network topology to PNG, ignoring if 'dot' tool isn't installed.
2023-04-27 19:00:56 -05:00
greg7mdp e71453641d Move variable declaration from Logging to IR as per PR comment. 2023-04-27 18:32:43 -04:00
greg7mdp d08a6b1202 Merge branch 'main' of github.com:AntelopeIO/leap into fix_gcc_10_link_issue 2023-04-27 18:02:43 -04:00
Eric Passmore 52a7df3d72 fixed rel path to Error 2023-04-27 14:55:38 -07:00
Huang-Ming Huang dff7b524ba Merge remote-tracking branch 'origin/main' into huangminghuang/refactor-prometheus 2023-04-27 16:43:57 -05:00
Gregory Popovitch c5bec2b3a5 Merge pull request #1070 from AntelopeIO/c++20_update
Changes for building with c++20.
2023-04-27 17:37:50 -04:00
Huang-Ming Huang 67edf65502 remove unused parameter 2023-04-27 16:24:14 -05:00
greg7mdp a4681a3c04 Declare WASM::check_limits variable is Logging library to fix g++ issue
Within `libraries/wasm-jit/Source`, `WASM` depends on `IR` and `Logging`, and `IR` depends on
`Logging`.
With the current declaration of `WASM::check_limits` in `WASM`, we have the following g++-10 link
error when building with `-std=c++20`:

```
_64-linux-gnu/libz.so  -ldl  libraries/libfc/secp256k1/libsecp256k1.a  libraries/chainbase/libchainbase.a  -lpthread  libraries/softfloat/libsoftfloat.a && :
/usr/bin/ld: libraries/wasm-jit/Source/IR/libIR.a(DisassemblyNames.cpp.o): warning: relocation against `_ZN4WASM12check_limitsE' in read-only section `.text'
/usr/bin/ld: libraries/wasm-jit/Source/IR/libIR.a(DisassemblyNames.cpp.o): in function `void Serialization::serialize<Serialization::MemoryInputStream>(Serialization::MemoryInputStream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/home/greg/github/enf/leap/libraries/wasm-jit/Include/Inline/Serialization.h:274: undefined reference to `WASM::check_limits'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
```

Moving the declaration of `WASM::check_limits` in `Logging` (end leaf of dependency graph) fixes the issue.
2023-04-27 15:36:51 -04:00
Peter Oschwald bcd70c2302 Merge pull request #1093 from AntelopeIO/ph-feature-api-op-mode
[PH] Initial API Node (HTTP Node) Support - Topology definition/configuration
2023-04-27 13:25:58 -05:00
Matt Witherspoon 9023583231 fix parallel-ctest-containers creation of log tarballs on failure 2023-04-27 13:08:46 -04:00
Huang-Ming Huang 22dd72753e address PR comments 2023-04-27 11:33:50 -05:00
Kevin Heifner 8db6fd8654 GH-641 Explicitly list source files to avoid cmake issues with GLOB 2023-04-27 11:32:09 -05:00
Kevin Heifner 72d47e0a21 GH-641 Remove unneeded CMakeLists.txt files 2023-04-27 09:13:39 -05:00
Kevin Heifner c410c7c943 GH-641 Refactor libfc tests into one executable 2023-04-27 09:07:31 -05:00
Jonathan Giszczak b3a9ed2fe6 Update terminate-scenarios-tests.
Includes update of Cluster relaunchEosInstances() method.
Fix bug in Node relaunch when launching a new chain.
2023-04-26 19:10:49 -05:00
greg7mdp 1f741664b6 Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-26 14:03:34 -04:00
Gregory Popovitch 99d196176a Merge pull request #1092 from AntelopeIO/update_chainbase_tip
Update chainbase to tip (-Wfree-nonheap-object warning suppressed for gcc-12)
2023-04-26 14:02:13 -04:00
Peter Oschwald 18fd82fd7e Update README documentation. 2023-04-26 12:13:43 -05:00
Peter Oschwald 22a5aa1f08 Add initial support for configuring and running an API node. 2023-04-26 11:52:56 -05:00
Peter Oschwald ee930e01a7 Encapsulate validation node configuration. 2023-04-26 10:39:59 -05:00
greg7mdp 847fec0f13 Update chainbase to tip (-Wfree-nonheap-object suppressed got gcc-12) 2023-04-26 11:38:25 -04:00
greg7mdp abf1e75713 Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-26 11:30:20 -04:00
Kevin Heifner 3342373d67 Merge pull request #1091 from AntelopeIO/GH-1081-dry-run-auth-check
[4.0 -> main] fix: not fail on signature checks for dry-run txns
2023-04-26 10:20:01 -05:00
Kevin Heifner 224630968a Merge remote-tracking branch 'origin/release/4.0' into GH-1081-dry-run-auth-check 2023-04-26 09:47:42 -05:00
Kevin Heifner b56d4b5400 Merge pull request #1090 from AntelopeIO/GH-1081-dry-run-auth-check-4.0
[3.2 -> 4.0] fix: not fail on signature checks for dry-run txns
2023-04-26 09:47:18 -05:00
Kevin Heifner e33ed69fcb Merge remote-tracking branch 'origin/release/3.2' into GH-1081-dry-run-auth-check-4.0 2023-04-26 09:13:17 -05:00
Kevin Heifner e059d8213e Merge pull request #1089 from AntelopeIO/GH-1081-dry-run-auth-check-3.2
[3.2] fix: not fail on signature checks for dry-run txns
2023-04-26 09:11:45 -05:00
Pinelliaw e07fd0a0c8 Fix not fail on signature checks for dry-run, include the time it takes for checker.all_keys_used() 2023-04-26 07:54:42 -05:00
Matt Witherspoon 6184957f42 Merge pull request #1081 from PinelliaC/main
fix: not fail on signature checks for dry-run txns
2023-04-25 21:56:28 -04:00
PinelliaC e585d0edbc Merge branch 'main' into main 2023-04-26 07:48:48 +08:00
Jonathan Giszczak 41708e6228 Update block_log_util_test. 2023-04-25 18:18:35 -05:00
Jonathan Giszczak fdffa3ed76 Update nodeos_snapshot_diff_test.
Remove rmFromFile used by only one test for config file editing and
replace with rmFromCmd in Node to achieve same.
2023-04-25 18:13:58 -05:00
greg7mdp e88383e409 Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-25 18:37:36 -04:00
Gregory Popovitch 4a4ed579dc Merge pull request #1086 from AntelopeIO/update_submodules_tip
Update submodules to the version building with `-std=c++20`
2023-04-25 18:33:36 -04:00
Peter Oschwald 4f431014f1 Refactor how cluster is configured to give higher level understanding of the node types being configured.
Instead of simply relying on cluster's pnodes and totalnodes specification, add higher level definition of producerNodeCount and validationNodeCount (can be added to as additional node types are supported) that in sum make totalNodes.  Also pre-populate the nodeIds that cluster will configure for each node type.

Remove support for -s (topo) as currently only supporting default of
mesh anyway.
2023-04-25 17:10:20 -05:00
766C6164 d052b65a15 Removed not needed anymore header 2023-04-25 17:41:38 -04:00
766C6164 925ad20690 Addressed merge conflict 2023-04-25 17:39:07 -04:00
Vlad fd7051b6f3 Merge branch 'main' into snapshot-scheduler-refactoring 2023-04-25 17:01:40 -04:00
greg7mdp 5f01a2adac Update submodules to the version building with -std=c++20 2023-04-25 16:59:26 -04:00
Jonathan Giszczak 8816a9560c Update larger_lib_test. 2023-04-25 15:42:14 -05:00
Jonathan Giszczak 52bacf03a4 Update nodeos_chainbase_allocation_test. 2023-04-25 15:38:50 -05:00
greg7mdp 3f5c96f848 Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-25 16:35:29 -04:00
Jonathan Giszczak 7071a350d0 Add missing command-line option to http-plugin-test.
Avoid adding duplicates of http-server-address and http-validate-host to
nodeos command line.  boost doesn't tolerate duplicates from the same
source.
2023-04-25 15:30:21 -05:00
766C6164 ef09502162 Missed one more spot 2023-04-25 15:01:11 -04:00
Kevin Heifner cc4a46df64 Merge pull request #1076 from AntelopeIO/GH-668-circle-dep
Refactor: Move subjective_billing to chain library
2023-04-25 13:12:44 -05:00
greg7mdp 7161fb6016 Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-25 13:24:52 -04:00
greg7mdp 6bf4c8881f remove no longer used noncopyable struct 2023-04-25 13:06:43 -04:00
Pinelliaw a3589123ec refactor: include the time it takes for checker.all_keys_used() 2023-04-26 01:04:02 +08:00
766C6164 79a2f281c5 Removed a separate header related to json db 2023-04-25 12:50:39 -04:00
766C6164 02590a54d7 Addressng feedback 2023-04-25 12:31:48 -04:00
Kevin Heifner d2beec373b Merge branch 'main' into main 2023-04-25 11:17:59 -05:00
Huang-Ming Huang 101f11fa6c Merge pull request #1023 from AntelopeIO/huangminghuang/python-sitelib
use python_DISTLIB
2023-04-25 11:14:21 -05:00
Vlad b064339e91 Merge branch 'main' into snapshot-scheduler-refactoring 2023-04-25 11:39:40 -04:00
Matt Witherspoon 004130086c Merge pull request #1080 from AntelopeIO/ambig_variant_error
fix ambiguous to_variant()s in json tests
2023-04-25 10:37:41 -04:00
Pinelliaw a6b95519d0 fix: not fail on signature checks for read-only txns 2023-04-25 21:26:28 +08:00
Jonathan Giszczak b087d37b23 Revise node verifyAlive and launchUnstarted, fix relaunch (some more)
Update nodeos_read_terminate_at_block_test.
2023-04-24 20:36:24 -05:00
Matt Witherspoon 16685ab12d fix ambiguous to_variant()s 2023-04-24 17:31:27 -04:00
Lin Huang 83be35f713 Merge pull request #1078 from AntelopeIO/merge_4_0_0_version_bump
[4.0 -> main] Merge 4.0.0 version bump to main
2023-04-24 17:14:21 -04:00
Lin Huang 889d312468 correct version after merging 4.0.0 version bump 2023-04-24 15:56:46 -04:00
Kevin Heifner c5774f6911 GH-668 Remove space which confuses CMakeLists.txt processing 2023-04-24 14:55:03 -05:00
Lin Huang 48e83f138d Merge pull request #1077 from AntelopeIO/bump_to_4_0_0
[4.0] Bump Leap version to 4.0.0
2023-04-24 15:43:25 -04:00
Lin Huang af8383c34c [4.0] Bump Leap version to 4.0.0 2023-04-24 15:13:50 -04:00
Gregory Popovitch b67d1747dd Merge pull request #1075 from AntelopeIO/fix_abi_test_check
Fix test failure on fast machine (release builds)
2023-04-24 14:44:33 -04:00
Kevin Heifner a7d268df10 GH-668 Move subjective_billing to chain library. Break circular dependency between producer_plugin and chain_plugin. 2023-04-24 13:40:37 -05:00
greg7mdp f5cb026ee1 Lower another timeout which I hit occasionally when running tests. 2023-04-24 14:25:08 -04:00
greg7mdp 663fc516d1 Fix test failure on fast machine (release builds)
When I build in release mode, I have the following tests failing (both gcc-12 and clang-16, no problem in debug)
/home/greg/github/enf/leap/unittests/api_tests.cpp(1078): error: in "api_tests/checktime_pause_max_trx_cpu_extended_test": elapsed 26100us
/home/greg/github/enf/leap/unittests/api_tests.cpp(1136): error: in "api_tests/checktime_pause_max_trx_extended_test": elapsed 26056us

This is the first failure in the code:

      // This assumes that loading the WASM takes at least 1.5 ms
   // If this check fails but duration is >= 24'999 (previous check did not fail), then the check here is likely
   // because WASM took less than 1.5 ms to load.
   BOOST_CHECK_MESSAGE( dur > 26'500, "elapsed " << dur << "us" );
2023-04-24 13:50:14 -04:00
Huang-Ming Huang 5cbdf9bf1c refactor prometheus plugin 2023-04-24 12:30:09 -05:00
Huang-Ming Huang c81ae9a766 revert to use distutils 2023-04-24 09:24:47 -05:00
greg7mdp b40f23f64f Remove #ifdef preserving the nocopy constraint as per PR comment 2023-04-24 10:00:19 -04:00
Jonathan Giszczak 2cfeb99d8d Update cli_test. 2023-04-21 19:01:47 -05:00
Jonathan Giszczak 716665b0a8 Update plugin_http_api_test. 2023-04-21 18:58:09 -05:00
greg7mdp 55319ec01e Merge branch 'main' of github.com:AntelopeIO/leap into c++20_update 2023-04-21 19:27:53 -04:00
Peter Oschwald 6d4a3ac00d Remove duplicate of max_requests_in_flight 2023-04-21 15:55:04 -05:00
Jonathan Giszczak 7fa30714e6 Update protocol feature test.
Fixes to Node kill and relaunch.
Cache config_dir in Node.
2023-04-21 15:17:45 -05:00
greg7mdp fdc3bf6f38 Changes for building with c++20.
With these changes, plus the ones in the PRs opened in the following submodules:

- bn256
- eos-vm
- CLI11
- abieos

Leap builds with clang-16 in c++20 mode.
2023-04-21 15:57:00 -04:00
Peter Oschwald f9ac95cb9b Add command line support for http-max-in-flight-requests. 2023-04-21 14:47:06 -05:00
Peter Oschwald e994655f0d Slight reorg of config items in op modes doc showing associated plugin. 2023-04-21 14:46:34 -05:00
Peter Oschwald f91b9724a5 Factor out TestHelperConfig and ClusterConfig setup from args into one reusable location/helper function. 2023-04-21 14:09:00 -05:00
Gregory Popovitch 48b6a4e27c Merge pull request #1054 from AntelopeIO/gh-743
Move abi serialization of transaction trace off main thread for `chain_plugin: get_table_rows` and `get_account`
2023-04-21 13:45:27 -04:00
Peter Oschwald 3b99d8322e Merge pull request #1052 from AntelopeIO/ph-add-http-client-async
[PH] Add http client async
2023-04-21 12:19:42 -05:00
Peter Oschwald 73383f2710 Merge branch 'main' into ph-add-http-client-async 2023-04-21 11:51:36 -05:00
Peter Oschwald eacc0122f4 Merge pull request #1056 from AntelopeIO/ph-add-api-op-mode-desc
[PH] Update initial API Node Op Mode documentation.
2023-04-21 11:50:16 -05:00
Peter Oschwald f02287e445 Address peer review comments. 2023-04-21 11:06:30 -05:00
Matt Witherspoon 694b11b4a1 Merge pull request #1069 from AntelopeIO/libtester_boost170_cmake
remove boost <1.70 workaround in libtester cmakes
2023-04-21 10:36:37 -04:00
Matt Witherspoon fe16dc2967 Merge pull request #1068 from AntelopeIO/unused_libssl_libtester
remove unused libssl from libtester cmakes
2023-04-21 10:36:26 -04:00
Peter Oschwald 9ff417bc69 Fix comment. 2023-04-21 09:25:43 -05:00
Matt Witherspoon 5c5f550b8c also remove now always empty libosssl variable from link list 2023-04-21 10:22:05 -04:00
Peter Oschwald 575d7596e1 Small updates to config and performance measurement sections. 2023-04-21 09:21:46 -05:00
Matt Witherspoon 380dd917c8 remove boost <1.70 workaround in libtester cmakes 2023-04-20 20:04:38 -04:00
Matt Witherspoon 4594716347 remove unused libssl from libtester cmakes 2023-04-20 20:01:44 -04:00
Jonathan Giszczak eb4098db9f Update relaunch method to always save popen and use cmd array 2023-04-20 18:24:06 -05:00
Jonathan Giszczak b95a8db827 Remove --nodeos-log-path launcher argument and use existing config and data dir arguments
Move config directories into test parent directory with data for same.
2023-04-20 18:22:22 -05:00
766C6164 2215bc4ed5 fixes to merge conflicts 2023-04-20 17:00:19 -04:00
Vlad fc4d60af70 Merge pull request #1058 from AntelopeIO/compile-fix-std
Added missing namespace to logger in case of FC_USE_PTHREAD_NAME_NP not defined
2023-04-20 16:52:36 -04:00
766C6164 94540634be Merge 2023-04-20 15:48:23 -04:00
766C6164 c64783366e Merge branch 'main' into snapshot-scheduler-refactoring 2023-04-20 15:47:52 -04:00
Lin Huang da014a698a Merge pull request #1061 from AntelopeIO/update_chainbase
Update chainbase to include comparison of different signedness warning fix
2023-04-20 15:30:30 -04:00
greg7mdp 6f5254e442 Address PR comments 2023-04-20 15:05:08 -04:00
Lin Huang 57eab29d7a Merge branch 'main' into update_chainbase 2023-04-20 14:31:03 -04:00
Vlad 2b5b3ceedf Merge pull request #1060 from AntelopeIO/stringify-json-fix
Properly stringify both large and small int64's when converting to json
2023-04-20 13:53:00 -04:00
766C6164 c9c84d6175 adjustments 2023-04-20 13:26:28 -04:00
766C6164 876910a81b Merge branch 'stringify-json-fix' of github.com:AntelopeIO/leap into stringify-json-fix 2023-04-20 11:42:48 -04:00
766C6164 d3a36d3214 fix 2023-04-20 11:42:25 -04:00
Vlad 27325ffbfd Merge branch 'main' into stringify-json-fix 2023-04-20 10:30:08 -04:00
766C6164 24f886de91 updated if condition 2023-04-20 10:18:02 -04:00
Lin Huang 0457c48bfb Update chainbase to include comparison of different signedness warning fix 2023-04-20 09:31:07 -04:00
Lin Huang cba6aa8212 Merge pull request #1055 from AntelopeIO/fix_warning
Fix control reaches end of non-void function warning
2023-04-19 22:08:27 -04:00
Jonathan Giszczak 2e832a8150 Fix wrong variable name. 2023-04-19 19:04:50 -05:00
Jonathan Giszczak 5c814dad79 Merge branch 'main' into test-harness-process-control 2023-04-19 18:22:17 -05:00
Jonathan Giszczak 77f321dc09 Manage tracking and lifetime of bios node better. 2023-04-19 18:18:18 -05:00
766C6164 9501ea2b90 Convert small neg values to string as well 2023-04-19 19:00:27 -04:00
greg7mdp 1d19a7d2f1 Merge branch 'main' of github.com:AntelopeIO/leap into gh-743 2023-04-19 16:51:53 -04:00
766C6164 619de63b3d Added missing namespace 2023-04-19 16:45:02 -04:00
766C6164 3846d8653d Added bsd specific kevent-based timer 2023-04-19 16:23:43 -04:00
Kevin Heifner f583e29d76 Merge pull request #1049 from AntelopeIO/fc-cleanup
FC cleanup
2023-04-19 14:28:52 -05:00
Kevin Heifner d658d61081 Added include of optional 2023-04-19 13:58:24 -05:00
Kevin Heifner 202f224991 Remove some additional unused code 2023-04-19 13:44:06 -05:00
Lin Huang 6f8896ecd7 Fix a compile error from last minute change 2023-04-19 14:23:10 -04:00
Peter Oschwald 6a0beee038 Update initial API Node Op Mode documentation. 2023-04-19 13:13:48 -05:00
greg7mdp d75c0421f4 Fix compilation issue. 2023-04-19 14:12:54 -04:00
Lin Huang 8834403ca0 Fix control reaches end of non-void function warning 2023-04-19 14:06:36 -04:00
greg7mdp 1640c382de Update get_account() to serialize off the main thread. 2023-04-19 13:45:04 -04:00
Peter Oschwald b9f2d280a1 Add missing source file to executable in CMakeLists.
minor reformatting of CMakeLists
2023-04-19 10:55:39 -05:00
Peter Oschwald 81504813b7 Switch to callback model instead of promise/future.
Some reformatting of the new code.

Additional test checks
2023-04-19 10:41:39 -05:00
Peter Oschwald 0dbce37fce Make fail function inline. 2023-04-19 09:22:38 -05:00
Peter Oschwald f1b6b770b0 Add missed include 2023-04-19 08:29:50 -05:00
Peter Oschwald bc807a2660 Merge branch 'ph-feature-api-node-op-mode' into ph-add-http-client-async 2023-04-19 08:19:52 -05:00
Peter Oschwald ce33412a09 Add placeholder documentation for API Node Operational Mode 2023-04-19 08:17:57 -05:00
Peter Oschwald 0f1b0a300a Update http_client_async to POST with message body and promise/future to see response.
Add simple unit test to test http_client_async with simple_rest_server implementation.
2023-04-19 08:09:11 -05:00
Peter Oschwald 3b8ad9632c Replace bind with lambda 2023-04-19 07:47:56 -05:00
Kevin Heifner 060dbed7f7 Fix indentation 2023-04-18 17:49:03 -05:00
Kevin Heifner a1cb719176 Remove fc::string alias 2023-04-18 17:45:02 -05:00
Kevin Heifner acb580ad0a Remove unused files 2023-04-18 17:42:51 -05:00
Huang-Ming Huang f394de84ce Merge branch 'main' into huangminghuang/python-sitelib 2023-04-18 14:44:52 -05:00
greg7mdp b2d1d890c1 Update calling convention for get_account() 2023-04-18 15:07:44 -04:00
Huang-Ming Huang d1fd7c14e6 Merge pull request #1039 from AntelopeIO/huangminghuang/unix-path
mitigate unix socket path problem
2023-04-18 14:01:40 -05:00
Huang-Ming Huang 306e9145a3 add test 2023-04-18 13:49:19 -05:00
greg7mdp 41e2e68e3f Update get_table_rows_ex() to serialize off the main thread. 2023-04-18 14:10:28 -04:00
Huang-Ming Huang 11964ff71f Merge branch 'main' into huangminghuang/unix-path 2023-04-18 13:08:36 -05:00
Huang-Ming Huang f74763b8e6 use dist-package 2023-04-18 13:03:26 -05:00
Kevin Heifner a1b1722e47 Merge pull request #1045 from AntelopeIO/GH-452-block-buffer
P2P: Save and retry unlinkable blocks
2023-04-18 12:58:45 -05:00
Huang-Ming Huang 9dbe29ceae fix unix_sock listening path 2023-04-18 12:20:54 -05:00
Kevin Heifner ab84c78135 GH-452 Remove unneeded forward declare 2023-04-18 11:54:17 -05:00
Kevin Heifner b9c6a668c0 GH-452 Untangle unlinkable_block_state_cache and dispatch_manager 2023-04-18 11:40:38 -05:00
Huang-Ming Huang 53f9ca1f2a always use relative path 2023-04-18 11:40:09 -05:00
Huang-Ming Huang f02853063d Merge remote-tracking branch 'origin/main' into huangminghuang/unix-path 2023-04-18 11:19:13 -05:00
Huang-Ming Huang f3b92143f5 Merge pull request #1011 from AntelopeIO/huangminghuang/filesystem
Replace boost/fc filesystem
2023-04-18 11:17:37 -05:00
Kevin Heifner fd5546901c GH-452 Encapsulate unlinkable_block_state_index. 2023-04-18 10:54:28 -05:00
Huang-Ming Huang 88f477a7d5 address PR comments 2023-04-18 10:38:56 -05:00
Huang-Ming Huang de82f95baf Merge remote-tracking branch 'origin/main' into huangminghuang/python-sitelib 2023-04-18 09:32:19 -05:00
Huang-Ming Huang 4b104260ba make sure Python_SITELIB exists 2023-04-18 09:30:00 -05:00
Kevin Heifner 022b6f3d5a GH-452 Some renaming to make code clearer 2023-04-18 08:33:39 -05:00
greg7mdp 078f7b4861 Update get_table_rows_by_seckey() 2023-04-17 17:01:51 -04:00
greg7mdp 193f2cd5f0 Update calling convention for get_table_rows(). 2023-04-17 15:42:33 -04:00
Matt Witherspoon aba8b86be3 Merge pull request #1044 from AntelopeIO/WAST_string_include
add needed `string` include for some newer libc++ versions
2023-04-17 15:27:52 -04:00
Jonathan Giszczak 8993fc2557 Remove obsolete command line argument from performance harness use of TestHarness 2023-04-17 14:26:37 -05:00
Jonathan Giszczak 5b801d4e75 Python backwards compatibility. 2023-04-17 14:26:04 -05:00
Jonathan Giszczak 3ad05471e3 Fix up imports. 2023-04-17 14:14:56 -05:00
Matt Witherspoon fdb0ae65ba add needed string include for some newer libc++ 2023-04-17 14:36:44 -04:00
Kevin Heifner 120d2261d1 GH-452 Remove correct block 2023-04-17 13:18:30 -05:00
Vlad d849c9c67c Merge pull request #914 from AntelopeIO/leaputil-shutdown-state
Added leap-util subcommand to check for a clean shutdown
2023-04-17 14:03:08 -04:00
Kevin Heifner 2a3a784f3f GH-452 Keep and retry unlinkable blocks 2023-04-17 12:28:46 -05:00
766C6164 7200356530 Added graceful shutdown on snapshot execution exception 2023-04-17 11:56:44 -04:00
Kevin Heifner 2ef8789182 Merge pull request #1040 from AntelopeIO/GH-452-block-buffer
P2P: Misc improvements
2023-04-17 10:33:53 -05:00
Kevin Heifner 1ffb230b2b GH-452 Move setting of closing to false at end of close 2023-04-17 07:43:05 -05:00
Kevin Heifner dd045a8949 GH-452 Close immediately on buffer full. 2023-04-15 11:56:51 -05:00
Huang-Ming Huang 429bb3faad Merge remote-tracking branch 'origin/main' into huangminghuang/filesystem 2023-04-14 18:15:59 -05:00
Huang-Ming Huang f20f9382e6 remove more unnecessary generic_string() 2023-04-14 18:01:34 -05:00
Huang-Ming Huang c406945f63 address PR comments 2023-04-14 17:52:10 -05:00
Jonathan Giszczak eedb50a7d6 Fix spelling error. 2023-04-14 17:49:28 -05:00
Jonathan Giszczak 0b9fc5de67 Fix syntax error. 2023-04-14 17:48:40 -05:00
Jonathan Giszczak db779d1068 Fix resurrected Node relaunch() method. 2023-04-14 17:48:22 -05:00
Jonathan Giszczak 7a87c1eb93 Fix merge errors. 2023-04-14 17:47:59 -05:00
Jonathan Giszczak c6503d6e1c Fix merge failures. 2023-04-14 17:39:48 -05:00
Jonathan Giszczak 8f003d68e0 Merge branch 'main' into test-harness-process-control 2023-04-14 17:11:03 -05:00
Jonathan Giszczak e521e9baab Bring nodeos and keosd process control into TestHarness Node/WalletMgr
Use launcher as object in TestHarness rather than external program.
Eliminate --clean-run arguments.  All runs are clean.
Remove killall from Cluster and all scripts.  Tests only terminate their
own processes.
Remove unused scripts.
Remove unused test.
2023-04-14 16:06:49 -05:00
Peter Oschwald bd05872b6b Merge pull request #967 from AntelopeIO/ph-block-producer-op-mode
[PH] block producer op mode
2023-04-14 15:57:23 -05:00
Peter Oschwald 2bf7a1ace2 Make docs easier to update by limiting additional formatting from help messages. 2023-04-14 15:28:17 -05:00
Peter Oschwald 40e776bf29 Finish removing config options no longer supported by producer plugin. 2023-04-14 15:00:43 -05:00
Peter Oschwald 866ed20f35 Merge branch 'main' into ph-block-producer-op-mode 2023-04-14 14:52:12 -05:00
Kevin Heifner 054ddf8648 GH-452 Add alignas(hardware_destructive_interference_size) to avoid cache synchronization. Also removed an unneeded atomic 2023-04-14 13:49:33 -05:00
Huang-Ming Huang 495e417d82 mitigate unix socket path problem 2023-04-14 12:46:56 -05:00
766C6164 fdeb7bee94 Cleanup 2023-04-14 11:41:35 -04:00
Gregory Popovitch daa25c95e7 Merge pull request #1038 from AntelopeIO/abi_serializer
Pass Resolver as `const &` instead of by value.
2023-04-14 10:48:43 -04:00
Kevin Heifner 686bd5680d GH-452 No reason to stop processing a block just because the client has closed the connection 2023-04-14 09:21:50 -05:00
greg7mdp 7e322b3c2b Fix typo 2023-04-14 10:16:38 -04:00
greg7mdp 9f365be4a9 Pass Resolver as const & instead of by value 2023-04-14 09:57:41 -04:00
Kevin Heifner fcbd3da22f GH-452 Encapsulate sync_mtx 2023-04-14 08:01:52 -05:00
Kevin Heifner 509c047323 Merge pull request #958 from AntelopeIO/GH-955-ship-test
Test: Add SHiP forking and have_positions unittest
2023-04-14 07:07:30 -05:00
Huang-Ming Huang 16c437514e update Python_SITELIB 2023-04-14 04:09:24 -05:00
Kevin Heifner 7924cfa099 GH-955 minor perf improvement 2023-04-13 20:56:12 -05:00
Vlad 54a5a0555c Merge branch 'main' into snapshot-scheduler-refactoring 2023-04-13 21:43:28 -04:00
Gregory Popovitch fe9128e60f Merge pull request #1036 from AntelopeIO/sync_abieos
update to latest commit of abieos submodule
2023-04-13 21:43:16 -04:00
Vlad d3dfcbf37b Merge branch 'main' into snapshot-scheduler-refactoring 2023-04-13 21:26:03 -04:00
766C6164 4bb4d65b74 Multiple fixes 2023-04-13 21:02:28 -04:00
Huang-Ming Huang bdc73d43d1 remove unused include 2023-04-13 19:15:40 -05:00
Kevin Heifner 8e29a56cda GH-955 Use unordered_map 2023-04-13 18:15:05 -05:00
766C6164 9c856538a7 Moved snapshot code out of producer plugin 2023-04-13 18:21:27 -04:00
Kevin Heifner c89ee3ea22 Merge pull request #994 from AntelopeIO/small-opt
Small but measurable improvement to executor queue
2023-04-13 16:49:55 -05:00
greg7mdp 35eadc1697 update to latest commit of abieos submodule 2023-04-13 17:26:34 -04:00
Kevin Heifner 2b5915b260 Merge pull request #1022 from AntelopeIO/GH-452-clang-tidy
P2P: clang-tidy fixes
2023-04-13 15:43:28 -05:00
Gregory Popovitch ceeed297af Merge pull request #1027 from AntelopeIO/clang_16_warnings
Fix compilation warnings with clang-16
2023-04-13 14:31:48 -04:00
greg7mdp ae136cf9eb Address PR comment 2023-04-13 13:03:18 -04:00
greg7mdp 39cefd6304 Fix compilation warnings with clang-16 (mostly warning: unqualified call to 'std::forward') 2023-04-13 12:24:07 -04:00
Gregory Popovitch 3b2f6654f8 Merge pull request #999 from AntelopeIO/gh-698-part2
Move abi serialization of transaction trace off main thread
2023-04-13 11:31:57 -04:00
greg7mdp e0edbcdc30 Revert "Keep track of whether the serializer cache contains a setabi action."
This reverts commit 8d830dcef0.
2023-04-13 08:05:58 -04:00
greg7mdp 8d830dcef0 Keep track of whether the serializer cache contains a setabi action. 2023-04-12 21:49:09 -04:00
greg7mdp 380373b6cd Address PR comments (mostly allow parameters to be moved by accepting values) 2023-04-12 21:11:21 -04:00
greg7mdp 6e47c7142a Add comment as suggested in PR review. 2023-04-12 16:58:44 -04:00
Kevin Heifner bd6551947f GH-452 Avoid unnecessary construction of boost::asio::buffer 2023-04-12 15:56:11 -05:00
greg7mdp 0c041509e6 Change abi_cache name as per PR review comment. 2023-04-12 16:54:58 -04:00
Huang-Ming Huang e3583307fd use python_SITELIB 2023-04-12 15:16:55 -05:00
greg7mdp 8fabe5d1b8 Commonize to a single send_transaction function. 2023-04-12 16:08:21 -04:00
Kevin Heifner 4cb969d991 GH-452 Clang-tidy fixes 2023-04-12 14:48:18 -05:00
Kevin Heifner be11e4f2f6 Merge pull request #1020 from AntelopeIO/GH-767-p2p-net-opt
P2P:  Inform peer if not accepting transactions
2023-04-12 13:49:04 -05:00
Kevin Heifner 3e1f05bac9 GH-767 Add log on sending blocks only because of p2p-accept-transactions=false 2023-04-12 12:34:35 -05:00
Kevin Heifner b1c9efa270 GH-767 If configured to not accept transactions, p2p-accept-transactions=false, then inform peer the node is blocks only 2023-04-12 11:17:56 -05:00
Kevin Heifner dec181b6fc Merge pull request #1019 from AntelopeIO/GH-1003-debug-log-spam-main
[4.0 -> main] Reduce producer_plugin debug level log spam
2023-04-12 10:27:55 -05:00
Kevin Heifner 0f3685a4fd Merge remote-tracking branch 'origin/release/4.0' into GH-1003-debug-log-spam-main 2023-04-12 09:57:45 -05:00
Kevin Heifner 23e94d542d Merge pull request #1017 from AntelopeIO/GH-1003-debug-log-spam-4.0
[3.2 -> 4.0] Reduce producer_plugin debug level log spam
2023-04-12 09:57:12 -05:00
Kevin Heifner d7ea2e0c94 Merge pull request #1015 from AntelopeIO/GH-678-http-debug-main
[4.0 -> main] Log all http request/response at debug log level
2023-04-12 09:56:48 -05:00
Huang-Ming Huang 6726ca6ed3 update build.yaml 2023-04-12 09:54:30 -05:00
greg7mdp 52f0a2a954 have send_transaction call send_transaction2 2023-04-12 10:51:24 -04:00
Huang-Ming Huang e54457bcb0 Merge pull request #867 from AntelopeIO/huangminghuang/block_start_time
Optimize block start time
2023-04-12 09:44:38 -05:00
Kevin Heifner 2412691694 Merge remote-tracking branch 'origin/release/3.2' into GH-1003-debug-log-spam-4.0 2023-04-12 09:21:48 -05:00
Kevin Heifner 051a893ca7 Merge pull request #1010 from AntelopeIO/GH-1003-debug-log-spam-3.2
[3.2] Reduce producer_plugin debug level log spam
2023-04-12 09:21:20 -05:00
Huang-Ming Huang 8bd05824ce update cmake 2023-04-12 08:32:26 -05:00
Kevin Heifner c43bf480f6 Merge remote-tracking branch 'origin/release/4.0' into GH-678-http-debug-main 2023-04-12 08:24:28 -05:00
Huang-Ming Huang 5c1ac2ca70 Merge branch 'main' into huangminghuang/block_start_time 2023-04-12 08:19:47 -05:00
Huang-Ming Huang 63a97a63ce Merge pull request #1013 from AntelopeIO/huangminghuang/http-host-main
[4.0->main] response to disallowed host
2023-04-12 08:10:40 -05:00
Kevin Heifner 20b73e2e20 Merge pull request #1009 from AntelopeIO/GH-678-http-debug-4.0
[3.2 -> 4.0] Log all http request/response at debug log level
2023-04-12 07:38:30 -05:00
Gregory Popovitch ff2251d6d9 Merge pull request #1004 from AntelopeIO/get_account_cleanup
cleanup duplicated code blocks in `get_account`
2023-04-11 20:09:23 -04:00
Huang-Ming Huang b61198cbf4 Merge pull request #1008 from AntelopeIO/huangminghuang/http-host-4.0
[3.2->4.0] response to disallowed host
2023-04-11 17:56:15 -05:00
Huang-Ming Huang b9375ba27a Merge branch 'release/4.0' into huangminghuang/http-host-main 2023-04-11 17:43:49 -05:00
greg7mdp 645704057d Merge branch 'main' of github.com:AntelopeIO/leap into gh-698-part2 2023-04-11 17:23:25 -04:00
greg7mdp 03c5d6be9e Merge branch 'main' of github.com:AntelopeIO/leap into get_account_cleanup 2023-04-11 17:21:44 -04:00
greg7mdp 7808e5e993 Address PR comments. 2023-04-11 17:20:14 -04:00
greg7mdp 9aa412b107 Whitespace cleanup 2023-04-11 17:15:40 -04:00
Huang-Ming Huang 69c4e00613 update appbase 2023-04-11 16:01:56 -05:00
Huang-Ming Huang c7873a8a17 update submodules 2023-04-11 14:51:47 -05:00
Huang-Ming Huang 12d7500a69 some format fix 2023-04-11 14:51:47 -05:00
Huang-Ming Huang 67b0fca821 update submodule 2023-04-11 14:51:47 -05:00
Huang-Ming Huang 6df0840474 fix compressed_file 2023-04-11 14:51:47 -05:00
Huang-Ming Huang 29598be699 remove test_filesystem 2023-04-11 14:51:47 -05:00
Huang-Ming Huang d15d16b0be replace boost::filesystem 2023-04-11 14:51:47 -05:00
Kevin Heifner afbcdf240b GH-1003 Reduce producer_plugin debug log spam 2023-04-11 14:45:44 -05:00
Huang-Ming Huang 13d484ca9e Merge pull request #991 from AntelopeIO/huangminghuang/wildcard_linkauth
cleos wildcard linkauth
2023-04-11 14:38:23 -05:00
Kevin Heifner 8c391275e3 Merge branch 'huangminghuang/http-host-4.0' into GH-678-http-debug-4.0 2023-04-11 14:34:11 -05:00
Huang-Ming Huang 604567018f fix test 2023-04-11 13:51:00 -05:00
Kevin Heifner c8b917a884 Merge branch 'huangminghuang/http-host-4.0' into GH-678-http-debug-4.0 2023-04-11 13:38:54 -05:00
Kevin Heifner 29a69b6041 Merge remote-tracking branch 'origin/release/3.2' into GH-678-http-debug-4.0 2023-04-11 13:36:15 -05:00
Kevin Heifner 480374b245 Merge pull request #1000 from AntelopeIO/GH-678-http-debug-3.2
[3.2] Log all http request/response at debug log level
2023-04-11 13:29:36 -05:00
greg7mdp 52e25cdfe3 Avoid unnecessary copies, restore mutable on lambdas capturing the abi cache 2023-04-11 13:46:15 -04:00
Huang-Ming Huang 1c4ae672fa Merge branch 'release/3.2' into huangminghuang/http-host-4.0 2023-04-11 12:04:19 -05:00
Huang-Ming Huang a3f52dbf8e Merge pull request #1006 from AntelopeIO/huangminghuang/prometheus-fix-main
[4.0->main] prometheus fix main
2023-04-11 11:53:43 -05:00
Huang-Ming Huang c716ac5480 Merge pull request #996 from AntelopeIO/huangminghuang/http-host-3.2
[3.2] response to disallowed host
2023-04-11 11:52:08 -05:00
greg7mdp 841a59eb32 remove unnecesary mutable qualifiers. 2023-04-11 12:31:55 -04:00
greg7mdp eb49677485 2nd batch of changes from PR review comments 2023-04-11 12:21:17 -04:00
Huang-Ming Huang f8ce734569 Merge branch 'main' into huangminghuang/prometheus-fix-main 2023-04-11 10:48:32 -05:00
greg7mdp ac8c37c6d5 First batch of changes from PR review comments 2023-04-11 11:45:54 -04:00
Lin Huang 1a8d88f6a6 Merge pull request #1001 from AntelopeIO/merge_4_0_rc3_version_bump_to_main
[4.0 -> main] Merge release 4.0 rc3 version bump to main
2023-04-11 11:32:26 -04:00
Huang-Ming Huang bc101f5785 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/prometheus-fix-main 2023-04-11 10:28:22 -05:00
Huang-Ming Huang 8dbb9f1bcc Merge pull request #1005 from AntelopeIO/huangminghuang/prometheus-fix
[4.0] fix resource not found bug
2023-04-11 10:22:24 -05:00
Huang-Ming Huang df88471be4 add test 2023-04-11 09:52:33 -05:00
Huang-Ming Huang 208c9160c9 fix resource not found buf 2023-04-11 09:13:46 -05:00
greg7mdp 36d4dd7feb cleanup duplicated code blocks in get_account 2023-04-11 10:02:21 -04:00
Huang-Ming Huang 7efec6a669 add test 2023-04-10 23:47:56 -05:00
Lin Huang dd2b3920c3 restore version after merging 4.0.0 rc3 version bump 2023-04-10 21:39:15 -04:00
Kevin Heifner d4bd548d61 GH-678 Log all http request/response when debug log enabled 2023-04-10 17:21:22 -05:00
Zach Butler 3f76a2e51b Merge branch 'release/4.0' into zach-install-deps
Resolve README.md conflict that GitHub thinks is a conflict but really
wasn't...
2023-04-10 17:39:43 -04:00
greg7mdp 01a0dc5c0c Merge branch 'main' of github.com:AntelopeIO/leap into gh-698-part2 2023-04-10 16:44:03 -04:00
greg7mdp 28b03d2145 Make a few lambdas mutable to avoid copying abi_serializers 2023-04-10 16:29:57 -04:00
Lin Huang 28ffcc841b Merge pull request #998 from AntelopeIO/bump_to_4_0_rc_3
[4.0] Bump Leap version to release 4.0 rc3
2023-04-10 16:24:44 -04:00
Lin Huang 282eee5765 Merge pull request #997 from AntelopeIO/merge_eosvmoc_retry_to_main
[4.0 -> main] Fix ROtrx dispatched to baseline runtime when compiled code not ready
2023-04-10 16:10:57 -04:00
Lin Huang 4966b62311 [4.0] Bump Leap to release 4.0 rc3 2023-04-10 15:55:03 -04:00
greg7mdp 9fd4dfff71 Update get_block() API to use new architecture. 2023-04-10 15:50:19 -04:00
Lin Huang 0d888b84e6 Merge remote-tracking branch 'origin/release/4.0' into merge_eosvmoc_retry_to_main 2023-04-10 15:41:01 -04:00
Matt Witherspoon aad4d4aa39 Merge pull request #995 from AntelopeIO/more_direct_eosio_exit
[4.0 -> main] make eosio_exit impl more direct
2023-04-10 15:34:06 -04:00
Kevin Heifner f08592d2c7 Merge pull request #992 from AntelopeIO/GH-980-restore-read-mode-speculative-main
[4.0 -> main] Restore read-mode=speculative
2023-04-10 14:32:40 -05:00
Peter Oschwald 0dc3a16e31 Add boost beast example http client async vs. 1.7 2023-04-10 13:33:05 -05:00
Lin Huang b9b4b8a035 Merge pull request #984 from AntelopeIO/eosvmoc_retry_4_0
[4.0] Fix ROtrx dispatched to baseline runtime when compiled code not ready
2023-04-10 13:56:51 -04:00
Huang-Ming Huang 0740055506 response to disallowed host 2023-04-10 12:09:32 -05:00
greg7mdp c2aab35c60 correct abi caching, avoid unnecessary serializer copies 2023-04-10 12:04:22 -04:00
Matt Witherspoon 7843090356 Merge pull request #993 from AntelopeIO/more_direct_eosio_exit_40
[4.0] make `eosio_exit` impl more direct
2023-04-10 11:37:34 -04:00
Peter Oschwald 29dd998fae Merge pull request #990 from AntelopeIO/update-leap-boost-version
Update boost version.
2023-04-10 10:06:10 -05:00
Kevin Heifner 708a8eec80 Small but measurable improvement to executor queue. 2023-04-10 09:43:07 -05:00
Peter Oschwald c5a956d05b With increasing min boost version to 1.70, can remove optional behavior for older versions. 2023-04-10 09:34:18 -05:00
Peter Oschwald 5ca44254f6 With increasing min boost version to 1.70, can remove optional behavior for older versions. 2023-04-10 09:18:36 -05:00
Matt Witherspoon 24e34bf8bb Merge remote-tracking branch 'origin/release/4.0' into more_direct_eosio_exit 2023-04-10 04:39:06 -04:00
Kevin Heifner 8ee0f9844b Merge remote-tracking branch 'origin/release/4.0' into GH-980-restore-read-mode-speculative-main 2023-04-08 08:10:29 -05:00
Kevin Heifner de1c1c2c0d Merge pull request #986 from AntelopeIO/GH-980-restore-read-mode-speculative-4.0
[4.0] Restore read-mode=speculative
2023-04-08 08:10:00 -05:00
Lin Huang 32ee290773 Merge branch 'release/4.0' into eosvmoc_retry_4_0 2023-04-08 08:26:05 -04:00
Huang-Ming Huang 8ea26048c4 fix test 2023-04-07 14:50:11 -05:00
Huang-Ming Huang abfbe13624 add type wildcard 2023-04-07 14:07:21 -05:00
Peter Oschwald 455b40b073 Update boost version. 2023-04-07 13:48:51 -05:00
Lin Huang c701194f48 Add missing transient_trx_failed_trace_log for speculative execution 2023-04-07 14:33:46 -04:00
Lin Huang aa892ef784 fix comments and move get_cd_failure into code_cache_base 2023-04-07 12:41:42 -04:00
Lin Huang 706bbb90ec simplify ro_trx_vm_oc_compile_temporary_failure handling 2023-04-07 12:40:47 -04:00
Lin Huang 4f35d9990f Fix the problem of ro_trx_vm_oc_compile exceptions caught prematurally 2023-04-07 12:39:55 -04:00
Lin Huang e58d26fb83 Replace ro_trx_temporary ro_trx_vm_oc_compile_temporary_failure, ro_trx_permanent with ro_trx_vm_oc_compile_permanent_failure, and add better description 2023-04-07 12:36:44 -04:00
Huang-Ming Huang dfe829e7dc Merge pull request #989 from AntelopeIO/huangminghuang/prometheus-port-main
[4.0->main] prometheus on different port
2023-04-07 11:12:53 -05:00
Huang-Ming Huang 7b3c2df592 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/prometheus-port-main 2023-04-07 10:35:02 -05:00
Huang-Ming Huang 2b60a3919c Merge pull request #939 from AntelopeIO/huangminghuang/prometheus-port
[4.0] prometheus on different port
2023-04-07 10:31:51 -05:00
Kevin Heifner d8168632e5 GH-980 List speculative mode last since it is deprecated 2023-04-07 09:49:00 -05:00
Huang-Ming Huang 1b68dd7f83 address PR comments 2023-04-07 09:30:36 -05:00
Gregory Popovitch f31e5277cd Merge pull request #973 from AntelopeIO/gh-698
Unify definitions of `next_function` and its variant parameter
2023-04-07 09:09:03 -04:00
Kevin Heifner 0895779064 GH-980 Add a version of the distributed transaction test running in read-mode=speculative 2023-04-07 07:58:01 -05:00
greg7mdp e6166495b7 Merge branch 'gh-698' of github.com:AntelopeIO/leap into gh-698-part2 2023-04-07 08:34:35 -04:00
greg7mdp 8f90505d3e remove unnecessary header addition 2023-04-07 08:31:54 -04:00
greg7mdp 66c1731f3f Move serialization off main thread for compute_transaction 2023-04-07 08:27:50 -04:00
Matt Witherspoon 3a3d36ab08 make eosio_exit more direct 2023-04-06 22:03:24 -04:00
Vlad 21ede922f7 Merge pull request #985 from AntelopeIO/multiple-snapshot-fixes-main
[4.0 -> main] Several improvements and fixes for snapshot scheduling
2023-04-06 15:11:32 -04:00
greg7mdp 0b3cc3ddd7 Merge branch 'gh-698' of github.com:AntelopeIO/leap into gh-698-part2 2023-04-06 14:22:40 -04:00
greg7mdp 43f64b36a9 Merge branch 'main' of github.com:AntelopeIO/leap into gh-698 2023-04-06 14:10:14 -04:00
Vlad 49637bebb9 Merge branch 'main' into multiple-snapshot-fixes-main 2023-04-06 14:08:26 -04:00
greg7mdp 71824ff287 Merge branch 'gh-698' of github.com:AntelopeIO/leap into gh-698 2023-04-06 14:08:16 -04:00
Areg Hayrapetian b71ea9ad10 Merge pull request #987 from AntelopeIO/huangminghuang/cmake-fix-main
[4.0->main] fix cpack error message
2023-04-06 11:07:55 -07:00
greg7mdp 51d2b5bab7 Move abi serialization of transaction trace off main thread for send_transaction. 2023-04-06 13:47:52 -04:00
Vlad 2e8f098d7e Merge branch 'main' into multiple-snapshot-fixes-main 2023-04-06 12:01:08 -04:00
Huang-Ming Huang acdd583aaf Merge branch 'main' into huangminghuang/cmake-fix-main 2023-04-06 10:35:06 -05:00
Kevin Heifner 425f6e6105 Merge pull request #983 from AntelopeIO/GH-978-read-only-limit-main
[4.0 -> main] Set an upper limit on read-only-threads of 8
2023-04-06 10:29:31 -05:00
Kevin Heifner d5f8575eda GH-980 Restore read-mode=speculative 2023-04-06 10:09:56 -05:00
766C6164 17fb494060 Merge branch 'release/4.0' into multiple-snapshot-fixes-main 2023-04-06 10:47:33 -04:00
Vlad ae0018b525 Merge pull request #968 from AntelopeIO/make-pending-snapshots-nonopt
[4.0] Several improvements and fixes for snapshot scheduling
2023-04-06 10:43:43 -04:00
Huang-Ming Huang cbef1eca19 Merge branch 'release/4.0' into huangminghuang/cmake-fix-main 2023-04-06 09:25:12 -05:00
Huang-Ming Huang 07b99d386a Merge pull request #972 from AntelopeIO/huangminghuang/cmake-fix
[4.0] fix cpack error message
2023-04-06 09:22:19 -05:00
Peter Oschwald 3459a104ee Merge branch 'main' into ph-block-producer-op-mode 2023-04-06 08:02:16 -05:00
Kevin Heifner 0f316a45b5 Merge remote-tracking branch 'origin/release/4.0' into GH-978-read-only-limit-main 2023-04-06 06:34:37 -05:00
Kevin Heifner 7dac5948b1 Merge pull request #982 from AntelopeIO/GH-978-read-only-limit-4.0
[4.0] Set an upper limit on read-only-threads of 8
2023-04-06 06:34:00 -05:00
Lin Huang 4be7471c56 push_read_only_transaction handles temporary and permanent failure exceptions 2023-04-06 07:23:57 -04:00
Lin Huang 1b3e49b96c get_descriptor_for_code returns failure reason and wasm_interface::apply raises appropriate exceptions 2023-04-06 07:22:06 -04:00
Lin Huang d9cf9336ce add new exceptions for read-only trxs 2023-04-06 07:15:35 -04:00
Matt Witherspoon 54e897094e Merge pull request #927 from AntelopeIO/no_wavm_cxx11
remove WAVM specific c++11 flag
2023-04-05 19:17:17 -07:00
greg7mdp 74575d3404 Fix a couple typos. 2023-04-05 22:13:46 -04:00
greg7mdp 1d039b6749 Update whitespace as per PR comments. 2023-04-05 22:06:56 -04:00
greg7mdp 01b992ce05 Address some PR comments (define types in types.hpp and add comments) 2023-04-05 22:03:26 -04:00
Kevin Heifner 538437b7ad GH-978 Max of 8 read-only threads is allowed 2023-04-05 20:54:08 -05:00
Kevin Heifner 610bd6fba4 GH-978 Set an upper limit on read-only-threads of 8. 2023-04-05 20:10:59 -05:00
Matt Witherspoon 9ee7277ab8 Merge pull request #923 from AntelopeIO/more_wavm_removal
remove more unused WAVM code
2023-04-05 17:48:35 -07:00
Lin Huang ff31742b14 Merge pull request #979 from AntelopeIO/merge_missing_methods
[4.0 -> main] Added missing calls to wasmifs on read-only threads
2023-04-05 19:56:22 -04:00
Lin Huang 18736d61ac Merge remote-tracking branch 'origin/release/4.0' into merge_missing_methods 2023-04-05 19:06:38 -04:00
Lin Huang bc349683e9 Merge pull request #964 from AntelopeIO/wasmif_methods_4_0
[4.0] Added missing calls to wasmifs on read-only threads
2023-04-05 18:37:38 -04:00
766C6164 b2c81cdb4c Multiple updates 2023-04-05 17:42:51 -04:00
Lin Huang 8bce249ff0 Merge pull request #977 from AntelopeIO/merge_remove_check_limits_to_main
[4.0 -> main] Remove global WASM::check_limits and initial memory from instantiate_module
2023-04-05 17:20:56 -04:00
Lin Huang 599f08b649 Merge remote-tracking branch 'origin/release/4.0' into merge_remove_check_limits_to_main 2023-04-05 16:41:05 -04:00
Peter Oschwald b91b4c75c8 Merge branch 'main' into ph-block-producer-op-mode 2023-04-05 15:34:42 -05:00
Vlad 78e15feeaa Merge pull request #976 from AntelopeIO/test-snapshot-scheduler-stability-main
[4.0 -> main] test_snapshot_scheduler stability improvements
2023-04-05 16:30:39 -04:00
Lin Huang 64d06887a5 Merge pull request #975 from AntelopeIO/remove_check_limits_4_0
[4.0] Remove global WASM::check_limits and initial memory from instantiate_module
2023-04-05 16:03:11 -04:00
Peter Oschwald d115fa6e30 Merge branch 'main' into ph-block-producer-op-mode 2023-04-05 15:02:00 -05:00
Peter Oschwald 2bc918fc4d Deconflict shorthand arguments for help.
Cleanup commented out code.
2023-04-05 15:01:31 -05:00
766C6164 3cc4aa2344 Test stability improvements 2023-04-05 15:39:35 -04:00
766C6164 6ddfa97ebc Merge branch 'release/4.0' into test-snapshot-scheduler-stability-main 2023-04-05 15:35:18 -04:00
Peter Oschwald 32a7503e01 Update README for changes to arguments.
Update argument lists to use the direct output from --help to ease updating in future as no additional formatting is necessary.

Remove section on lauch_transaction_generators.py since that script was incorporated into the TestHarness module and is no longer command line executable.

Add infomration on newly broken out sub-commands and the arguments pertaining to those modes or config commands.
2023-04-05 14:16:12 -05:00
Lin Huang 9ddf0f7acf remove unused IR::Module module 2023-04-05 15:12:45 -04:00
Lin Huang 2cb34fea5c remove unneccessary bytes copying 2023-04-05 14:48:58 -04:00
Lin Huang b59c1ad5e7 Remove serialization completely from get_instantiated_module 2023-04-05 14:34:24 -04:00
Matt Witherspoon 160b42759d Merge pull request #961 from AntelopeIO/revert_ctest_test-dir
revert `ctest --test-dir` usage that is cmake 3.20+
2023-04-05 11:22:31 -07:00
Lin Huang 6e8bd9ad27 remove parse_initial_memory 2023-04-05 13:51:26 -04:00
Lin Huang 7e49aa03fc remove WASM::check_limits and initial memory from instantiate_module 2023-04-05 13:41:37 -04:00
Kevin Heifner ee7f5a8034 Merge branch 'release/4.0' into huangminghuang/cmake-fix 2023-04-05 12:28:00 -05:00
Peter Oschwald 80e05c8327 Updating README dir structure and test report outputs. 2023-04-05 12:24:50 -05:00
greg7mdp 3f9f704587 Missed another needed change 2023-04-05 13:14:46 -04:00
greg7mdp a2d676e517 Missed needed change in macros.hpp 2023-04-05 13:04:32 -04:00
greg7mdp be8217f31a unify definitions of next_function and its parameter
So that it is defined in a single location (DRY) and can be easily updated.
2023-04-05 11:35:31 -04:00
Huang-Ming Huang 16354ee6e5 Merge branch 'release/4.0' into huangminghuang/prometheus-port 2023-04-05 08:53:14 -05:00
Huang-Ming Huang 69a741c5ba fix make package 2023-04-04 21:01:10 -05:00
Lin Huang 9a10c803b3 Merge branch 'release/4.0' into wasmif_methods_4_0 2023-04-04 21:02:22 -04:00
766C6164 26e2f658e4 Make pending_snapshot non-optional 2023-04-04 18:32:19 -04:00
Peter Oschwald 088d5c7a30 Merge branch 'main' into ph-block-producer-op-mode 2023-04-04 17:18:00 -05:00
Peter Oschwald d7eb6d7f9f Merge pull request #945 from AntelopeIO/performance_harness_reduce_log_usage
[PH] Reduce log Usage and Other Performance Harness Improvements
2023-04-04 17:16:59 -05:00
Peter Oschwald 16b9d324b7 Add initial note on configuration of the bp operational mode. 2023-04-04 17:06:57 -05:00
Peter Oschwald 8d87497b00 Begin to layout framework for operational modes in performance_test.py.
Initial support for Block Producer Operational Mode provided through sub-command testBpOpMode
Update performance_test integration tests to use the new sub-commands.
2023-04-04 17:05:58 -05:00
Lin Huang 6a97c7bb16 revert the change for get_wasm_interface().exit() 2023-04-04 17:56:09 -04:00
Vlad 7218f25f50 Merge pull request #931 from AntelopeIO/test-snapshot-scheduler-stability
[4.0] Improved test_snapshot_scheduler stability
2023-04-04 17:52:29 -04:00
Peter Oschwald cd87f42a9b Fix logic in isOnBlockTransaction as it was inverted. 2023-04-04 16:44:53 -05:00
766C6164 dee4a153c4 Stop if pending_snapshots do not exist 2023-04-04 17:31:29 -04:00
Peter Oschwald 31273296fe Address peer review comments. 2023-04-04 16:18:39 -05:00
766C6164 a93faeb280 Tightened up test a bit 2023-04-04 15:35:04 -04:00
Lin Huang 1f46ff65ea remove first_block_num_used from wasm_instantiation_cache 2023-04-04 14:42:07 -04:00
Lin Huang 9b38815c56 make sure app wasm interface methods are called on wasmifs on all the read-only threads 2023-04-04 14:38:15 -04:00
Lin Huang 647dd99e44 wait until all read-only threads are started before proceeding in producer_plugin startup 2023-04-04 13:35:15 -04:00
Lin Huang 5b1c8dd644 Replace thread_local with unordered_map for wasmif 2023-04-04 13:25:13 -04:00
Lin Huang 553b834042 Merge pull request #962 from AntelopeIO/merge_oc_main_thread_fix
[4.0 -> main] Use is_write_window in eos-vm-oc main to determine if it is safe to update code cache
2023-04-04 11:09:09 -04:00
Huang-Ming Huang 7b2da964e5 fix calculate_pending_block_time 2023-04-04 09:45:21 -05:00
Huang-Ming Huang 8575d62354 Merge branch 'main' into huangminghuang/block_start_time
# Conflicts:
#	plugins/producer_plugin/producer_plugin.cpp
2023-04-04 09:24:54 -05:00
Huang-Ming Huang bf289ae1bc fix for boost 1.74+ 2023-04-04 08:12:36 -05:00
Lin Huang b31889d0e0 Merge remote-tracking branch 'origin/release/4.0' into merge_oc_main_thread_fix 2023-04-04 08:34:11 -04:00
Lin Huang 299d11f8a8 Merge pull request #960 from AntelopeIO/oc_main_thread_fix
[4.0] Use is_write_window in eos-vm-oc main to determine if it is safe to update code cache
2023-04-04 08:31:57 -04:00
Lin Huang 6f7a948488 Merge pull request #959 from AntelopeIO/merge_3_2_3_version_bump_from_4_0_to_main
[4.0 -> main] Merge 3.2.3 version bump from 4.0 to main
2023-04-04 08:23:21 -04:00
Lin Huang 56c6ad3b7f replace app().executor().is_write_window() with cleaner chain.is_write_window() 2023-04-03 22:16:36 -04:00
Kevin Heifner 50a4728478 Merge pull request #912 from AntelopeIO/GH-591-get-account-http
Return 400 http error for unknown account
2023-04-03 20:21:10 -05:00
Lin Huang 107670145a initialize app_window 2023-04-03 21:11:27 -04:00
Matt Witherspoon 92ee0041ba revert ctest --test-dir usage that is cmake 3.20+ 2023-04-03 20:53:33 -04:00
Lin Huang 49892f5ebb Merge remote-tracking branch 'origin/release/4.0' into merge_3_2_3_version_bump_from_4_0_to_main 2023-04-03 19:34:23 -04:00
Lin Huang 7586219c04 Change to use is_write_window to determine whether it is safe to update eos-vm-oc code cache 2023-04-03 19:22:49 -04:00
Lin Huang 4917ebcf36 Merge pull request #957 from AntelopeIO/merge_3_2_3_version_bump_to_4_0
[3.2 -> 4.0] Merge 3.2.3 version bump to 4.0
2023-04-03 19:20:31 -04:00
Lin Huang 66c23b9de6 Add execution window APIs to controller so chain can access current execution window 2023-04-03 19:19:45 -04:00
Kevin Heifner db54a5c66f Merge branch 'main' into GH-591-get-account-http 2023-04-03 16:01:59 -05:00
Kevin Heifner dd3b23005d Add SHiP forking and have_positions unittest. 2023-04-03 15:43:52 -05:00
Kevin Heifner d278917fcf Merge pull request #955 from AntelopeIO/ship-fork-main
[4.0 -> main] SHiP Fix forking behavior
2023-04-03 15:21:48 -05:00
Lin Huang 4b59a6bd32 restore version to 4.0 after merging 3.2.3 version bump 2023-04-03 16:17:04 -04:00
Huang-Ming Huang d10df32600 avoid std::bind 2023-04-03 15:09:31 -05:00
Kevin Heifner d51a94253a Merge remote-tracking branch 'origin/release/4.0' into ship-fork-main 2023-04-03 14:52:58 -05:00
Kevin Heifner a1e56a3ba9 Merge pull request #952 from AntelopeIO/ship-fork-4.0
[3.2 -> 4.0] SHiP Fix forking behavior
2023-04-03 14:52:43 -05:00
Huang-Ming Huang bd9511dd0e Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/prometheus-port 2023-04-03 14:39:35 -05:00
Huang-Ming Huang 0355c52126 based on boost 1.67 example 2023-04-03 14:30:11 -05:00
Lin Huang d382d71c7e Merge pull request #954 from AntelopeIO/merge_time_summary_fix_to_main
[4.0 -> main] Merge time summary fix to main
2023-04-03 14:23:45 -04:00
Lin Huang 43873e8221 Merge pull request #953 from AntelopeIO/bump_to_3_2_3
[3.2] Bump Leap version to 3.2.3
2023-04-03 13:52:59 -04:00
greg7mdp 3abe789f76 Add generic make_api_entry function which splits processing
between main thread and http thread pool
2023-04-03 13:50:29 -04:00
Kevin Heifner d40be19b02 CORE_SYMBOL is now in TestHarness 2023-04-03 12:40:09 -05:00
Lin Huang 34288c5bba Merge remote-tracking branch 'origin/release/4.0' into merge_time_summary_fix_to_main 2023-04-03 13:33:54 -04:00
Lin Huang f696190c0e Merge pull request #947 from AntelopeIO/time_summary_fix_4_0
[4.0] Correct time summary calculation for transient trxs due to change of read-only trxs windows
2023-04-03 13:28:24 -04:00
Lin Huang adaec7704c Bump Leap version to 3.2.3 2023-04-03 13:23:52 -04:00
Kevin Heifner cb909a8f1a Merge remote-tracking branch 'origin/release/3.2' into ship-fork-4.0 2023-04-03 11:47:47 -05:00
Peter Oschwald 1164893367 Remove log_reader_tests.py and associated test log files.
With rework to no longer rely on parsing a majority of the block and transaction data out of the nodeos log in favor of querying it directly from an active node, the log_reader_tests have lost their usefulness.  Can remove nodeos logs as well which were supporting the testing.
2023-04-03 11:27:54 -05:00
Kevin Heifner 1fa531daf8 Merge pull request #943 from AntelopeIO/ship-fork-3.2
[3.2] SHiP Fix forking behavior
2023-04-03 11:25:51 -05:00
Kevin Heifner fa2b7fece2 Use f-strings 2023-04-03 10:29:25 -05:00
Lin Huang e09d9570cb remove duplicated _ro_in_read_only_mode 2023-04-03 11:03:38 -04:00
Peter Oschwald 621ece03ad Merge branch 'main' into performance_harness_reduce_log_usage 2023-04-03 09:48:42 -05:00
Huang-Ming Huang 1b9c6525da address PR comments 2023-04-03 09:39:43 -05:00
Kevin Heifner bb7fc8d145 Fix spelling 2023-04-03 09:31:33 -05:00
Kevin Heifner c3814b9e59 Use 10 clients for test. Minor cleanups to ship_streamer_test.py 2023-04-03 06:58:58 -05:00
Lin Huang 61f3e7e818 Add missing idle time adjustment while executing read-only trxs and correct a format error 2023-04-02 16:48:20 -04:00
Lin Huang c6d5b13f12 remove unneeded is_on_main_thread from controller.hpp 2023-04-02 13:49:41 -04:00
Lin Huang a87705b4ff Correct transient trx time summary due to read-only trxs can run in both read and write window 2023-04-02 13:30:22 -04:00
Lin Huang 4099678077 Merge pull request #946 from AntelopeIO/merge_read_only_trx_improve_to_main
[4.0 -> main] Small improvements for parallelizing read-only transactions and tasks
2023-04-02 08:00:15 -04:00
Lin Huang 15e73d9bf7 Merge remote-tracking branch 'origin/release/4.0' into merge_read_only_trx_improve_to_main 2023-04-01 20:30:05 -04:00
Kevin Heifner 6f1e67b2b5 Merge pull request #944 from AntelopeIO/GH-596-fork-db-main
[4.0 -> main] forkdb reset in replay since blocks are signaled
2023-04-01 18:03:38 -05:00
Matt Witherspoon 2ec88efcca Merge pull request #920 from AntelopeIO/cmake_3.16_bump
bump minimum cmake requirement to 3.16
2023-04-01 10:52:40 -07:00
Lin Huang ab8202ffbf Merge pull request #933 from AntelopeIO/readonly_improve
[4.0] Small improvements for parallelizing read-only transactions and tasks
2023-03-31 21:50:19 -04:00
Lin Huang 0b3a0a7b8d Merge branch 'release/4.0' into readonly_improve 2023-03-31 21:22:21 -04:00
Kevin Heifner 618c805c7e Merge remote-tracking branch 'origin/release/4.0' into GH-596-fork-db-main 2023-03-31 17:27:50 -05:00
Kevin Heifner 60ebeddf41 Merge pull request #938 from AntelopeIO/GH-596-fork-db-4.0
[3.2 -> 4.0] forkdb reset in replay since blocks are signaled
2023-03-31 17:27:28 -05:00
ClaytonCalabrese 7f5a789406 Merge pull request #942 from AntelopeIO/cleanup_after_logs_release_4_0_to_main
[4.0 -> main] Clean tmp and TestLogs after test runs
2023-03-31 17:26:27 -05:00
Clayton Calabrese a78965bc9d remove accidental newline 2023-03-31 17:03:08 -05:00
Clayton Calabrese 6486facd38 rename chainData::nodes to chainData::numNodes to clarify what it means 2023-03-31 17:00:04 -05:00
Lin Huang 89e3a461c8 fine tuning error message 2023-03-31 17:55:04 -04:00
Lin Huang 1d57375ced Merge branch 'release/4.0' into readonly_improve 2023-03-31 17:51:43 -04:00
Clayton Calabrese 466093fad9 remove pointless return 2023-03-31 16:32:03 -05:00
Clayton Calabrese b1dfcb99f8 rename blockLog in chainData to blockList to better represent what the member actually is 2023-03-31 16:27:22 -05:00
Clayton Calabrese 72c36e0876 put blockDict and trxDict into chainData class 2023-03-31 16:25:05 -05:00
Clayton Calabrese 1fd2e67898 check forked and dropped blocks for each node in a performance test run. Change where updateTotal happens to not double count if blocks fork. 2023-03-31 15:55:57 -05:00
Matt Witherspoon b38adb5171 Merge pull request #941 from AntelopeIO/remove_more_unused_libfc_netstuff
remove more unused libfc network code
2023-03-31 13:02:18 -07:00
Kevin Heifner 6fb28e5f7d ship_streamer_test now the longest running nonparallelizable_tests, so make it long_running_test 2023-03-31 14:59:35 -05:00
Kevin Heifner fa8d025ca8 Make sure SHiP sends new blocks on forks 2023-03-31 14:44:12 -05:00
Lin Huang bcade58c1c Merge branch 'readonly_improve' of https://github.com/AntelopeIO/leap into readonly_improve 2023-03-31 15:39:44 -04:00
Lin Huang a617c5557b better error message 2023-03-31 15:39:11 -04:00
ClaytonCalabrese f3993e1790 Merge pull request #915 from AntelopeIO/clean_log_littering
[4.0] Clean tmp and TestLogs after test runs
2023-03-31 14:13:15 -05:00
Kevin Heifner 12924afa0a Add test for forking in SHiP 2023-03-31 14:10:05 -05:00
Huang-Ming Huang 0e0fdcccd7 Merge pull request #940 from AntelopeIO/huangminghuang/gelf-fix-main
[4.0->main] fix gelf DNS resolves to ipv6 address
2023-03-31 12:27:44 -05:00
Matt Witherspoon 6548567ad7 remove more unused libfc network code 2023-03-31 13:23:40 -04:00
Huang-Ming Huang 3a5c6bca80 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/prometheus-port 2023-03-31 12:21:24 -05:00
Huang-Ming Huang 4d26ccb983 Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/gelf-fix-main 2023-03-31 11:58:41 -05:00
Kevin Heifner 5d91a7604a Merge pull request #937 from AntelopeIO/GH-596-ship-flush-main
[4.0 -> main] SHiP flush logs on write
2023-03-31 11:49:16 -05:00
Huang-Ming Huang a29c4f8b51 Merge pull request #917 from AntelopeIO/huangminghuang/gelf-fix
[4.0] fix gelf DNS resolves to ipv6 address
2023-03-31 11:30:02 -05:00
Lin Huang 96541108c3 Merge branch 'release/4.0' into readonly_improve 2023-03-31 12:26:05 -04:00
Kevin Heifner f3fcfe952a Merge remote-tracking branch 'origin/release/3.2' into GH-596-fork-db-4.0 2023-03-31 11:18:49 -05:00
Kevin Heifner d9a4772977 Merge pull request #936 from AntelopeIO/GH-596-fork-db-3.2
[3.2] forkdb reset in replay since blocks are signaled
2023-03-31 11:17:38 -05:00
Kevin Heifner 752da16214 Merge remote-tracking branch 'origin/release/4.0' into GH-596-ship-flush-main 2023-03-31 11:16:00 -05:00
Kevin Heifner fc8cd5b6ea Merge pull request #935 from AntelopeIO/GH-596-ship-flush-4
[3.2 -> 4.0] SHiP flush logs on write
2023-03-31 11:15:27 -05:00
Huang-Ming Huang 59a8809f98 prometheus on different port 2023-03-31 11:02:11 -05:00
Huang-Ming Huang b7b374200b remove commented line 2023-03-31 10:49:31 -05:00
Lin Huang d27d4cca72 incorporate review comments 2023-03-31 11:19:45 -04:00
Kevin Heifner 51c4bea20a GH-596 forkdb reset in replay since blocks are signaled 2023-03-31 09:20:27 -05:00
Kevin Heifner 46b223174c Merge remote-tracking branch 'origin/release/3.2' into GH-596-ship-flush-4 2023-03-31 09:08:57 -05:00
Peter Oschwald 5872a08793 Begin documenting operational modes.
First operational mode for the performance harness with be Block Producer mode.
2023-03-31 08:23:00 -05:00
Kevin Heifner 1043b9c054 GH-591 Fix spelling 2023-03-31 07:25:34 -05:00
Kevin Heifner 4359bc06f7 Merge pull request #928 from AntelopeIO/GH-596-ship-flush-3.2
[3.2] SHiP flush logs on write
2023-03-31 06:38:04 -05:00
Lin Huang 1e0aaf9c19 update eos-vm-oc threads limit calculation based on the design 2023-03-30 21:37:44 -04:00
Lin Huang 06595488c4 assert chain.is_building_block 2023-03-30 21:03:51 -04:00
Lin Huang d86a6bbed0 Add more descriptions about read and write timer default values 2023-03-30 20:39:03 -04:00
Lin Huang 89d334cb20 use boost deque which is faster than std:deque 2023-03-30 20:32:11 -04:00
766C6164 7642088732 Improved test stability 2023-03-30 17:40:40 -04:00
766C6164 b837affa1d Moved state_dir option to chain-state subcommand 2023-03-30 15:08:18 -04:00
766C6164 bba172f769 Dropped short argument form 2023-03-30 14:22:25 -04:00
Kevin Heifner 2384df3312 Merge pull request #929 from AntelopeIO/read-safe-multi-thread-main
[4.0 -> main] Execute read only safe tasks on read-only thread pool
2023-03-30 13:21:08 -05:00
Kevin Heifner 9f54fc4026 Merge remote-tracking branch 'origin/release/4.0' into read-safe-multi-thread-main 2023-03-30 11:52:22 -05:00
Kevin Heifner e871f05cfe Merge pull request #901 from AntelopeIO/read-safe-multi-thread-4.0
[4.0] Execute read only safe tasks on read-only thread pool
2023-03-30 11:51:28 -05:00
Matt Witherspoon 5bfb498b45 Merge pull request #924 from AntelopeIO/remove_curl
curl is no longer a required dependency; remove from docs & CI environment
2023-03-30 09:46:37 -07:00
Kevin Heifner 8aab319a2d Resize vector to ensure it is empty 2023-03-30 09:55:56 -05:00
Kevin Heifner bf5746f6cf Remove unneeded call to cancel. 2023-03-30 08:57:59 -05:00
Kevin Heifner efd642b151 GH-596 flush log and index files to make it more likely that a kill-9 or crash leaves valid ship logs. 2023-03-30 07:27:09 -05:00
Matt Witherspoon 735fc8f732 missed cmake version bump in readme's prose section 2023-03-29 23:08:45 -04:00
Kevin Heifner 4465a8bd99 Cleanup window deadline calculation for read-only trxs.
Since repost_exhausted_transactions is called in start_block, check should_interrupt_start_block in while loop.
2023-03-29 21:50:00 -05:00
Matt Witherspoon 8aeb0b5445 remove WAVM specific c++11 flag 2023-03-29 22:28:37 -04:00
jgiszczak 2f46f75970 Merge pull request #926 from AntelopeIO/test-harness-k-argument-support-main
[4.0 -> main] Implement support for -k/--kill in launcher.
2023-03-29 18:57:46 -05:00
jgiszczak e2539791a8 Merge pull request #921 from AntelopeIO/test-harness-k-argument-support
[4.0] Implement support for -k/--kill in launcher.
2023-03-29 18:01:55 -05:00
Kevin Heifner ca4de0e435 Remove unneeded cancel and update read-only-threads help description. 2023-03-29 17:52:01 -05:00
Jonathan Giszczak c708815a25 Suppress spurious error and use signal number on all platforms.
Pass kill signal number to kill for consistency with bounce/down.
2023-03-29 17:34:19 -05:00
Matt Witherspoon 5a39a122dc curl is no longer a required dependency 2023-03-29 18:23:01 -04:00
Clayton Calabrese 82e8ba8b6a change folder for performance_test runs to performance_test from p 2023-03-29 17:17:07 -05:00
Jonathan Giszczak 661515f5a8 Implement support for -k/--kill in launcher. 2023-03-29 16:15:07 -05:00
Huang-Ming Huang d29df5ef70 fix tests 2023-03-29 15:37:12 -05:00
Clayton Calabrese fb249230c1 convert to f string in walletMgr 2023-03-29 15:11:34 -05:00
Clayton Calabrese f07ccdc417 adjust indent 2023-03-29 15:10:44 -05:00
Clayton Calabrese 3ecb150933 Adjust test harness walletMgr to place files inside the wallet dir 2023-03-29 15:10:06 -05:00
Clayton Calabrese 97aa5b02d5 revert change for auto-bp_peering_test that is no longer needed 2023-03-29 14:38:47 -05:00
Clayton Calabrese 07c38c5c86 address PR comments for performance_test_basic and auto_bp_peering_test loggin 2023-03-29 14:28:28 -05:00
Huang-Ming Huang 3191ab295d remove deprecated options 2023-03-29 13:57:21 -05:00
Huang-Ming Huang 59b174029f restore udp non-blocking mode 2023-03-29 13:01:42 -05:00
Clayton Calabrese 82b179ccaa Merge remote-tracking branch 'origin/main' into performance_harness_reduce_log_usage 2023-03-29 12:05:31 -05:00
Kevin Heifner 6a989fd7eb Rename method and honor deadline. 2023-03-29 10:23:49 -05:00
Huang-Ming Huang dce7f418c3 address PR comment 2023-03-29 10:20:27 -05:00
Matt Witherspoon 6f6b5b7565 make use of some newer cmake functionality in CI 2023-03-29 10:29:46 -04:00
Matt Witherspoon 296fbc586f remove unused WAVM TestScript.h 2023-03-29 10:25:58 -04:00
Matt Witherspoon da68bd88ec remove WAVM travis CI 2023-03-29 10:25:54 -04:00
Matt Witherspoon 17201d4a63 remove WAVM Runtime 2023-03-29 10:25:47 -04:00
Matt Witherspoon b310933bb9 remove some unused WAVM headers 2023-03-29 10:25:43 -04:00
Matt Witherspoon a644bb2070 remove commented out cmake rules in WAVM 2023-03-29 10:25:42 -04:00
Matt Witherspoon 391d14e0d2 remove ENABLE_SIMD_PROTOTYPE & ENABLE_THREADING_PROTOTYPE WAVM code 2023-03-29 10:25:39 -04:00
Huang-Ming Huang 3ea7bae19f Merge branch 'main' into huangminghuang/block_start_time
# Conflicts:
#	plugins/producer_plugin/producer_plugin.cpp
2023-03-29 09:03:40 -05:00
Kevin Heifner 6672db333e Remove unneeded check of read-only exhausted trx queue 2023-03-29 07:25:42 -05:00
Kevin Heifner f80a95bf30 Add verification of posted read_only calls 2023-03-29 07:25:08 -05:00
Gregory Popovitch e22629623a Merge pull request #913 from AntelopeIO/optimize_http_api_calls
Replace needless std::map with std::vector, and std::move in capture
2023-03-28 23:21:35 -04:00
Kevin Heifner 81ff398777 Simplify use of exhausted read-only trx queue 2023-03-28 21:41:58 -05:00
Matt Witherspoon 8f36b20ab9 remove now unneeded CMAKE_VERSION checks 2023-03-28 21:23:21 -04:00
Matt Witherspoon cfab568b31 bump cmake minimum to 3.16 2023-03-28 21:22:25 -04:00
Huang-Ming Huang def64d1c6f Merge branch 'release/4.0' into huangminghuang/gelf-fix 2023-03-28 18:26:02 -05:00
Kevin Heifner 2dd1f6768c Remove unneeded _ro_exiting_read_window and simplify read_only_execution_task loop 2023-03-28 18:21:12 -05:00
Huang-Ming Huang e906597c2d fix gelf DNS resolves to ipv6 address 2023-03-28 17:34:45 -05:00
Kevin Heifner fa702aaccc Integrate #904 to prevent exit from read window until all threads are idle. 2023-03-28 17:21:37 -05:00
Clayton Calabrese c6908a45a6 Remove blkData by merging it with blockData and changing some use cases 2023-03-28 17:18:51 -05:00
Clayton Calabrese e0da601c80 fix performance_test and performance_test_basic leaving logs around in TestLogs 2023-03-28 15:50:15 -05:00
766C6164 33334b1b43 Added check for chainbase version 2023-03-28 16:40:07 -04:00
766C6164 f193441289 Added subcommand to check for a clean shutdown 2023-03-28 15:19:12 -04:00
Kevin Heifner 8eaa42ef39 Fix for slow runner hitting abi serialization deadline 2023-03-28 13:48:29 -05:00
greg7mdp abc8c1dcec Replace needless std::map with std::vector, and std::move in capture 2023-03-28 14:30:47 -04:00
Clayton Calabrese d5bbebbb13 fix a number of tests that leave logs in TestLogs even on success. 2023-03-28 12:22:15 -05:00
Kevin Heifner 18cd288c82 Simplify exhausted read-only handling 2023-03-28 10:52:43 -05:00
Clayton Calabrese a7c3431323 prevent snapshot test from creating a bunch of tmp files that aren't cleaned up 2023-03-28 10:06:54 -05:00
Clayton Calabrese 97f02ac1d0 remove unused code 2023-03-28 10:02:34 -05:00
Kevin Heifner ce8c1b70d5 GH-591 fix expected http code 2023-03-28 10:01:38 -05:00
Clayton Calabrese f906cfa686 clean up test wallet littering 2023-03-28 09:59:42 -05:00
Kevin Heifner 138737c414 Default read-only-threads to 3 if not specified when eosio::chain_api_plugin configured and not a producer. 2023-03-28 09:46:08 -05:00
Kevin Heifner 9ec3b79dea GH-591 Return 400 http error for unknown account 2023-03-28 07:42:45 -05:00
Kevin Heifner e8a081c3dc Run everything at the same time test 2023-03-27 19:56:48 -05:00
Kevin Heifner 06637d5221 Add some calls to read-only actions to the test. 2023-03-27 19:36:05 -05:00
Kevin Heifner f999202e94 Check test_mode 2023-03-27 18:22:44 -05:00
Vlad e13e2cf5bd Merge pull request #909 from AntelopeIO/increase-timeout-fork-test-main
[4.0 -> main] Adjusted timeout in tests to give better chance on reaching consensus
2023-03-27 18:55:33 -04:00
766C6164 fa920523c0 Merge branch 'release/4.0' into increase-timeout-fork-test-main 2023-03-27 17:27:14 -04:00
766C6164 6c0ea314a3 Merge branch 'increase-timeout-fork-test-main' of https://github.com/AntelopeIO/leap into increase-timeout-fork-test-main 2023-03-27 17:25:32 -04:00
Vlad 7eaaf66419 Merge branch 'main' into increase-timeout-fork-test-main 2023-03-27 17:25:20 -04:00
766C6164 966dec6f17 Revert "Increased timeout for the network to reach consensus"
This reverts commit d9cde1c924.
2023-03-27 17:24:20 -04:00
Kevin Heifner f07011d828 Minor updates 2023-03-27 16:05:22 -05:00
Kevin Heifner 66aef5b026 Merge remote-tracking branch 'origin/release/4.0' into read-safe-multi-thread-4.0 2023-03-27 15:29:49 -05:00
Kevin Heifner 1c5e133ce6 Merge pull request #910 from AntelopeIO/GH-891-interrupt-start-block-main
[4.0 -> main] Use block_num for interrupt of start_block & Use single timer for read and write windows
2023-03-27 14:38:34 -05:00
Matt Witherspoon 49939fe2f4 Merge pull request #894 from AntelopeIO/bionic_removal
remove ubuntu 18.04 from CI & documentation
2023-03-27 11:47:30 -07:00
Kevin Heifner 23fd711cbc Merge remote-tracking branch 'origin/main' into GH-891-interrupt-start-block-main 2023-03-27 13:40:38 -05:00
Gregory Popovitch 09c6af1659 Merge pull request #904 from AntelopeIO/gh_822_main
[4.0 -> main] Cleanup and prevent thread starvation while in the read window.
2023-03-27 14:31:21 -04:00
766C6164 d9cde1c924 Increased timeout for the network to reach consensus 2023-03-27 14:18:36 -04:00
Vlad fca96e56eb Merge pull request #907 from AntelopeIO/increase-timeout-fork-test
[4.0] Adjusted timeout in tests to give better chance on reaching consensus
2023-03-27 14:14:02 -04:00
Kevin Heifner bb4a277385 Merge remote-tracking branch 'origin/release/4.0' into GH-891-interrupt-start-block-main 2023-03-27 12:19:51 -05:00
Kevin Heifner a329707f22 Merge pull request #908 from AntelopeIO/GH-891-interrupt-start-block-4.0
[3.2 -> 4.0] Use block_num for interrupt of start_block
2023-03-27 12:19:20 -05:00
Lin Huang fed6d11e00 Merge pull request #905 from AntelopeIO/single_timer
[4.0] Use a single timer for read and write windows
2023-03-27 13:12:41 -04:00
Kevin Heifner 9e79e82dea GH-891 Integrate new received block into ro_trx_queue 2023-03-27 10:51:11 -05:00
766C6164 0c448aebee Adjusted timeout to give better chance on reaching consensus 2023-03-27 11:49:57 -04:00
Kevin Heifner 728f9b3861 Merge remote-tracking branch 'origin/release/3.2' into GH-891-interrupt-start-block-4.0 2023-03-27 10:30:27 -05:00
Kevin Heifner f1cc518341 Merge pull request #893 from AntelopeIO/GH-891-interrupt-start-block-3.2
[3.2] Use block_num for interrupt of start_block
2023-03-27 10:23:34 -05:00
Lin Huang d73bf1b0a5 Use a single timer for read and write windows 2023-03-27 10:52:24 -04:00
greg7mdp 90b1e9e5c0 Merge remote-tracking branch 'origin/release/4.0' into gh_822_main 2023-03-27 10:10:27 -04:00
Gregory Popovitch 8de29868c8 Merge pull request #892 from AntelopeIO/gh-822-4.0
[4.0] Cleanup and prevent thread starvation while in the read window.
2023-03-27 09:37:32 -04:00
Matt Witherspoon 89d60a09e7 Merge pull request #895 from AntelopeIO/ci_test_timeouts
set a maximum test time in CI via a ctest argument
2023-03-25 11:16:22 -07:00
Kevin Heifner 376470d685 Encapsulate mtx 2023-03-25 11:52:38 -05:00
Kevin Heifner 780fb3f8f8 Fix includes 2023-03-25 11:29:04 -05:00
Kevin Heifner d106d18f72 Fix rebase merge issue 2023-03-25 11:23:52 -05:00
Kevin Heifner ac234f6547 Add multiple runs to read_only_trx_test.py. Also be explicit about 0 read-only-threads 2023-03-25 10:53:07 -05:00
Kevin Heifner f47d7d23e7 Revert added whitespace 2023-03-25 10:53:07 -05:00
Kevin Heifner 33e1951aa9 Shutdown all read threads when read_only queue is empty 2023-03-25 10:53:06 -05:00
Lin Huang 25c0efcd6e correct version after merging from 4.0.0-rc1 2023-03-25 10:48:22 -05:00
Zach Butler fe74adcfad Restore markdown formatting erroneously deleted in commit 06c9e25327 2023-03-25 10:47:41 -05:00
Zach Butler 320d480be3 Cardinal objects should be in a numbered list 2023-03-25 10:47:41 -05:00
Zach Butler 1655c66786 Pull note about sudo into its own quote block 2023-03-25 10:47:41 -05:00
Zach Butler 2abdaa4f90 Minor pinned build script README changes 2023-03-25 10:47:40 -05:00
Kevin Heifner efa76d349f get_snapshot_requests safe to be parallel in read window 2023-03-25 10:47:40 -05:00
Kevin Heifner ea43426ca2 Fix test configuration 2023-03-25 10:47:40 -05:00
Kevin Heifner d9c9150be9 Enabled read-only thread pool on non-producer nodes by default with 3 threads. 2023-03-25 10:47:39 -05:00
Kevin Heifner 7893eebff5 Add --num-test-runs option and fix get_table_rows to not generate an error 2023-03-25 10:47:39 -05:00
Kevin Heifner 5126601c1e Rename some variables and add some additional comments 2023-03-25 10:47:38 -05:00
Kevin Heifner 73da55059c Rename general queue to read_write queue and read_only_safe queue to read_only queue. 2023-03-25 10:47:38 -05:00
Kevin Heifner d13c056933 net_plugin operations do not have to be on the main thread at all. 2023-03-25 10:47:38 -05:00
Kevin Heifner 709c0a94a9 Fix merge conflicts 2023-03-25 10:47:37 -05:00
Kevin Heifner a913cdbfb6 Use read_only_safe queue for switching. Add comments on why. 2023-03-25 10:47:37 -05:00
Kevin Heifner 366a9bb706 Rename read_only_trx_safe to read_only_safe 2023-03-25 10:47:36 -05:00
Kevin Heifner 44f7429407 Move operations not safe to run in parallel onto general queue 2023-03-25 10:46:11 -05:00
Kevin Heifner 791c2c9ca2 Clean up some comments 2023-03-25 10:44:35 -05:00
Kevin Heifner 8ca774328e Update comments 2023-03-25 10:44:35 -05:00
Kevin Heifner f051bad29f Swith db read mode when executing read-only trx on the main thread 2023-03-25 10:41:55 -05:00
Kevin Heifner d97aaf1a55 Add required thread safety to execution priority queue. 2023-03-25 10:41:55 -05:00
Kevin Heifner 1ff7e7de2e Revert to appbase main branch 2023-03-25 10:41:54 -05:00
Kevin Heifner 052faf630d max-transaction-time is required to be less than read-only-read-window-time-us 2023-03-25 10:41:54 -05:00
Kevin Heifner f53341b98e When running without read only thread pool, execute exhausted read only trxs during start block. 2023-03-25 10:41:53 -05:00
Kevin Heifner 8d8db42f7c Consistently execute read-only trx via process_read_only_transaction() 2023-03-25 10:41:53 -05:00
Kevin Heifner aca29eb87e Cleanup comments 2023-03-25 10:41:53 -05:00
Kevin Heifner 5ac13271ff Cleanup variable names and comments and fix mutex lock around execute_highest_read_only() 2023-03-25 10:41:52 -05:00
Kevin Heifner c10195cddf Update tests for pop() happening before execute() 2023-03-25 10:40:53 -05:00
Kevin Heifner cfa2cc2ec8 Read-only execution can run during write window so set read_window_deadline to allow it. 2023-03-25 10:40:53 -05:00
Kevin Heifner 3239eb7225 Update to appbase with priority queue pop() 2023-03-25 10:38:21 -05:00
Kevin Heifner e2ad3488e8 Execute read safe tasks on read-only thread pool. 2023-03-25 10:38:16 -05:00
Matt Witherspoon fd33c6d95b set a maximum test time in CI via ctest argument 2023-03-24 19:19:43 -04:00
greg7mdp f331ff96be Merge branch 'gh-822-4.0' of github.com:AntelopeIO/leap into gh-822-4.0 2023-03-24 18:52:27 -04:00
greg7mdp e05b737703 Fix hang occuring sometimes in test 2023-03-24 18:51:24 -04:00
Kevin Heifner ebadb713e9 GH-891 Use block_num for interrupt of start_block to handle case of receiving block before beginning of start_block 2023-03-24 14:17:13 -05:00
Gregory Popovitch bda60b521d Merge branch 'release/4.0' into gh-822-4.0 2023-03-24 14:54:04 -04:00
greg7mdp e4c138d490 simplify cond wait - greatly inspired from Kevin's branch 2023-03-24 14:49:14 -04:00
greg7mdp 12c9cdfe04 Fix test issue (uninitialized variables) 2023-03-24 14:49:10 -04:00
greg7mdp 4379207dac Replace option to turn off checking with a static variable. 2023-03-24 14:49:02 -04:00
greg7mdp 1ca223cad6 Address PR comments 2023-03-24 14:48:56 -04:00
greg7mdp ac61ecd816 Add extra test with 1 readonly thread 2023-03-24 14:48:46 -04:00
greg7mdp 30fc086249 Implement code review comments. 2023-03-24 14:48:40 -04:00
greg7mdp d75db84abf Notify condition_variable under the lock.
(see https://github.com/isocpp/CppCoreGuidelines/issues/925#issuecomment-302269850)
2023-03-24 14:48:30 -04:00
greg7mdp 5a76c1b240 Deal with possible spurious wakeups from wait(). 2023-03-24 14:48:24 -04:00
greg7mdp aad1729450 No need to check for option's presence since it has a default value 2023-03-24 14:48:19 -04:00
greg7mdp 77e96f8416 simplify capture list 2023-03-24 14:48:08 -04:00
greg7mdp da8a507642 Add C++ test exercizing readonly transactions in read window. 2023-03-24 14:48:02 -04:00
greg7mdp 0688dc7254 Fix a couple issues - now tests pass! 2023-03-24 14:47:57 -04:00
greg7mdp 8289563b69 Add two assert() checks. 2023-03-24 14:47:53 -04:00
greg7mdp f7822e3277 Small cleanups and comments. 2023-03-24 14:47:49 -04:00
greg7mdp 033ca045e5 Small cleanups. 2023-03-24 14:47:46 -04:00
greg7mdp 2a9653101f Consistent exit when read_window_deadline is reached, and encapsulate exit criteria in ro_trx_queue_t 2023-03-24 14:47:42 -04:00
greg7mdp 7b22be389f Update comment 2023-03-24 14:47:34 -04:00
greg7mdp 81939db6ea Forgot one notify_one call. 2023-03-24 14:47:30 -04:00
greg7mdp 72ea655875 Cleanup and prevent thread starvation while in the read window. 2023-03-24 14:47:23 -04:00
Lin Huang c227c63714 Merge pull request #890 from AntelopeIO/time_summary
[4.0 -> main] Add time summary logging for transient trx processing and read-only threads
2023-03-24 14:30:41 -04:00
Lin Huang a47447b5df Merge remote-tracking branch 'origin/release/4.0' into time_summary 2023-03-24 13:52:35 -04:00
Lin Huang f07e688305 Merge pull request #885 from AntelopeIO/read_only_time_report
[4.0] Add time summary logging for transient trx processing and read-only threads
2023-03-24 13:45:11 -04:00
Huang-Ming Huang 2766caf1ba address PR comment 2023-03-24 12:07:52 -05:00
Lin Huang 44b56b38ca use std::atomic<int64_t> for total thread time for simplicity 2023-03-23 21:14:38 -04:00
Kevin Heifner 291cd11cd4 Merge pull request #888 from AntelopeIO/fix-clang-warn
Fix clang warning
2023-03-23 18:42:06 -05:00
Lin Huang c600fbe0b8 let add_success_time and add_fail_time handle transient trxs time tracking 2023-03-23 19:19:08 -04:00
Kevin Heifner 15b271a98a Fix clang warning 2023-03-23 17:58:45 -05:00
Lin Huang 07af448870 add total time spent by all threads and minor format changes 2023-03-23 18:36:09 -04:00
Matt Witherspoon da685c1a70 remove ubuntu 18.04 from CI & documentation 2023-03-23 18:02:02 -04:00
Huang-Ming Huang 7b38f8eeee fix previous commit 2023-03-23 14:57:13 -05:00
Huang-Ming Huang 537e0f056b fix start time for the first block in a round 2023-03-23 14:46:27 -05:00
Lin Huang 318e1e4533 Merge pull request #884 from AntelopeIO/merge_4_0_0_rc_2_bump
[4.0 -> main] Merge 4.0.0-rc2 bump changes to main
2023-03-23 14:33:45 -04:00
Lin Huang fb21cdecb0 add us (for microseconds) to time text 2023-03-23 14:31:30 -04:00
Lin Huang b3cc74f621 Merge remote-tracking branch 'origin/release/4.0' into read_only_time_report 2023-03-23 14:03:37 -04:00
Lin Huang 8d86d7d2d4 change is_main_thread method name to is_on_main_thread 2023-03-23 14:02:56 -04:00
Lin Huang ccdaa64392 correct version after merging from 4.0.0-rc2 2023-03-23 13:28:43 -04:00
Kevin Heifner 150fe5de8f Merge pull request #882 from AntelopeIO/GH-871-test-fix-main
[4.0 -> main] Test fix: Add max-transaction-time -1
2023-03-23 12:10:00 -05:00
Lin Huang 59cf021b08 Merge pull request #881 from AntelopeIO/bump_to_4_0_0_rc2
Bump release/4.0.0 to rc2
2023-03-23 12:40:56 -04:00
Kevin Heifner 8b52aac579 Merge remote-tracking branch 'origin/release/4.0' into GH-871-test-fix-main 2023-03-23 11:39:53 -05:00
ClaytonCalabrese 1dd3f89555 Merge pull request #880 from AntelopeIO/restore_lost_node_py_changes_main
[4.0 -> main] Restore Node.py Changes that were lost
2023-03-23 11:38:09 -05:00
Lin Huang 5969e8b6fe Bump release/4.0.0 to rc2 2023-03-23 12:11:40 -04:00
Kevin Heifner 8cbd7decca Merge pull request #872 from AntelopeIO/GH-871-test-fix-4.0
[4.0] Test fix: Add max-transaction-time -1
2023-03-23 11:07:33 -05:00
Clayton Calabrese 25915c3510 merge release/4.0 into main to get missing Node.py changes 2023-03-23 11:04:19 -05:00
Kevin Heifner 2299d0b626 Merge pull request #878 from AntelopeIO/GH-854-fix-test-main
[4.0 -> main] Test Fix: Use max-transaction-time -1
2023-03-23 10:38:40 -05:00
ClaytonCalabrese c9fcb2ac2c Merge pull request #875 from AntelopeIO/restore_lost_node_py_changes
[4.0] Return Lost Changes to Node.py Functions
2023-03-23 10:10:32 -05:00
Kevin Heifner 40576f5416 Merge remote-tracking branch 'origin/release/4.0' into GH-854-fix-test-main 2023-03-23 10:06:16 -05:00
Kevin Heifner b5232f0eaf Merge pull request #864 from AntelopeIO/GH-854-fix-test-4.0
[4.0] Test Fix: Use max-transaction-time -1
2023-03-23 10:05:43 -05:00
Huang-Ming Huang 8134e5394a Merge pull request #877 from AntelopeIO/huangminghuang/unshare-import-fix
[4.0->main] unshare import fix & SHiP: Send until queue is empty
2023-03-23 10:05:23 -05:00
Huang-Ming Huang 6176fa323c Merge remote-tracking branch 'origin/release/4.0' into huangminghuang/unshare-import-fix 2023-03-23 09:43:27 -05:00
Vlad 5d1ab0c0bb Merge pull request #873 from AntelopeIO/increase-snapshot-test-robustness-main
[4.0 -> main] Increase robustness of snapshot diff python test
2023-03-23 10:37:35 -04:00
Huang-Ming Huang ac1a035b5e Merge pull request #869 from AntelopeIO/huangminghuang/unshare-import-fix-4.0
[4.0] unshare import fix
2023-03-23 09:36:49 -05:00
Lin Huang 2597e02383 Merge remote-tracking branch 'origin/release/4.0' into read_only_time_report 2023-03-23 09:15:53 -04:00
Kevin Heifner 191aafc8f6 Merge pull request #876 from AntelopeIO/GH-861-ship-fix-4.0
[4.0] SHiP: Send until queue is empty
2023-03-22 22:22:24 -05:00
Kevin Heifner 405ac4178d GH-861 Make sure to keep sending as long as there are items queued up to send. 2023-03-22 21:01:17 -05:00
Clayton Calabrese 41bb796d77 add forgotten piece of changing default time limit for cleosLimit 2023-03-22 19:52:15 -05:00
Clayton Calabrese 1e80205270 remove hardcoded 999 time limit for getTable and depend on version. Change from 99999 to 999 for non v2 nodeos 2023-03-22 18:29:22 -05:00
Clayton Calabrese 483b462717 restore lost changes due to splitting of Node.py and moving of functions 2023-03-22 18:23:57 -05:00
766C6164 1b04bdf71c Rolled back queries.py changes in this pr 2023-03-22 18:38:06 -04:00
766C6164 9e2593cc16 Merge branch 'release/4.0' into increase-snapshot-test-robustness-main 2023-03-22 17:45:31 -04:00
Kevin Heifner ec471ad8e5 GH-871 Use max-transaction-time=-1 for consistency 2023-03-22 15:36:17 -05:00
Kevin Heifner 3dbc0baeeb GH-871 Add max-transaction-time -1 for loading of contract 2023-03-22 15:03:57 -05:00
Huang-Ming Huang 6ee7e1f1bb add missing test in cmake 2023-03-22 13:55:44 -05:00
Huang-Ming Huang f3c424ef90 huangminghuang/unshare-import-fix 2023-03-22 13:39:57 -05:00
Matt Witherspoon 1985e28a63 Merge pull request #866 from AntelopeIO/ignored_pack_warn_fix
fix noisy `ignoring packed attribute` warning on `IR::ControlStructureImm`
2023-03-22 11:06:46 -07:00
Clayton Calabrese 1bd16e8a6d some additional improvements to reduce performance test code and wasted effort 2023-03-22 12:21:30 -05:00
Vlad 2829420ecb Merge pull request #856 from AntelopeIO/increase-snapshot-test-robustness
[4.0] Increase robustness of snapshot diff python test
2023-03-22 11:51:46 -04:00
Huang-Ming Huang a4ee191185 optimize block start time 2023-03-22 10:51:16 -05:00
Matt Witherspoon 95c22b6e70 add PACKED_STRUCT on ControlStructureImm to silence warning 2023-03-22 10:57:40 -04:00
Matt Witherspoon f8ca18d5f5 add static_assert()s on required size of IR::OpcodeAndImm<>s 2023-03-22 10:55:29 -04:00
Matt Witherspoon bef672aae2 Merge pull request #860 from AntelopeIO/log_index_un_signed_warn
fix comparison of different signedness warning in log_index
2023-03-22 07:30:28 -07:00
Kevin Heifner 87c7480656 Merge pull request #852 from AntelopeIO/GH-850-test-fix
[4.0] Test Fix: Pass a large time limit to get table call
2023-03-22 09:25:02 -05:00
Kevin Heifner 971102e243 GH-854 Use max-transaction-time -1 like other integration tests 2023-03-22 09:20:34 -05:00
Matt Witherspoon c2366d392b fix comparison of different signedness warning in log_index 2023-03-21 20:17:49 -04:00
Clayton Calabrese 41f5b7fec6 merge from main 2023-03-21 17:46:33 -05:00
Clayton Calabrese e793ed17df commit in progress rework and log reduction to allow merge from main 2023-03-21 17:43:15 -05:00
Zach Butler 229de5aa05 Fix spurious commit 2023-03-21 18:10:23 -04:00
Zach Butler 4381229880 Guard against sudo being missing 2023-03-21 18:07:10 -04:00
Zach Butler 9f523ed7f1 You pass "y", not "-y", lol 2023-03-21 17:54:43 -04:00
Zach Butler 624864f3e0 Apparently the software suite including apt-get is called APT, not aptitude 2023-03-21 17:15:38 -04:00
Zach Butler 429e6e7694 A comment 2023-03-21 17:09:33 -04:00
Zach Butler fcdbe4c938 Do not hide exit status in try() 2023-03-21 16:20:10 -04:00
Zach Butler c21e563b1b Make it easier to debug by printing significant commands before running them in try() 2023-03-21 16:19:15 -04:00
Zach Butler a0a7338118 Add a pinned build example where the [Y/n] prompts from aptitude are suppressed 2023-03-21 16:17:37 -04:00
Zach Butler 0fcb2a152f Add a note about the pinned build script asking for a password 2023-03-21 16:17:37 -04:00
Zach Butler 68bf7febf0 Remove scripts/install_deps.sh from the README.md 2023-03-21 16:17:37 -04:00
Zach Butler 71fe27cfdf Remove the "-y" flag from "apt-get install"
To suppress the prompts from aptitude, run:
echo 'y' | ./scripts/pinned_build.sh /leap/deps /leap/build "$(nproc)"
2023-03-21 16:17:37 -04:00
Zach Butler 41e34c4881 Remove hard-coded timezone
tzdata defaults to UTC anyways, lol
2023-03-21 16:17:36 -04:00
Zach Butler c7545f2cd6 Remove unnecessary MISSING_DEPS var 2023-03-21 16:17:36 -04:00
Zach Butler ddfedd4d88 SC2207 - warning: Prefer mapfile or read -a to split command output (or quote to avoid splitting)
Note: This implementation is backwards-compatible with BASH 3.x for
macOS
2023-03-21 16:17:36 -04:00
Zach Butler 75c5f3bcda SC2086 - note: Double quote to prevent globbing and word splitting 2023-03-21 16:17:31 -04:00
766C6164 cb64c3fb38 schedule snapshot at exact block num of another one 2023-03-21 15:43:31 -04:00
Lin Huang c7d0f6c1c2 Merge pull request #855 from AntelopeIO/merge_4_0_0_rc_1
[4.0 -> main] Merge 4.0.0-rc1 version bump to main
2023-03-21 15:31:31 -04:00
Lin Huang 3beffd5765 correct version after merging from 4.0.0-rc1 2023-03-21 14:46:34 -04:00
Lin Huang 1e3f12dc60 Merge remote-tracking branch 'origin/release/4.0' into merge_4_0_0_rc_1 2023-03-21 14:43:12 -04:00
Lin Huang 61cb264885 Merge pull request #851 from AntelopeIO/create_release_4_0_rc_1
Create v4.0.0-rc1 on release/4.0 branch
2023-03-21 14:34:46 -04:00
Zach Butler 1deeab7071 Use "dpkg -s" instead of "dpkg -l" 2023-03-21 14:18:16 -04:00
Zach Butler 8b25083310 Write code to by-pass invocation of apt-get (and sudo) if dependencies are already installed 2023-03-21 14:18:15 -04:00
Zach Butler fcb5437882 Use sudo for apt-get commands if we are not root 2023-03-21 14:18:15 -04:00
Zach Butler 8c0465a098 Use try() for apt-get commands 2023-03-21 14:18:15 -04:00
Zach Butler 3ed298c7aa Add a print statement at the beginning and end of package deps installation 2023-03-21 14:18:15 -04:00
Zach Butler dd2d53d480 Add a warning for OSes that do not have aptitude 2023-03-21 14:18:14 -04:00
Zach Butler f67e598ba1 Roll scripts/install_deps.sh into scripts/pinned_build.sh with a guard
for Debian-family OSes
2023-03-21 14:18:14 -04:00
Kevin Heifner 446a04a607 GH-850 Pass a large time limit so python does not have to handle more=true case. 2023-03-21 13:09:26 -05:00
Zach f3aab2cfa5 Merge pull request #849 from AntelopeIO/zach-readme
Fix README.md Formatting
2023-03-21 14:08:04 -04:00
Lin Huang 28ac7906dc Create v4.0.0-rc1 on release/4.0 branch 2023-03-21 14:03:42 -04:00
Lin Huang 5d4a7ee60e Merge pull request #848 from AntelopeIO/bump_to_4_1
Bump Leap Main branch version to 4.1.0-dev
2023-03-21 13:35:49 -04:00
Zach Butler 8fc769efd1 Restore markdown formatting erroneously deleted in commit 06c9e25327 2023-03-21 13:19:33 -04:00
Zach Butler 7f27916d3d Cardinal objects should be in a numbered list 2023-03-21 13:19:19 -04:00
Zach Butler df3685516e Pull note about sudo into its own quote block 2023-03-21 13:17:58 -04:00
Zach Butler 866dfae99c Minor pinned build script README changes 2023-03-21 13:12:34 -04:00
Lin Huang 4ef610fa33 Bump Leap Main branch version to 4.1.0-dev 2023-03-21 13:00:08 -04:00
Zach 17ca88c8ad Merge pull request #847 from AntelopeIO/zach-libcurl4-openssl-dev
Restore libcurl4-openssl-dev
2023-03-20 22:26:45 -04:00
Zach Butler 60e757d677 export TZ 2023-03-20 18:36:55 -04:00
Zach Butler cc6c3255a7 SC2034 - warning: DEBIAN_FRONTEND appears unused. Verify use (or export if used externally). 2023-03-20 18:01:01 -04:00
Zach Butler 958f6d53b6 tzdata does not need to be separate 2023-03-20 18:00:26 -04:00
Zach Butler e0dac2c6ed Restore libcurl4-openssl-dev 2023-03-20 17:51:58 -04:00
Zach Butler 5027a17a3b Sort packages, each one on its own line 2023-03-20 17:48:57 -04:00
Zach Butler 9398564118 Quote strings 2023-03-20 17:48:49 -04:00
Zach Butler d42262bfeb "apt-get install -y" 2023-03-20 17:48:31 -04:00
Zach Butler 3ba58b20b7 Whitespace 2023-03-20 17:48:23 -04:00
Zach 35b56406cc Merge pull request #835 from AntelopeIO/zach-ascii-art
Change ASCII Art Banner in Build Script
2023-03-20 13:41:26 -04:00
Zach 069245d4f3 Merge pull request #812 from AntelopeIO/zach-lint
Pinned Build Script Linter Changes
2023-03-20 13:39:33 -04:00
Lin Huang 0ed5d6da9e track read-window time 2023-03-20 11:31:16 -04:00
Zach 0f84d4e534 Merge pull request #833 from AntelopeIO/zach-revert-799
Fix Pinned Build on Ubuntu 22.04
2023-03-20 10:01:05 -04:00
Lin Huang 38d3c39e9d track transient trx on main thread execution time specifically 2023-03-19 20:52:48 -04:00
Lin Huang ace9c40d56 Merge pull request #845 from AntelopeIO/fix_pr_192_bad_merge
Fix test coverage regression by a bad merge conflict in PR #192
2023-03-17 19:31:54 -04:00
Lin Huang 3c53734d2f add missing 2023-03-17 18:59:30 -04:00
Lin Huang 255617660d Fix test coverage regression by a bad merge conflict in PR #192 2023-03-17 18:29:20 -04:00
Vlad e3807c2b5f Merge pull request #842 from AntelopeIO/snapshot-diff-test-fix
snapshot-diff-test fix
2023-03-17 14:35:44 -04:00
766C6164 5324a5da79 sync scheduled snapshot with 2 others 2023-03-17 13:56:06 -04:00
ClaytonCalabrese 264737b4ef Merge pull request #791 from AntelopeIO/performance_harness_distributed_producer_ports
[PH] Distribute Transaction Generators Across Producer Nodes.
2023-03-17 12:28:19 -05:00
766C6164 b4fe3c654f test fix 2023-03-17 12:49:47 -04:00
Clayton Calabrese be75e8aa3a merge from main 2023-03-17 11:26:55 -05:00
Peter Oschwald 77dfd0c2bf Merge pull request #818 from AntelopeIO/dev-install-add-testharness
Add TestHarness python integration scripts to dev package
2023-03-17 11:07:03 -05:00
Peter Oschwald b1225959e4 Merge pull request #798 from AntelopeIO/GH-789-remove-private-key
Remove deprecated `--private-key` option from nodeos
2023-03-17 11:06:04 -05:00
jgiszczak 0c6892fe65 Merge pull request #192 from AntelopeIO/eosio-launcher-python-port
Port eosio-launcher to Python
2023-03-17 11:04:16 -05:00
Kevin Heifner 6491c667a3 Merge pull request #836 from AntelopeIO/fix-snapshot-schedule
Snapshot: fix issue with erasing element while iterating
2023-03-17 10:36:31 -05:00
Peter Oschwald d6e6a93150 Fix CORE_SYMBOL import and cleanup other imports. 2023-03-17 10:17:40 -05:00
Peter Oschwald 3e9d098e4b Merge branch 'eosio-launcher-python-port' into dev-install-add-testharness 2023-03-17 10:00:04 -05:00
Kevin Heifner 48f2396904 Fix issue with erasing element while iterating 2023-03-17 09:03:30 -05:00
Kevin Heifner fc08e7d99c Fix issue with erasing element while iterating 2023-03-17 08:58:48 -05:00
Zach Butler 383fb714d4 Appreciate our users and make them feel like they are part of a community 2023-03-17 02:09:45 -04:00
Zach Butler 01b4454090 Cooler Leap ASCII art banner at end of pinned build script 2023-03-17 02:09:38 -04:00
Zach Butler 08aca00905 Revert "Merge pull request #799 from AntelopeIO/sbailey/autofind_llvm_7-11"
Co-authored-by: Matt Witherspoon <32485495+spoonincode@users.noreply.github.com>
2023-03-17 00:53:32 -04:00
jgiszczak 8eb33401eb Merge branch 'main' into eosio-launcher-python-port 2023-03-16 21:26:47 -05:00
Zach Butler 03b1ebd46f Fix shebang in bash build scripts
Looking for BASH in the environment instead of invoking it directly
enables attacks where malware could escalate privileges by pointing BASH
to itself and tricking the user into entering a superuser password when
a user invokes our script, a familiar request the user may be expecting.
2023-03-16 21:03:43 -04:00
Zach Butler 0697aa31f3 SC2016 - note: Expressions don't expand in single quotes, use double quotes for that 2023-03-16 21:03:43 -04:00
Zach Butler 07208ec800 SC2006 - note: Use $(...) notation instead of legacy backticks ... 2023-03-16 21:03:42 -04:00
Zach Butler eee850dc38 SC2086 - note: Double quote to prevent globbing and word splitting. 2023-03-16 21:03:42 -04:00
Zach Butler 1038a94e66 SC2294 - warning: eval negates the benefit of arrays. Drop eval to preserve whitespace/symbols (or eval as string). 2023-03-16 21:03:42 -04:00
Zach Butler 633a8d37b3 SC2164 - Use "pushd ... || exit" or "pushd ... || return" in case pushd fails. 2023-03-16 21:03:42 -04:00
Zach Butler 83e6c6c6eb SC2034 - warning: "output" appears unused. Verify use (or export if used externally). 2023-03-16 21:03:41 -04:00
Zach Butler 46e50a4ee5 SC2034 - warning: ARCH appears unused. Verify use (or export if used externally). 2023-03-16 21:03:41 -04:00
Zach Butler 28c790be89 SC2034 - warning: CORE_SYM appears unused. Verify use (or export if used externally). 2023-03-16 21:03:41 -04:00
Zach Butler 25a7550166 SC2068 - error: Double quote array expansions to avoid re-splitting elements 2023-03-16 21:03:41 -04:00
Zach Butler 2e831bf906 SC2242 - error: Can only exit with status 0-255. Other data should be written to stdout/stderr. 2023-03-16 21:03:40 -04:00
Zach Butler 108a902a83 E011 - then keyword is not on same line as if or elif keyword 2023-03-16 21:03:40 -04:00
Zach Butler 2c92ef7ef2 E001 - Trailing Whitespace 2023-03-16 21:03:40 -04:00
Zach Butler a3284f4d5d E003 - Inconsistent indentation 2023-03-16 21:03:40 -04:00
Peter Oschwald e7e66a5d19 Simplify postinst and prerm scripts
leap_testing dir is already part of package so don't need to mkdir or rmdir as it will be cleaned up appropriately.

However, continue to clean up dir potentially created directly by postinst
2023-03-16 19:39:52 -05:00
Matt Witherspoon 18e812a99f Merge pull request #831 from AntelopeIO/peering_signed_warning
fix signed vs unsigned comparison warning in autobp peering
2023-03-16 17:29:22 -07:00
Peter Oschwald 7d78b885d6 Merge branch 'dev-install-add-testharness' of ssh://github.com/AntelopeIO/leap into dev-install-add-testharness 2023-03-16 19:08:51 -05:00
Peter Oschwald c46400c527 Best effort attempt to remove the directorys we may have created during the install.
Can ignore failed directory deletion as they may be installing to location that has more than leap in it, for instance the ~/lib/python3/dist-packages, however if it is empty it is a safe assumption that it is in the location the install created it and can be removed as the inverse uninstall operation.
2023-03-16 19:07:10 -05:00
Jonathan Giszczak 3ea8cf1b5c Update test from main. 2023-03-16 18:45:13 -05:00
Peter Oschwald 9c066a76af Update package.cmake
Co-authored-by: Scott B <Scott@TheBaileyFamily.org>
2023-03-16 18:11:15 -05:00
Clayton Calabrese 39bdbfe675 use lambda for transaction generator calculations 2023-03-16 17:52:37 -05:00
jgiszczak 7815146f8a Merge branch 'main' into eosio-launcher-python-port 2023-03-16 17:34:28 -05:00
Jonathan Giszczak 42df97f5d5 Some limits to prevent division by zero in performance linear search. 2023-03-16 17:20:30 -05:00
Vlad e3b31cda96 Merge pull request #759 from AntelopeIO/snapshot-api
Programmable snapshots API
2023-03-16 17:08:54 -04:00
Huang-Ming Huang 326c169e10 Merge pull request #820 from AntelopeIO/huangminghuang/get_raw_block
get_raw_block api endpoint
2023-03-16 16:02:54 -05:00
Peter Oschwald 8c8ad50862 Don't overwrite the env variable so you get both postinst and prerm 2023-03-16 15:50:00 -05:00
766C6164 17c4ce3a5c feedback addressed 2023-03-16 16:46:43 -04:00
Matt Witherspoon 81ec6137c8 fix un/signed comparison warning in autobp peering 2023-03-16 16:43:21 -04:00
Jonathan Giszczak 4c9a2fe2a1 Fix merge error. 2023-03-16 15:42:50 -05:00
Huang-Ming Huang af1dcf23cf fix assertion message 2023-03-16 15:35:42 -05:00
Jonathan Giszczak b52517bef3 Fix merge error. 2023-03-16 15:28:13 -05:00
766C6164 af808b72e6 feedback addressed 2023-03-16 16:20:18 -04:00
Jonathan Giszczak 1cdb4c5bdc Ignore errors in shutil.rmtree. 2023-03-16 15:19:31 -05:00
Peter Oschwald 08b1eb5252 Addressing peer review comment.
Simplify prerm script.
2023-03-16 14:34:29 -05:00
Jonathan Giszczak 60902e95fe Clean up launcher log directory on successful run. 2023-03-16 14:29:32 -05:00
Jonathan Giszczak 5ab118f982 Fix automatic merge failure. 2023-03-16 14:28:04 -05:00
Peter Oschwald 61b0efe536 Address a couple more review comments. 2023-03-16 14:24:15 -05:00
Jonathan Giszczak 1d95b12268 Merge branch 'main' into eosio-launcher-python-port 2023-03-16 14:19:51 -05:00
Peter Oschwald b6007e022d Peer review recommended using sh instead of bash as more likely to exist. 2023-03-16 13:56:16 -05:00
Peter Oschwald be154da603 Address peer review comments.
Adding additional commentary on cmake version based processing paths.

Added prerm script to cleanup symbolic links

Added EXCLUDE_FROM_ALL where necessary.

Move setting scripts to the package.cmake location suggested.
2023-03-16 13:54:19 -05:00
Clayton Calabrese 15d92a1797 use proper arg instead of empty string in launch transaction generators 2023-03-16 12:34:45 -05:00
Clayton Calabrese 5e21ecfea4 handle whitespace stripping in launch transaction generators 2023-03-16 12:31:37 -05:00
Clayton Calabrese 07ec10dd46 update readme to reflect port endpoint changes in performance harness 2023-03-16 11:03:47 -05:00
Peter Oschwald 38f8c59642 Address peer review comment. 2023-03-16 10:54:07 -05:00
Clayton Calabrese e3915ba846 merge from main 2023-03-16 10:53:05 -05:00
766C6164 6e0672ece4 Addressing feedback 2023-03-16 11:52:01 -04:00
Peter Oschwald d4ffa14da8 Merge pull request #829 from AntelopeIO/ph-fix-bug-and-arg-passing
[PH] fix bug and arg passing
2023-03-16 08:37:06 -05:00
Peter Oschwald c8d36c2ff7 Merge branch 'eosio-launcher-python-port' into dev-install-add-testharness 2023-03-16 08:30:41 -05:00
Peter Oschwald 315874ae2f DataDir now returns absolute path instead of relative.
Don't add cwd to the front of the already absolute path. Fixes error where unix socket path  was too long.
2023-03-15 23:59:57 -05:00
Peter Oschwald ed5aeca689 Fix comment to reflect updated floor in range. 2023-03-15 23:06:05 -05:00
Peter Oschwald e94cb14af8 Fix command line argument passing.
When additional command line arguments were added to performance_test_basic.py, some were inadvertently missed being passed from performance_test down to the performance_test_basic.  Update the argument passing to match that in performance_test_basic.py.
2023-03-15 23:01:11 -05:00
Jonathan Giszczak 9921db1a5c Avoid division by zero in performance_test. 2023-03-15 23:01:04 -05:00
Peter Oschwald 74696f2c0c Fix bug causing possible division by 0.
If the targetTps is allowed to be 0, there can be a division by 0 error TpsTrxGensConfig because the numGenerators would be 0 and thus initialTpsPerGenerator would be division by 0.  Fix this error through starting search floor at min 1 as well as capping the min to the floor.
2023-03-15 22:59:39 -05:00
Peter Oschwald d55b043b8d Merge branch 'eosio-launcher-python-port' into dev-install-add-testharness 2023-03-15 22:02:10 -05:00
Peter Oschwald b2db52d14b Update install mkdir and symbolic linking steps.
Existing steps were failing to work with package and old versions of cmake.
2023-03-15 21:24:28 -05:00
Vlad 82093b0203 Merge branch 'main' into snapshot-api 2023-03-15 21:58:39 -04:00
Huang-Ming Huang 58d6eb0327 Merge pull request #802 from AntelopeIO/huangminghuang/rm-eosio-blocklog 2023-03-15 17:56:10 -05:00
Vlad 152198f779 Merge branch 'main' into snapshot-api 2023-03-15 18:25:17 -04:00
Huang-Ming Huang e6020fbec2 address PR comments 2023-03-15 17:10:50 -05:00
Lin Huang 1e042d15df Merge pull request #823 from AntelopeIO/merge_3_2_2_version_bump_to_main
[3.2 -> Main] Merge 3.2.2 version bump to main
2023-03-15 18:07:03 -04:00
766C6164 b72027cf22 should allow loop to run from start to finish 2023-03-15 18:03:48 -04:00
Lin Huang 0f15f5f94a Merge branch 'main' into merge_3_2_2_version_bump_to_main 2023-03-15 17:33:24 -04:00
Vlad 135a9ee265 Merge branch 'main' into snapshot-api 2023-03-15 17:30:00 -04:00
766C6164 696f30f8ed more selectability for invalid request 2023-03-15 17:22:52 -04:00
Lin Huang 5cac6638ed Merge pull request #776 from AntelopeIO/parallel_readonly_trxs
Parallelize Read-only Transaction Execution
2023-03-15 17:02:03 -04:00
Jonathan Giszczak 156a055bcc Fix test bug. 2023-03-15 15:29:05 -05:00
Jonathan Giszczak e7b4866553 Missed a moved variable in performance test basic. 2023-03-15 14:57:49 -05:00
Jonathan Giszczak ecc8fb9b04 Fix merge error. 2023-03-15 14:43:12 -05:00
jgiszczak 794b4b4a04 Merge branch 'main' into eosio-launcher-python-port 2023-03-15 14:34:32 -05:00
Jonathan Giszczak a17d8f4293 Make network isolation default disabled but enabled in CI/CD.
Remove some obsolete and broken test scripts.
2023-03-15 14:32:37 -05:00
Huang-Ming Huang 22605db687 address PR comment 2023-03-15 14:26:21 -05:00
Lin Huang a5036cab0d Merge branch 'main' into parallel_readonly_trxs 2023-03-15 15:25:35 -04:00
Lin Huang c2c41c2c5c Merge branch 'main' into merge_3_2_2_version_bump_to_main 2023-03-15 15:07:14 -04:00
ClaytonCalabrese 1e70108ab4 Merge pull request #827 from AntelopeIO/remove_read_log_data
[PH] [4.0] Remove read_log_data.py
2023-03-15 14:06:34 -05:00
Huang-Ming Huang 5e48d00e22 Merge branch 'main' into huangminghuang/rm-eosio-blocklog 2023-03-15 13:00:26 -05:00
Clayton Calabrese cce332d1c9 remove undesired read_log_data.py and related components 2023-03-15 12:57:15 -05:00
jgiszczak 6023f71672 Merge branch 'main' into eosio-launcher-python-port 2023-03-15 12:38:35 -05:00
Peter Oschwald a211e57c8b Merge pull request #819 from AntelopeIO/ph-add-performance-test
[PH] Add performance test to CI/CD
2023-03-15 12:36:59 -05:00
Lin Huang 07fad93eb2 restore VERSION_SUFFIX to dev after merging 3.2.2 version bump 2023-03-15 13:24:09 -04:00
Lin Huang 061f010258 Merge pull request #821 from AntelopeIO/bump_to_3_2_2
[3.2] Bump Leap version to release 3.2.2
2023-03-15 13:06:29 -04:00
Lin Huang 68df37da0c Bump Leap version to release 3.2.2 2023-03-15 12:34:27 -04:00
766C6164 b25ee3c306 break after unschedule 2023-03-15 11:27:55 -04:00
Huang-Ming Huang 75fb80b6f8 get_raw_block api endpoint 2023-03-15 08:44:39 -05:00
Peter Oschwald 0a01800886 Add performance test to excercise user defined contract and test action with data file. 2023-03-15 08:23:32 -05:00
Peter Oschwald e43d6339e7 Add performance_test run to long_running_tests to exercise performance_test.py. 2023-03-15 08:04:30 -05:00
Peter Oschwald 39c2242d17 Fix some dataclass initialization for python 3.11 2023-03-15 07:57:43 -05:00
766C6164 d0d5d02f0d one more fix 2023-03-14 22:30:59 -04:00
766C6164 1041600558 logic fix 2023-03-14 22:05:39 -04:00
766C6164 3ec37d2eee fixed ups 2023-03-14 21:38:54 -04:00
Peter Oschwald d56b97e527 Update core_symbol imports to reflect it being part of TestHarness module. 2023-03-14 19:16:01 -05:00
766C6164 41601acac4 make sure future scheduled snapshots treated correctly 2023-03-14 20:08:43 -04:00
Peter Oschwald 6f16347f6e Fix install steps to only apply to COMPONENT dev 2023-03-14 18:46:21 -05:00
Jonathan Giszczak c6b839025e Correct syntax of suggested change. 2023-03-14 18:23:34 -05:00
766C6164 dfe1c55ed6 Addressing feedback 2023-03-14 19:20:46 -04:00
jgiszczak 3346d1e04f Create output directory just-in-time for the shutdown case.
Co-authored-by: Scott B <Scott@TheBaileyFamily.org>
2023-03-14 18:12:09 -05:00
Peter Oschwald 0a1ec82bcd Add TestHarness python integration scripts to dev-install package. 2023-03-14 18:11:08 -05:00
Peter Oschwald f81921ad3b Fix lost force option. 2023-03-14 18:01:08 -05:00
Clayton Calabrese 26da362b5d Convert Cluster's connectionPairList to match proper format 2023-03-14 16:04:17 -05:00
Lin Huang d0ef1cf667 revert _ro_num_active_trx_exec_tasks to uint32_t 2023-03-14 17:02:09 -04:00
Lin Huang 9adc66513e make window switching assert conditions stronger 2023-03-14 16:42:43 -04:00
Clayton Calabrese 3e19ad1fb0 rework when splitting of connectionpairList happens to simplify use 2023-03-14 13:27:25 -05:00
766C6164 dfc8d629f3 cleaned up listeners/handlers 2023-03-14 14:03:06 -04:00
766C6164 c8487beb17 Renamed and cleaned up last test 2023-03-14 12:38:28 -04:00
Lin Huang 8997ae2f89 make exec_queue parameter explicit in all APIs 2023-03-14 11:58:55 -04:00
Clayton Calabrese 9a2eb7b85b allow passing of endpoints in addition to ports. Create even distribution of generators accross ports based on number of ports passed to the transaction generator launcher 2023-03-14 10:25:56 -05:00
Lin Huang 8502c2ea66 move add_greylist_accounts and remove_greylist_accounts to general queue; correct an error text 2023-03-14 09:53:28 -04:00
766C6164 dbf901a55f Quit node gracefully on scheduler errors 2023-03-13 22:15:40 -04:00
Lin Huang 76bef699db move more read-only-non-safe operations to general queue 2023-03-13 21:47:08 -04:00
766C6164 b4b677866e Merge branch 'snapshot-api' of https://github.com/AntelopeIO/leap into snapshot-api 2023-03-13 21:24:56 -04:00
766C6164 ec624b5dcc Improved snapshot_diff test 2023-03-13 21:24:40 -04:00
Lin Huang 7f9002f10f Move update_runtime_options, set_whitelist_blacklist, and schedule_protocol_feature_activations to general queue 2023-03-13 18:21:18 -04:00
Lin Huang 9a9ba76f5b Merge branch 'main' into parallel_readonly_trxs 2023-03-13 18:03:58 -04:00
Kevin Heifner cf75235531 Merge pull request #809 from AntelopeIO/GH-808-test
Test fix: Increase abi-serializer-max-time-ms & http-max-response-time-ms for test
2023-03-13 16:15:52 -05:00
Jonathan Giszczak 6b78bac09c Remove eosio-launcher and testnet.template shell script. 2023-03-13 16:03:45 -05:00
Lin Huang ae158d5a77 fix merge conflicts from Main 2023-03-13 16:12:49 -04:00
Kevin Heifner 8f2b48e2a8 GH-808 All other integration tests set a high abi-serializer-max-time-ms and http-max-response-time-ms. Increase for this test as well. 2023-03-13 14:40:24 -05:00
Lin Huang 832db1158d Merge branch 'main' into parallel_readonly_trxs 2023-03-13 15:37:02 -04:00
Huang-Ming Huang fd9c2a64b9 fix snapshot test 2023-03-13 14:00:43 -05:00
Kevin Heifner 2573a5e7f5 Merge pull request #623 from AntelopeIO/feature_prometheus_plugin
Add Prometheus Plugin
2023-03-13 13:57:50 -05:00
Huang-Ming Huang 63157c187b fix unittest 2023-03-13 13:20:36 -05:00
Lin Huang 1880d22796 fail some trxs on authorization and expiration; wait sufficient time for all transactions to be executed 2023-03-13 14:09:34 -04:00
Kevin Heifner 6475b8fe70 Merge branch 'main' into feature_prometheus_plugin 2023-03-13 13:05:29 -05:00
Huang-Ming Huang e643eb6331 fix tests 2023-03-13 12:21:53 -05:00
Vlad df5ad0cf0c Merge branch 'main' into snapshot-api 2023-03-13 12:50:13 -04:00
Lin Huang 536546e12a Merge branch 'main' into parallel_readonly_trxs 2023-03-13 11:56:57 -04:00
Matt Witherspoon 2a9c20cc16 Merge pull request #807 from AntelopeIO/fix_ship_session_test_linkage
fix mixed up boost test linkage in ship session_test
2023-03-13 08:55:47 -07:00
Lin Huang e0feb2466f put back chain.is_building_block() check 2023-03-13 11:15:23 -04:00
766C6164 24cd36d37c Fix for the flakiness of snapshot test 2023-03-13 00:16:59 -04:00
Lin Huang a39e7b59a8 do not check is_building_block 2023-03-12 22:29:58 -04:00
Lin Huang 84fd3ada3c Add read-only trxs unit tests test_read_only_trx.cpp 2023-03-12 21:24:35 -04:00
Lin Huang adde995462 Merge branch 'main' into parallel_readonly_trxs 2023-03-12 21:17:09 -04:00
Jonathan Giszczak 02e7433a37 More missed renames of Queries class. 2023-03-12 18:22:03 -05:00
Matt Witherspoon 84c48b78e9 fix mixed up boost test linkage in ship session_test 2023-03-12 19:11:38 -04:00
Jonathan Giszczak 44ed18203e Fix missed rename of Queries class. 2023-03-12 18:01:40 -05:00
Kevin Heifner df5dd69af2 Merge pull request #805 from AntelopeIO/log-spam
Improve logging during syncing when `producer_plugin` `debug` level is enabled
2023-03-11 13:05:03 -06:00
Kevin Heifner b020a077ec Add comment 2023-03-11 12:13:11 -06:00
Lin Huang f573906fe2 correct typos in comments 2023-03-11 11:00:01 -05:00
Kevin Heifner ff671fcd35 Improve logging during syncing when producer_plugin debug level is enabled. 2023-03-11 08:34:25 -06:00
Jonathan Giszczak cad96d77e3 Address review comments.
CMake simplification.
Rename Queries to NodeosQueries.
Make transferFundsCmdArr conventionally accessible.
Rewrite some ancient C-style code to something more Pythonic.
Make appropriate use of sys.executable.
2023-03-10 19:01:09 -06:00
Clayton Calabrese e12d2befb8 Merge branch 'eosio-launcher-python-port' of https://github.com/AntelopeIO/leap into eosio-launcher-python-port 2023-03-10 17:42:39 -06:00
Clayton Calabrese 7aafa96d3d merge from main 2023-03-10 17:42:01 -06:00
jgiszczak 7d4a9e802e Reduce CMakeLists verbosity still further.
Co-authored-by: Scott B <Scott@TheBaileyFamily.org>
2023-03-10 17:35:42 -06:00
Clayton Calabrese 52606ac5fe resolve some cleanup from merge PR 2023-03-10 17:23:17 -06:00
Lin Huang debcd87f70 Merge branch 'main' into parallel_readonly_trxs 2023-03-10 18:18:15 -05:00
Peter Oschwald cf833519a5 Merge pull request #803 from AntelopeIO/ph_trxgen_remove_contracts_dep
[PH] Remove unnecessary dependency on contracts.
2023-03-10 16:46:44 -06:00
Lin Huang 5bc9c1ab72 correct typos in comments 2023-03-10 17:09:10 -05:00
ClaytonCalabrese f8118ee918 Merge pull request #804 from AntelopeIO/merge_performance_harness_phase2_python_launcher
[TH] Merge Main Containing PH Phase 2
2023-03-10 15:46:09 -06:00
Lin Huang d6a0062ca1 more comments and finishing touch 2023-03-10 16:33:52 -05:00
Clayton Calabrese 6e3ee81336 merge main containing performance test phase 2 into python launcher 2023-03-10 13:25:41 -06:00
Peter Oschwald 3be20fa28b Remove unnecessary dependency on contracts. 2023-03-10 13:06:51 -06:00
Huang-Ming Huang d5deb4eef1 remove eosio-blocklog 2023-03-10 11:56:54 -06:00
Lin Huang 2d5a313f00 Merge branch 'main' into parallel_readonly_trxs 2023-03-10 11:51:51 -05:00
Lin Huang 23baf6dfe9 Merge branch 'parallel_readonly_trxs' of https://github.com/AntelopeIO/leap into parallel_readonly_trxs 2023-03-10 11:51:01 -05:00
Lin Huang 48b40afbca add a test of doing read-only trxs, send_transaction, and push_block in parallell; improve test names 2023-03-10 11:50:36 -05:00
Scott B eac39208ff Merge pull request #799 from AntelopeIO/sbailey/autofind_llvm_7-11
Search for LLVM versions 7-11, prefering latest version.
2023-03-10 10:15:47 -06:00
Lin Huang 7e4b451c9b Merge branch 'main' into parallel_readonly_trxs 2023-03-10 11:04:10 -05:00
Lin Huang 5522e274af compile when EOSIO_EOS_VM_OC_RUNTIME_ENABLED is not defined 2023-03-10 11:03:31 -05:00
Peter Oschwald f9becdbf21 Merge pull request #473 from AntelopeIO/feature_performance_harness_stage_2
[PH] Feature performance harness stage 2 development
2023-03-10 09:46:46 -06:00
Lin Huang ed647f8628 make code_cache_sync (used by EOSIO_EOS_VM_OC_DEVELOPER) multi-threaded safe 2023-03-10 10:39:54 -05:00
Scott Bailey cb160e00c2 untabify 2023-03-10 09:24:07 -06:00
Peter Oschwald da92673aff Merge branch 'main' into feature_performance_harness_stage_2 2023-03-10 09:01:41 -06:00
Peter Oschwald a9aea207be Switch to support older versions of python.
Before text=True (3.7) there was universal_newlines=True. Ubuntu 18 build still running on older version of python.
2023-03-10 08:56:50 -06:00
Lin Huang 7f258bcd43 for dry-run, only append action_receipt_digests; add more comments about thread-local data 2023-03-10 09:20:49 -05:00
Scott Bailey ab0752c7c9 Ubuntu18 default CMake is 3.10 and will not execute the search path. 2023-03-10 07:58:47 -06:00
Scott Bailey 0c180d04c5 Addressing review comment. 2023-03-10 07:49:32 -06:00
Lin Huang e0c3b9daaf set a hard limit of read-only trx thread number for EOS VM OC 2023-03-09 20:37:04 -05:00
Lin Huang 94d8f4470b delete removed abi_json_to_bin and abi_bin_to_json from read_only_trx_test.py 2023-03-09 18:37:45 -05:00
Lin Huang 46b0a2a55c Merge branch 'main' into parallel_readonly_trxs 2023-03-09 17:50:09 -05:00
Kevin Heifner 8bf37aac8a Merge pull request #797 from AntelopeIO/GH-788-remove-abi
Remove deprecated `/v1/chain/abi_bin_to_json` and `/v1/chain/abi_json_to_bin`
2023-03-09 16:49:14 -06:00
Peter Oschwald a24b05cd4e Switch to support older versions of python.
capture_output not added until python 3.7. Ubuntu 18 build still running on older version of python.
2023-03-09 16:33:03 -06:00
Peter Oschwald 93f52ea34f Don't require these find packages, which are already being done higher up. 2023-03-09 16:20:50 -06:00
Peter Oschwald 7ee35bb31d Generate *PluginArgs.py files directly.
Since they are now being generated they will always be kept in sync with nodeos arguments and the validation test is no longer needed.
2023-03-09 16:14:01 -06:00
Peter Oschwald 9063dd87e1 Addressing peer review comments.
Add long form for help message.

Make sure launch_transaction_generators is added to the module.

Remove executable bits from scripts internal to the module.
2023-03-09 15:05:53 -06:00
Peter Oschwald df957cd13d Addressing peer review comment to remove unused code. 2023-03-09 15:04:20 -06:00
Jonathan Giszczak 094448ac06 Remove obsolete support for txn_test_gen_plugin.
Restore a missed nodeos version hardcoding.
Whitespace cleanup.
2023-03-09 14:38:16 -06:00
Peter Oschwald 6ba406ff2d Address peer review comments.
Moving some functions out of trx_generator since they don't need to be member functions.

Addressing a couple missed const qualifiers on arguments.
2023-03-09 14:31:25 -06:00
Scott Bailey 4394506093 Search for LLVM versions 7-11, prefering latest version. 2023-03-09 14:20:20 -06:00
Lin Huang 70a6c94b3a Use correct window deadline and max trx time 2023-03-09 15:17:27 -05:00
Kevin Heifner c2c784fb25 GH-789 Fix regex 2023-03-09 14:09:28 -06:00
Kevin Heifner 2099dc1d36 GH-789 Remove --private-key option from nodeos 2023-03-09 14:05:47 -06:00
Peter Oschwald 5ec692a2be Fixup documentation for missing arguments. 2023-03-09 13:54:14 -06:00
Huang-Ming Huang cdc3ffe4da Merge pull request #796 from AntelopeIO/huangminghuang/fix_prometheus_test
Huangminghuang/fix_prometheus_test
2023-03-09 13:48:23 -06:00
Kevin Heifner 7baee720cd GH-788 Remove abi_json_to_bin 2023-03-09 13:39:27 -06:00
Kevin Heifner d680c62f79 GH-788 Remove abi_bin_to_json 2023-03-09 13:33:02 -06:00
Lin Huang 2cac6cd13f fix a capture reference probem in http_plugin::make_app_thread_url_handler, remove duplicate code in transient_trx logging, and some small changes 2023-03-09 14:27:09 -05:00
Peter Oschwald 500814876e Addressing peer review comments. 2023-03-09 13:26:13 -06:00
Peter Oschwald 1c612e8189 Update ProducerPluginArgs for newly added arguments. 2023-03-09 13:03:36 -06:00
Peter Oschwald 93fc50a277 Merge branch 'main' into feature_performance_harness_stage_2 2023-03-09 13:00:25 -06:00
766C6164 041d897df0 Addressing feedback 2023-03-09 13:55:08 -05:00
Peter Oschwald 045db81995 Addressing peer review comments.
Newer versions of Python, e.g. 3.11 require use of default_factory in dataclasses.

Newer versions of python/numpy no longer require np predicate before float, and can use float directly.
2023-03-09 12:51:16 -06:00
Huang-Ming Huang 0dd648a10e Merge pull request #795 from AntelopeIO/huangminghuang/prometheus_int_test
prometheus plugin integeration test
2023-03-09 12:49:30 -06:00
Lin Huang 2b67c0f654 Merge branch 'main' into parallel_readonly_trxs 2023-03-09 12:06:21 -05:00
Peter Oschwald c6717c4054 Peer review comment.
Use variable to make this easier to read and follow.
2023-03-09 10:23:26 -06:00
Huang-Ming Huang 70fe996081 Merge pull request #793 from AntelopeIO/huangminghuang/strike-rule-main
[3.2 -> main] subjective-account-max-failures-window-size
2023-03-09 10:09:45 -06:00
Lin Huang f250a2d545 add transient_trx_success_tracing and transient_trx_failure_tracing for dry-run and read-only transactions; remove a redundant db_read_only_mode_guard.cancel 2023-03-09 10:46:11 -05:00
Peter Oschwald 72451aad53 Address peer review comments.
Combine pieces of argument onto same line.

Remove trailing whitespace.
2023-03-09 08:57:14 -06:00
Peter Oschwald bafd7ddd69 Address peer review comments.
Break up some rather long lines of code.
2023-03-09 08:53:17 -06:00
Peter Oschwald 173fff951f Fix braces. 2023-03-09 08:36:59 -06:00
Huang-Ming Huang 2b469c4748 remove num_call assertion 2023-03-09 02:15:46 -06:00
Huang-Ming Huang c1c32ee562 head_block_num 2023-03-08 22:58:48 -06:00
Huang-Ming Huang 35df1bc591 Merge remote-tracking branch 'origin/feature_prometheus_plugin' into huangminghuang/prometheus_int_test 2023-03-08 22:47:16 -06:00
Huang-Ming Huang 9784e89666 create integeration test 2023-03-08 22:05:53 -06:00
Kevin Heifner c0ed157959 Add tracking of num_peers and num_clients 2023-03-08 21:14:19 -06:00
Kevin Heifner ba8ba7f0e9 Use tlog for trace logging of adding metrics 2023-03-08 21:09:09 -06:00
Kevin Heifner 3e2fd4d55b Merge remote-tracking branch 'origin/main' into feature_prometheus_plugin 2023-03-08 21:02:04 -06:00
Kevin Heifner 8eb0d86f71 Cleanup for peer review comments 2023-03-08 21:01:40 -06:00
Lin Huang 16e5a1c5ff make read_only_trx_test handle clean-run properly 2023-03-08 21:19:13 -05:00
Lin Huang 832fa96e09 fix crash caused by handle_push_result 2023-03-08 20:11:23 -05:00
Lin Huang 3a35e0e799 revert back pushing receipts, correct a commment about non-parallized read-only trx 2023-03-08 18:33:29 -05:00
Jonathan Giszczak 045b439cfa Update auto-bp-peering test for new launcher topology format.
Also fix typos in comments.
2023-03-08 17:30:54 -06:00
Peter Oschwald 778ff304e6 Cleaning up using namespace statements and namespace qualifiers. 2023-03-08 16:43:56 -06:00
Huang-Ming Huang b1972b154e Merge pull request #794 from AntelopeIO/huangminghuang/prometheus-fix
fix create_metrics_listener
2023-03-08 15:18:22 -06:00
Huang-Ming Huang abf26654a0 fix mutable 2023-03-08 14:33:28 -06:00
Huang-Ming Huang 3bcf55d1f7 address PR comment 2023-03-08 14:28:30 -06:00
Huang-Ming Huang cb153b637b fix create_metrics_listener 2023-03-08 14:20:55 -06:00
Jonathan Giszczak 320cc044aa Fix defect in launcher_test when no asserts found in log. 2023-03-08 13:11:59 -06:00
Lin Huang 8128ea9502 make handle_push_result some simpler and rename exhausted to retry to better reflect intention. 2023-03-08 14:02:37 -05:00
Peter Oschwald 3cd1b3609c Addressing peer review comments
Updates to emplace_back, push_back, transform usage.
2023-03-08 13:01:51 -06:00
Jonathan Giszczak 178f3988db Manually set GITHUB_ACTIONS environment variable in custom docker run. 2023-03-08 12:52:46 -06:00
Jonathan Giszczak 784fc5e176 Github 2023-03-08 11:57:25 -06:00
Peter Oschwald 2d31597efc Put back in blank line so list will render properly. 2023-03-08 11:45:41 -06:00
Peter Oschwald eed59be134 Work to coalesce arguments into config objects.
Additional work to clean up argument handling in trx generator main.

Drop a couple helper functions that we not needed.

Don't pass arguments into member functions that could simple access member variables.
2023-03-08 11:39:18 -06:00
Jonathan Giszczak 7d36182587 Merge branch 'eosio-launcher-python-port' of github.com:AntelopeIO/leap into eosio-launcher-python-port 2023-03-08 11:24:11 -06:00
Jonathan Giszczak a8c8f4d278 Fix misspelling. 2023-03-08 11:23:58 -06:00
Huang-Ming Huang 19cd5ee282 Merge remote-tracking branch 'origin/release/3.2' into huangminghuang/strike-rule-main
# Conflicts:
#	plugins/producer_plugin/producer_plugin.cpp
2023-03-08 11:16:53 -06:00
Huang-Ming Huang 7988545513 Merge pull request #785 from AntelopeIO/huangminghuang/strike-rule-3.2
[3.1 -> 3.2] subjective-account-max-failures-window-size
2023-03-08 10:45:19 -06:00
Clayton Calabrese 29564f6a6f Remove hardcoded number of ports in transaction generator 2023-03-08 09:45:20 -06:00
Huang-Ming Huang 264ff183cb address PR comment 2023-03-08 09:31:40 -06:00
Kevin Heifner efc31df65d Merge pull request #786 from AntelopeIO/external-order
Use appbase with external order for priority queue.
2023-03-08 07:20:02 -06:00
Kevin Heifner 740e60de64 Update appbase to head of main 2023-03-08 07:05:13 -06:00
Lin Huang 7894aabf1e refactor push_read_only_transaction to reuse common push transaction result handling 2023-03-07 22:12:44 -05:00
jgiszczak 6073cce8d6 Merge branch 'main' into eosio-launcher-python-port 2023-03-07 18:48:24 -06:00
Jonathan Giszczak 9bd0629176 Github 2023-03-07 18:25:49 -06:00
Clayton Calabrese 5747877d1c update readmes for trxgen and perf test to fit new port system 2023-03-07 17:45:19 -06:00
Clayton Calabrese 1c2f0567ce account for other routes into transactiongeneratorlauncher when dealing with ports 2023-03-07 16:55:33 -06:00
Clayton Calabrese 5baeede259 evenly distribute created transaction generators across multiple producer's ports 2023-03-07 16:17:29 -06:00
Kevin Heifner 8d7845f89c Use correct register_plugin of appbase 2023-03-07 15:51:24 -06:00
Peter Oschwald 23670d00ca Reintroduce stop-on-trx-failed argument.
Inadvertently removed in commit d8d9fa3.
2023-03-07 15:25:22 -06:00
Lin Huang 7b529301a3 Merge branch 'main' into parallel_readonly_trxs 2023-03-07 15:44:49 -05:00
Peter Oschwald bbf4a2e110 Merge branch 'main' into feature_performance_harness_stage_2 2023-03-07 13:21:00 -06:00
Peter Oschwald fe8e3dfca3 Clean up argument handling per peer review suggestions. 2023-03-07 13:20:23 -06:00
766C6164 dec7c1103a Fixed whitespace plus additional test 2023-03-07 14:01:18 -05:00
Peter Oschwald ed797fbc16 Merge pull request #787 from AntelopeIO/https-cleanup-in-http-plugin-test
Cleanup some missed https support from test that was missed.
2023-03-07 12:56:06 -06:00
Lin Huang f04718b930 do not use mutex for code_cache_async::get_descriptor_for_code and protect _cache_index.relocate 2023-03-07 13:44:15 -05:00
Peter Oschwald 8470e01f24 Cleanup some missed https support from test that was missed. 2023-03-07 12:27:42 -06:00
Peter Oschwald 71a155b9cf Updates for changes in nodeos plugin args from merge from main. 2023-03-07 12:20:41 -06:00
Clayton Calabrese 0ec3c58be4 remove hardcoded use of TestLogs name from tests 2023-03-07 12:07:50 -06:00
Lin Huang 7702f1a6d3 protect code cache from evicting entries while read-only trxs threads are executing 2023-03-07 12:15:01 -05:00
Peter Oschwald 5d3988570c Merge branch 'main' into feature_performance_harness_stage_2 2023-03-07 10:48:27 -06:00
Kevin Heifner cd42afafcb Merge pull request #784 from AntelopeIO/fix-warn
Minor cleanup and fix for clang warning
2023-03-07 10:41:34 -06:00
Kevin Heifner b3a1eafdaf Use appbase with external order for priority queue. 2023-03-07 10:24:06 -06:00
Peter Oschwald 602e9eec89 Merge branch 'main' into feature_performance_harness_stage_2 2023-03-07 10:21:58 -06:00
Lin Huang c2ef8b2f59 use _producers.empty() instead _production_enabled to determine production node 2023-03-07 10:43:59 -05:00
Lin Huang 5ace1197c6 Do not post transaction related RPCs to general queue, revert not to do push_receipt for read-only trx, and move _ro_trx_exec_tasks_fut.clear inside post task 2023-03-07 10:26:40 -05:00
766C6164 2c5bb903e7 Cleanup requests with invalid start 2023-03-07 10:02:21 -05:00
766C6164 dc5c15426f Updated snapshot_diff_test to use scheduler 2023-03-07 10:01:24 -05:00
Kevin Heifner 62b9337cb8 Minor cleanup and fix for clang++ warning: suggest braces around initialization of subobject [-Wmissing-braces] 2023-03-07 08:52:58 -06:00
Huang-Ming Huang 9d1ea27ed7 Merge pull request #777 from AntelopeIO/huangminghuang/strike-rule
[3.1] subjective-account-max-failures-window-size
2023-03-07 08:19:34 -06:00
Lin Huang 428de82034 update _idle_trx_time, correct assertion text for read-only-thread with production node 2023-03-07 09:12:25 -05:00
766C6164 7cf95895eb Better handling of "now" snapshots 2023-03-07 08:42:21 -05:00
Lin Huang 3598fda51b make custom_appbase as an interface so its users do not need to use relative include path in their CMakeList.txt files 2023-03-07 08:36:21 -05:00
Lin Huang 37f374f2d5 fix merging conflict errors 2023-03-06 22:33:29 -05:00
Huang-Ming Huang a8877f19cd extract block_time_tracker 2023-03-06 21:26:31 -06:00
Huang-Ming Huang bd8d23a2e8 Merge remote-tracking branch 'origin/release/3.1' into huangminghuang/strike-rule-3.2
# Conflicts:
#	plugins/producer_plugin/producer_plugin.cpp
2023-03-07 08:38:58 -06:00
Lin Huang 09434dabfb Merge branch 'main' into parallel_readonly_trxs 2023-03-06 21:51:05 -05:00
Lin Huang 30eb5da5c6 do not all multi-threaded read-only transaction execution when production is enabled; revert net_plugin process_packed_transaction changes; and some minor changes 2023-03-06 21:37:58 -05:00
766C6164 d0a21f7828 Added multinode py test, fixed bug in scheduler 2023-03-06 20:42:54 -05:00
Jonathan Giszczak a0ddca815b Github 2023-03-06 19:33:56 -06:00
Jonathan Giszczak dfd1444e1c Github 2023-03-06 19:32:51 -06:00
Jonathan Giszczak 3677252f0a Indentation. (Lost in auto-merge?) 2023-03-06 18:46:17 -06:00
Kevin Heifner 283daf3d2e Use http_plugin max_response_time 2023-03-06 18:40:48 -06:00
Jonathan Giszczak 792f5184a1 Merge branch 'eosio-launcher-python-port' of github.com:AntelopeIO/leap into eosio-launcher-python-port 2023-03-06 18:13:14 -06:00
Jonathan Giszczak ac5286401c Missing seccomp setting from NP and LR tests. 2023-03-06 18:12:27 -06:00
jgiszczak e2c8a2ad81 Merge branch 'main' into eosio-launcher-python-port 2023-03-06 18:02:42 -06:00
Kevin Heifner c0c0659822 Fix merge conflicts 2023-03-06 17:53:03 -06:00
Jonathan Giszczak 70e23921de Github 2023-03-06 17:49:50 -06:00
Jonathan Giszczak b4fb60f1c9 Try uid rather than euid for Github environment. 2023-03-06 17:35:38 -06:00
Lin Huang 809d72e029 small cleanups in controller and producer_plugin 2023-03-06 18:32:51 -05:00
Kevin Heifner cfa3c11bd5 Merge pull request #781 from AntelopeIO/GH-768-logging-main
[3.2 -> main] Move subjective bill log to `all` level of `producer_plugin` logger.
2023-03-06 17:16:27 -06:00
jgiszczak f171585ae8 Merge branch 'main' into eosio-launcher-python-port 2023-03-06 16:59:29 -06:00
Jonathan Giszczak 2e896e3c5a Enable extracting stdout/stderr from CalledProcessError.
Minimum supported Python version now includes these properties.
2023-03-06 16:54:20 -06:00
Jonathan Giszczak 19bd633d07 Auto-detect running integration tests as root or not. 2023-03-06 16:47:14 -06:00
Kevin Heifner a08aeceaef Merge remote-tracking branch 'origin/main' into feature_prometheus_plugin 2023-03-06 15:57:08 -06:00
Gregory Popovitch 0da31eaa35 Merge pull request #738 from AntelopeIO/gh-451
http_plugin: add support for `Expect: 100-Continue' header.
2023-03-06 16:03:40 -05:00
greg7mdp 3e1f6cabe3 Add a comment. 2023-03-06 15:35:28 -05:00
Jonathan Giszczak 4c27d35bd0 Wait for trans in block for each group of protocol features, to ensure prerequisites complete. 2023-03-06 14:35:12 -06:00
Lin Huang 759291d018 Merge branch 'main' into parallel_readonly_trxs 2023-03-06 13:23:53 -05:00
Lin Huang 83de948f5d remove _ro_read_window_pct and use _ro_read_window_minimum_time_us instead, check _ro_read_window_time_us and _max_transaction_time_ms interaction, more conservative on EOS VM OC VM size, and several small enhancements 2023-03-06 13:02:48 -05:00
ClaytonCalabrese 0a5ea49da8 Merge pull request #778 from AntelopeIO/performance_harness_update_log_reader_tests
[PH] Update Log Reader Tests For scrapeBlockTrxDataLog
2023-03-06 11:16:17 -06:00
Huang-Ming Huang 5037c40a61 Merge pull request #744 from AntelopeIO/huangminghuang/auto-bp-peer
Add auto bp peering functionality
2023-03-06 10:59:45 -06:00
greg7mdp 6dc85d861a Address code review comments from @mikelik. 2023-03-06 11:29:23 -05:00
Huang-Ming Huang 71548a6425 Merge branch 'release/3.1' into huangminghuang/strike-rule 2023-03-06 09:37:22 -06:00
Huang-Ming Huang 72c5d299fe add reset time until back 2023-03-06 09:12:30 -06:00
Kevin Heifner 3ed53c2b3e Merge remote-tracking branch 'origin/release/3.2' into GH-768-logging-main 2023-03-06 09:01:51 -06:00
Kevin Heifner 258a06ab82 Merge pull request #779 from AntelopeIO/GH-768-logging-3.2
[3.1 -> 3.2] Move subjective bill log to `all` level of `producer_plugin` logger.
2023-03-06 08:59:36 -06:00
Huang-Ming Huang 5cf31c9929 address PR comment 2023-03-06 08:21:26 -06:00
Kevin Heifner a0ff189eab kick ci/cd 2023-03-06 08:01:08 -06:00
Huang-Ming Huang 6811be23de address PR comments 2023-03-06 07:59:56 -06:00
Kevin Heifner e9976d2ce0 Cleanup 2023-03-06 07:59:41 -06:00
Lin Huang c913c9e098 Assert no active read-only tasks when switching to write window; start read-only tasks before timer; several comment and format improvements 2023-03-06 08:42:35 -05:00
Kevin Heifner bd14a62314 Merge remote-tracking branch 'origin/main' into feature_prometheus_plugin 2023-03-06 06:53:45 -06:00
766C6164 d2aeeb7e3e Fixed pending snapshot test 2023-03-05 21:41:33 -05:00
Lin Huang 5b441a3d68 put _ro_trx_queue and its mutex into a struct, use std::atomic for _ro_num_active_trx_exec_tasks; use fc::microseconds for microsecond members 2023-03-05 21:13:47 -05:00
Vlad c4c448ea6c Merge branch 'main' into snapshot-api 2023-03-05 15:44:29 -05:00
Lin Huang 44af6d8532 use std::thread::id instead of boost::thread::id, combine start methods in thread_utils, and add override to init_thread_local_data in eosvmoc_runtime 2023-03-05 13:42:28 -05:00
Lin Huang fe49865132 Merge branch 'main' into parallel_readonly_trxs 2023-03-05 11:05:49 -05:00
Lin Huang 11c42ce651 Merge pull request #780 from AntelopeIO/fix_logconf
bump appbase version and fix logging.json not working problem
2023-03-05 11:05:17 -05:00
Lin Huang d010733bcf Merge branch 'main' into parallel_readonly_trxs 2023-03-05 10:54:37 -05:00
Kevin Heifner 5b0108f7a2 Merge pull request #774 from AntelopeIO/GH-772-head
Fix issue with reported fork head vs retrieval of block from fork db
2023-03-04 22:08:07 -06:00
Lin Huang 8f83e49f90 Merge branch 'main' into parallel_readonly_trxs 2023-03-04 21:10:16 -05:00
Lin Huang 111e4bd3e4 bump appbase version and fix logging.conf not working problem 2023-03-04 21:04:30 -05:00
Kevin Heifner 83307587a2 GH-768 Log non TRX_TRACE trx logging to all (trace) level logger of producer_plugin. 2023-03-04 14:01:23 -06:00
Kevin Heifner 0046163ad7 GH-768 Move fc_tlog to logger.hpp 2023-03-04 13:52:06 -06:00
Kevin Heifner f13bf0ab1b Merge remote-tracking branch 'origin/release/3.1' into GH-768-logging-3.2 2023-03-04 13:50:49 -06:00
Kevin Heifner 941b525093 Merge pull request #773 from AntelopeIO/GH-768-logging-3.1
[3.1] Move subjective bill log to `all` level of `producer_plugin` logger.
2023-03-04 13:42:53 -06:00
Kevin Heifner a2905e7472 Merge pull request #770 from AntelopeIO/GH-659-ship-test
Test: Add a test that verifies restart from genesis not allowed
2023-03-04 13:41:28 -06:00
Kevin Heifner cf07a4e629 GH-772 Additional cleanup 2023-03-04 13:14:11 -06:00
Kevin Heifner 61173fc332 GH-772 Remove unused variables 2023-03-04 09:11:40 -06:00
Jonathan Giszczak c5e2bcc983 Remove per-node configuration of nodeos version. 2023-03-03 17:41:11 -06:00
greg7mdp 401ece1a58 Forgot to stage this file after merging 2023-03-03 18:13:52 -05:00
greg7mdp 4c93d2fafb Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-03-03 18:05:37 -05:00
Gregory Popovitch 447fc3c722 Merge pull request #745 from AntelopeIO/gh-643
Remove HTTPS support from nodeos & keosd
2023-03-03 17:39:39 -05:00
Clayton Calabrese 60299d5cb5 rename file passed into log_reader_tests to a proper .gz suffix 2023-03-03 15:41:35 -06:00
Clayton Calabrese a631088f4d pass along nodeos version in performance test rather than calculating in multiple places 2023-03-03 15:23:38 -06:00
Clayton Calabrese cfeaa64b41 refactor log_reader use of nodeos version so it isn't recalculated multiple times during a test run 2023-03-03 15:00:41 -06:00
greg7mdp ef17c150ea Merge branch 'main' of github.com:AntelopeIO/leap into gh-643 2023-03-03 15:57:27 -05:00
Kevin Heifner 6444b2796d GH-772 Add a fork_db_head() to consolidate db_read_mode::IRREVERSIBLE check 2023-03-03 14:55:43 -06:00
greg7mdp 837b33ef33 Address PR comment - remove unused parameter. 2023-03-03 15:49:16 -05:00
Clayton Calabrese e6bfc9e214 Add new section to log_reader_tests to ensure 2.0 compatibility doesn't get broken by changes to scrapeBlockTrxDataLog in the future. 2023-03-03 14:27:21 -06:00
jgiszczak 9e5aaf8de9 Merge pull request #538 from AntelopeIO/eosio-launcher-launch-nodeos-unshared
Launch nodeos instances per configuration, unsharing the network first.  Python launcher now used for all tests in place of eosio-launcher.
2023-03-03 14:24:36 -06:00
Jonathan Giszczak e4c20c835c Removing exception in Node pollversion to tolerate the small number of tests which use relaunch or launchcmd. 2023-03-03 13:40:16 -06:00
Jonathan Giszczak e8797dfd4f Restore an increased ctest timeout for plugin_http_api_test. 2023-03-03 11:59:36 -06:00
Lin Huang 4d4e3606b5 Merge branch main to parallel_readonly_trxs 2023-03-03 11:54:20 -05:00
Lin Huang 130fbbf804 make names better to reflect the intentions and update comments 2023-03-03 10:43:48 -05:00
Lin Huang 7d9fd3b771 remove deprecated cleos option read-only for compute_transaction 2023-03-03 10:20:38 -05:00
Peter Oschwald 1e36c5123f Update StateHistoryPluginArgs for new arguments introduced on main. 2023-03-03 09:14:12 -06:00
Kevin Heifner 629aa81aeb GH-772 Simplify fetch_block_state_by_number by using controller fork_db_head_block_id() which checks db mode. 2023-03-03 09:11:14 -06:00
greg7mdp 4ad4135fc2 Update http_pluging API definitions with lambdas taking rvalues
as specified in url_handler.
2023-03-03 10:00:00 -05:00
Kevin Heifner a215b2cd12 GH-772 Simplify fork db head interface on controller. Fixes issue with net_plugin asking for a block that should be available but is not. 2023-03-03 08:49:48 -06:00
greg7mdp 84fa8238b5 update url_handler to take rvalues. 2023-03-03 09:41:36 -05:00
greg7mdp 5613660355 Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-03-03 09:36:14 -05:00
Kevin Heifner 6e7d98ea2c GH-772 Remove unused methods 2023-03-03 08:34:58 -06:00
Peter Oschwald 505b5d8b4a Merge branch 'main' into feature_performance_harness_stage_2 2023-03-03 08:18:16 -06:00
greg7mdp d2a91c9398 Cleanups from PR comments. Thanks @mikelik! 2023-03-03 08:24:14 -05:00
Kevin Heifner e377339f04 GH-768 Move subjective bill log to all level of producer_plugin logger. 2023-03-03 07:10:23 -06:00
766C6164 c7a2f6130e Made schedule_snapshot params optional 2023-03-02 23:49:54 -05:00
766C6164 4be2e1cd13 Removed debug message 2023-03-02 23:41:34 -05:00
766C6164 407e0ba5fe Multiple fixes: pendings, tests, namings 2023-03-02 23:22:52 -05:00
Jonathan Giszczak 27d1430af5 Raise TimeoutError if unable to determine nodeos version. 2023-03-02 17:24:07 -06:00
ClaytonCalabrese d74575396b Merge pull request #771 from AntelopeIO/performance_harness_fix_2_0_compatibility
[PH] Repair Nodeos 2.0 Compatibility with Performance Tests
2023-03-02 17:00:04 -06:00
Kevin Heifner 558f69064b Merge pull request #764 from AntelopeIO/GH-659-ship-rollback-main
[3.2 -> main] SHiP do not truncate logs when starting from genesis
2023-03-02 16:45:04 -06:00
Jonathan Giszczak cfc122d890 Fix merge error. 2023-03-02 16:37:42 -06:00
Jonathan Giszczak c1112fcd48 Remove timeout on plugin_http_api_test.
Have waitForHeadToAdvance sleep a block interval rather than 3s.
Fix an invalid assert syntax in transactions.
2023-03-02 16:36:51 -06:00
Clayton Calabrese 480eb31260 simplify version check for resource monitor plugin constructor in performance tests 2023-03-02 15:55:22 -06:00
Kevin Heifner 993bcbae73 GH-659 Fix indentation 2023-03-02 15:53:29 -06:00
Clayton Calabrese 3f007ba932 fix introduced compatibility issues for nodeos 2.0 in performance tests 2023-03-02 15:26:25 -06:00
Kevin Heifner 05d9c4bfe5 GH-659 Add a test that verifies restart from genesis not allowed 2023-03-02 15:11:05 -06:00
Kevin Heifner d5491960f0 GH-659 Fix merge issue 2023-03-02 15:05:21 -06:00
Kevin Heifner 42f3250826 Merge remote-tracking branch 'origin/main' into GH-659-ship-rollback-main 2023-03-02 14:52:11 -06:00
greg7mdp 5e59a1709a Merge branch 'main' of github.com:AntelopeIO/leap into gh-643 2023-03-02 15:42:41 -05:00
greg7mdp 19acc7d847 Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-03-02 15:42:07 -05:00
Kevin Heifner 4107e46348 Merge pull request #727 from AntelopeIO/GH-627-ship
SHiP move client handling off the main thread
2023-03-02 14:39:43 -06:00
Kevin Heifner e161d29bcf Merge remote-tracking branch 'origin/main' into GH-627-ship 2023-03-02 14:11:26 -06:00
ClaytonCalabrese 397293bd80 Merge pull request #769 from AntelopeIO/performance_harness_reduce_test_db_size
[PH] Reduce Performance Test Database Size Allocation
2023-03-02 13:49:29 -06:00
Huang-Ming Huang 44f8c70d45 Merge pull request #628 from AntelopeIO/GH-592-ship-crash-split-ship-log
Merge SHiP stability fixes & log splitting & memory usage improvements
2023-03-02 13:48:42 -06:00
Clayton Calabrese 9cf5ffe5c0 set cmake test runs of performance_test_basic to a lower value for chain-state-db-size-mb to reduce allocated space 2023-03-02 13:12:17 -06:00
Huang-Ming Huang ef96d952b9 remove unnecessary using 2023-03-02 11:48:13 -06:00
Jonathan Giszczak 19dd2520de Keep Node's self.cmd up to date if a node is relaunched. 2023-03-02 11:18:07 -06:00
Jonathan Giszczak 863360411b Restore lost raise_if_missing argument from bounce/down consolidation. 2023-03-02 11:10:52 -06:00
766C6164 9178e5ef3b Handle situation where mlock_spacing is not specified 2023-03-02 11:39:20 -05:00
Huang-Ming Huang 48a4d871db Merge pull request #758 from AntelopeIO/huangminghuang/gelf-logging
move gelf logging to another thread
2023-03-02 10:35:59 -06:00
766C6164 5819266db8 Addressing feedback 2023-03-02 10:24:21 -05:00
Lin Huang 4a85352462 remove max-read-only-transaction-time option which is not neccessary 2023-03-02 10:09:50 -05:00
Peter Oschwald 85eecb0961 Update ProducerPluginArgs for new arguments introduced on main. 2023-03-02 09:01:24 -06:00
Peter Oschwald 9de88d468b Merge branch 'main' into feature_performance_harness_stage_2 2023-03-02 08:36:30 -06:00
Peter Oschwald ce4f840bfa Merge pull request #766 from AntelopeIO/ph-handle-exception
[PH] Handle exceptions occurring during runTest.
2023-03-02 08:06:59 -06:00
greg7mdp 5530a26449 Merge branch 'main' of github.com:AntelopeIO/leap into gh-643 2023-03-02 09:03:46 -05:00
greg7mdp b71a10c21a Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-03-02 09:02:52 -05:00
Lin Huang f14f2b36e6 Merge branch send_read_only_trx into parallel_readonly_trxs 2023-03-02 08:53:32 -05:00
Lin Huang 3c0e506959 Merge pull request #558 from AntelopeIO/send_read_only_trx
introduce new read-only transaction RPC end point
2023-03-02 08:22:50 -05:00
Lin Huang 2ae98cb29c correct bad comments about dm logging and improve error message for scheduling/cacelling deferred transactions 2023-03-02 07:53:42 -05:00
Lin Huang 4a3b81cf9a set global_action_sequence and recv_sequence to 0 for read-only transactions 2023-03-01 22:21:43 -05:00
Lin Huang 5aecde251b correct add_pending_ram_usage's handling of deep-mind logging 2023-03-01 22:19:47 -05:00
766C6164 cd0d56ab7f Make sure snapshot state preserved 2023-03-01 22:01:21 -05:00
Lin Huang d0c8046edd do not allow state-changing readonly privilege, schedualing and canceling deferred transaction host functions 2023-03-01 21:40:26 -05:00
Kevin Heifner 6080511bbe GH-592 Add comment 2023-03-01 20:20:31 -06:00
766C6164 b14fc5a4b4 Addressing feedback (2/2 minus refactoring) 2023-03-01 21:15:11 -05:00
Huang-Ming Huang 6bc3df865d address PR comments 2023-03-01 19:18:57 -06:00
Jonathan Giszczak 837a5761f1 Restore nodeosVers to performance test ClusterConfig.
Migrate node-specific version-dependent config out of ClusterConfig into
Node.
Fix Cluster killall to use Python launcher.
2023-03-01 19:11:18 -06:00
Lin Huang a7df2e7d59 Merge branch 'main' into send_read_only_trx 2023-03-01 20:01:29 -05:00
Peter Oschwald 576ba161f2 Handle excpetions occurring during runTest. 2023-03-01 18:18:03 -06:00
ClaytonCalabrese c90430b316 Merge pull request #765 from AntelopeIO/test_harness_change_performance_test_defaults
[TH] Revert Unintentional Change to Performance Test Defaults
2023-03-01 17:50:17 -06:00
Clayton Calabrese d144ac5999 revert an unintentional change ot the defaults in performance test 2023-03-01 17:19:19 -06:00
Lin Huang 06cc38e9f7 For EOS-VM-OC, make sure the system has enough virtual memory for the number of read-only transaction execution threads 2023-03-01 18:01:47 -05:00
ClaytonCalabrese 08bd7b5941 Merge pull request #762 from AntelopeIO/performance_harness_performance_test_userTrxDataFile_fix
[PH] expose --user-trx-data-file to performance test
2023-03-01 16:31:33 -06:00
Peter Oschwald de7274be4e Merge pull request #761 from AntelopeIO/ph-update-calc-threads-min
[PH] update calc threads min to give to plugins to the plugin default.
2023-03-01 16:30:06 -06:00
Kevin Heifner d24cbb1509 Merge remote-tracking branch 'origin/release/3.2' into GH-659-ship-rollback-main 2023-03-01 16:23:25 -06:00
Kevin Heifner afd52cb105 Merge pull request #737 from AntelopeIO/GH-659-ship-rollback-3.2
[3.2] SHiP do not truncate logs when starting from genesis
2023-03-01 16:22:19 -06:00
Gregory Popovitch d42b860039 Merge pull request #763 from AntelopeIO/gh-513_main
[3.2 -> main] keosd - Exit program if keosd fails to aquire wallet lock (GH #513)
2023-03-01 17:07:02 -05:00
Clayton Calabrese b152475c8f also fix linearsearch test case for performance test. 2023-03-01 16:02:27 -06:00
greg7mdp 5bdf3fb20a Revert to using code unauthorized (see PR comment). 2023-03-01 16:54:04 -05:00
Clayton Calabrese ddd64861b0 remove unneeded arg in performPtbBinarySearch 2023-03-01 15:39:54 -06:00
greg7mdp 3ec5a36a75 Merge branch 'release/3.2' of github.com:AntelopeIO/leap into gh-513_main 2023-03-01 16:39:15 -05:00
greg7mdp b62ea2b878 Address PR Comments. Return code 417 when Expect fails. 2023-03-01 16:36:38 -05:00
Gregory Popovitch 9c7b0b721e Merge pull request #756 from AntelopeIO/gh-513_rel3.2
[3.1 -> 3.2] keosd - Exit program if keosd fails to aquire wallet lock (GH #513)
2023-03-01 16:28:59 -05:00
Clayton Calabrese bad5a9bc91 expose --user-trx-data-file to performance test 2023-03-01 15:27:55 -06:00
Peter Oschwald ec5db248b7 Update the min threads to start at when calculating number of threads to give to plugins to the plugin default. 2023-03-01 15:26:10 -06:00
Huang-Ming Huang e7a1572118 avoid join called from its own thread 2023-03-01 14:21:20 -06:00
Peter Oschwald 48022c93b6 Update ChainPluginArgs to capture arguments added to chain plugin. 2023-03-01 13:03:33 -06:00
766C6164 962f0a975d Addressing feedback comments 1/2 2023-03-01 13:49:55 -05:00
Lin Huang bc7d7e2c84 use an enum to indicate which queue to post; use write queue for default queue to post; and clean up use of app().post in producer_plugin 2023-03-01 13:41:56 -05:00
greg7mdp 8d524d965f Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-03-01 10:33:35 -05:00
greg7mdp 96fa497a43 Merge branch 'main' of github.com:AntelopeIO/leap into gh-643 2023-03-01 10:21:44 -05:00
Huang-Ming Huang fcbdb0ae98 subjective-account-max-failures-window-size 2023-03-01 06:13:02 -06:00
Huang-Ming Huang b1b7ae76ef fix mark_bp_connection 2023-02-28 20:02:23 -06:00
Huang-Ming Huang 95852be12e address PR comments 2023-03-02 14:02:25 -06:00
Huang-Ming Huang c13777a99c address some PR comments 2023-03-01 15:16:28 -06:00
Peter Oschwald 5531d0e978 Merge branch 'main' into feature_performance_harness_stage_2 2023-02-28 19:41:24 -06:00
Kevin Heifner 248ed21b54 Merge branch 'main' into GH-592-ship-crash-split-ship-log 2023-02-28 19:31:01 -06:00
ClaytonCalabrese e6b2a4ec7e Merge pull request #740 from AntelopeIO/performance_harness_nodeos_config_options
[PH] Expose various Nodeos Options in performance_test_basic
2023-02-28 18:58:53 -06:00
Jonathan Giszczak 4e9a7ec8ec Remove use of eosio-launcher in Cluster killall(). 2023-02-28 18:32:08 -06:00
Huang-Ming Huang a28e873134 Merge pull request #532 from AntelopeIO/huangminghuang/block_log
Add block log partition functionality
2023-02-28 17:57:34 -06:00
Jonathan Giszczak b84b293e08 Consolidate bounce and down implementations in launcher. 2023-02-28 17:33:26 -06:00
Jonathan Giszczak 7c009bb934 Spacing. 2023-02-28 17:32:56 -06:00
Clayton Calabrese 7075447265 add fix for duplicate transaction in transaction generators when resigning transactions 2023-02-28 17:28:03 -06:00
Clayton Calabrese 0fbdbfa4e0 merge from dev branch 2023-02-28 16:15:39 -06:00
766C6164 2eae5267eb Updated yaml formatting 2023-02-28 16:43:31 -05:00
Lin Huang 64aee92db8 make wasmif in controller and executor in eosvmoc_runtime as default member to allow multiple controllers in unittest 2023-02-28 16:22:27 -05:00
Huang-Ming Huang c5b6b0dcc2 More merge fix 2023-02-28 15:00:36 -06:00
Vlad ca1a8d3ad7 Merge branch 'main' into snapshot-api 2023-02-28 15:40:56 -05:00
Clayton Calabrese 0d30973b85 rename eos-vm-oc-enable in performance test to represent it only affecting non producer nodes. Resolve related test failure. 2023-02-28 14:39:06 -06:00
Huang-Ming Huang 76816a83aa address PR comments 2023-02-28 14:21:05 -06:00
Peter Oschwald a5adbda94f Merge pull request #734 from AntelopeIO/ph2-update-docs
[PH] Update docs
2023-02-28 14:06:12 -06:00
Kevin Heifner eddd8373b5 GH-659 Add additional comments 2023-02-28 13:51:08 -06:00
Peter Oschwald 078197250d Update reports in readme. 2023-02-28 13:36:13 -06:00
766C6164 21630d3a5c Added second snapshot request to test 2023-02-28 13:05:23 -05:00
Peter Oschwald cdc00a2385 Merge branch 'feature_performance_harness_stage_2' into ph2-update-docs 2023-02-28 11:09:45 -06:00
ClaytonCalabrese 62126c6482 Merge pull request #757 from AntelopeIO/performance_harness_resolve_duplicate_transaction_ids
[PH] Resolve Duplicate Transaction ID Generation in Transaction Generator
2023-02-28 10:36:28 -06:00
Peter Oschwald 2940d5aa92 Updates per peer review. 2023-02-28 10:18:19 -06:00
greg7mdp 715cd765df Remove reference to http_client_plugin page, which was removed. 2023-02-28 10:30:56 -05:00
Chris Gundlach a88bf8d9fd updates based on feedback from pr 2023-02-28 08:08:27 -06:00
greg7mdp dc66574b2d remove http_client_plugin doc (unneeded after https removal) 2023-02-28 08:59:56 -05:00
Huang-Ming Huang 3b2c22d240 address PR comments 2023-02-27 21:58:09 -06:00
Huang-Ming Huang f3b5c74cc8 more merge issue fix 2023-02-27 21:57:15 -06:00
Huang-Ming Huang 21d988d279 some more merge issue fix 2023-02-28 11:52:52 -06:00
Huang-Ming Huang c5010d9df3 fix merge problem 2023-02-28 11:44:17 -06:00
Huang-Ming Huang a6872c8e84 Merge branch 'main' into huangminghuang/block_log
# Conflicts:
#	libraries/appbase
#	libraries/chain/abi_serializer.cpp
#	libraries/chain/include/eosio/chain/abi_serializer.hpp
#	plugins/chain_plugin/chain_plugin.cpp
2023-02-28 10:10:34 -06:00
Lin Huang be0054bb3c do not enforce max_action_return_value_size for read-only transactions 2023-02-27 17:54:10 -05:00
Clayton Calabrese 1ce9036357 change enable args in performance_test_basic to be store_true instead of bools. Put eos-vm-oc-enable in ptb only onto non producer nodes. Remove duplicate choice in wasm-runtime 2023-02-27 16:36:38 -06:00
Jonathan Giszczak 021597ff7b Fix timing issue in compute_transaction_test. 2023-02-27 15:44:57 -06:00
Clayton Calabrese 6dfb66edaa resolve test failure for ram and cpu performance tests due to id collision 2023-02-27 15:44:53 -06:00
Lin Huang 655c1c58da move custom_appbase from under plugin to under libraries directory 2023-02-27 16:42:51 -05:00
Huang-Ming Huang 63de610175 remove unnecessary return 2023-02-27 15:24:01 -06:00
Huang-Ming Huang 5d0abaf7a2 move gelf logging to another thread 2023-02-27 15:11:35 -06:00
Lin Huang c6df34b1e1 make multi-threaded eos-vm-oc work 2023-02-27 16:08:26 -05:00
Lin Huang 4e04ff329c add an optional init function to be called when a thread is started 2023-02-27 16:06:14 -05:00
Jonathan Giszczak cac4714b9c Fix timing issue in cli_test. 2023-02-27 14:18:32 -06:00
Huang-Ming Huang 733c6057bb fix typo 2023-02-27 12:56:47 -06:00
Huang-Ming Huang e49e1a8909 revert catching fc::exception 2023-02-27 12:50:09 -06:00
Huang-Ming Huang 3617b438b6 address PR comments 2023-02-27 12:27:24 -06:00
Clayton Calabrese 93f7a50d1f add a sanity check for number of transactions scraped from trx gen 2023-02-27 11:57:59 -06:00
greg7mdp 9892f9abf7 Merge branch 'release/3.1' of github.com:AntelopeIO/leap into gh-513_rel3.2 2023-02-27 10:44:29 -05:00
Gregory Popovitch 4957dd5b63 Merge pull request #755 from AntelopeIO/gh-530_main
[3.2 -> main] Avoid logging errors when client disconnects after request (GH #530)
2023-02-27 10:39:47 -05:00
Gregory Popovitch ecc5c4ec11 Merge pull request #754 from AntelopeIO/gh-513_rel3.1
[3.1] keosd - Exit program if keosd fails to aquire wallet lock (GH #513)
2023-02-27 10:39:15 -05:00
Huang-Ming Huang e95ae9c239 address PR comments 2023-02-27 09:28:34 -06:00
Kevin Heifner 06a8032662 Merge pull request #752 from AntelopeIO/GH-659-log
Move initialization of logging before plugin_initialize
2023-02-27 08:05:53 -06:00
Lin Huang 4f9baf57c6 revert thread_ids() method 2023-02-27 09:04:47 -05:00
greg7mdp 91f689483f Merge branch 'release/3.2' of github.com:AntelopeIO/leap into gh-530_main 2023-02-25 19:30:06 -05:00
Alexander Molchevsky 34cda2a910 Merge pull request #751 from AntelopeIO/update_bios_boot_tutorial_main
[3.2 -> main] New protocol features activation was added to the bootstrap process
2023-02-26 00:49:32 +02:00
greg7mdp caa01ca443 main() should return if appbase initialization fails. 2023-02-25 14:39:25 -05:00
Kevin Heifner 9755a45304 GH-659 get_name() returns by value which removes the need for this comment. 2023-02-25 12:36:16 -06:00
Kevin Heifner 6e9e2edd59 GH-659 Change name() to get_name() that returns by value. This prevents accident use of returned const& after logger has been destroyed. 2023-02-25 12:35:50 -06:00
Kevin Heifner 9255393bac GH-659 resource monitor test assumes this is logged, but runs with info level logging. 2023-02-25 12:33:19 -06:00
Kevin Heifner 2c0b46f70f GH-659 Move initialization of logging before plugin_initialize so configured logging works as expected 2023-02-24 21:33:55 -06:00
Gregory Popovitch e226e464c3 Merge pull request #750 from AntelopeIO/gh-530-rel3.2
[3.2] Avoid logging errors when client disconnects after request (GH #530)
2023-02-24 21:52:33 -05:00
Lin Huang ba66693ace simplify thread data by using thread_local for timer and wasm_alloc 2023-02-24 17:52:56 -05:00
Alexander Molchevsky 3cc87ef0af Merge remote-tracking branch 'origin/release/3.2' into update_bios_boot_tutorial_main
Merge updates
2023-02-25 00:44:45 +02:00
Jonathan Giszczak 75caa12f25 Add dependency resolver for protocol features. 2023-02-24 16:30:24 -06:00
Gregory Popovitch 84cd370504 Merge branch 'release/3.2' into gh-530-rel3.2 2023-02-24 17:03:40 -05:00
Huang-Ming Huang aff761c7b4 address PR comment 2023-02-24 15:48:34 -06:00
greg7mdp 3b4c66ba50 Silently close connection upon receiving asio::error::connection_reset 2023-02-24 16:34:11 -05:00
Clayton Calabrese a13f48ba3c merge from main and rerun generate_nodeos_plugin_args 2023-02-24 13:17:55 -06:00
Clayton Calabrese 181fe40036 Merge branch 'main' into feature_performance_harness_stage_2 2023-02-24 11:33:57 -06:00
Alexander Molchevsky 1dea8a9e3d Merge pull request #748 from AntelopeIO/update_bios_boot_tutorial3.2
Backport to 3.2 of bootstrap new protocol features activation
2023-02-24 17:40:57 +02:00
Alexander Molchevsky a6c1e92aea Merge remote-tracking branch 'origin/release/3.1' into update_bios_boot_tutorial3.2
Merge updates
2023-02-24 17:00:54 +02:00
Huang-Ming Huang 90cdd6741f change file mode 2023-02-24 08:34:20 -06:00
Alexander Molchevsky 3e585d0f8a Merge pull request #747 from AntelopeIO/update_bios_boot_tutorial3.1
Backport to 3.1 of bootstrap new protocol features activation
2023-02-24 12:38:21 +02:00
Jonathan Giszczak cd40443f94 Get nodeos version in Node either on init or launch. 2023-02-23 19:32:54 -06:00
Alexander Molchevsky 967ab869e0 Backport to 3.1 of bootstrap new protocol features activation 2023-02-24 00:42:48 +02:00
greg7mdp d16743f120 fix test failure (keosd_auto_launch_test.py) 2023-02-23 17:05:40 -05:00
greg7mdp f65b2ec92b fixup! Update whitespace to avoid diff in PR. 2023-02-23 16:26:40 -05:00
greg7mdp 201793adb8 Update whitespace to avoid diff in PR. 2023-02-23 16:25:10 -05:00
greg7mdp b657fc6eb7 revert removal of OPENSSL_ROOT_DIR in top CMakeLists.txt. 2023-02-23 16:23:00 -05:00
greg7mdp e3c6016bd4 Merge branch 'main' of github.com:AntelopeIO/leap into gh-643 2023-02-23 16:05:05 -05:00
greg7mdp e88ccece3f remove https options from docs. 2023-02-23 16:03:20 -05:00
Clayton Calabrese 481811969e fix some README issues in performance test 2023-02-23 14:55:50 -06:00
Clayton Calabrese dcd8bc6df1 Restore accidentally removed config option. Added new option and updated README. Use choices for wasm-runtime. Add new options to the *Args constructors in both performance tests. 2023-02-23 14:52:42 -06:00
greg7mdp d2e38e2ef5 remove HTTPS support from libfc in http_client.
Also remove `OpenSSL::SSL` from libraries/libfc/CMakeLists.tx.
2023-02-23 15:51:54 -05:00
greg7mdp ad6a0969df remove HTTPS support from http_client_plugin 2023-02-23 15:19:51 -05:00
greg7mdp 43f6dca8f5 remove HTTPS support from http_plugin. 2023-02-23 15:17:37 -05:00
Huang-Ming Huang 150c18c34f rename auto-bp-peer to p2p-auto-bp-peer 2023-02-23 14:04:29 -06:00
Huang-Ming Huang 826cf9905b fix test 2023-02-23 13:40:17 -06:00
Huang-Ming Huang 1dc4ff8cd8 Merge branch 'main' into huangminghuang/auto-bp-peer 2023-02-23 13:05:38 -06:00
Kevin Heifner a3e0756474 Merge pull request #742 from AntelopeIO/GH-741-abi-serializer
Revert interface change of abi_serializer for tester
2023-02-23 11:23:12 -06:00
Lin Huang 36f89c71e1 add tests for parallelizing read-only thransaction execution 2023-02-23 12:15:09 -05:00
Lin Huang 88322f7d6b update test contract for read-only transaction testing 2023-02-23 12:14:19 -05:00
Lin Huang 23b5f27c3c main work of parallelizing read-only thransaction execution 2023-02-23 12:13:35 -05:00
Lin Huang d6947eff58 Make chainApis and NetApis safe to multithreaded read-only transactions 2023-02-23 12:11:47 -05:00
Lin Huang d181cacf46 add support to specify which execution queue to post an RPC API 2023-02-23 12:08:05 -05:00
Clayton Calabrese 2952699ebc Merge branch 'feature_performance_harness_stage_2' into performance_harness_nodeos_config_options 2023-02-23 11:07:38 -06:00
ClaytonCalabrese 8a0adc4b18 Merge pull request #713 from AntelopeIO/performance_harness_eos_mechanics
[PH] Use EOSMechanics contract with Performance Test
2023-02-23 11:06:45 -06:00
Lin Huang 02ddc0375e update to use new app().executor().post() 2023-02-23 12:03:57 -05:00
Lin Huang 5716438cea simplify execution window setting and checking APIs 2023-02-23 11:59:49 -05:00
Kevin Heifner e9b6c9ee21 GH-659 Allow truncate call when before begin_block otherwise rollback past prune does not work. Added additional test cases. 2023-02-23 10:30:57 -06:00
766C6164 82ae03985d Included light boost integration test 2023-02-23 09:39:49 -05:00
greg7mdp cbcad80c61 Update whitespace to the PR doesn't show a diff for CMakeLists.txt 2023-02-23 09:22:35 -05:00
greg7mdp ab7c555879 Remove boost warning suppression as requested by Matt in PR review 2023-02-23 09:20:43 -05:00
Kevin Heifner b4f18d5d20 GH-741 Don't std::move abi since it is used after. 2023-02-23 07:58:58 -06:00
Kevin Heifner f6d51f1989 GH-741 Reverted interface change to deprecated methods. Changed from rvalue reference to value so backward compatible for those using abi_serializer via tester. 2023-02-23 07:31:57 -06:00
Matt Witherspoon 505bae8ef3 Merge pull request #739 from AntelopeIO/remove_unused_boostbind_header
remove unused boost/bind.hpp include that generates a warning
2023-02-22 20:16:02 -05:00
Clayton Calabrese db73142095 Expose a number of nodeos options via the CLI in performance_test_basic. Also hardcode some others. 2023-02-22 18:24:25 -06:00
Matt Witherspoon dcbb111741 remove unused boost/bind.hpp include that generates a warning 2023-02-22 17:53:36 -05:00
Kevin Heifner 4b7e8274c7 GH-659 Skip writing to ship log if log already contains block 2023-02-22 16:14:59 -06:00
Clayton Calabrese b1ce2718b7 re-report the readme report due to changes, and update performance test to accomodate chanes 2023-02-22 15:40:31 -06:00
greg7mdp a5997fe0ee Complete basic unit tests.
This test exercises both basic http 1.0 protocol, and the Expect "100-continue" from http 1.1.
2023-02-22 16:30:32 -05:00
Lin Huang b46629b9d0 make controller threaded safe for read-only transaction execution 2023-02-22 16:24:54 -05:00
Lin Huang 33c09d385e add a missing custom_appbase change for unittests 2023-02-22 16:23:49 -05:00
Kevin Heifner 4dd5651a11 GH-659 Do not allow truncate back to genesis 2023-02-22 15:12:07 -06:00
Clayton Calabrese 97a8d1299f merge from feature branch 2023-02-22 14:29:47 -06:00
Clayton Calabrese fd0c702d18 remove unavailable options from README for performance test 2023-02-22 14:20:25 -06:00
Peter Oschwald 4f90bf6ff0 Update log directory structure example. 2023-02-22 14:18:16 -06:00
Kevin Heifner f6f93c0a0a Merge pull request #728 from AntelopeIO/GH-723-json-optimization
Optimize json parsing
2023-02-22 14:12:32 -06:00
Clayton Calabrese 3f191a9adc update transaction datafiles to match new eosio.mechanics directory layout 2023-02-22 14:11:03 -06:00
ClaytonCalabrese 5980ed3431 Merge pull request #731 from AntelopeIO/performance_harness_shutdown_trxgenlauncher
[PH] Add TransactionGeneratorLauncher to TestHelper Shutdown
2023-02-22 13:48:44 -06:00
Lin Huang 60bf50dc64 add thread_ids method to return thread IDs of the threads in a thread pool 2023-02-22 13:50:41 -05:00
Clayton Calabrese c15ed53794 remove unused import 2023-02-22 12:43:10 -06:00
Clayton Calabrese 1935103562 remove shutdown change from nodeos_startup_catchup 2023-02-22 12:42:38 -06:00
Clayton Calabrese 2fd6ad6057 Unwind shutdown changes as cluster killall will handle the transactiongeneratorlauncher now that it is set 2023-02-22 12:37:52 -06:00
Peter Oschwald 3fe0fdf357 Update docs for trx_generator README. 2023-02-22 12:19:51 -06:00
Lin Huang df2060fcca add read-only trx parallelization configuration options 2023-02-22 13:16:16 -05:00
766C6164 f1affa6b8e Hook snapshot generation to block_start 2023-02-22 12:48:16 -05:00
Peter Oschwald 97ed6b6118 Update test report examples in README. 2023-02-22 11:31:41 -06:00
Peter Oschwald fd4cdbd52c Update README for new command line arguments to Performance Harness scripts. 2023-02-22 11:18:14 -06:00
Kevin Heifner 8d13c2aae1 GH-723 Avoid potential temporary 2023-02-22 10:34:05 -06:00
Kevin Heifner 90e773a370 GH-723 Use using to make less verbose. 2023-02-22 10:03:18 -06:00
Lin Huang 0b1b2a26eb customize appbase to support two queue executor in Leap, add tests, update Leap to use the cusomized appbase 2023-02-22 10:18:12 -05:00
Kevin Heifner ba6b9a95db Merge pull request #729 from AntelopeIO/GH-721-test
Test: Provide a bit more time for the contract to be cached.
2023-02-22 07:54:41 -06:00
Huang-Ming Huang 08f614c121 Add auto bp peering functionality 2023-02-22 01:51:40 -06:00
Clayton Calabrese a2ee13ad39 rearrange shutdown arguments to accomodate the 20 or so tests using shutdown without keyword arguments 2023-02-21 20:40:44 -06:00
Jonathan Giszczak f759571449 Bring cluster bootstrap into line with bios_boot.sh.
Default to using cluster boostrap rather than shell script.
Tolerate dots in integration test names.
Relocate urllib support to queries.py, highest inheritance hierarchy
level it is used.
Miscellaneous code cleanup.
To enable heterogenous clusters:
-  Self-configure Node version per node.
-  Activate protocol features supported by lowest version node.
2023-02-21 18:49:30 -06:00
Lin Huang b160db9044 Merge branch 'main' into send_read_only_trx 2023-02-21 19:27:15 -05:00
Gregory Popovitch b8cb13ffdd Merge pull request #732 from AntelopeIO/appbase_executor
Update leap to use new appbase version.
2023-02-21 18:14:44 -05:00
greg7mdp 8d300377d5 update to the latest appbase version 2023-02-21 17:39:34 -05:00
Clayton Calabrese 1cf32d615d give ability to cleanup transaction generator in TestHelper shutdown 2023-02-21 15:42:48 -06:00
Clayton Calabrese 074471b413 address PR comment to make contracts folder consistent. 2023-02-21 15:40:45 -06:00
Kevin Heifner 94424bf5c3 GH-721 Provide a bit more time for the contract to be cached. 2023-02-21 13:59:00 -06:00
greg7mdp 9d737860c0 Fix issues when using new appbase 2023-02-21 14:30:17 -05:00
Kevin Heifner 7e22fed30d GH-627 Add const as request in peer review 2023-02-21 13:26:57 -06:00
Kevin Heifner ee77041529 GH-723 Optimize json parsing by using boost stream and std::string instead of std::stringstream 2023-02-21 13:06:26 -06:00
greg7mdp af23774f13 update http_plugin test to test the Expect 100-continue support 2023-02-21 14:00:00 -05:00
766C6164 34612f2dab Little refactoring 2023-02-21 11:05:27 -05:00
Kevin Heifner 5a94445f3f Merge branch 'GH-592-ship-crash-split-ship-log' into GH-627-ship 2023-02-21 09:53:34 -06:00
Kevin Heifner d12726c58f Merge branch 'huangminghuang/block_log' into GH-592-ship-crash-split-ship-log 2023-02-21 09:07:28 -06:00
Kevin Heifner a642ad3071 Create index on hard-replay 2023-02-21 08:36:07 -06:00
Lin Huang 251c2a31d9 Merge branch 'main' into send_read_only_trx 2023-02-21 09:35:33 -05:00
ClaytonCalabrese 6e5cb4a67c Merge pull request #720 from AntelopeIO/performance_harness_capture_arg_string
[PH] Capture Full Command Line Argument String in Report
2023-02-20 19:05:14 -06:00
Clayton Calabrese 8f75c30e2e add ram performance test. Rework how keys are put into contract account for performance test. revert the reversion of the setupWallet change 2023-02-20 16:14:05 -06:00
Chris Gundlach 86791fe7cc updated named_thread_pool usage 2023-02-20 15:34:34 -06:00
Kevin Heifner 0d497be7c5 Update tests for block_log not auto re-creating index file. 2023-02-20 15:02:55 -06:00
Kevin Heifner 051546bfc2 Update block_log to handle case of a block_log with no blocks 2023-02-20 15:02:14 -06:00
Kevin Heifner fa61e5c475 GH-627 Fix merge issue 2023-02-20 13:08:19 -06:00
Kevin Heifner 16c2a92432 Merge branch 'GH-592-ship-crash-split-ship-log' into GH-627-ship 2023-02-20 13:03:30 -06:00
Kevin Heifner bd664892b3 Merge branch 'huangminghuang/block_log' into GH-592-ship-crash-split-ship-log 2023-02-20 12:58:14 -06:00
Kevin Heifner 06b6d651b3 Merge remote-tracking branch 'origin/main' into huangminghuang/block_log 2023-02-20 12:48:25 -06:00
Kevin Heifner 707e72f8db GH-627 Additional cleanup 2023-02-20 12:43:24 -06:00
Kevin Heifner a79358fd61 GH-627 Add more than one client to get better test coverage 2023-02-20 12:42:59 -06:00
Chris Gundlach 4c6de84598 Merge branch 'main' into feature_prometheus_plugin 2023-02-20 10:33:43 -06:00
Christopher Gundlach 24d9998f55 Merge pull request #722 from AntelopeIO/prom_instrument_api
Added instrumentation for number of calls to api endpoint
2023-02-20 09:56:36 -06:00
Chris Gundlach 2282b7bac1 took out cmake dependencies on chain_plugin 2023-02-20 09:55:02 -06:00
766C6164 8301c6bd7b Improved data structures 2023-02-19 22:16:49 -05:00
Kevin Heifner f0b44752c4 GH-627 Add logging of connection info 2023-02-18 15:42:17 -06:00
Clayton Calabrese 726a0333e7 rerun test and update readme 2023-02-17 19:28:21 -06:00
Kevin Heifner 897e950c4b GH-627 Cleanup and optimization 2023-02-17 15:14:31 -06:00
Clayton Calabrese 270ea091f9 improve visibility of TypeErrors and still output JSON when one occurs 2023-02-17 14:44:10 -06:00
Clayton Calabrese e27ebfa1b8 revert a number of inadvertant whitespace changes due to removed code from merge. Fix printing of account type in json. 2023-02-17 13:49:15 -06:00
Kevin Heifner a2aecb3e23 GH-627 Refactor state_history_plugin to use a session_manager. The session_manager is used to coordinate sending since only one session can access the trace/delta log files at a time. 2023-02-17 10:55:09 -06:00
Kevin Heifner 4d31b149ff GH-627 Optimize empty() 2023-02-17 10:51:23 -06:00
Jonathan Giszczak 2dd3a18235 Add log messages, remove cruft and commented code. 2023-02-16 20:13:04 -06:00
greg7mdp 37f0b285b4 wip 2023-02-16 19:19:35 -05:00
greg7mdp 52cfbd8346 wip 2023-02-16 19:10:08 -05:00
greg7mdp 210b884ffe wip - http_plugin unit tests 2023-02-16 18:55:11 -05:00
Clayton Calabrese 5a67397e1c reduce size of specifiedContract through use of .account 2023-02-16 17:10:08 -06:00
Clayton Calabrese 724ba6cdae readd test-duration-sec to cpu performance test, remove lingering commas, set back assert in trx_generator main 2023-02-16 16:29:44 -06:00
Clayton Calabrese 96ae1ec49a revert some no longer necessary changes following merge and resolve test failures in doing so. 2023-02-16 15:48:43 -06:00
Huang-Ming Huang a7a401edb2 Merge pull request #724 from AntelopeIO/huangminghuang/update-bn256
merge bn256 submodule change
2023-02-16 15:29:13 -06:00
Huang-Ming Huang 71378b9b1a remove fix-irreversible_block option 2023-02-16 15:12:28 -06:00
Huang-Ming Huang 679b2053a0 merge bn256 submodule change 2023-02-16 13:10:49 -06:00
Clayton Calabrese 94d4b4be24 add missing cpuTrxData.json file 2023-02-16 11:03:18 -06:00
Chris Gundlach 8f84257950 added url to count metric 2023-02-16 10:22:37 -06:00
Chris Gundlach 12ec8ece1d added metrics tracking for api calls 2023-02-16 09:59:49 -06:00
mikelik 2f9903033a Merge pull request #718 from AntelopeIO/mikelik/valgrind_fix_low
Change INCBIN to INCTXT for abi in tests to fix invalid read
2023-02-16 16:55:19 +01:00
Kevin Heifner 9283b46856 Merge pull request #715 from AntelopeIO/GH-669-ship-main
[3.2 -> main] Fix SHiP stability
2023-02-16 07:04:34 -06:00
Michal Lesiak 3364a714a1 Change INCBIN to INCTXT for abi to add trailing null terminator and fix invalid read 2023-02-16 11:38:44 +01:00
Michal Lesiak fe98d62640 Increase vectors used in testing by 1 to fix invalid read 2023-02-16 11:38:44 +01:00
766C6164 46502e5814 Added execution handlers, several updates 2023-02-15 21:38:52 -05:00
Clayton Calabrese 1b77051987 improve reporting for command line in performance tests. Replace README output with new data. 2023-02-15 16:47:33 -06:00
Clayton Calabrese d00908e0f4 add variable to be saved in report which captures arg string in full 2023-02-15 16:18:44 -06:00
766C6164 2aad1dcaef Work in progress, moved things around 2023-02-15 16:47:26 -05:00
Kevin Heifner d8485297bb GH-627 WIP moving ship sending off main thread 2023-02-15 15:15:43 -06:00
Clayton Calabrese 06c418e813 merge from feature branch 2023-02-15 14:16:47 -06:00
greg7mdp 986dc8f388 Start implementing http_plugin unit tests 2023-02-15 13:23:20 -05:00
Kevin Heifner 077f4fbf93 GH-627 Add empty() method to sha256 2023-02-15 11:03:12 -06:00
greg7mdp 8bb930c87b Merge branch 'main' of github.com:AntelopeIO/leap into gh-451 2023-02-15 10:46:40 -05:00
Kevin Heifner 165e72ff95 GH-627 Update net_plugin to use new thread-safe block retrieval methods. 2023-02-15 09:17:37 -06:00
Kevin Heifner 84e8facc78 GH-627 Make get_block_id_from_num thread-safe. 2023-02-15 09:16:50 -06:00
Kevin Heifner dd59a99722 Merge pull request #696 from AntelopeIO/GH-677-get-block
Move get_block abi serialization off the main thread
2023-02-15 07:24:13 -06:00
Lin Huang 0dee765de8 Merge pull request #717 from AntelopeIO/bump_to_latest_appbase
bump appbase to the latest version for fixing test failures
2023-02-14 17:29:01 -05:00
Lin Huang 8adaef4cf0 bump appbase to the latest version for fixing test failures 2023-02-14 16:42:28 -05:00
Kevin Heifner 8a176e9ec5 GH-627 Make block_log thread safe 2023-02-14 15:35:13 -06:00
Jonathan Giszczak aaaa31184b Fix merge error. 2023-02-14 13:37:39 -06:00
Kevin Heifner f79b1a21c7 Merge remote-tracking branch 'origin/main' into GH-627-ship 2023-02-14 09:06:02 -06:00
766C6164 576143901a Added ut to a snapshot scheduler 2023-02-13 21:47:22 -05:00
Kevin Heifner 6f9ad52fbb Merge pull request #704 from AntelopeIO/GH-395-resource-monitor
Add absolute value threshold to resource monitor
2023-02-13 20:10:18 -06:00
Jonathan Giszczak e7a7f211a5 Fix merge errors.
Partially lost conversion to pathlib.
2023-02-13 17:01:23 -06:00
Jonathan Giszczak 3c78db6777 Stop using deprecated boost resolver overload.
Boost authors, in their infinite wisdom, have written different default
resolver flags across overloads which take the same parameters at
different layers in the API.
2023-02-13 16:35:08 -06:00
Clayton Calabrese d35b2f9515 merge from dev branch 2023-02-13 16:21:05 -06:00
Peter Oschwald 8a1fecd9a7 Merge pull request #702 from AntelopeIO/ph-gen-newaccounts
[PH] Transaction Generator support generating newaccount transactions
2023-02-13 16:02:08 -06:00
Peter Oschwald f25de1b5a8 Addressing peer review comments. 2023-02-13 15:34:21 -06:00
Peter Oschwald 239fa1fdc8 Addressing peer review comments. 2023-02-13 14:09:20 -06:00
greg7mdp c9df8e9f1b small cleanups 2023-02-13 13:25:24 -05:00
Jonathan Giszczak ac8002b2d1 nodeosLogPath still a string, not a pathlib Path. 2023-02-13 12:21:03 -06:00
greg7mdp 016183a467 Complete support for "100-continue" 2023-02-13 13:08:11 -05:00
Peter Oschwald 66fc7ddeec Correct the default priv keys to be valid key format. 2023-02-13 12:04:40 -06:00
Peter Oschwald 4384455481 Make private helper to protect usage. 2023-02-13 12:03:59 -06:00
Peter Oschwald 77ba8eacfe Fix typo in argument. 2023-02-13 11:42:34 -06:00
Peter Oschwald dd4fb9143f Add commentary and unit tests for account name generator. 2023-02-13 11:20:10 -06:00
Peter Oschwald 73105095a5 Merge pull request #712 from AntelopeIO/gh711-update-missing-python-dep
GH-711 Update dependencies to include numpy.
2023-02-13 08:51:14 -06:00
Kevin Heifner d0be3b93ef Merge remote-tracking branch 'origin/release/3.2' into GH-669-ship-main 2023-02-13 06:29:43 -06:00
Kevin Heifner 3ee279a10d Merge pull request #714 from AntelopeIO/GH-669-ship
[3.2] Fix SHiP stability
2023-02-13 06:29:04 -06:00
Kevin Heifner 8fa412616e Merge pull request #710 from AntelopeIO/GH-695-dirty-db-main
[3.2 -> main] Fix reporting of dirty db
2023-02-13 06:01:24 -06:00
Jonathan Giszczak ec5681d775 Enum class _generate_next_value can't be staticmethod on older Pythons 2023-02-13 01:24:03 -06:00
Jonathan Giszczak 9837593164 Omit typing not understood on most platforms. 2023-02-13 00:20:51 -06:00
766C6164 b1654c9763 wip schedule/unschedule to update json db 2023-02-12 20:46:41 -05:00
766C6164 5ee9f0f3d0 intermediate commit to sync changes 2023-02-12 01:03:44 -05:00
Kevin Heifner c42d216143 Merge branch 'release/3.2' into GH-669-ship 2023-02-11 19:17:40 -06:00
Clayton Calabrese 1ca46a897c add eosiomechanics cpu run to performance test basic 2023-02-10 19:13:48 -06:00
Jonathan Giszczak e0f14275f5 Implement support for generating logging.json.
Add support for --logging-level, --logging-level-map, is-nodeos_v2
Fix remaining merge error.
2023-02-10 18:58:50 -06:00
greg7mdp 2fda9e983e wip - fix issue with regular request 2023-02-10 18:04:04 -05:00
Huang-Ming Huang 86ba65b852 make split log safer 2023-02-10 16:37:55 -06:00
greg7mdp 9a1fd644ad wip - 100-continue works but not regular request. 2023-02-10 17:21:37 -05:00
Huang-Ming Huang 4fc996d0a0 remove memory mapped file 2023-02-10 15:56:19 -06:00
Peter Oschwald 56863d0f69 Address additional peer review comments. 2023-02-10 15:44:15 -06:00
Peter Oschwald 12868230fb Address peer review comment. Virtual destructor added. 2023-02-10 15:29:34 -06:00
Huang-Ming Huang 273a4a2fdf Merge branch 'huangminghuang/block_log' into GH-592-ship-crash-split-ship-log
# Conflicts:
#	libraries/chain/include/eosio/chain/log_catalog.hpp
#	libraries/chain/include/eosio/chain/log_data_base.hpp
#	libraries/chain/include/eosio/chain/log_index.hpp
2023-02-10 14:57:32 -06:00
Peter Oschwald d14493b75a GH-711 Update dependencies to include numpy.
Was already in unpinning build instructions but missing for pinned builds and overarching requirements in readme.
2023-02-10 14:31:49 -06:00
Peter Oschwald 24e376cf87 Additional peer review comments being addressed. 2023-02-10 13:51:14 -06:00
Huang-Ming Huang b2c8fb8f72 address some more PR comments 2023-02-10 13:20:55 -06:00
Peter Oschwald 1ad0888997 Address some peer review comments. 2023-02-10 13:19:45 -06:00
Peter Oschwald 0dc7b3ae58 Rename id to generator_id to be more specific. 2023-02-10 13:04:45 -06:00
Huang-Ming Huang 82bcada40a updated based on PR #628 2023-02-10 12:47:12 -06:00
Huang-Ming Huang 422878fb11 Merge branch 'main' into huangminghuang/block_log 2023-02-10 12:16:34 -06:00
Huang-Ming Huang 3edbfdda74 remove memory mapped file usage 2023-02-10 12:16:08 -06:00
Kevin Heifner 5eff003966 Merge remote-tracking branch 'origin/release/3.2' into GH-695-dirty-db-main 2023-02-10 09:54:55 -06:00
Kevin Heifner 91720b8f74 Merge pull request #708 from AntelopeIO/GH-695-dirty-db-3.2
[3.1 -> 3.2] Fix reporting of dirty db
2023-02-10 09:54:30 -06:00
Kevin Heifner 305f41b7c6 GH-395 Avoid overflow 2023-02-10 09:34:40 -06:00
Kevin Heifner d47c760921 GH-395 Log values in GiB instead of Bytes. Other misc minor cleanup. 2023-02-10 09:27:18 -06:00
Kevin Heifner 30e99e66c2 Merge remote-tracking branch 'origin/main' into GH-395-resource-monitor 2023-02-10 08:28:11 -06:00
Kevin Heifner 5169a113bd Merge remote-tracking branch 'origin/release/3.1' into GH-695-dirty-db-3.2 2023-02-10 08:17:37 -06:00
Kevin Heifner 0d977585ce Merge pull request #700 from AntelopeIO/GH-695-dirty-db-3.1
[3.1] Fix reporting of dirty db
2023-02-10 08:15:54 -06:00
Peter Oschwald 3c6bb070d0 Merge branch 'feature_performance_harness_stage_2' into ph-gen-newaccounts 2023-02-09 15:16:15 -06:00
Peter Oschwald 938d4abc53 Merge branch 'main' into feature_performance_harness_stage_2 2023-02-09 15:13:30 -06:00
Peter Oschwald f6f56e5c5d Fix logic in log_transactions.
Now that default contract is loaded to eosio again, it teased out a logic error here.  Should be 'or' not 'and'.
2023-02-09 14:31:13 -06:00
Peter Oschwald 299c9e9ee0 Fix Cluster's arguments for TransactionGeneratorsLauncher. 2023-02-09 10:53:00 -06:00
Peter Oschwald 310e6b8de7 Make actions data and auths const. 2023-02-09 10:52:39 -06:00
Lin Huang 424a0a7fe2 Merge pull request #705 from AntelopeIO/bump__to_latest_appbase
bump appbase to the latest for clang compile errors
2023-02-09 11:19:34 -05:00
Peter Oschwald 68fe107e1a Apply nonparallelizable_tests flag to new tests. 2023-02-09 10:08:32 -06:00
Lin Huang e9ef2026be bump appbase to the latest for clang compile errors 2023-02-09 10:45:00 -05:00
Peter Oschwald 7d250f6866 Merge branch 'feature_performance_harness_stage_2' into ph-gen-newaccounts 2023-02-09 09:30:14 -06:00
Peter Oschwald 3022c7c9f7 Fix validate_nodeos_plugin_args test by updating NetPlugingArgs default. 2023-02-09 09:21:19 -06:00
Kevin Heifner c91f3c6c45 GH-395 Combine all the unittests into one executable. Greatly improve run time for tests. Add new tests for resource-monitor-space-absolute-gb option. 2023-02-09 08:48:04 -06:00
Kevin Heifner def487d61b GH-395 Added resource-monitor-space-absolute-gb that overrides resource-monitor-space-threshold percentage option if specified. Also made sure file space warning is logged on exit when shutting down. 2023-02-09 08:46:08 -06:00
Peter Oschwald 5082223a01 Merge branch 'main' into feature_performance_harness_stage_2 2023-02-09 08:41:38 -06:00
Peter Oschwald 9a8d79212d Control test-duration-sec for these tests.
Default is 90 sec, don't need that long for these tests.
2023-02-09 08:07:44 -06:00
Peter Oschwald df12ef4835 Fix argument names. 2023-02-09 08:07:06 -06:00
Jonathan Giszczak 9aaac36e12 Fix merge error. 2023-02-08 19:00:04 -06:00
Jonathan Giszczak eba31b1187 Merge branch 'eosio-launcher-python-port' into eosio-launcher-launch-nodeos-unshared 2023-02-08 18:14:21 -06:00
Peter Oschwald d8d9fa3195 Expand transaction generator to support new account trx
Update user data transaction specification to support multiple actions and automatically generating an account namer per transaction to substitute into defined actions using the 'ACCT_PER_TRX' key word.

Removed arguments for action data pieces that have been moved into the larger transaction spec in the json files.

Added/Updated tests to exercise the new feature.
2023-02-08 17:35:47 -06:00
jgiszczak 9cbca20f81 Merge pull request #685 from AntelopeIO/launcher_merge_main_2_3
merge from main into launcher dev branch
2023-02-08 17:02:13 -06:00
Gregory Popovitch e302b74fd9 Merge pull request #636 from AntelopeIO/greg7mdp/gh-585
Update appbase/plugins to support multiple instances/exe
2023-02-08 16:21:50 -05:00
Clayton Calabrese 1ffa26a3df fix failure of performance test 2023-02-08 15:16:01 -06:00
Chris Gundlach 0bfc796926 added lambda for named thread pool start 2023-02-08 10:45:56 -06:00
Chris Gundlach e2e591fb54 mod to named_thread_pool construction 2023-02-08 10:25:52 -06:00
Chris Gundlach 3d2ad4de22 Merge branch 'main' into feature_prometheus_plugin 2023-02-08 09:47:36 -06:00
Kevin Heifner a357765c73 GH-695 Report dirty-db correctly 2023-02-08 08:07:14 -06:00
766C6164 280d799958 Added comment on why non-propagating system_error 2023-02-08 08:03:43 -06:00
766C6164 f694588f9f Propagate all exceptions minus system_error 2023-02-08 08:03:38 -06:00
Gregory Popovitch a4129fc6d9 Merge pull request #697 from eosswedenorg/main
Producer Plugin: Add block number to account_failures::report()
2023-02-08 08:29:35 -05:00
Kevin Heifner 8d95662be5 Merge pull request #687 from AntelopeIO/named-thread
named_thread_pool template description for debugger
2023-02-08 06:32:45 -06:00
Henrik Hautakoski 40f04073d3 plugins/producer_plugin/producer_plugin.cpp: fix log message in account_failures::report()
Co-authored-by: Gregory Popovitch <greg7mdp@gmail.com>
2023-02-08 08:57:30 +01:00
Kevin Heifner 34baed929b GH-677 Revert unneeded explicit copy 2023-02-07 20:02:17 -06:00
Kevin Heifner 2eb0b43a65 GH-677 Use unnamed copy 2023-02-07 20:01:36 -06:00
Clayton Calabrese f44705d37d fixed performance test basic, the main pt is still failing 2023-02-07 18:28:38 -06:00
Kevin Heifner a10d6bc3be GH-677 Fix some uses of std::move 2023-02-07 16:22:24 -06:00
Kevin Heifner b1af6cf101 GH-677 Use unnamed copy 2023-02-07 15:58:50 -06:00
Kevin Heifner cd3aaf24c1 GH-677 Fix invalid move 2023-02-07 15:57:44 -06:00
Kevin Heifner ed2e91d68d GH-677 Constrain scope 2023-02-07 13:23:23 -06:00
Kevin Heifner eb0d3dc090 GH-677 Minor cleanup 2023-02-07 13:19:35 -06:00
Jonathan Giszczak 368fdd4ba9 Catch ProcessLookupError during terminate call and react appropriately 2023-02-07 12:36:52 -06:00
Kevin Heifner 62903c04ab GH-677 Use std::move for abi into abi_serializer to avoid string copies. 2023-02-07 11:58:41 -06:00
Kevin Heifner b7fdd1c884 GH-677 Refactor get_block into multiple methods for testing. Also fix issue with invalid abi should not throw exception. 2023-02-07 11:56:06 -06:00
Jonathan Giszczak 625662a2d2 Capture ProcessLookupError independently of OSError. 2023-02-07 10:59:41 -06:00
Henrik Hautakoski d34e1cf1d0 plugins/producer_plugin/producer_plugin.cpp: Add block number to account_failures::report() 2023-02-07 16:57:53 +00:00
Huang-Ming Huang 26c03a57d3 Merge branch 'main' into huangminghuang/block_log 2023-02-07 10:53:38 -06:00
Huang-Ming Huang 54ff3feba9 Merge branch 'main' into GH-592-ship-crash-split-ship-log 2023-02-07 10:15:38 -06:00
Kevin Heifner 38f3988ac5 GH-677 Move abi serialization off the main thread for get_block 2023-02-07 08:34:33 -06:00
Jonathan Giszczak 2aa860d871 Fix typo. 2023-02-06 19:02:04 -06:00
Jonathan Giszczak b245ba43c2 Implement wait for terminating process on platforms without pidfd_open
Remove spurious whitespace change in Cluster.
2023-02-06 18:08:17 -06:00
Kevin Heifner 7b010976a4 Merge pull request #693 from AntelopeIO/GH-662-terminate-at-block-main
[3.2 -> main] Fix --terminate-at-block to stop at correct block
2023-02-06 15:24:50 -06:00
Kevin Heifner eb2d2d5d6e Merge pull request #694 from AntelopeIO/GH-548-error-msg
Log exception details for failed transactions
2023-02-06 15:08:04 -06:00
Kevin Heifner c4629c7c3a Remove std::abort() 2023-02-06 15:06:19 -06:00
Kevin Heifner e702efa4d4 Use tag type for name instead of eosio::chain::name so no conversion from uint64_t needed. Thanks @greg7mdp for the idea. 2023-02-06 15:03:46 -06:00
Jonathan Giszczak 7eb38c4cd5 Remove nodeos_remote_test.
A test which doesn't test a feature we no longer support.
2023-02-06 14:21:38 -06:00
Huang-Ming Huang ffc8716284 update based on PR comment 2023-02-06 14:18:34 -06:00
Kevin Heifner 08d545a566 GH-548 Pass correct type 2023-02-06 12:28:19 -06:00
Kevin Heifner 511ec439a2 GH-548 Make constructor explicit to avoid auto conversion from int64_t 2023-02-06 12:27:43 -06:00
Huang-Ming Huang 94cb1d6353 use block_num_t consistently 2023-02-06 12:15:52 -06:00
Huang-Ming Huang 89963f6fdc address some PR comments 2023-02-06 11:42:33 -06:00
Christopher Gundlach 34a45f8d92 Merge pull request #635 from AntelopeIO/prometheus_metrics_listener
First cut at a more message based interface between prometheus and instrumented plugins
2023-02-06 09:52:41 -06:00
Chris Gundlach a8022cdd1b used std::move() to update metrics map rather than copy 2023-02-06 09:23:34 -06:00
Chris Gundlach 3ac58ebd50 Merge branch 'feature_prometheus_plugin' into prometheus_metrics_listener 2023-02-06 09:14:44 -06:00
Chris Gundlach 754b2d81f9 minor cleanup 2023-02-06 09:10:27 -06:00
Kevin Heifner 2def372081 GH-548 Log exception details 2023-02-06 09:02:59 -06:00
Kevin Heifner 2281382f15 Merge remote-tracking branch 'origin/release/3.2' into GH-662-terminate-at-block-main 2023-02-06 07:52:58 -06:00
Kevin Heifner f93a6084ea Merge pull request #691 from AntelopeIO/GH-662-terminate-at-block-3.2
[3.1 -> 3.2] Fix --terminate-at-block to stop at correct block
2023-02-06 07:49:46 -06:00
Kevin Heifner 217152d7fe Remove out of date comment 2023-02-06 07:47:23 -06:00
Kevin Heifner 3e89847085 Merge remote-tracking branch 'origin/release/3.1' into GH-662-terminate-at-block-3.2 2023-02-04 15:18:24 -06:00
Kevin Heifner 26025d7382 Merge pull request #684 from AntelopeIO/GH-662-terminate-at-block-3.1
[3.1] Fix --terminate-at-block to stop at correct block
2023-02-04 15:17:10 -06:00
Kevin Heifner 6fa01ee6ac Merge branch 'main' into named-thread 2023-02-04 14:51:31 -06:00
Kevin Heifner 44434bc5f1 Use method so named_thread_pool template is on the stack. Thanks @spoonincode for the idea. 2023-02-04 14:51:12 -06:00
greg7mdp d13d06886c Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-585 2023-02-04 13:46:03 -05:00
greg7mdp 889de5b282 Update appbase to tip 2023-02-04 13:44:35 -05:00
Matt Witherspoon f6643e434e Merge pull request #686 from AntelopeIO/clear_executable_cpp
clear executable flag on a couple source files
2023-02-04 11:54:34 -05:00
Kevin Heifner 286d570ba5 Remove abort() 2023-02-04 09:14:21 -06:00
Kevin Heifner d77ba4071d Make named_thread_pool a template that can be named via an eosio::chain::name. 2023-02-04 08:58:36 -06:00
Matt Witherspoon 2a08a0febd clear executable flag on a couple source files 2023-02-03 22:38:29 -05:00
Clayton Calabrese 6c5bc1e721 merge from main again 2023-02-03 16:07:20 -06:00
Kevin Heifner 517ef20396 GH-662 Fixes for terminate-scenarios-test 2023-02-03 16:01:08 -06:00
Clayton Calabrese 8d17b5cf40 merge from main 2023-02-03 15:59:15 -06:00
Kevin Heifner 6f16383453 GH-662 Fix terminate-at-block test 2023-02-03 14:10:57 -06:00
Kevin Heifner debba62dd8 GH-662 Fix terminate-at-block to terminate at correct block 2023-02-03 14:10:38 -06:00
Kevin Heifner 7e1ef84c9b Merge remote-tracking branch 'origin/main' into GH-592-ship-crash-split-ship-log 2023-02-03 09:06:05 -06:00
Gregory Popovitch 9f0679bd0a Merge pull request #663 from AntelopeIO/greg7mdp/gh-470_ship_accept
SHiP: add delay when `accept()` fails with `too_many_files_open`
2023-02-03 08:48:25 -05:00
Jonathan Giszczak 404e5a9372 Implement bounce argument.
Finish fixing down argument.
2023-02-03 01:03:58 -06:00
Lin Huang 717685c037 change contracts to test_contracts 2023-02-02 21:26:38 -05:00
greg7mdp 3d609ae106 Implement Matt's suggestion to collapse two classes into a single templated one. 2023-02-02 21:24:25 -05:00
Lin Huang 4365542bc4 add no_auth_table to new unittests/test_contracts.hpp.in due to change by merge from main 2023-02-02 20:56:33 -05:00
Lin Huang 1b18206a79 Merge branch 'main' into send_read_only_trx 2023-02-02 20:52:26 -05:00
Kevin Heifner 02e4cc55a8 Merge pull request #682 from AntelopeIO/GH-588-handshake-main
[3.2 -> main] net_plugin improve block latency calculation
2023-02-02 18:44:45 -06:00
Kevin Heifner 1b5efcf6fa Merge remote-tracking branch 'origin/release/3.2' into GH-588-handshake-main 2023-02-02 17:12:00 -06:00
Kevin Heifner 8feca18ccc Merge pull request #681 from AntelopeIO/GH-588-handshake-3.2
[3.1 -> 3.2] net_plugin improve block latency calculation
2023-02-02 17:11:19 -06:00
Kevin Heifner b1f187c890 Merge remote-tracking branch 'origin/release/3.1' into GH-588-handshake-3.2 2023-02-02 14:47:45 -06:00
Kevin Heifner 343596a0c1 Merge pull request #676 from AntelopeIO/GH-588-handshake-3.1
[3.1] net_plugin improve block latency calculation
2023-02-02 14:47:12 -06:00
Peter Oschwald b35c3d6fba Add ability to configure log level for cluster via cli arg. 2023-02-02 13:35:14 -06:00
greg7mdp 88cbbb5b71 Update appnbase to tip 2023-02-02 11:05:20 -05:00
greg7mdp 2914633fc3 Update appbase to tip. 2023-02-02 11:01:31 -05:00
Kevin Heifner ec27d3d1f3 GH-588 Round using lround instead of the original hardcoded +1 2023-02-01 15:10:23 -06:00
greg7mdp febc1a1629 update appbase to tip 2023-02-01 16:03:25 -05:00
Kevin Heifner f347ab534e GH-588 Add additional logging that would be helpful for debugging 2023-02-01 13:42:13 -06:00
greg7mdp 2b6775334d Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-585 2023-02-01 13:39:44 -05:00
766C6164 d865960c07 Work in progress - requests scaffold, db 2023-02-01 13:39:00 -05:00
greg7mdp 165a5a575e Use scoped_app consistently in main programs. 2023-02-01 13:37:35 -05:00
Peter Oschwald f52beda0a2 Fix compiler warnings in tests. 2023-02-01 10:41:10 -06:00
Peter Oschwald caa8f41586 Refactoring. Moving functions into classes. 2023-02-01 10:35:45 -06:00
Peter Oschwald cfe83467aa Add way to specify auth acct when using json trx description.
Add support for actionAuthAcct and actionAuthPrivKey for more explicit control when specifying transaction directly.

Add actionAuthAcct to json transaction description

Add trx generator id to allow differentiation of trx generators for use in create accounts.

Factored out set_transaction_headers into own helper function.
2023-02-01 09:45:50 -06:00
Jonathan Giszczak 01bb0d406b Support more than 26 producers in launcher. 2023-01-31 19:15:15 -06:00
Jonathan Giszczak 04815fa968 Write start script when node isn't started by launcher. 2023-01-31 16:58:46 -06:00
greg7mdp 7f0b67f6b8 call register_plugin() as a static member, so that static variable initializers don't create an application instance before the program is started. 2023-01-31 16:53:43 -05:00
Chris Gundlach a6565005ff updates to prometheus_plugin to support message based updates 2023-01-31 13:47:15 -06:00
Kevin Heifner 24b533397a GH-592 Move files back as they are used by block log splitting as well 2023-01-31 13:35:25 -06:00
greg7mdp 8e7b6ec66b update appbase to tip 2023-01-31 13:51:41 -05:00
Kevin Heifner 3db765e0f1 GH-588 Remove +1 to number of blocks latency calculation. With it 0 latency indicates 1 block latency. 2023-01-31 07:44:20 -06:00
Peter Oschwald a4d6ecc40b Rename for generalization, not strictly for transfers. 2023-01-31 04:38:27 -06:00
Jonathan Giszczak 585dca0157 Temporarily remove some error suppression not yet ready for prime time. 2023-01-30 18:26:42 -06:00
Jonathan Giszczak 61969f6701 Honor unstarted nodes flag and validate total vs prod/unstarted.
Fix up --down implementation.
2023-01-30 18:06:21 -06:00
Jonathan Giszczak 5c5a37395e Tolerate empty specific extra nodeos args used by some tests as docs 2023-01-30 16:49:23 -06:00
Kevin Heifner c137951259 Merge branch 'GH-592-ship-crash-split-ship-log' of https://github.com/AntelopeIO/leap into GH-592-ship-crash-split-ship-log 2023-01-30 13:40:40 -06:00
Kevin Heifner ed420c2198 GH-592 Minor cleanup from peer review comments 2023-01-30 13:40:23 -06:00
Kevin Heifner 0e5cd164ed Merge branch 'main' into GH-592-ship-crash-split-ship-log 2023-01-30 11:47:32 -06:00
Peter Oschwald 96930a1616 Rename in prep to support additional trx desc files. 2023-01-30 11:29:56 -06:00
766C6164 e17e772e0c Updates to schema 2023-01-30 11:56:56 -05:00
Kevin Heifner 337b81122c GH-592 Add missing return 2023-01-30 10:51:33 -06:00
Kevin Heifner dc542bd122 GH-592 Increase to have more than one connection to ship 2023-01-30 10:51:16 -06:00
Kevin Heifner 6b708e375c GH-669 Do not reset socket_stream as it can still be in use. 2023-01-27 17:18:48 -06:00
ClaytonCalabrese ac1c5db6cc Merge pull request #647 from AntelopeIO/performance_harness_csv
[PH] Performance Harness csv improvements
2023-01-27 16:18:26 -06:00
Kevin Heifner 33656e3ee6 GH-592 Remove unneeded use of this-> 2023-01-27 15:32:51 -06:00
Kevin Heifner f149ce6af0 GH-592 Remove explicit close and just let websocket destructor take care of it 2023-01-27 15:19:10 -06:00
Kevin Heifner 34b8e11f2e GH-592 Fix shutdown issue with session_test 2023-01-27 15:18:25 -06:00
Kevin Heifner a4c2960847 Merge pull request #590 from AntelopeIO/GH-568-block-propagate
Propagate block after header validation
2023-01-27 15:15:22 -06:00
Kevin Heifner 491665441a Merge branch 'main' into GH-568-block-propagate 2023-01-27 14:35:44 -06:00
Clayton Calabrese de7c7b0e48 change csv variable names to something more proper 2023-01-27 14:35:05 -06:00
Kevin Heifner b25add6e51 Merge pull request #671 from AntelopeIO/GH-631-fork-test-main
[3.2 -> main] Test fix: nodeos_forked_chain_lr_test
2023-01-27 14:34:45 -06:00
Kevin Heifner 5f451d486d Merge remote-tracking branch 'origin/release/3.2' into GH-631-fork-test-main 2023-01-27 14:04:41 -06:00
Kevin Heifner 6842647a33 Merge pull request #670 from AntelopeIO/GH-631-fork-test-3.2
[3.1 -> 3.2] Test fix: nodeos_forked_chain_lr_test
2023-01-27 14:04:21 -06:00
Kevin Heifner 99116edf47 Merge remote-tracking branch 'origin/release/3.1' into GH-631-fork-test-3.2 2023-01-27 13:30:48 -06:00
Kevin Heifner 0dbd5cf68c Merge pull request #667 from AntelopeIO/GH-631-fork-test-3.1
[3.1] Test fix: nodeos_forked_chain_lr_test
2023-01-27 13:30:03 -06:00
Kevin Heifner f0ff749c20 GH-568 Revert passing block_num to peer_block_state_index methods as it can just be calculated quickly from id 2023-01-27 13:28:16 -06:00
Kevin Heifner 30637af65a GH-568 Use block_header::num_from_id instead of storing block_num 2023-01-27 12:53:14 -06:00
Kevin Heifner 406b4eb6ab Merge remote-tracking branch 'origin/main' into GH-568-block-propagate 2023-01-27 12:47:29 -06:00
Kevin Heifner 8c37219708 GH-568 Combined by_block_num index into by_connection_id so only one index has to be maintained. 2023-01-27 12:43:36 -06:00
Kevin Heifner 1a24e95fae GH-568 Remove redundant bcast_block call for accepted_block signal. 2023-01-27 12:21:07 -06:00
Jonathan Giszczak 2540fc16c8 Don't launch nodes when --output is specified.
Write and read topology file in nodeosLogPath.
Convert nodeosLogPath to pathlib.
Implement support for --down argument.
Add minor additional debugging output to Node.
2023-01-26 17:34:25 -06:00
Gregory Popovitch df6ffbb016 Merge pull request #665 from AntelopeIO/greg7mdp/gh-654_net_plugin_accept
net_plugin: add delay when `accept()` fails with `too_many_files_open`
2023-01-26 16:59:06 -05:00
greg7mdp 107ef62ab4 Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-470_ship_accept 2023-01-26 16:37:55 -05:00
greg7mdp f876c96919 Implement Matt's suggestion to forego the unique_ptr for the timer. 2023-01-26 16:30:29 -05:00
Clayton Calabrese 5add73c439 change from .txt to .csv 2023-01-26 15:21:21 -06:00
greg7mdp f28136f60c Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-654_net_plugin_accept 2023-01-26 15:40:47 -05:00
greg7mdp 36d0aa8c7c Update with code review comments and fix uninitialized variable 2023-01-26 15:34:14 -05:00
Kevin Heifner da2a1dc996 GH-631 Update preKill info since waiting for producer to change before continuing. 2023-01-26 13:29:19 -06:00
Kevin Heifner 23089d6545 GH-592 Move log_* files only used by state_history into state_history library. 2023-01-26 13:10:49 -06:00
Clayton Calabrese 5f1770b58e rename csv 2023-01-26 11:13:46 -06:00
Kevin Heifner 0271a56e9a Merge remote-tracking branch 'origin/main' into GH-592-ship-crash-split-ship-log 2023-01-26 10:01:47 -06:00
Kevin Heifner 6fda64452c GH-592 Fix spelling 2023-01-26 10:01:32 -06:00
Kevin Heifner cab88df475 Merge pull request #612 from AntelopeIO/GH-54-contracts
Add test contract code for existing abi/wasm and clean up libraries/testing & unittests dependencies
2023-01-26 07:43:05 -06:00
Kevin Heifner bcd4a8c4dd GH-586 Fix merge issue 2023-01-25 17:53:20 -06:00
greg7mdp fb139e70a6 Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-470_ship_accept 2023-01-25 18:43:49 -05:00
greg7mdp 0e86228c0d Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-654_net_plugin_accept 2023-01-25 18:41:47 -05:00
Kevin Heifner c738ea7d86 Empty commit to kick of ci/cd 2023-01-25 17:38:00 -06:00
Kevin Heifner 93173ce827 Merge remote-tracking branch 'origin/main' into GH-592-ship-crash-split-ship-log 2023-01-25 16:30:07 -06:00
Kevin Heifner ec4a9af3fb Merge remote-tracking branch 'origin/main' into GH-568-block-propagate 2023-01-25 16:19:09 -06:00
Kevin Heifner e55669c42d Merge pull request #632 from AntelopeIO/named-tp-except
Add handling of exceptions to named_thread_pool
2023-01-25 15:58:14 -06:00
766C6164 e54032ab72 Added snapshot status to get_snapshots_requests 2023-01-25 14:30:16 -05:00
Kevin Heifner 1d2b98363c Add reserve() 2023-01-25 09:57:44 -06:00
greg7mdp 2a904da020 Update appbase to tip. 2023-01-25 10:33:26 -05:00
greg7mdp c5ed01ed37 Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/gh-654_net_plugin_accept 2023-01-25 09:34:55 -05:00
greg7mdp c532a4018f Create deadline timer when thread pool is created (thanks Matt!) 2023-01-25 09:30:41 -05:00
greg7mdp 09c4ebb42d Update wlog() call to correct fc_wlog() which specifies the logger to be used. 2023-01-25 09:16:27 -05:00
Kevin Heifner 76374f884f Changed named_thread_pool to always delay start() 2023-01-25 07:53:41 -06:00
Kevin Heifner cca83e0c10 Merge remote-tracking branch 'origin/main' into named-tp-except 2023-01-25 06:59:05 -06:00
Matt Witherspoon 7ea9f61a07 Merge pull request #664 from AntelopeIO/gcc13
add missing include statements for gcc13 (libstdc++13)
2023-01-24 19:00:29 -05:00
Matt Witherspoon 2b69bd28cb bump abieos submodule to HEAD w/ gcc13 fixes applied 2023-01-24 18:44:00 -05:00
Clayton Calabrese 8f32316705 add header to csv and filter out ungenerated transactions 2023-01-24 17:25:56 -06:00
greg7mdp 3f193900d8 Update another elog instance to fc_elog 2023-01-24 17:08:38 -05:00
greg7mdp 98dea84c0a Update a couple log statements 2023-01-24 16:44:57 -05:00
greg7mdp 5ad310d5fb Implement suggestions from Kevin's code review 2023-01-24 14:42:47 -05:00
greg7mdp 9b40540a5d Add a couple comments 2023-01-24 10:13:59 -05:00
greg7mdp 040d0e8b04 Add timer when async_accept() gets a too_many_files_open error 2023-01-24 10:07:42 -05:00
greg7mdp 6459fbb9f9 more straightforward management of the socket in async_accept 2023-01-23 15:43:41 -05:00
greg7mdp e094184801 Cleanup do_accept code, add timer on "too many files", keep accepting on error 2023-01-23 14:53:25 -05:00
Chris Gundlach b950953ae6 fixes based on peer review 2023-01-23 10:08:23 -06:00
Matt Witherspoon f5f92a69d0 fixes for gcc13 2023-01-22 19:13:37 -05:00
Kevin Heifner 009b4f6c73 Rethrow exception if no on_except provided. 2023-01-21 09:04:41 -06:00
Kevin Heifner aa46c518c4 Cleanup from peer review comments 2023-01-21 08:50:15 -06:00
Kevin Heifner 3be3fccaf6 Rename async_thread_pool to post_async_task to better describe its function 2023-01-21 08:44:51 -06:00
greg7mdp 9cd3fc4271 Update appbase tip 2023-01-20 14:41:32 -05:00
greg7mdp f0196780b1 Update appbase to tip 2023-01-20 14:13:03 -05:00
Kevin Heifner 3ed8ac7eee Merge branch 'main' into GH-592-ship-crash-split-ship-log 2023-01-20 13:03:23 -06:00
greg7mdp 2ee7407eb5 Update appbase to tip 2023-01-20 13:07:32 -05:00
greg7mdp 7143ea4269 Update appbase to tip 2023-01-20 12:06:37 -05:00
greg7mdp b815f304aa update appbase to tip 2023-01-20 11:55:51 -05:00
Kevin Heifner 20547b9ec0 Merge branch 'main' into named-tp-except 2023-01-20 08:07:06 -06:00
Jonathan Giszczak 8e95e7c2c9 Add support for custom topologies and fix shell argument handling.
Remove broken nodes placeholder from Cluster.
2023-01-20 01:10:25 -06:00
Lin Huang fe8dc3fb3d Merge pull request #658 from AntelopeIO/merge_3_2_1_version_bump_to_main
[3.2 -> main] Merge 3.2.1 version bump to main
2023-01-19 20:25:43 -05:00
Lin Huang 40e9c74865 restore 4.0.0 after merging 3.2.1 version bump 2023-01-19 18:46:16 -05:00
Lin Huang 3f9cb99e06 Merge pull request #657 from AntelopeIO/bump_leap_to_3_2_1
[3.2] bump Leap version to v3.2.1
2023-01-19 18:03:48 -05:00
Lin Huang 5753eb04e7 bump Leap version to 3.2.1 2023-01-19 17:16:36 -05:00
Lin Huang 84dfe08940 Merge pull request #655 from AntelopeIO/merge_3_1_4_version_bump_to_main
[3.2->main] Merge 3.1.4 version bump to main
2023-01-19 15:16:59 -05:00
Peter Oschwald 031f5959bb Merge branch 'main' into feature_performance_harness_stage_2 2023-01-19 12:07:12 -06:00
Lin Huang 9826436079 Merge remote-tracking branch 'origin/release/3.2' into merge_3_1_4_version_bump_to_main 2023-01-19 11:46:00 -05:00
Lin Huang ee37bb1d14 Merge pull request #653 from AntelopeIO/merge_3_1_4_version_bump
[3.1->3.2] Merge release 3.1.4 version bump
2023-01-19 11:43:10 -05:00
greg7mdp acb1bdb79e update appbase to tip 2023-01-19 11:06:11 -05:00
greg7mdp 2aad4aecd8 update appbase to tip 2023-01-19 10:56:23 -05:00
Lin Huang a8f94ee5d8 restore 3.2.0 version after merging 3.1.4 version bump 2023-01-19 10:28:27 -05:00
Lin Huang 78973e4088 Merge pull request #651 from AntelopeIO/bump_to_3_1_4
bump Leap release to 3.1.4
2023-01-19 10:11:38 -05:00
Lin Huang d627a18e8e bump Leap release to 3.1.4 2023-01-19 09:27:35 -05:00
Kevin Heifner fe5e1f77c7 Merge branch 'main' into GH-592-ship-crash-split-ship-log 2023-01-18 18:36:50 -06:00
Peter Oschwald 8f7fefb8ff Merge pull request #639 from AntelopeIO/fix-nodeos-snapshot-diff-test
Working to fix nodeos_snapshot_diff_test by sync on trx gen startup
2023-01-18 17:56:58 -06:00
greg7mdp 62c426081f Update appbase to latest commit 2023-01-18 18:41:17 -05:00
Kevin Heifner 21bdaed5f2 GH-592 truncate/prune only called from other public methods that already have a lock 2023-01-18 16:54:24 -06:00
Kevin Heifner 9aa3ffc00a GH-592 Fix bad merge issue which was causing core dump 2023-01-18 16:01:12 -06:00
greg7mdp 922d4486fa Update to latest commit in appbase branch 2023-01-18 16:40:03 -05:00
greg7mdp 112702a870 fix test_trx_retry_db test so that it initializes appbase correctly. 2023-01-18 16:33:59 -05:00
Kevin Heifner f43f0408af Merge remote-tracking branch 'origin/main' into GH-568-block-propagate 2023-01-18 14:46:06 -06:00
Kevin Heifner 51c11175e5 Merge pull request #649 from AntelopeIO/GH-525-block-propagation-main-merge
[3.2 -> main] Interrupt speculative start_block when a block is received
2023-01-18 14:38:13 -06:00
Kevin Heifner 5c1a4f42b3 Merge remote-tracking branch 'origin/release/3.2' into GH-525-block-propagation-main-merge 2023-01-18 14:09:40 -06:00
Kevin Heifner 4107ba4be0 Merge pull request #648 from AntelopeIO/GH-525-block-propagation-3.2-merge
[3.1 -> 3.2] Interrupt speculative start_block when a block is received
2023-01-18 13:59:54 -06:00
Kevin Heifner bce4029e41 Merge remote-tracking branch 'origin/release/3.1' into GH-525-block-propagation-3.2-merge 2023-01-18 12:34:27 -06:00
Clayton Calabrese 9af6e9023d seperate out new csv file containing data and rework as necessary 2023-01-18 12:29:20 -06:00
Kevin Heifner be7fc5714e Merge pull request #543 from AntelopeIO/GH-525-block-propagation-3.1
[3.1] Interrupt speculative start_block when a block is received
2023-01-18 12:13:35 -06:00
Kevin Heifner b69a03f3dc GH-592 WIP Fixing threading issues with state_history_log and sessions 2023-01-18 12:11:42 -06:00
Chris Gundlach 8f62c272fb format fix 2023-01-18 09:45:57 -06:00
766C6164 7cb3a08ef3 Updates to swagger spec 2023-01-17 14:03:26 -05:00
Chris Gundlach ed72be42f7 made call to metrics async; using strands/named_thread_pool 2023-01-17 11:17:34 -06:00
Kevin Heifner 1381a0f19e GH-592 Remove unused methods 2023-01-16 12:58:33 -06:00
ClaytonCalabrese 4ca1528956 Merge pull request #633 from AntelopeIO/performance_harness_dropped_blocks_tracking
[PH] Log Dropped Blocks, Dropped Transactions, and Production Windows
2023-01-16 11:03:19 -06:00
Peter Oschwald 81c53afc4a GH-637 Initialize trxGenLauncher to None. 2023-01-16 10:56:19 -06:00
Peter Oschwald 9fea12ef88 GH-637 Reintroduce the generic sleep for trx generation.
Prod node has already been killed at this point so can't synchronize on trxs making it into blocks since no prod nodes left.
2023-01-16 10:42:35 -06:00
Peter Oschwald 2bcab03611 GH-637 Make sure trx generators are cleaned up now that they are internal to Cluster. 2023-01-16 10:41:20 -06:00
Peter Oschwald de3a1c8392 Updates addressing peer review comments. 2023-01-16 10:15:29 -06:00
Peter Oschwald e6b523220b Merge branch 'main' into fix-nodeos-snapshot-diff-test 2023-01-16 10:04:58 -06:00
Peter Oschwald 889cc01795 GH-637 Working to fix nodeos_snapshot_diff_test by sync on trx gen startup.
Refactor - move launchTrxGenerators from Node to Cluster where it fits better.

Add waitForTrxGeneratorsSpinup function which allows tests to wait for initial trx from each generator to appear in a block.  This allows the tests to sync on the trx generators spinning up and knowing that trxs are flowing before proceeding with tests.

Update tests that used launchTrxGenerators for the refactor and to use the waitForTrxGeneratorsSpinup function.

trx_generator now logs first transaction it is preparing to send right before sending it to allow synchronization by tests without influencing its generation rate since it occurs prior only on initil trx and prior to initial trx send.
2023-01-16 10:03:09 -06:00
Kevin Heifner ba0f16834c Merge remote-tracking branch 'origin/main' into GH-592-ship-crash-split-ship-log 2023-01-16 08:27:49 -06:00
greg7mdp 6c95e51b5a update submodules to same version as main 2023-01-13 17:51:55 -05:00
Gregory Popovitch e1320e7931 Merge branch 'main' into greg7mdp/gh-585 2023-01-13 17:26:29 -05:00
greg7mdp 0db18fc295 Update submodules 2023-01-13 17:25:03 -05:00
Clayton Calabrese da7dff2c39 refactor calcProductionWindows 2023-01-13 14:54:51 -06:00
Kevin Heifner 4c60db9b69 Merge remote-tracking branch 'origin/main' into named-tp-except 2023-01-13 14:53:12 -06:00
Kevin Heifner 1626490985 Merge pull request #638 from AntelopeIO/GH-592-ship-crash-main
[3.2 -> main] Backport SHiP fixes from eosio/eos release/2.2.x
2023-01-13 13:59:34 -06:00
Clayton Calabrese 031f5fe969 merge from feature branch and resolve conflicts 2023-01-13 13:43:35 -06:00
Kevin Heifner 253d648505 Merge remote-tracking branch 'origin/release/3.2' into GH-592-ship-crash-main 2023-01-13 12:37:53 -06:00
Kevin Heifner d7dd7156ab Merge pull request #624 from AntelopeIO/GH-592-ship-crash-3.2
[3.2] Backport SHiP fixes from eosio/eos release/2.2.x
2023-01-13 12:27:54 -06:00
Clayton Calabrese f72b6fd047 redo generated report using single producer 2023-01-13 12:04:05 -06:00
Clayton Calabrese a70daf9c87 remove sorted keys and regenerate report for readme to reduce diff 2023-01-13 11:59:47 -06:00
Peter Oschwald 0743686658 Another fixup from Merge branch 'main' into feature_performance_harness_stage_2 2023-01-13 10:57:07 -06:00
Peter Oschwald 1334957ae5 Fixup from Merge branch 'main' into feature_performance_harness_stage_2 2023-01-13 10:13:55 -06:00
Kevin Heifner 20d7b80d40 GH-54 Update deep mind log for new bios contract 2023-01-13 10:03:47 -06:00
Kevin Heifner 759a0690b5 GH-54 Add a print to activate so this bios contract is different then the bios contract used in eos-system-contracts avoiding a duplicate trx error on set_code of its bios contract. 2023-01-13 09:41:14 -06:00
Peter Oschwald be375bf42e Merge branch 'main' into feature_performance_harness_stage_2 2023-01-13 09:40:33 -06:00
greg7mdp 9d2235b672 restore file deleted by mistake 2023-01-12 18:18:21 -05:00
greg7mdp fb12fe627f Update appbase/plugins to support multiple instances/exe 2023-01-12 18:05:16 -05:00
Clayton Calabrese bda0d82103 count first and last window as complete windows if containing 12 blocks, otherwise ignore them. 2023-01-12 17:04:07 -06:00
Clayton Calabrese 18d654f3bc commit print statement that was unsaved in past commit 2023-01-12 16:53:29 -06:00
Clayton Calabrese 3775f5050a undo unintentional default change. Inform users when adjusting lbto and lbcep from defaults. Add DroppedTransactions to report 2023-01-12 16:49:38 -06:00
Kevin Heifner 1e3b4a3631 GH-54 Update eosio.token contract location 2023-01-12 16:04:05 -06:00
Kevin Heifner dd66bfc075 GH-54 Now that txn_test_gen_plugin has been removed eosio.token can move back into ./unittests/contracts and ./libraries/testing/CMakeLists.txt can go back to eosio_testing_contracts being INTERFACE only. 2023-01-12 16:00:33 -06:00
Kevin Heifner b3a6e00148 Merge remote-tracking branch 'origin/main' into GH-54-contracts 2023-01-12 15:38:08 -06:00
Kevin Heifner baac068f92 GH-592 Remove unused code 2023-01-12 15:37:18 -06:00
Kevin Heifner f164461d6c GH-592 Start thread after listen 2023-01-12 15:36:59 -06:00
Peter Oschwald 9461180b53 Merge pull request #634 from AntelopeIO/rem-trx-test-gen-plugin
Remove trx_test_gen_plugin
2023-01-12 15:35:48 -06:00
Peter Oschwald 18428070e9 Create launchTrxGenerators helper in Node.py.
Factor out common trx generator launch setup and launch capabilities into Node.py for tests to utilize.

Move launch_transaction_generators.py into the TestHarness module.  This made sense and also helped alleviate circular dependencies between modules.
2023-01-12 13:55:47 -06:00
Peter Oschwald 02163a4519 Merge pull request #626 from AntelopeIO/ph-trx-gen-json
[PH] Support configuring transaction type to send in trx generator through JSON transaction description
2023-01-12 11:59:28 -06:00
Peter Oschwald 08746f0e55 Merge branch 'feature_performance_harness_stage_2' into ph-trx-gen-json 2023-01-12 11:29:39 -06:00
ClaytonCalabrese 92870e10d4 Merge pull request #598 from AntelopeIO/performance_harness_specifiy_contract
[PH] Add Ability to Specify Contract for Performance Tests
2023-01-12 10:59:26 -06:00
Peter Oschwald 6253abcc49 Peer review comment. Resolve IPv4 addresses for p2p plugin. 2023-01-12 10:54:10 -06:00
Chris Gundlach 2651eaf7d1 first cut at new interface between prometheus and other plugins 2023-01-12 10:12:30 -06:00
Peter Oschwald d86782461b Replace cout in favor of xlog statements. 2023-01-12 08:45:27 -06:00
Peter Oschwald 777d9d30bf Remove UserTrxData in favor of loading user data from json file.
Replace prev argument --user-trx-data with --user-trx-data-file.

Read user trx data in from file and use that directly in lieu of UserTrxData.

Update tests to exercise this path with sample userTrxData.json file.

Update report construction to support Paths.
2023-01-11 22:55:12 -06:00
Peter Oschwald 03750c994a Refactor common transaction generator code into base class.
Fix trx_expr to be fc::microseconds instead of int64_t
2023-01-11 21:24:17 -06:00
Peter Oschwald e290f59aef Refactor user defined trx data into easily modifiable dataclass UserTrxData.
Update performance_test_basic to support user specified transaction data through the use of the --user-trx-data command argument and the UserTrxData class.  Now supports creation of named accounts for use in user defined transactions.

Cluster supports populating wallet with named accounts.

Renamed command line argument for making use of user provided trx data to --user-trx-data.
2023-01-11 20:37:14 -06:00
Peter Oschwald 48174929b2 Rename for clarity as this is not a string. 2023-01-11 20:04:06 -06:00
Jonathan Giszczak 3fe6780a91 Honor launch = 'none' and delay arguments.
Fix arithmetic error calculating producers per node.
2023-01-11 18:01:50 -06:00
Peter Oschwald 559d82165e Remove txn_test_gen_plugin.
Deprecating txn_test_gen_plugin in favor of txn_generator

Remove Node.py helper functions to the txn_test_gen_plugin.

Remove documentation for plugin.
2023-01-11 16:22:24 -06:00
Peter Oschwald 57e7dd0cb3 Update test to use txn generator. 2023-01-11 16:16:00 -06:00
Gregory Popovitch db563f2e3e Merge pull request #603 from AntelopeIO/greg7mdp/gh-471_accept_too_many_files
Add timer on http listener to avoid fast looping on accept
2023-01-11 16:58:15 -05:00
Peter Oschwald af54717809 Add support for setting peer endpoint and port in trx generator.
Transaction Geneators Launcher adds support for setting peer endpoint and port in trx generator.

Cluster adds p2pBasePort and means to calculate a given node's p2p listen port from node id.

Update tests using trx generator to specify peer endpoint and port to send trxs to.
2023-01-11 15:55:24 -06:00
Jonathan Giszczak 292a0a3826 Python alias no present; use python3 alias. 2023-01-11 15:32:29 -06:00
Kevin Heifner 912cc20f24 Merge branch 'named-tp-except' into GH-592-ship-crash-split-ship-log 2023-01-11 15:21:33 -06:00
Clayton Calabrese c26432e9be more explicit constructor names 2023-01-11 14:21:05 -06:00
Peter Oschwald a50057b2c7 Use multiple trx generators to more closely mirror existing behavior.
Need to increase the allowed connections for the trx generators to work.
2023-01-11 14:20:15 -06:00
Peter Oschwald 165823bb0b Fix usage of multiple trx generators by allowing enough connections. 2023-01-11 14:07:34 -06:00
Clayton Calabrese 26f0b5a111 change production window size to constant 2023-01-11 14:07:02 -06:00
Jonathan Giszczak b0e950a660 Revise NP and LR tests with seccomp=unconfined instead of privileged 2023-01-11 13:41:09 -06:00
Clayton Calabrese 24ce5d97d8 merge and resolve conflicts from feature branch 2023-01-11 13:35:47 -06:00
Peter Oschwald af9deeb161 Replace txn_test_gen_plugin with trx_generator in test.
Make sure txnGenLauncher is initialized before trying to kill in finally block at end of test.
2023-01-11 13:31:36 -06:00
Jonathan Giszczak f84884ccfa Try unconfined seccomp rather than --privileged test execution. 2023-01-11 13:24:21 -06:00
Clayton Calabrese 060be863a3 log production windows, dropped blocks, and dropped transactions in performance harness 2023-01-11 13:19:36 -06:00
Peter Oschwald 6dedf4fbef Replace txn_test_gen_plugin with trx_generator in test.
Create python module for performance_tests to gain access to launch_transaction_generators utilities.

Update trx_generator and trx_provider to allow stopping generation on failure of transaction to send.
2023-01-11 12:51:48 -06:00
jgiszczak 136262250a Merge pull request #629 from AntelopeIO/eosio-launcher-support-nodeos-path-args
Add support for specifying paths to nodeos in launcher.
2023-01-11 12:22:40 -06:00
Peter Oschwald d219741057 Remove txn_test_gen_plugin from test as it was not being used. 2023-01-11 11:47:33 -06:00
Kevin Heifner 5f29e56ce1 GH-592 Add restart() needed to actually be able to restart io_context 2023-01-11 11:14:37 -06:00
Kevin Heifner c955f558ad Added tests and fixed issue with ioc needing restart() 2023-01-11 11:09:21 -06:00
766C6164 6da9928831 Updates to snapshot scheduling api 2023-01-11 12:05:19 -05:00
Kevin Heifner 3b8a5fd940 Add ability to delay start of thread pool 2023-01-11 10:38:05 -06:00
Gregory Popovitch f5f57214c7 Merge branch 'main' into greg7mdp/gh-471_accept_too_many_files 2023-01-11 10:46:46 -05:00
greg7mdp 6248ef49d3 Revert to earlier implementation based on Matt's feedback. 2023-01-11 10:44:31 -05:00
Kevin Heifner f0fad92b38 GH-592 Delay start of thread pool until after listen 2023-01-11 09:41:32 -06:00
Kevin Heifner 25a7621b30 GH-592 Add ability to delay start of thread pool 2023-01-11 09:33:19 -06:00
Kevin Heifner 2d6307b37e GH-525 rename start_block_interrupted to should_interrupt_start_block 2023-01-10 13:09:57 -06:00
Kevin Heifner 3d77eb001b GH-525 Add check for existing to be consistent 2023-01-10 13:09:04 -06:00
Kevin Heifner a482ad8ab8 Add handling of exceptions to named_thread_pool 2023-01-10 12:16:42 -06:00
Clayton Calabrese eb8337adb1 use explicit names on constructor for specified contract 2023-01-10 12:06:13 -06:00
Kevin Heifner 77738071f0 Merge pull request #630 from AntelopeIO/revert-ship
Update abieos to head of main
2023-01-10 08:12:56 -06:00
Kevin Heifner 95b711dcfa Update abieos to head of main 2023-01-10 07:28:37 -06:00
Kevin Heifner ef9b3ea1b6 Merge branch 'release/3.1' into GH-525-block-propagation-3.1 2023-01-10 07:00:41 -06:00
Kevin Heifner a88bdf75e2 Merge pull request #584 from AntelopeIO/GH-551-sub-bill-fail
Subjectively bill for failed transactions during block production
2023-01-10 06:59:03 -06:00
Jonathan Giszczak a3fcefbd3f Add support for specifying paths to nodeos in launcher.
Modify nodeos_run_test to exercise nodeos path specification.
2023-01-10 01:49:06 -06:00
Kevin Heifner 9185b4fde9 GH-592 Make sure ws::stream is destroyed on ship thread 2023-01-09 17:38:02 -06:00
Kevin Heifner 6df9b2bbd7 GH-592 Use to_send_block_num 2023-01-09 17:25:08 -06:00
Kevin Heifner 2970357110 GH-592 Debug log for request messages. 2023-01-09 17:17:35 -06:00
Kevin Heifner e75b2dda6a GH-592 Merge GH-624 changes into split-ship-log branch. 2023-01-09 17:08:55 -06:00
Kevin Heifner 2c12c7285c Merge pull request #607 from AntelopeIO/GH-260-code-cache-test
Tests: Add is_code_cached and use in tests to verify
2023-01-09 17:04:09 -06:00
766C6164 9e32a10396 Added snapshot scheduling calls to schema 2023-01-09 16:18:28 -05:00
Peter Oschwald 00a552f1b0 Add action_name, action_data, and abi_file argument support. 2023-01-09 13:21:19 -06:00
Peter Oschwald 58fed8c512 Trx Generator config support for JSON transaction description
Add functionality to transaction generator to take input of abi from file, transaction action type, and action data from a string or file json description and generate transactions matching that description.

Rename handler_account to contract_owner_account for more accurate description.

Add integration test exercising the new functionality that builds transactions from abi, action type and action data.  Makes use of the performance_test_basic with new argument '--exercise-trx-specification', but generates the transfer transactions from the abi, action name and action description in the test.

Added unit test to exercise the new trx_generator constructor.
2023-01-09 13:02:48 -06:00
Lin Huang 654aadedda completely review deep mind logging to make sure no deep mind logging for dry-run or read-only transactions 2023-01-09 13:29:44 -05:00
Areg Hayrapetian d3fe5bd772 Merge pull request #557 from AntelopeIO/use-fallthrough-options
CLI11: Use inherited option vs duplicating it in leap-util (blocklog)
2023-01-09 10:28:11 -08:00
ClaytonCalabrese 95ebafbcf1 Merge pull request #618 from AntelopeIO/performance_harness_log_forks
[PH] Performance harness Log Number of Forks and Forked Blocks
2023-01-09 11:10:17 -06:00
Kevin Heifner b2baf8da70 GH-592 Use named_thread_pool instead of explicit thread, io_context, etc. Old versions of boost do not have an acceptor that takes a strand in constructor. 2023-01-07 16:55:24 -06:00
Kevin Heifner 66bdc383d5 GH-592 Back-port fixes from eosio/eos release/2.2.x and removed use of mutex for protecting session_set. 2023-01-07 15:39:46 -06:00
Christopher Gundlach 596487257d Merge pull request #617 from AntelopeIO/merge_main_into_prometheus
Merge main into prometheus
2023-01-06 11:35:56 -06:00
Lin Huang 5260e4c8a5 use single get_deep_mind_logger method from control and pass trx_is_transient directly to indicate doing deep mind logging or not 2023-01-06 12:18:14 -05:00
Gregory Popovitch c39d95e6a0 Merge branch 'main' into greg7mdp/gh-471_accept_too_many_files 2023-01-06 10:29:55 -05:00
Lin Huang 0148c8d162 Merge branch 'main' into send_read_only_trx 2023-01-05 18:26:11 -05:00
Lin Huang 92f751d0d4 revert the trx_execution_mode changes 2023-01-05 16:48:35 -05:00
Lin Huang 9380de4812 rework to make sure deep-mind loggins is not generated for dry-run and read-only transactions 2023-01-05 15:27:18 -05:00
766C6164 8837b12c01 Added fallthrough option to other subcommands 2023-01-05 14:33:12 -05:00
Clayton Calabrese 22b60a3ae3 add a +1 to how many forked blocks are logged 2023-01-05 12:07:43 -06:00
Clayton Calabrese 15061f94fb merge from feature branch 2023-01-05 12:03:40 -06:00
Clayton Calabrese 186a0b038e revert unintended change made to get logs for testing. 2023-01-05 12:00:38 -06:00
Clayton Calabrese fba333be4d report forks and forked blocks in performance harness 2023-01-05 11:58:00 -06:00
Chris Gundlach 6caa809804 Merge branch 'main' into merge_main_into_prometheus 2023-01-05 10:49:00 -06:00
Kevin Heifner b7e18846c0 Merge pull request #616 from AntelopeIO/GH-605-dup-sync-stop-main
[3.2 -> main] Attempt connection retry for duplicate connections
2023-01-05 10:21:26 -06:00
766C6164 8933c34715 Included additional comments to generic template 2023-01-05 11:04:18 -05:00
Kevin Heifner 3f8bc9ae07 Merge remote-tracking branch 'origin/release/3.2' into GH-605-dup-sync-stop-main 2023-01-05 09:04:09 -06:00
Kevin Heifner cf6297e396 Merge pull request #615 from AntelopeIO/GH-605-dup-sync-stop-3.2-merge
[3.1 -> 3.2] Attempt connection retry for duplicate connections
2023-01-05 09:03:41 -06:00
Kevin Heifner ee93897888 Merge remote-tracking branch 'origin/release/3.1' into GH-605-dup-sync-stop-3.2-merge 2023-01-05 08:23:40 -06:00
Kevin Heifner 943d113480 Merge pull request #606 from AntelopeIO/GH-605-dup-sync-stop-3.1
[3.1] Attempt connection retry for duplicate connections
2023-01-05 08:23:05 -06:00
Lin Huang e990619600 do not perform key recovery if there are no signatures 2023-01-04 21:57:48 -05:00
Kevin Heifner 4ff794875b GH-260 Fix return type 2023-01-04 19:44:59 -06:00
Lin Huang b646c92db3 improve max-read-only-transaction-time description, fix a comment typo, and do not use _max_read_only_transaction_time_ms as it is not thread-safe when called from net plugin 2023-01-04 19:09:38 -05:00
Jonathan Giszczak bb1943de18 Move --privileged to test runner command, from template.
Manually update index.mjs to match source.
2023-01-04 17:29:04 -06:00
Jonathan Giszczak 7a5d57b434 Run db_modes_test with verbose flag. 2023-01-04 16:58:06 -06:00
Kevin Heifner 4e1d593d1e Merge branch 'main' into GH-54-contracts 2023-01-04 16:10:22 -06:00
Kevin Heifner e83c91d359 GH-54 Copy over abi/wasm compiled with latest Antelope CDT 3.2.0-dev ea6d926c3d2e9fa37dd513b8a946d8283b1aa233 2023-01-04 15:43:43 -06:00
Kevin Heifner a9281f5e9a GH-54 Add contract code for eosio.msig, eosio.system, eosio.wrap. Update contract code for eosio.bios and eosio.token to match as close as possible what matches the existing abi/wasm. 2023-01-04 15:20:48 -06:00
Clayton Calabrese 7ab1586970 merge from feature branch to resolve conflicts 2023-01-04 14:06:56 -06:00
Kevin Heifner 2bf719df38 GH-54 Remove call to set_parameters_packed as many tests assume that its protocol feature has not been activated. 2023-01-04 13:15:35 -06:00
Clayton Calabrese a8ea37a27c remove unnecessary new lines 2023-01-04 12:45:19 -06:00
ClaytonCalabrese 6dd154b4e0 Merge pull request #571 from AntelopeIO/performance_harness_replace_os_path
[PH] Replace usage of os.path with Path and PurePath
2023-01-04 12:35:55 -06:00
Clayton Calabrese 5cc242518e rework custom contract activation in performance harness 2023-01-04 12:32:06 -06:00
Gregory Popovitch a577669df9 Merge branch 'main' into greg7mdp/gh-471_accept_too_many_files 2023-01-04 11:24:29 -05:00
greg7mdp a6052e16b5 Use the single argument ctor as suggested in the review. 2023-01-04 11:22:18 -05:00
Kevin Heifner 1fc40bf7b3 GH-54 eosio.token contract moved to libraries/testing/contracts from unitests/contracts 2023-01-04 09:30:44 -06:00
Kevin Heifner b8fadad454 GH-54 eosio.token contract moved to libraries/testing/contracts from unitests/contracts 2023-01-04 09:11:44 -06:00
Kevin Heifner c3e46863fe GH-54 Remove moved test_chain_plugin test 2023-01-04 07:47:19 -06:00
Kevin Heifner e0c9fafa84 GH-54 Add comment 2023-01-04 07:46:52 -06:00
Kevin Heifner b9e99f0902 GH-54 Split contracts.cpp.in for libraries/testing and unittests. Remove dependency of libraries/testing on unittests. 2023-01-04 07:25:19 -06:00
Matt Witherspoon 61b2f98a6f Merge pull request #614 from AntelopeIO/cleos_spelling_parameters
fix spelling of "parameters" in cleos' `set action permission`
2023-01-03 22:11:20 -05:00
Jonathan Giszczak 20951f1ce0 Manually add --privileged flag to minified javascript. 2023-01-03 19:08:33 -06:00
Matt Witherspoon e2ac52ec0a fix spelling of "parameters" 2023-01-03 20:06:22 -05:00
Kevin Heifner 6e0d8a08fb GH-54 Move snapshot_suites out of libraries/testing as it is not needed for libraries/testing 2023-01-03 17:24:58 -06:00
Kevin Heifner 6c17992d6b GH-54 Remove mostly unused CORE_SYM_STR and just use CORE_SYMBOL 2023-01-03 16:58:51 -06:00
Kevin Heifner 4dc42963ec Revert "GH-54 Remove mostly unused CORE_SYM_STR and just use CORE_SYMBOL_NAME"
This reverts commit bb470faef2.
2023-01-03 16:31:35 -06:00
Kevin Heifner c168977c1b GH-54 Missed a few locations where python tests refer to old eosio.bios contract 2023-01-03 15:46:43 -06:00
Kevin Heifner bb470faef2 GH-54 Remove mostly unused CORE_SYM_STR and just use CORE_SYMBOL_NAME 2023-01-03 15:33:45 -06:00
ClaytonCalabrese 3fd598ba65 Merge pull request #611 from AntelopeIO/ph_merge_main_phase2_1_2
[PH] Ph merge main
2023-01-03 15:25:47 -06:00
Kevin Heifner 1c80bab44e GH-54 Move eosio.bios to libraries/testing and provide ability to build it from source 2023-01-03 11:54:18 -06:00
Clayton Calabrese bd1bd7d573 Merge branch 'main' into ph_merge_main_phase2_1_2 2023-01-03 11:23:11 -06:00
Clayton Calabrese bbfe01eb34 update NodeosPluginArgs to match addition of --state-dir 2023-01-03 11:20:14 -06:00
Kevin Heifner 239c55e155 Merge pull request #609 from AntelopeIO/GH-570-nodeos-v2-support
Fix nodeos v2 performance harness support
2023-01-03 09:44:39 -06:00
greg7mdp 5cce266f9f Implement some suggestions from the code reviews. 2023-01-02 17:15:50 -05:00
Clayton Calabrese dc1575ba6b resolve failures for 2.0 following merge. 2023-01-02 15:27:07 -06:00
Clayton Calabrese 099bbe45fa merge from main 2023-01-02 14:55:19 -06:00
Kevin Heifner 1b04b4f7f5 GH-570 cleos v2 does not have --time-limit option 2023-01-02 10:04:01 -06:00
Lin Huang 5e5a2c60c4 add test for max_read_only_transaction_time deadline exception 2022-12-31 19:45:53 -05:00
Kevin Heifner 1bf42bceba GH-568 Remove unused zipkin support 2022-12-30 15:11:54 -06:00
Kevin Heifner b4db5ce4ab GH-260 Additional uses of is_code_cached 2022-12-30 12:14:16 -06:00
Kevin Heifner 34b185d49b Merge branch 'release/3.1' into GH-605-dup-sync-stop-3.1 2022-12-30 10:42:56 -06:00
Kevin Heifner 79e99ad605 GH-605 Remove no_retry code from connect that was already in resolve_and_connect. connect is only called by resolve_and_connect. The no_retry code in connect didn't have the newly added re-connect for duplicate. 2022-12-30 10:37:31 -06:00
greg7mdp 65766979af Remove outdated comment 2022-12-29 16:13:50 -05:00
Huang-Ming Huang a9cea07eca revert commit for threaded write 2022-12-29 14:21:05 -06:00
greg7mdp 963f4c1aa8 Add timer on http listener to avoid fast looping on accept 2022-12-29 14:44:42 -05:00
Huang-Ming Huang 7b2efb8ee7 remove ff 2022-12-29 11:54:12 -06:00
Huang-Ming Huang 65163a90d4 fix ship threaded write 2022-12-29 11:06:11 -06:00
Kevin Heifner cafceaa6d7 GH-260 Add is_code_cached method to wasm_interface and use in api_tests. 2022-12-28 15:04:53 -06:00
Kevin Heifner 1688568cd4 GH-568 Post block processing to dispatcher strand so that only one thread is doing block header validation at a time. 2022-12-28 12:27:05 -06:00
Lin Huang eacc66da47 simplify and streamline deep-mind logging for dry-run and read-only transactions 2022-12-27 16:23:41 -05:00
Lin Huang 1c667f77be Add transaction execution mode to controller for better managing dry-run and read-only transactions 2022-12-27 16:06:47 -05:00
Huang-Ming Huang 9329fa3a62 fix issue #592 2022-12-26 14:54:16 -06:00
Lin Huang 2e9de779f9 Add configurable max-read-only-transaction-time; add node_configured_max_read_only_transaction_time for tx_cpu_usage_exceeded_reason 2022-12-26 15:02:29 -05:00
Huang-Ming Huang 068ac71968 fix truncate 2022-12-26 11:18:45 -06:00
Clayton Calabrese 1b1a191816 more changes to using specified contracts in performance tests. 2022-12-23 18:13:50 -06:00
Luis Paris 7c534bf3af Merge pull request #597 from AntelopeIO/fix-devrel#60-main
[3.2 -> main] Update nodeos options help usage [docs]
2022-12-23 18:54:27 -05:00
Clayton Calabrese 99dd39dd8f more path to string changes 2022-12-23 17:11:07 -06:00
Clayton Calabrese 4a53c71ed0 replace repeated path calls with concatonated strings using / operator from path 2022-12-23 17:09:18 -06:00
Luis 33adf255f0 update txn_test_gen plugin options :doc 2022-12-23 18:00:52 -05:00
Luis 933b5d7a8f update state history plugin options (main) :doc 2022-12-23 17:56:40 -05:00
Luis b1a08f08f9 update producer plugin options (main) :doc 2022-12-23 17:54:08 -05:00
Luis 445c439964 update http plugin options (main) :doc 2022-12-23 17:46:02 -05:00
Luis 3a9f1577f6 update chain plugin options (main) :doc 2022-12-23 17:42:23 -05:00
Luis 22ff6df3be Merge remote-tracking branch 'origin/release/3.2' into fix-devrel#60-main 2022-12-23 17:35:49 -05:00
Luis Paris 2f01e9eb8b Merge pull request #595 from AntelopeIO/fix-devrel#60-3.2
[3.1 -> 3.2] Update nodeos options help usage [docs]
2022-12-23 17:31:13 -05:00
Luis dc398b5877 Merge remote-tracking branch 'origin/release/3.1' into fix-devrel#60-3.2 2022-12-23 15:31:57 -05:00
Luis Paris 6c9012874b Merge pull request #583 from AntelopeIO/fix-devrel#60b
[3.1] Update nodeos options help usage [docs]
2022-12-23 15:29:53 -05:00
Huang-Ming Huang 1d3bc44203 add ship log partition options
# Conflicts:
#	libraries/state_history/include/eosio/state_history/log.hpp
#	plugins/state_history_plugin/include/eosio/state_history_plugin/session.hpp
#	plugins/state_history_plugin/tests/session_test.cpp
2022-12-23 12:58:44 -06:00
Huang-Ming Huang ec3c5ed1dc add ro_stream_for_block overload 2022-12-23 12:58:44 -06:00
Huang-Ming Huang a33f61099a add log catalog files 2022-12-23 12:58:43 -06:00
mikelik 539502a174 Merge pull request #495 from AntelopeIO/mikelik/valgrind_fix
Fix undefined behavior - uninitialized variables revealed by valgrind
2022-12-23 10:16:31 +01:00
766C6164 407d3581a1 Switched to require_subcommand() which is 1 or more 2022-12-22 21:41:19 -05:00
Jonathan Giszczak e10013e9b9 Support nodeos-log_path argument and non-producing nodes. 2022-12-22 17:39:11 -06:00
Lin Huang 290fc7a04b Merge branch 'main' into send_read_only_trx 2022-12-22 17:26:47 -05:00
Kevin Heifner d956b55abe Merge branch 'GH-525-block-propagation-main' into GH-568-block-propagate 2022-12-22 15:07:33 -06:00
Kevin Heifner fa178a9583 Merge remote-tracking branch 'origin/main' into GH-525-block-propagation-main 2022-12-22 15:05:36 -06:00
Kevin Heifner d192253709 GH-568 Do not send handshake to peer when dropping a block do to block received during block production 2022-12-22 15:04:34 -06:00
Eric Passmore 1b8eadea55 Merge pull request #589 from AntelopeIO/ehp/GH-547-producer-api-doc-cleanup
Fixes Producer Plugin Schema Fixes and Better Alignment with OpenAPI spec
2022-12-22 12:59:54 -08:00
Jonathan Giszczak 7beadb0a2c Maybe fix YAML syntax. 2022-12-22 14:53:19 -06:00
Jonathan Giszczak 15300dc01b Maybe fix YAML syntax. 2022-12-22 14:08:23 -06:00
Jonathan Giszczak 0351d913b0 Maybe fix YAML syntax. 2022-12-22 13:52:55 -06:00
Kevin Heifner a24ce77440 Merge remote-tracking branch 'origin/main' into GH-568-block-propagate 2022-12-22 13:03:31 -06:00
Kevin Heifner edbded1a77 Merge pull request #581 from AntelopeIO/GH-330-tx-cpu-errors
Include additional info in tx_cpu_usage_exceeded exceptions
2022-12-22 12:32:18 -06:00
Kevin Heifner 9b0a648e3d GH-551 Minor cleanup 2022-12-22 12:30:00 -06:00
Kevin Heifner ec1089bf5f Merge pull request #594 from AntelopeIO/multi-prod-perf
Fix for mulit-producer run of performance test
2022-12-22 12:04:38 -06:00
Kevin Heifner 27515b74a7 Merge pull request #575 from AntelopeIO/misc-python-test
Small Misc python test improvements
2022-12-22 12:04:15 -06:00
Lin Huang 842fa04bce honor block_deadline, set deadline_exception_code, and split a large if statement 2022-12-22 13:03:22 -05:00
Kevin Heifner e27004e2da GH-330 Minor perf improvements and cleanup 2022-12-22 12:03:19 -06:00
Kevin Heifner 3ad766a99d GH-330 Take by value and move 2022-12-22 12:02:29 -06:00
Huang-Ming Huang afbb418cb5 move session.hpp 2022-12-22 11:45:07 -06:00
Kevin Heifner 19c87a6aac Fix for mulit-producer run of performance test 2022-12-22 11:31:01 -06:00
Huang-Ming Huang d9fd83b82b Merge branch 'huangminghuang/ship-memory' of https://github.com/antelopeio/leap into huangminghuang/ship-memory 2022-12-22 11:16:19 -06:00
Huang-Ming Huang fb4b5d5fab remove unused code 2022-12-22 11:15:53 -06:00
Huang-Ming Huang b90e937734 Merge branch 'main' into huangminghuang/ship-memory 2022-12-22 11:11:25 -06:00
766C6164 f86d1f66aa Bumped cli11 sub 2022-12-22 10:57:40 -05:00
Huang-Ming Huang 08be3db08b Merge pull request #461 from AntelopeIO/huangminghuang/bn256
Replace implementation of alt_bn128 host functions with faster bn256 library
2022-12-22 09:56:39 -06:00
Vlad c1064fdc04 Merge branch 'main' into use-fallthrough-options 2022-12-22 10:45:50 -05:00
Huang-Ming Huang 1a82cbd342 Merge remote-tracking branch 'origin/main' into huangminghuang/bn256 2022-12-22 09:22:37 -06:00
Huang-Ming Huang e370adf3d7 address PR comments 2022-12-22 09:11:02 -06:00
Kevin Heifner 80aa64f56b GH-568 Optimize bcast_block by removing need for conn_mtx. 2022-12-22 08:04:04 -06:00
Lin Huang 372005e8c1 Merge branch 'main' into send_read_only_trx 2022-12-21 21:41:16 -05:00
Kevin Heifner 42a5c96918 GH-568 Handle case of close of connection after recording of peer block id. 2022-12-21 20:02:39 -06:00
Huang-Ming Huang c4490901ba add smaller cases 2022-12-21 19:37:28 -06:00
Jonathan Giszczak 726b56ec71 Maybe fix YAML syntax. 2022-12-21 19:22:59 -06:00
Jonathan Giszczak 8a43b014df Proliferate privileged option to more configurations. 2022-12-21 19:20:07 -06:00
Lin Huang 18f4ce2c75 remove duplicate code from merging, improve deadline calculation for read-only transactions 2022-12-21 19:14:18 -05:00
Jonathan Giszczak e084cce8f8 Maybe fix YAML syntax. 2022-12-21 17:25:43 -06:00
Jonathan Giszczak 827ffe89f3 Maybe fix YAML syntax. 2022-12-21 17:16:45 -06:00
Eric Passmore 18b4aeccc9 updated document meta-tag to version 4.0 2022-12-21 15:09:07 -08:00
Eric Passmore 475200f14c added defaults 2022-12-21 15:02:17 -08:00
Jonathan Giszczak 64f4c4b57e Merge branch 'eosio-launcher-launch-nodeos-unshared' of github.com:AntelopeIO/leap into eosio-launcher-launch-nodeos-unshared 2022-12-21 16:37:33 -06:00
Jonathan Giszczak 272d5f3afc Invoke launcher.py with generic python interpreter name.
Remove commented code.
2022-12-21 16:33:32 -06:00
Vlad c36f68d00b Merge pull request #466 from AntelopeIO/make-cli11-submodule
[4.0] Use leap's cli11 as submodule for leap-util and cleos
2022-12-21 17:22:29 -05:00
jgiszczak 77f8a4a6d2 Merge branch 'eosio-launcher-python-port' into eosio-launcher-launch-nodeos-unshared 2022-12-21 16:09:35 -06:00
Jonathan Giszczak 4de10f5a45 Use launcher.py for tests.
Write bios_boot.sh script from Python launcher for the time being.
Relocate Python libc wrapper into TestHarness from tests.
Use unshare in Cluster instead of launcher.py.
Add --privileged flag to Github test container configuration.
2022-12-21 16:05:27 -06:00
Eric Passmore c1930cc9b6 Merge branch 'release/3.2' into ehp/GH-547-producer-api-doc-cleanup
- add producer.swagger.yaml updates from release/3.2 into branch
2022-12-21 13:57:11 -08:00
Gregory Popovitch 00e3f98124 Merge pull request #563 from AntelopeIO/greg7mdp/GH-433_state-dir_config
Adds support for a 'state-dir' command line option in chain_plugin.
2022-12-21 16:40:56 -05:00
Kevin Heifner 3885747495 GH-568 If after full validation block is unlinkable then mark as not received so it can be processed when valid later. 2022-12-21 15:35:22 -06:00
Lin Huang 97b28b66b4 fix merge error, do not enforce block_cpu_limit or on-chain max_transaction_cpu_usage for read-only transactions 2022-12-21 15:52:03 -05:00
Huang-Ming Huang 78d8c3ca7a add tests for invalid input length 2022-12-21 14:38:44 -06:00
Eric Passmore 5a97068ae4 Merge pull request #587 from AntelopeIO/ehp/GH-547-producer-api-doc-cleanup-3.2
[3.2] Fixes Producer Plugin Schema Fixes and Better Alignment with OpenAPI spec
2022-12-21 12:26:51 -08:00
Vlad e70845c4a0 Merge branch 'main' into make-cli11-submodule 2022-12-21 14:59:08 -05:00
ClaytonCalabrese d2348f31c6 Merge pull request #570 from AntelopeIO/performance_harness_old_nodeos_compatibility
[4.0] [PH] enable compatibility for 2.0 and 2.1 nodeos on performance tests.
2022-12-21 12:33:32 -06:00
Kevin Heifner ffaf94571e GH-568 Broadcast block after validating block header instead of after full validation of the block. 2022-12-21 11:14:46 -06:00
Clayton Calabrese 17ada31c33 remove more unused imports 2022-12-21 11:09:47 -06:00
Clayton Calabrese 54af028748 remove unused import 2022-12-21 11:07:20 -06:00
Clayton Calabrese 339d1c8624 convert log reader tests to use pathlike objects) 2022-12-21 11:06:23 -06:00
Kevin Heifner 9de45ed460 GH-568 Cleanup and optimize peer block tracking 2022-12-21 10:44:57 -06:00
Kevin Heifner f6caf63083 GH-568 Remove unused zipkin calls. 2022-12-21 09:29:25 -06:00
Huang-Ming Huang 914c0cb96c add 4GB test case 2022-12-21 08:52:51 -06:00
Lin Huang 789d077cde fix a merge from main error 2022-12-20 19:26:19 -05:00
greg7mdp 4d754284b1 Use fc::temp_directory to alleviate the need to do manual cleanup 2022-12-20 18:56:56 -05:00
Lin Huang 7adb00bc92 Merge branch 'main' into send_read_only_trx 2022-12-20 18:52:45 -05:00
Huang-Ming Huang e0aa788ce2 fix counter overflow problem 2022-12-20 17:11:29 -06:00
greg7mdp 3142924eff Merge branch 'main' of github.com:AntelopeIO/leap into greg7mdp/GH-433_state-dir_config 2022-12-20 18:09:03 -05:00
greg7mdp 7d2ce5d6b3 Undo whitespace change 2022-12-20 17:59:53 -05:00
greg7mdp c5f407ff07 Undo change to fix warning unrelated to this PR. 2022-12-20 17:57:25 -05:00
Eric Passmore 90c1566a24 text/plain return for paused 2022-12-20 14:24:18 -08:00
Huang-Ming Huang 2b6f6bb74c address PR comments 2022-12-20 15:38:18 -06:00
Kevin Heifner fcad3c3d05 Merge branch 'GH-525-block-propagation-3.2' into GH-525-block-propagation-main 2022-12-20 12:37:35 -06:00
Kevin Heifner 95d562038a Merge branch 'GH-525-block-propagation-3.1' into GH-525-block-propagation-3.2 2022-12-20 12:24:48 -06:00
Clayton Calabrese bf1126db27 fix some problems with pathLike changes 2022-12-20 11:17:16 -06:00
greg7mdp 9c342ac981 Add unit test for state-dir option configuration 2022-12-20 11:58:24 -05:00
Clayton Calabrese acfdfc53a6 convert additional string paths to pathLike objects 2022-12-20 10:56:49 -06:00
Peter Oschwald 39342990c3 Merge branch 'main' into feature_performance_harness_stage_2 2022-12-20 09:52:38 -06:00
Kevin Heifner 351be6630a GH-551 Subjectively bill for failures when producing 2022-12-20 09:46:04 -06:00
Kevin Heifner 2fae41c5b5 GH-551 Remove subjective billing support for speculative blocks since speculative read-mode was removed via GH-414. 2022-12-20 09:45:01 -06:00
Eric Passmore 6521a53bc0 fixed duplicate producer in url 2022-12-20 03:37:59 -08:00
Eric Passmore 4141184a40 added get unapplied transactions 2022-12-19 19:22:49 -08:00
Eric Passmore 434eed6ddf on this feature branch merged release/3.2 with previous release/3.1 changes 2022-12-19 18:52:45 -08:00
Eric Passmore 278b94baf7 Merge pull request #569 from AntelopeIO/ehp/GH-547-producer-api-doc-cleanup-3.1
[3.1] Fixes Producer Plugin Schema Fixes and Better Alignment with OpenAPI spec
2022-12-19 17:06:02 -08:00
766C6164 b86b7f0e2b Removed commented out line 2022-12-19 17:04:49 -05:00
Eric Passmore 20b1da2b47 removed datatypes from descriptions 2022-12-19 13:45:24 -08:00
Luis 82ef97bf4e rename eos.io to example.org in net plugin help :doc 2022-12-19 16:23:27 -05:00
Luis cca0dc306e remove unsupported history plugin docs :doc 2022-12-19 14:57:45 -05:00
Luis 897edb9d9f update state history plugin options :doc 2022-12-19 14:56:06 -05:00
Luis f7c6b63cf7 update resource monitor plugin options and minor edits :doc 2022-12-19 14:54:09 -05:00
Luis 32d7d9f9fd update producer plugin options and minor edits :doc 2022-12-19 14:50:46 -05:00
Luis 97737fdd86 update net plugin options :doc 2022-12-19 14:47:12 -05:00
Luis 7a5930bb66 update http plugin options :doc 2022-12-19 14:45:17 -05:00
Luis 51d9cc22d7 update chain plugin options :doc 2022-12-19 14:33:22 -05:00
Kevin Heifner df43faf888 GH-330 Report reached account cpu limit 2022-12-19 09:43:41 -06:00
Huang-Ming Huang 4de50072fe Fix input check 2022-12-19 08:58:17 -06:00
Kevin Heifner d3f0ed8f26 Merge remote-tracking branch 'origin/main' into GH-330-tx-cpu-errors 2022-12-19 07:55:00 -06:00
Kevin Heifner 167bcf781c Merge pull request #562 from AntelopeIO/GH-329-subjective-deadline
Include subjective cpu limit in trx deadline
2022-12-19 07:54:37 -06:00
Kevin Heifner 1f4e4680ae Merge remote-tracking branch 'origin/main' into GH-330-tx-cpu-errors 2022-12-17 08:15:00 -06:00
Kevin Heifner 5498f5b3d9 GH-330 Add test for reached speculative executed adjusted trx max time 2022-12-17 08:06:28 -06:00
Kevin Heifner 325a0aa3c1 GH-330 Estimated account limit is always account 2022-12-16 17:15:19 -06:00
Kevin Heifner b824ac123c Merge branch 'GH-329-subjective-deadline' into GH-330-tx-cpu-errors 2022-12-16 16:55:55 -06:00
Kevin Heifner e3f97ea076 GH-330 WIP: Add additional information to tx_cpu_usage_exceeded exception messages 2022-12-16 16:55:40 -06:00
Areg Hayrapetian 22daed5030 Merge pull request #580 from AntelopeIO/greg7mdp/undo_incorrect_submodule_checkin
revert to previous appbase version
2022-12-16 14:37:54 -08:00
greg7mdp f9dcdc4a2e revert to previous appbase version 2022-12-16 17:30:28 -05:00
Luis ee1b184428 fix another small type that slipped :doc 2022-12-16 16:52:05 -05:00
Luis d34c40bd68 fix minor sentence contructions :doc 2022-12-16 16:36:47 -05:00
Luis a3bf1f54a1 minor edits and spelling corrections :doc 2022-12-16 16:33:15 -05:00
greg7mdp 195d9762ee revert to main branch of submodule appbase 2022-12-16 15:47:12 -05:00
Huang-Ming Huang ed08c5e8ab use regular mutex for prune mutex 2022-12-16 12:58:38 -06:00
Kevin Heifner 1292b4996a Merge pull request #578 from AntelopeIO/fix-warn
Fix trx_generator warnings
2022-12-16 11:19:43 -06:00
Huang-Ming Huang 2fb428f796 Merge branch 'main' into huangminghuang/ship-memory 2022-12-16 10:53:17 -06:00
Huang-Ming Huang f7c341b74a Suport hole punching with lock 2022-12-16 10:48:15 -06:00
Christopher Gundlach 2fb3e06c60 Merge pull request #537 from AntelopeIO/instrument_producer_plugin
Instrument producer_plugin for Prometheus
2022-12-16 10:07:58 -06:00
Chris Gundlach a1f8820031 added base struct for plugin metrics 2022-12-16 09:56:57 -06:00
Huang-Ming Huang eae61b7d9e address PR comment 2022-12-16 08:51:18 -06:00
Kevin Heifner 9b5ec62e19 GH-525 Remove unused incoming::channels::transaction 2022-12-16 08:39:38 -06:00
Kevin Heifner eb5ae91257 Fix warnings 2022-12-16 08:16:01 -06:00
Lin Huang 525055fb9d bump chainbase version to main which contains final changes for read-only transactions support 2022-12-16 08:52:11 -05:00
Kevin Heifner 453e5d0975 GH-525 Add open_impl/close_impl so all methods of fork_database follow the same pattern. 2022-12-15 18:39:28 -06:00
Clayton Calabrese 893e4a3018 address futureproof issues by converting nodeosVers from enum to string. Assert that an unsupport nodeos is not being used. Reduce code. 2022-12-15 16:18:19 -06:00
Huang-Ming Huang de376b1106 Merge branch 'main' into huangminghuang/bn256 2022-12-15 15:52:58 -06:00
Huang-Ming Huang 95d99fb643 reduce ship memory usage 2022-12-15 15:51:22 -06:00
Kevin Heifner 8f12805b4c GH-525 Minor cleanup from PR comments. 2022-12-15 15:12:10 -06:00
Kevin Heifner e497a58902 Better output on errors 2022-12-15 13:43:20 -06:00
Kevin Heifner 0327b13313 Set launched keosd timeout to effectively unlimited 2022-12-15 13:42:57 -06:00
Huang-Ming Huang d496437e83 remove libff based test case 2022-12-15 12:33:55 -06:00
Kevin Heifner 9b1401aa4a GH-525 Only interrupt start_block for validated block_header. 2022-12-15 09:23:10 -06:00
Kevin Heifner b3391af3bf GH-525 Use shared_mutex to allow multiple readers 2022-12-15 08:15:44 -06:00
Kevin Heifner d0d7fa798b GH-525 Move scope_exit of schedule_production_loop since any call should restart block because speculative block may have been interrupted. 2022-12-15 08:15:32 -06:00
Kevin Heifner 7468dede46 GH-525 Remove unused block channel. 2022-12-15 08:15:17 -06:00
Kevin Heifner 43d45edb01 GH-525 Make forkdb thread-safe 2022-12-15 08:14:57 -06:00
Clayton Calabrese 36855331ed change isNodeosV2 name and from bool to enum. Conver to use postinit handling for functions 2022-12-14 17:43:31 -06:00
Kevin Heifner 6f3ad96c50 GH-525 Only interrupt start_block for validated block_header. 2022-12-14 17:07:13 -06:00
greg7mdp 1e098a34ae update appbase 2022-12-14 17:23:58 -05:00
greg7mdp ff81b77fad commit appbase change revert, and remove outdated referece in modeos/main.cpp 2022-12-14 16:55:48 -05:00
greg7mdp e69011e5cd Restore using default state dir name from config 2022-12-14 16:55:48 -05:00
greg7mdp 4167a56e41 Move state-dir config from appbase to chain_plugin 2022-12-14 16:55:48 -05:00
greg7mdp 952f1ef173 Revert "update submodule appbase"
This reverts commit 4f262f3f83a16f9665135d8a4fcd083727950d78.
2022-12-14 16:55:48 -05:00
greg7mdp fd93d2d242 use state_dir() which can now be configured 2022-12-14 16:55:48 -05:00
Clayton Calabrese c4726da567 address pr comments to make old nodeos code more efficient 2022-12-14 15:16:22 -06:00
Kevin Heifner a1438030a2 GH-525 Use shared_mutex to allow multiple readers 2022-12-14 13:59:40 -06:00
Kevin Heifner b408aa229b GH-525 Move scope_exit of schedule_production_loop since any call should restart block because speculative block may have been interrupted. 2022-12-14 13:30:39 -06:00
Kevin Heifner 99533befa8 GH-525 Remove unused block channel. 2022-12-14 13:29:34 -06:00
Chris Gundlach bd017586b6 added enabled for metrics 2022-12-14 10:43:06 -06:00
Kevin Heifner 74366a2bf7 GH-525 Make forkdb thread-safe 2022-12-14 09:38:56 -06:00
Eric Passmore 76a341e52c updated version tag 2022-12-14 03:23:46 -08:00
Eric Passmore b0ea27b449 paused returns boolean, pause does not 2022-12-14 02:20:53 -08:00
Clayton Calabrese e095f2b154 replace use of os.path with pathlib's Path and PurePath 2022-12-13 17:34:07 -06:00
Clayton Calabrese 8f5095b460 rename oldNodeos to isNodeosv2 to improve clarity 2022-12-13 16:31:32 -06:00
Clayton Calabrese a6ad4d7239 remove unused and unneeded cl option for old nodeos 2022-12-13 16:15:25 -06:00
Clayton Calabrese 53a6902856 enable compatibility for 2_0 and 2_1 nodeos on performance tests. 2022-12-13 16:05:53 -06:00
Eric Passmore 16c8021e93 added 4xx return codes as required by redocly linter 2022-12-13 12:50:22 -08:00
Eric Passmore 266175a940 fixed component paths on openapi docs 2022-12-13 11:25:32 -08:00
Lin Huang 79e387ea76 use is_transient in producer_plugin; refine unit tests 2022-12-13 13:45:09 -05:00
Chris Gundlach b7bf037e4c code reformat / added bool for collecting of metrics 2022-12-13 10:49:52 -06:00
Lin Huang 864e31e798 finish changeing is_read_only() to is_transient() for deep-mind logging 2022-12-13 10:34:25 -05:00
Gregory Popovitch c365dc2020 Merge pull request #539 from AntelopeIO/greg7mdp/GH-488_bytes_in_flight
Update management of `in_flight` bytes in http_plugin
2022-12-13 08:59:58 -05:00
Eric Passmore 1bd84d8447 fixes producer plugin docs 2022-12-13 03:22:36 -08:00
greg7mdp 5e51edf9b4 address Lin's code review remarks 2022-12-12 18:01:51 -05:00
Jonathan Giszczak 75994a38c1 Use kernel call directly to bring up namespaced loopback interface 2022-12-12 16:55:00 -06:00
greg7mdp ad4e8360f2 fix whitespace 2022-12-12 17:42:19 -05:00
greg7mdp 2881eab935 Additional changes after talking with Kevin 2022-12-12 17:42:11 -05:00
greg7mdp 870b0a9a5c address some if Kevin's code review remarks 2022-12-12 17:40:43 -05:00
greg7mdp f5611f97e0 Remove overly complicated in_flight struct and manage in_flight_bytes directly and consistently. 2022-12-12 17:40:39 -05:00
greg7mdp bc91564fa2 Address Kevin's remark to avoid copy, and fix a mistaken change 2022-12-12 17:39:07 -05:00
greg7mdp 37ef02a489 consistent management of in_flight bytes, incl. through http::async_write call 2022-12-12 17:38:57 -05:00
Kevin Heifner 16214bbe6c Merge pull request #567 from AntelopeIO/GH-561-test-fail-main
[3.2 -> main] Fix Test: Specify a large time limit for cleos get table
2022-12-12 16:13:39 -06:00
Kevin Heifner 1996d5bdd2 Merge remote-tracking branch 'origin/release/3.2' into GH-561-test-fail-main 2022-12-12 15:38:49 -06:00
Kevin Heifner 3890add68f Merge pull request #566 from AntelopeIO/GH-561-test-fail-3.2
[3.2] Fix Test: Specify a large time limit for cleos get table
2022-12-12 15:38:22 -06:00
Kevin Heifner 308f991812 GH-561 Specify a large time limit for new user configurable time-limit to get table. 2022-12-12 14:44:32 -06:00
Chris Gundlach 525a454414 cleanup in chain an net plugins based on changes in producer plugin 2022-12-12 14:41:23 -06:00
Chris Gundlach 0d5f7ddad8 changed to use const refs and other pr changes 2022-12-12 13:20:47 -06:00
Kevin Heifner 4cdbfdcee6 Merge branch 'GH-525-block-propagation-3.1' into GH-525-block-propagation-3.2 2022-12-12 13:07:08 -06:00
ClaytonCalabrese d444a1a616 Merge pull request #467 from AntelopeIO/test_harness_var_lib_replacement
[TH] Replace hardcoded use of var/lib in tests
2022-12-12 10:58:56 -06:00
Lin Huang bf92e33c5b use make_scoped_exit to protect chainbase from being stuck in read_only_mode 2022-12-12 11:52:10 -05:00
Lin Huang 30e77a1db1 revert the changes for elpased and net_usage for non-read-only transactions; add tests for elpased and net_usage for read-only transactions 2022-12-12 10:33:54 -05:00
Kevin Heifner 40a7e34d14 GH-525 Honor deadline if we can produce 2022-12-12 08:58:59 -06:00
Kevin Heifner 304948a461 GH-329 Include subjective cpu limit in trx deadline 2022-12-12 08:14:13 -06:00
Lin Huang 53caa49d80 Do not undo_session for read-only transaction, prevent chainbase read_only_mode from stuck, add more unit tests 2022-12-10 17:24:44 -05:00
Lin Huang 059330e9ac restructure transaction init and finalize; add is_transient() to simplify code, do not allow non-zero delay_sec; do not do validate_expiration and validate_tapo; add back elapsed and net_usage to trace 2022-12-10 16:10:35 -05:00
Lin Huang f5ac3f77bc do not check authorization for read-only transactions; do not allow canceldelay 2022-12-10 14:54:18 -05:00
Lin Huang 110303d87d Refactor cleos main and chain_plugin to remove duplicate code 2022-12-10 14:28:04 -05:00
Kevin Heifner 4c7c07c13e Merge pull request #560 from AntelopeIO/GH-535-trace-api-main
[3.1 -> main] Do not run maintenance task on shutdown
2022-12-10 07:22:04 -06:00
Jonathan Giszczak 39464f00ad Find loopback interface and bring it up in the launch namespace 2022-12-09 19:09:43 -06:00
Kevin Heifner 06022692a4 Merge pull request #556 from AntelopeIO/GH-230-max-response-time
Set keosd max http response time to unlimited
2022-12-09 12:55:23 -06:00
Peter Oschwald f2afae6626 Merge pull request #350 from AntelopeIO/feature_performance_harness
[PH -> main] Performance Harness MVP [PH]
2022-12-09 11:36:31 -06:00
Kevin Heifner 6eb815d24c Merge remote-tracking branch 'origin/release/3.2' into GH-535-trace-api-main 2022-12-09 09:36:11 -06:00
Kevin Heifner 45e0596d36 Merge pull request #559 from AntelopeIO/GH-535-trace-api-3.2
[3.1 -> 3.2] Do not run maintenance task on shutdown
2022-12-09 09:34:25 -06:00
Kevin Heifner 348a4f4fce GH-559 Fix merge issue 2022-12-09 06:40:54 -06:00
Kevin Heifner 2c751798fa Merge remote-tracking branch 'origin/release/3.1' into GH-535-trace-api-3.2 2022-12-09 06:19:45 -06:00
Kevin Heifner 82829648ba Merge pull request #541 from AntelopeIO/GH-535-trace-api-3.1
[3.1] Do not run maintenance task on shutdown
2022-12-09 06:19:17 -06:00
Kevin Heifner e8d9e27790 Merge pull request #540 from AntelopeIO/http-shutdown
Handle shutdown of http_plugin lifetime
2022-12-09 06:17:53 -06:00
Lin Huang 367123bdea restructure unit tests so they are modularized 2022-12-08 20:19:35 -05:00
Kevin Heifner e63482a75e GH-525 Minor cleanup 2022-12-08 19:05:57 -06:00
Lin Huang 598a2c8086 Merge branch 'main' into send_read_only_trx 2022-12-08 19:13:21 -05:00
Kevin Heifner 8027ecb367 GH-525 Fixed spelling of yield 2022-12-08 17:25:46 -06:00
Kevin Heifner 1f44c07cd8 GH-525 Use received block as interrupt for start_block when in speculative mode. Use deadline when in production mode. 2022-12-08 16:54:23 -06:00
Lin Huang 817f9f1ccf Fix a compile error on Ubuntu 22, do not use designated initializers on non-aggregate types 2022-12-08 17:17:19 -05:00
Clayton Calabrese 19ff2d0f89 Remove hardcoded test names in favor of __file__. Remove .py from path. 2022-12-08 14:58:22 -06:00
Lin Huang 4091091b2e check in missing read_only_trx_tests.cpp 2022-12-08 15:50:54 -05:00
Lin Huang 08e7e1c103 check in missing read_only_trx_test.py 2022-12-08 15:44:53 -05:00
Lin Huang 4e5a2cc197 implement read-only transaction 2022-12-08 15:05:20 -05:00
766C6164 6cee4e2bf6 Use inherited option vs duplicating it 2022-12-08 14:02:02 -05:00
Kevin Heifner b063ddcfc9 GH-230 Use very large deadline for keosd http response time 2022-12-08 10:02:27 -06:00
Kevin Heifner 2b11608f34 GH-230 cleanup exception handling 2022-12-08 10:01:56 -06:00
Peter Oschwald 54b1c4f8af Merge pull request #546 from AntelopeIO/ph-nodeos-defaults
[PH] Provide *PluginArgs dataclasses to capture and validate nodeos config options
2022-12-07 15:53:21 -06:00
jgiszczak 45c6376270 Fix typos and formatting. 2022-12-07 15:11:11 -06:00
Peter Oschwald 2e4495e651 Add suggestion to regen classes if test fails due to updated nodeos config options. 2022-12-07 14:58:44 -06:00
Peter Oschwald 792a0f8559 Add purpose and limitations statement to generation script.
Also add note to each generated class calling out that it was generated.
2022-12-07 14:50:31 -06:00
Peter Oschwald 52b7903d92 Remove redundant paths in CMake files. 2022-12-07 14:17:54 -06:00
Huang-Ming Huang 098e53528c fix bn256 installation 2022-12-07 12:38:11 -06:00
Peter Oschwald cc6879c467 Fix module name. 2022-12-07 12:11:16 -06:00
Peter Oschwald bea0ec0195 Fix imports. 2022-12-07 11:53:23 -06:00
Peter Oschwald cdb1342fc8 Create NodeosPluginArgs python package 2022-12-07 11:19:44 -06:00
Peter Oschwald 7703c6ef08 Remove cruft. 2022-12-07 08:49:27 -06:00
Peter Oschwald d1d717d8b0 Remove threads setter function and use setattr instead. 2022-12-07 08:46:58 -06:00
Peter Oschwald 0cd997ff6e Provide BasePluginArgs base class.
BasePluginArgs provides generic implementations of __str__ and supportedNodeosArgs functions for use in each *PluginArgs classes.

Update generation script to no longer generate base class functions, but to inherit from base class.
2022-12-07 08:45:28 -06:00
Peter Oschwald d23ae4cde9 Merge branch 'feature_performance_harness' into feature_performance_harness_stage_2 2022-12-06 19:57:07 -06:00
Peter Oschwald be7640ee47 Make CI/CD performance_test_basic run less perfomance and more unit test. 2022-12-06 19:50:54 -06:00
Peter Oschwald 94cc5a96cd Merge branch 'main' into feature_performance_harness 2022-12-06 19:49:08 -06:00
Peter Oschwald 7dc7133cd0 Fixup generator for proper quote detection and selection. 2022-12-06 19:48:07 -06:00
Peter Oschwald 6936b4144f Fixup invalid syntax error. 2022-12-06 19:45:12 -06:00
Peter Oschwald 8655e4dca1 Script that generates *PluginArgs.py dataclass files from nodeos --help output. 2022-12-06 17:52:28 -06:00
Peter Oschwald 23aea602b1 Fixup some of the config options. 2022-12-06 17:50:58 -06:00
Clayton Calabrese 44d9bb75c0 fix nodeos_run_remote_test failing on nodeos_run_test log check step 2022-12-06 16:40:24 -06:00
Peter Oschwald cf4097217f Provide *PluginArgs dataclasses to capture and validate nodeos config options.
Each *PluginArgs dataclass captures the command line argument and default for each option as specificed in nodeos.

New test validate_nodeos_plugin_args uses nodeos's --help command to parse out each plugin's available options and defaults to validate current status vs. the *PluginArgs classes.  Any addition, removal, update will cause a test failure with note of what has changed.  This will allow easy maintenance going forward.
2022-12-06 16:19:10 -06:00
Kevin Heifner 0103412fe7 GH-525 Interrupt speculative start_block when a block is received 2022-12-06 14:09:15 -06:00
Huang-Ming Huang 2bda949c35 add split-blocks and merge blocks option to leap-util 2022-12-06 11:45:25 -06:00
Kevin Heifner 051f8fd186 Merge branch 'release/3.1' into GH-535-trace-api-3.1 2022-12-06 11:30:52 -06:00
Kevin Heifner 57b0acb59c GH-535 Add log of shutdown complete. 2022-12-06 09:54:01 -06:00
Kevin Heifner 2c4d19902c GH-535 Do not run maintenance task on shutdown 2022-12-06 09:41:55 -06:00
Kevin Heifner ae1f75109c Handle shutdown of http_plugin lifetime 2022-12-06 08:24:02 -06:00
Christopher Gundlach b745639b0a Merge pull request #468 from AntelopeIO/http_plugin_text_plain
Add text/plain content type to http_plugin
2022-12-05 15:38:46 -06:00
Kevin Heifner 03235ed3d2 Merge pull request #536 from AntelopeIO/GH-430-fork-test-main
[3.2 -> main] Test nodeos_forked_chain_test: Fix race on kill of bridge node
2022-12-05 13:16:47 -06:00
Jonathan Giszczak b805a8802c Launch nodeos instances per configuration, unsharing the network first. 2022-12-05 10:40:04 -06:00
Chris Gundlach de6fe8c595 added base metrics for producer_plugin 2022-12-05 10:31:58 -06:00
Kevin Heifner 48ae96a972 Merge remote-tracking branch 'origin/release/3.2' into GH-430-fork-test-main 2022-12-05 10:23:18 -06:00
Kevin Heifner c15f84507d Merge pull request #534 from AntelopeIO/GH-430-fork-test-3.2
[3.1 -> 3.2] Test nodeos_forked_chain_test: Fix race on kill of bridge node
2022-12-05 10:22:08 -06:00
Kevin Heifner d65158aa00 Merge remote-tracking branch 'origin/release/3.1' into GH-430-fork-test-3.2 2022-12-05 09:42:09 -06:00
Kevin Heifner 0e53fc1b62 Merge pull request #533 from AntelopeIO/GH-430-fork-test
[3.1] Test nodeos_forked_chain_test: Fix race on kill of bridge node
2022-12-05 09:41:18 -06:00
Huang-Ming Huang d4fa489e80 Merge branch 'main' into huangminghuang/block_log 2022-12-05 08:45:50 -06:00
Kevin Heifner ca8f031bae GH-430 Fix race on kill of bridge node at producerk. Also removed some unneeded waits on blocks. 2022-12-05 08:40:28 -06:00
Huang-Ming Huang 2954299bd8 bug fixes 2022-12-02 15:50:54 -06:00
Huang-Ming Huang 6ad0eb7668 refactor block_log_impl 2022-12-02 14:28:59 -06:00
Huang-Ming Huang 9af2dafa72 Merge branch 'main' into huangminghuang/bn256 2022-12-02 14:25:07 -06:00
Huang-Ming Huang 2e09a536be update bn256 and tester dependency 2022-12-02 14:01:33 -06:00
Chris Gundlach c15e275e38 fixes based on pr comments 2022-12-02 10:54:13 -06:00
Lin Huang 2640009e79 Merge pull request #531 from AntelopeIO/fix_test_harness_crash
Fixed test harness crash when actiob_traces is empty
2022-12-01 21:47:56 -05:00
Lin Huang 41eea630df move except check before adding action_traces 2022-12-01 17:27:12 -05:00
Lin Huang 60103935b9 Fixed test harness crash when actiob_traces is empty 2022-12-01 16:02:51 -05:00
Clayton Calabrese 6eabf64f74 address pr comment regarding github actions log path 2022-12-01 10:59:21 -06:00
Peter Oschwald 7861f772f5 Merge branch 'feature_performance_harness' into feature_performance_harness_stage_2 2022-12-01 10:31:02 -06:00
Clayton Calabrese 0c2e0e61e7 fix incorrect list in github actions 2022-12-01 10:29:37 -06:00
Chris Gundlach ecea4c38ff changes based on pr comments 2022-12-01 10:24:57 -06:00
Peter Oschwald 94167d13bc Merge pull request #528 from AntelopeIO/ph-test-tweaking
[PH] Test tweaking - Decrease perf expectations for lower performing vms in CI/CD
2022-12-01 10:04:37 -06:00
Peter Oschwald 756bfe9c22 Decrease target tps for lower performance vms in CI/CD 2022-12-01 09:23:48 -06:00
Peter Oschwald 7df5fc7f79 Decrease tps-limit-per-generator for lower performance vms in CI/CD 2022-12-01 09:07:44 -06:00
Peter Oschwald 46366ce1b0 Decrease perf expectations for lower performing vms in CI/CD 2022-12-01 08:47:20 -06:00
Peter Oschwald 0d2ce63027 Merge pull request #527 from AntelopeIO/ph-test-tweaking
[PH] test tweaking
2022-12-01 08:22:35 -06:00
Peter Oschwald 72a6c1b877 Decrease perf expectations for lower performing vms in CI/CD 2022-12-01 07:51:37 -06:00
Peter Oschwald 7562f07879 Decrease perf expectations for lower performing vms in CI/CD 2022-12-01 06:34:39 -06:00
Peter Oschwald 14cf0bfcc5 Decrease tps-limit-per-generator for lower performance vms in CI/CD 2022-12-01 06:34:12 -06:00
Peter Oschwald 811817f60c Merge branch 'feature_performance_harness' into feature_performance_harness_stage_2 2022-12-01 05:28:35 -06:00
Peter Oschwald a4061cb4b0 Merge branch 'main' into feature_performance_harness 2022-12-01 05:27:04 -06:00
Peter Oschwald e1b51aa0f3 Merge pull request #524 from AntelopeIO/fix-nodeos-snapshot-diff-test
[4.0] nodeos_snapshot_diff_test fix
2022-12-01 05:20:19 -06:00
Clayton Calabrese ffffe77a96 resolve test failures due to use of var 2022-11-30 17:35:11 -06:00
Peter Oschwald 948e4f261c GH-523 Roll fixes to steady state average calculation with leeway forward to other test using same logic. 2022-11-30 17:19:32 -06:00
Peter Oschwald 0eba51d1f6 GH-523 Fix assert to be greater than or equal for correctness. 2022-11-30 17:00:12 -06:00
Peter Oschwald c6a5e4360f GH-523 Add small amount of leeway in expectation. 2022-11-30 16:52:22 -06:00
Peter Oschwald c20dc4f977 GH-523 Revert change to transPerPeriod. Fix steady state avg calculation. 2022-11-30 16:29:10 -06:00
Peter Oschwald 118a2a0b1b Merge pull request #518 from AntelopeIO/ph-argparse
[PH] argparse.ArgumentParser usage updates
2022-11-30 15:11:27 -06:00
Peter Oschwald dc76de1576 Merge pull request #510 from AntelopeIO/ph-thread-count-tests
[PH] thread count recommendation tests
2022-11-30 15:11:08 -06:00
Peter Oschwald c175d6be97 Resuse encoder from log_reader. 2022-11-30 14:43:26 -06:00
Peter Oschwald 33b94ba2a4 Remove redundant calls to close when using with statement. 2022-11-30 14:43:02 -06:00
Peter Oschwald 1d5256786d GH-523 Decrease min trx expectations in test to allow to run in nonparallelizable_tests env. 2022-11-30 14:32:48 -06:00
Peter Oschwald f89e6a1bb1 Merge branch 'main' into feature_performance_harness 2022-11-30 13:28:07 -06:00
Peter Oschwald 6bbc91b136 Merge pull request #522 from AntelopeIO/ph-truncate-verbose-response
[PH] Update response order and truncate when printing.
2022-11-30 12:46:49 -06:00
Peter Oschwald 8b9a98c26e Update response order and truncate when printing.
The payload object can be extremely long when printing out during verbose logging.  Rarely is the entire response needed for debugging.  However, the code is often useful when something goes wrong.  Reverse the order of code and payload so that, when trunctating printed responsed, the return code is always available.  Truncate the response to 1024 characters.
2022-11-30 12:14:51 -06:00
Peter Oschwald d291e17022 Use encoder to handle datetime and None type conversions for reporting. 2022-11-30 11:12:12 -06:00
Peter Oschwald 0d5980d2da Use Python introspection to simplify. 2022-11-30 10:29:33 -06:00
Kevin Heifner 31c3f60ab2 Merge pull request #268 from AntelopeIO/mandel-301-snapshot
[4.0] Regression test for: fix replay to correctly add trxs into the de-dup list
2022-11-30 09:57:06 -06:00
Kevin Heifner 732e3820e3 GH-268 Remove unneeded --dump-error-detail 2022-11-30 08:57:14 -06:00
Kevin Heifner f008c78b7a GH-521 Move initialize_protocol_features functionality out of chain_plugin into protocol_feature_manager so it can be used by both chain_plugin and leap-util snapshot. This fixes issue with leap-util snapshot not being able to read snapshots with protocol features activated. 2022-11-29 15:11:37 -06:00
Kevin Heifner 776f07bbd2 GH-268 Update nodeos_snapshot_diff_test.py to use leap-util 2022-11-29 13:17:18 -06:00
Kevin Heifner ed9e742eff Merge remote-tracking branch 'origin/main' into mandel-301-snapshot 2022-11-29 11:49:32 -06:00
Peter Oschwald 8bfa573dfc Merge pull request #520 from AntelopeIO/ph2-merge-feature-br
[PH] Ph2 merge feature br
2022-11-29 11:33:52 -06:00
Peter Oschwald f1d78e2be2 Merge branch 'feature_performance_harness' into ph2-merge-feature-br 2022-11-29 11:04:45 -06:00
Peter Oschwald 8d1e967ff6 Merge pull request #519 from AntelopeIO/ph-main-merge
[PH] main merge
2022-11-29 11:03:27 -06:00
Clayton Calabrese c1bbfe226d add new paths for GHA error logs 2022-11-29 10:21:46 -06:00
Clayton Calabrese d32cc2066f Merge branch 'eosio-launcher-python-port' into test_harness_var_lib_replacement 2022-11-29 10:06:10 -06:00
Peter Oschwald b239f06676 Merge branch 'main' into ph-main-merge 2022-11-29 10:04:14 -06:00
ClaytonCalabrese 119dd4dce8 Merge pull request #516 from AntelopeIO/test_harness_master_merge_11_28
[TH] Merge main into test harness
2022-11-29 09:53:39 -06:00
Peter Oschwald bd4a525f2f Fix performance_test_basic.py parser. 2022-11-29 09:38:24 -06:00
Peter Oschwald b6b6bcf767 Clarify TPS Test Config is part of Performance Harness. 2022-11-29 09:11:01 -06:00
Peter Oschwald ee1795570d Don't print Application Specific Arguments group if there are none. 2022-11-29 09:09:07 -06:00
Peter Oschwald ed975c6425 Make use of ArgumentParser parents and groups.
This will greatly reduce work to bubble up arguments between scripts/modules.  Also brings clarity and grouping of arguments by use with group titles and descriptions.

Test Helper arguments can now be bubbled up to user scripts via direct access to the ArgumentParser.  Performance Test Basic makes use of Test Helper arguments.  Perfomance Test makes use of both Performance Test Basic and Test Helper arguments as well.
2022-11-29 09:04:29 -06:00
Clayton Calabrese 452b719504 update main and merge 2022-11-28 16:10:20 -06:00
Clayton Calabrese 8e2da33d08 merge from main 2022-11-28 16:07:25 -06:00
Clayton Calabrese 577b088713 resolve collision in test path for tests which are run multiple times 2022-11-28 14:31:23 -06:00
Peter Oschwald 84b11790c4 Fix reference before assignment error on results objects when not configured to run tests. 2022-11-28 11:41:06 -06:00
Peter Oschwald 1db0e6c7c3 Fix check for thread calc being 'none' 2022-11-28 11:14:06 -06:00
ClaytonCalabrese c00d71ff3a Merge pull request #514 from AntelopeIO/performance_harness_remove_throw_chains
[PH] Performance harness remove unnecessary throw chains
2022-11-28 11:00:51 -06:00
Clayton Calabrese 7a90c935ad Remove try catch which aren't doing anything besides throwing 2022-11-28 10:25:12 -06:00
Lin Huang 013bbea3d9 Merge pull request #512 from AntelopeIO/libcurl_handle_init_fix
Fixed broken cleos due to reuse of curl handle
2022-11-24 17:04:55 -05:00
Lin Huang 14f193e772 Keep curl handle as a static for performance and unset CURLOPT_UNIX_SOCKET_PATH for non-unix-domain request 2022-11-24 14:30:23 -05:00
Lin Huang 695688e94b fixed broken cleos due to reuse of curl handle 2022-11-23 19:55:32 -05:00
Peter Oschwald 2ca2eb9d44 Fix typo. 2022-11-23 13:17:53 -06:00
Peter Oschwald 92fa92a1b2 Update defaults for producer threads to 6 and chain threads to 3 based on performance run calculations. 2022-11-23 12:44:38 -06:00
Peter Oschwald 7ba252b71c Add options to calculate recommended producer, chain, and net worker thread pool size.
Each plugin's option determines whether to calculate number of worker threads to use in the thread pool with options of: 'none', 'lmax', or 'full'. In 'none' mode, the default, no calculation will be attempted and default configured thread count will be used. In 'lmax' mode, thread count will incrementally be tested until the performance rate ceases to increase with the addition of subsequent threads. In 'full' mode thread count will incrementally be tested from 2..num logical processors, recording each performance and choosing the local max performance (same value as would be discovered in 'lmax' mode). Useful for graphing the full performance impact of each available thread.

Added log directory to collect results of thread optimization calculations.

Added option to opt out of running the tps test.

Updated README for new options and to show the updates to the result reports.
2022-11-23 12:33:34 -06:00
Michal Lesiak 48fb28eb37 Code review fixes.
Revert changes in Operators.h as apparently some unit tests were failing.
2022-11-23 11:58:05 +01:00
Michal Lesiak a629507b4e Revert "Code review fix."
This reverts commit bd3a600cd81e7d08c199f37c4f193d428083c3ec.
2022-11-23 11:58:05 +01:00
Michal Lesiak 253aae4bd0 Code review fix. 2022-11-23 11:58:05 +01:00
Michal Lesiak ce57001c7b Fix undefined behavior - uninitialized variables revealed by valgrind 2022-11-23 11:58:05 +01:00
Matt Witherspoon d5f65b3030 Merge pull request #507 from AntelopeIO/libcurl_readme
[4.0] add libcurl to README build instructions
2022-11-22 20:24:06 -05:00
Matt Witherspoon b87d5f4845 add libcurl to README build instructions 2022-11-22 17:57:50 -05:00
Peter Oschwald 22b0118aae Factor PerformanceTest out into its own class.
Break out config and logging classes.

Update documentation.
2022-11-21 16:36:14 -06:00
Lin Huang a2f3a67003 Merge pull request #492 from AntelopeIO/compute_transaction_clean_up
clean up compute_transaction: replace read_only flag with dry_run, refactor trx_type in transaction_metadata and transaction_context
2022-11-21 17:24:16 -05:00
Lin Huang ad8317f62d Merge branch 'main' into compute_transaction_clean_up 2022-11-21 16:52:06 -05:00
Lin Huang 5a02bd39e0 remove unnecessary const return type and correct an indentation 2022-11-21 16:23:43 -05:00
Kevin Heifner 67dc134361 Merge pull request #505 from AntelopeIO/deepmind-plugin-config-checks-main
[3.2 -> main] Added validation of plugin configuration for deep-mind
2022-11-21 15:10:05 -06:00
Kevin Heifner fd593224c7 Merge remote-tracking branch 'origin/release/3.2' into deepmind-plugin-config-checks-main 2022-11-21 14:00:13 -06:00
Kevin Heifner 5b71d02dd2 Merge pull request #504 from AntelopeIO/deepmind-plugin-config-checks-3.2
[3.1 -> 3.2] Added validation of plugin configuration for deep-mind
2022-11-21 13:59:13 -06:00
Kevin Heifner 52a10c5aa4 Merge pull request #499 from systemzax/libfc-cleanup
libfc cleanup
2022-11-21 13:29:13 -06:00
Kevin Heifner 11a58c587d Merge remote-tracking branch 'origin/release/3.1' into deepmind-plugin-config-checks-3.2 2022-11-21 13:25:29 -06:00
Kevin Heifner b357a163ce Merge pull request #503 from eostitan/v3.1.0/deepmind-plugin-config-checks
[3.1] Added validation of plugin configuration for deep-mind
2022-11-21 13:24:09 -06:00
Guillaume Babin-Tremblay c94218fdfe Added validation of plugin configuration for deep-mind 2022-11-21 18:35:17 +00:00
Chris Gundlach c7f962836a added support for metric_type 2022-11-21 10:38:58 -06:00
Chris Gundlach 40a0507b3b added producer_plugin metrics 2022-11-21 10:38:22 -06:00
Chris Gundlach ae8eee9824 added metric types to metrics 2022-11-21 10:37:53 -06:00
Chris Gundlach be41cdbdf4 added chain_plugin metrics 2022-11-21 10:36:06 -06:00
Chris Gundlach 56a11f1874 added metric_type 2022-11-21 10:35:12 -06:00
Guillaume Babin-Tremblay e5cc2d361c Removed commented files from libraries/libfc/CMakeLists.txt 2022-11-21 16:31:04 +00:00
Lin Huang 33acf3f330 Merge pull request #502 from AntelopeIO/merge_3_2_version_bump
[3.2->main] Merge release/3.2 version bump to Main
2022-11-21 10:21:15 -05:00
Lin Huang 202abefadd restore VERSION_SUFFIX to dev after merging 3.2.0 version bump 2022-11-21 09:46:40 -05:00
Lin Huang 9efc569ae5 Merge pull request #501 from AntelopeIO/bump_3_2_0
bump Leap to 3.2.0
2022-11-21 09:36:57 -05:00
Lin Huang bee268ca10 bump Leap to 3.2.0 2022-11-21 09:05:35 -05:00
Guillaume Babin-Tremblay af702454dc Removed unused files. Moved byteswap.hpp from src/ to include/fc/ and updated include references. 2022-11-19 13:30:28 +00:00
Guillaume Babin-Tremblay ed4b06507a Removed unused files. Moved byteswap.hpp from src/ to include/fc/ and updated include references. 2022-11-19 13:26:25 +00:00
Peter Oschwald d4b31f341c Factor out test params into PtbConfig and LoggingConfig objects.
Using PtbConfig and LoggingConfig objects simplifies test initializer params and encapsulates related config items into an object describing their use. It also allows easy reporting of test configuration in test report and will allow reporting to come for free if additional config arguments are added.

Some renaming for efficiency and clarity.
2022-11-18 16:58:47 -06:00
Peter Oschwald d35b65c863 Rename to PerformanceTestBasic to better align with script names.
Also renaming to use Ptb abbreviation in light of the name change.
2022-11-18 14:22:39 -06:00
Peter Oschwald 8d25f21d9f Merge pull request #496 from AntelopeIO/ph-remove-res-mon-argument
[PH] Remove argument to disable resmon shutdown.
2022-11-18 10:16:13 -06:00
Peter Oschwald 25768770c3 Remove argument to disable resmon shutdown.
Removing --resource-monitor-not-shutdown-on-threshold-exceeded in Cluster.py to allow resmon to shutdown as expected.  Shouldn't default to disabling this.  Also allows for Cluster.py to continue to be able to support older versions of nodeos for perf harness testing.
2022-11-18 09:23:55 -06:00
Peter Oschwald 3fe37f3b92 Merge pull request #484 from AntelopeIO/ph-log-dir-add-tps-target
[PH] log dir add tps target
2022-11-18 08:35:56 -06:00
Lin Huang c9bfbd0ccc clean up compute_transaction: replace read_only flag with dry_run, refactor trx_type in transaction_metadata and transaction_context 2022-11-17 21:03:10 -05:00
Peter Oschwald f7a486f88f Merge branch 'feature_performance_harness_stage_2' into ph-log-dir-add-tps-target 2022-11-17 16:26:28 -06:00
Peter Oschwald f09a1becd0 Merge branch 'feature_performance_harness' into feature_performance_harness_stage_2 2022-11-17 16:24:49 -06:00
Peter Oschwald 93d33db246 Merge pull request #489 from AntelopeIO/ph-fix-trx-gen-err-detection
[PH] fix trx gen err detection
2022-11-17 16:23:31 -06:00
Kevin Heifner 13ba3b5ad7 Merge pull request #491 from AntelopeIO/GH-485-log-main
[3.2 -> main] Use net_plugin_impl logger instead of default logger
2022-11-17 16:07:06 -06:00
Peter Oschwald e2746ebfd9 Attempt to lower trx gen limit for cicd ubuntu 18 machine. 2022-11-17 15:56:10 -06:00
Kevin Heifner bfdb1288f7 Merge remote-tracking branch 'origin/release/3.2' into GH-485-log-main 2022-11-17 15:39:57 -06:00
Kevin Heifner 9a15597983 Merge pull request #490 from AntelopeIO/GH-485-log-3.2
[3.1 -> 3.2] Use net_plugin_impl logger instead of default logger
2022-11-17 15:38:55 -06:00
Kevin Heifner 552aedc95c Merge remote-tracking branch 'origin/release/3.1' into GH-485-log-3.2 2022-11-17 15:04:33 -06:00
Kevin Heifner 0c08b9ed28 Merge pull request #486 from AntelopeIO/GH-485-log-3.1
[3.1] Use net_plugin_impl logger instead of default logger
2022-11-17 15:03:55 -06:00
Peter Oschwald a1e4799bee Fix detection of trx generator failing.
Trx generator can fail to keep up with configured tps generation rate. Detect that failure case and report it as test failure.

Move transaction recvd and expected check to similar location and handling.

Rename launcherExitCodes to trxGenExitCodes for clarity.
2022-11-17 14:46:47 -06:00
Lin Huang 04b46386ee Merge pull request #487 from AntelopeIO/compute_transaction_fix_main
[3.2->main] compute_transaction: add --dry-run, deprecate --read-only, and sign a transaction only when explicitly requested
2022-11-17 15:06:57 -05:00
Lin Huang 3b16c62e69 Merge remote-tracking branch 'origin/release/3.2' into compute_transaction_fix_main 2022-11-17 14:35:39 -05:00
Lin Huang b641746863 Merge pull request #483 from AntelopeIO/compute_transaction_fix
[3.2] compute_transaction: add --dry-run, deprecate --read-only, and sign a transaction only when explicitly requested
2022-11-17 14:32:03 -05:00
Kevin Heifner 8a0ed73c1a GH-485 Use net_plugin_impl logger instead of default logger 2022-11-17 13:18:39 -06:00
Lin Huang 2d2f7880ca Do not change the behavior of existing --read-only that transactions by --read-only will be signed by default 2022-11-17 14:04:54 -05:00
Peter Oschwald bda146d96e Add target tps number to test log dir name for ease of locating specific run. 2022-11-17 11:45:07 -06:00
Peter Oschwald 841011b13e Merge branch 'feature_performance_harness' into feature_performance_harness_stage_2 2022-11-17 10:52:45 -06:00
Peter Oschwald 65c13bd8c3 Merge branch 'main' into feature_performance_harness 2022-11-17 10:35:34 -06:00
Peter Oschwald 4530c518b1 Merge pull request #476 from AntelopeIO/perf_harness_curl_replacement
[PH] Update performance harness to main
2022-11-17 10:33:04 -06:00
Peter Oschwald f7c008ad72 Merge pull request #481 from AntelopeIO/ph-db-map-mode
[PH] add database map mode
2022-11-17 10:32:10 -06:00
Lin Huang 5d6dc09dd9 compute_transaction: add --dry-run, deprecate --read-only, and sign a transaction only when --sign-with is provided 2022-11-17 10:55:09 -05:00
Peter Oschwald 90a1cbd5e8 Add cpu count to top level report. 2022-11-17 09:27:30 -06:00
Peter Oschwald 20f7ccf399 Update docs for new argument 2022-11-16 17:08:17 -06:00
Peter Oschwald f852de1a13 Add argument to configure --database-map-mode.
Use namespace alias to simplify and make easier to read. Rename some variables for brevity.
2022-11-16 17:06:24 -06:00
Peter Oschwald e3e688ad51 Refactor to use __str__ function override. 2022-11-16 15:44:42 -06:00
Peter Oschwald 4dd551f00f Rename to simplify and shorten plugin argument classes. 2022-11-16 15:30:41 -06:00
Clayton Calabrese 54931b63ff merge from main to include curl replacement. 2022-11-16 12:24:33 -06:00
Peter Oschwald b7bc0fece0 Merge pull request #475 from AntelopeIO/ph-thread-configs
[PH] Update docs for new arguments.
2022-11-16 10:00:08 -06:00
Peter Oschwald ce9b26faf3 Merge pull request #474 from AntelopeIO/ph-chain-state-db-size
[PH] Add argument to configure --chain-state-db-size-mb and default to 10GB
2022-11-16 09:04:27 -06:00
Peter Oschwald 8fd065c0cf Update docs for new arguments. 2022-11-16 08:34:12 -06:00
Peter Oschwald 8206a6df01 Update docs for new argument. 2022-11-16 08:29:59 -06:00
Peter Oschwald 4ba4548af4 Add argument to configure --chain-state-db-size-mb and default to 10GB 2022-11-16 08:25:42 -06:00
Peter Oschwald 9f59b5ea4c Merge pull request #469 from AntelopeIO/ph-thread-configs
[PH] Add support for thread configs
2022-11-16 08:23:08 -06:00
Peter Oschwald 2afac0031c Add support for configuring number of worker threads in producer thread pool (--producer-threads). 2022-11-15 16:11:24 -06:00
Peter Oschwald 138fb0e096 Add support for configuring number of worker threads in net_plugin thread pool (--net-threads). 2022-11-15 15:43:23 -06:00
Matt Witherspoon 48c7251a34 Merge pull request #464 from AntelopeIO/boost181_path_overload
[?.?] resolve `path` ambiguous overload in boost 1.81
2022-11-15 16:35:30 -05:00
Matt Witherspoon 139593d7e5 Merge pull request #465 from AntelopeIO/boost181_string_view_tostring
[?.?] refactor `boost::beast::string_view` to `std::string` conversion for changes in boost 1.81
2022-11-15 16:35:18 -05:00
Peter Oschwald 9986399867 Add support for configuring number of worker threads in controller thread pool (--chain-threads). 2022-11-15 15:16:00 -06:00
Chris Gundlach 0780d77b60 changed url from /scrape to /metrics, which is default for prometheus 2022-11-15 13:00:57 -06:00
Chris Gundlach 722508e86e took out unnecessary content_type_ member 2022-11-15 12:52:43 -06:00
Chris Gundlach 0ef5a84596 set content type for prometheus_plugin to plain text 2022-11-15 11:25:16 -06:00
Chris Gundlach 7417565481 added ability to set content type on api 2022-11-15 11:24:31 -06:00
Clayton Calabrese 5ae2aef2ed convert hardcoded use of var lib to a dynamic one based off test name. 2022-11-15 11:22:47 -06:00
Matt Witherspoon e16bd9404f Merge pull request #462 from MaximSmolskiy/remove-dump-error-details-from-all-tests-in-tests/CMakeLists.txt
Remove --dump-error-details from all tests in tests/CMakeLists.txt
2022-11-14 20:01:58 -05:00
ClaytonCalabrese b757d02a77 Merge pull request #442 from AntelopeIO/replace_curl_with_urllib
[4.0] replace usage of curl in python with urllib
2022-11-14 15:36:55 -06:00
766C6164 e872980baf Use cli11 as submodule 2022-11-14 14:44:10 -05:00
Matt Witherspoon 074dd1437a Merge pull request #463 from AntelopeIO/remove_platform_tls_rootCA
[4.0] remove platform root CA population for TLS connections
2022-11-14 12:15:10 -05:00
Chris Gundlach 4b17541372 Merge branch 'main' into feature_prometheus_plugin 2022-11-14 10:10:23 -06:00
Huang-Ming Huang 21cd3a0201 Merge pull request #444 from AntelopeIO/huangminghuang/libcurl
[4.0] Use libcurl  for cleos
2022-11-14 08:32:12 -06:00
Matt Witherspoon b9029e8a01 boost::beast::string_view no longer has to_string() in boost 1.81 2022-11-13 22:55:38 -05:00
Matt Witherspoon 9f91f5a99b resolve 'path' ambiguous overload in boost 1.81 2022-11-13 22:52:43 -05:00
Clayton Calabrese 3faa5cf1c1 convert some strings to fstring. Fix indenting on multi-line blocks. 2022-11-11 18:52:41 -06:00
MaximSmolskiy 5dd1f2b995 Remove --dump-error-details from all tests in tests/CMakeLists.txt 2022-11-12 01:57:56 +03:00
Huang-Ming Huang f1142ffb6d address PR comments 2022-11-11 15:44:22 -06:00
Huang-Ming Huang 02a065b497 fix gcc8 compile problem 2022-11-11 13:57:36 -06:00
Huang-Ming Huang b24a270683 fix find gmp 2022-11-11 11:03:15 -06:00
Christopher Gundlach 6be258e1aa Merge pull request #436 from AntelopeIO/prometheus_metric_updates
Updates to runtime_metrics / interface between instrumented plugins and prometheus plugin
2022-11-11 10:22:28 -06:00
jgiszczak c0edf6c3ef Merge pull request #459 from AntelopeIO/eosio-launcher-create-queries-class
Migrate chain queries out of Node.py into their own class
2022-11-10 18:23:12 -06:00
Jonathan Giszczak 96a377cdcf Move wait methods back to Node. 2022-11-10 18:08:58 -06:00
Jonathan Giszczak 5f857313ac Redirect naughty usage of Python 'private' method in cli_test 2022-11-10 17:47:04 -06:00
Clayton Calabrese a2dd619621 fix another test failure 2022-11-10 17:29:05 -06:00
Clayton Calabrese f33fcdaf77 fix test failures as a result of return type changing for json in processUrlLibRequest 2022-11-10 16:54:11 -06:00
Clayton Calabrese a36a4f350f return the http retcode as well as the payload in processurllibrequest 2022-11-10 15:37:13 -06:00
Jonathan Giszczak 91e96d01b8 Move chain transactions API out of Node into its own class.
Still avoiding modifying tests for the time being.
2022-11-10 15:09:14 -06:00
Jonathan Giszczak d5e9dcdc86 Add missing imports. 2022-11-10 14:40:18 -06:00
Huang-Ming Huang e4a8edc2ac Merge branch 'main' into huangminghuang/libcurl 2022-11-10 14:25:52 -06:00
Huang-Ming Huang 9772bedd6b Merge branch 'main' into huangminghuang/bn256
# Conflicts:
#	libraries/libfc/libraries/ff
2022-11-10 13:00:49 -06:00
Huang-Ming Huang 64c953db4b remove ff submodule 2022-11-10 12:59:03 -06:00
Huang-Ming Huang 6cb2b24475 remove easy handle map 2022-11-10 11:51:30 -06:00
Huang-Ming Huang 0704f63200 address PR comments 2022-11-10 11:35:44 -06:00
Clayton Calabrese ba5e93d2ed revert reversion of new default. 2022-11-10 10:58:17 -06:00
Peter Oschwald 6430f7057e Merge pull request #460 from AntelopeIO/ph-merge-main
[PH] merge main
2022-11-10 09:00:50 -06:00
Peter Oschwald 68d3b15559 Merge branch 'main' into ph-merge-main 2022-11-10 07:57:22 -06:00
Jonathan Giszczak 4a52633f5d Migrate chain queries out of Node.py into their own class
Node inherits from new Queries class to avoid intrusive changes to tests
processCurlCommand is left in Node to avoid merge conflicts with #442
2022-11-09 18:01:33 -06:00
Clayton Calabrese 4ad6a58c6f fix test failures 2022-11-09 16:00:54 -06:00
Huang-Ming Huang 89a34d0e89 don't show detail exception 2022-11-09 13:22:29 -06:00
Clayton Calabrese 806f08fc34 Change txn_test_gen_plugin to send a response when no problems occur in push_next_transaction due to it causing errors when using urllib 2022-11-09 13:10:24 -06:00
Clayton Calabrese 0756eb865c revert change of defaulting for SilentErrors. 2022-11-09 13:09:39 -06:00
Clayton Calabrese 17e1d30b60 fix problem in http_api_test where incorrect command and args were being used. 2022-11-09 13:09:09 -06:00
Peter Oschwald bbacf249bb Merge pull request #457 from AntelopeIO/ph-readme-updates
[PH] README updates
2022-11-09 09:32:01 -06:00
Peter Oschwald cb690cfc28 Collapse example directory structure. 2022-11-09 09:28:47 -06:00
Peter Oschwald ad06833564 Merge pull request #456 from AntelopeIO/ph-readme-updates
[PH] README updates.
2022-11-09 09:19:23 -06:00
Peter Oschwald b438106b3b Fix indentation. 2022-11-09 09:16:22 -06:00
Peter Oschwald 27f8039d77 Merge pull request #455 from AntelopeIO/ph-fix-readme-links
[PH] Fix links to Build and Install From Source directions.
2022-11-09 08:51:25 -06:00
Peter Oschwald 4d421ef788 Fix links to Build and Install From Source directions. 2022-11-09 08:46:41 -06:00
Peter Oschwald a2ace6314e Merge pull request #454 from AntelopeIO/ph-fix-readme-links
[PH] Fix links to test report sections.
2022-11-09 08:36:01 -06:00
Peter Oschwald 8b36f6191d Merge pull request #453 from AntelopeIO/ph-rm-err-det-dump
[PH] Remove --dump-error-detail test arg
2022-11-09 08:35:46 -06:00
Peter Oschwald 113fcdb860 Fix links to test report sections. 2022-11-09 08:33:54 -06:00
Huang-Ming Huang 06e69ea263 more change to connection error message 2022-11-09 08:19:08 -06:00
Peter Oschwald 080aefd5fb Remove --dump-error-detail option now that logs are automatically collected during CICD runs. 2022-11-09 08:07:34 -06:00
Huang-Ming Huang e93f29d796 fix cli_test.py 2022-11-09 08:01:40 -06:00
Kevin Heifner 2aaa7abe94 Merge pull request #414 from AntelopeIO/GH-271-kill-speculative
[4.0] Remove read-mode speculative & disable-api-persisted-trx
2022-11-09 07:06:25 -06:00
Huang-Ming Huang 38dc095d8c restore connection refused message 2022-11-08 19:01:32 -06:00
Scott B 84cd74a1c5 Merge pull request #449 from AntelopeIO/wall-fix
Wall fix
2022-11-08 12:18:30 -06:00
Matt Witherspoon 7cf26920d6 remove platform root CA population for TLS connections 2022-11-08 11:53:37 -05:00
Vlad e16a17114c Merge pull request #450 from AntelopeIO/add-snapshot-subcommand
[4.0] Added snapshot to-json subcommand to leap-util
2022-11-08 11:34:04 -05:00
766C6164 5e4134da93 Fixes 2022-11-08 10:59:53 -05:00
766C6164 f1a60adff0 Multiple updates 2022-11-07 23:40:18 -05:00
Scott Bailey 71a2f1135f Review comment correction. 2022-11-07 21:21:30 -06:00
Kevin Heifner 70762315c9 GH-271 Additional info to comments. 2022-11-07 16:42:26 -06:00
Scott Bailey 53c462bf09 Address review comments. 2022-11-07 16:09:42 -06:00
766C6164 5d3689d9b4 Adjusted help texts 2022-11-07 15:47:44 -05:00
766C6164 17c9ef5c3d Added snapshot subcommand 2022-11-07 15:39:55 -05:00
Huang-Ming Huang e0ecd31f55 disable Expect 100-Continue header 2022-11-07 14:09:20 -06:00
jgiszczak 1a7212c931 Merge pull request #331 from AntelopeIO/eosio-launcher-data-and-topology
Add data classes, populators, and topology generators
2022-11-07 14:02:36 -06:00
Scott Bailey 7d5c3c9f70 Remove warnings. 2022-11-07 11:31:17 -06:00
Scott Bailey ed1068b411 Include system libraries with SYSTEM keyword to remove included warnings. 2022-11-07 11:31:17 -06:00
Scott Bailey ccf35ef625 Add warning options: ENABLE_WMAX, ENABLE_WERROR, ENABLE_WEXTRA. 2022-11-07 11:31:17 -06:00
Scott Bailey 6b2ae8e72e Improve ignore for '[Bb]uild*/' directories and ignore QtCreator user files. 2022-11-07 11:31:17 -06:00
Scott Bailey 58e4c327cc Update submodules with wall-fix changes. 2022-11-07 11:31:17 -06:00
Chris Gundlach 1557592bd5 added dropped trxs metric 2022-11-07 10:59:48 -06:00
Clayton Calabrese 258fbc352e Merge remote-tracking branch 'origin/main' into replace_curl_with_urllib 2022-11-07 10:56:34 -06:00
Chris Gundlach a370d138a0 changed to use references rather than pointers 2022-11-07 10:30:11 -06:00
Chris Gundlach 4cb2657ac8 updated to net_plugin to return a struct rather than a vector of pointers 2022-11-07 10:21:25 -06:00
Peter Oschwald 3151be3e1f Merge branch 'main' into feature_performance_harness 2022-11-07 09:23:34 -06:00
Peter Oschwald 05d107b387 Merge pull request #447 from AntelopeIO/ph-consolidate-args
[PH] Consolidate some of the arguments to log_reader.py's calcAndReport
2022-11-07 09:08:33 -06:00
Peter Oschwald 4495867be5 Merge pull request #446 from AntelopeIO/ph-prod-node-config-updates
[PH] Update producer node configurations for performance
2022-11-07 09:08:17 -06:00
Huang-Ming Huang 6326878363 Merge branch 'main' into huangminghuang/libcurl 2022-11-07 08:41:11 -06:00
Peter Oschwald 2982ba9756 Update to use disable-subjective-billing.
If providing disable-subjective-api-billing, should also provide disable-subjective-p2p-billing, otherwise simply add the disable-subjective-billing option which covers both. Opt to use the overarchign argument for now.
2022-11-07 08:17:53 -06:00
Kevin Heifner 7312368096 Merge pull request #448 from AntelopeIO/GH-419-trx-finality-test-main
[3.2 -> main] Fix test failure due to trx hitting near end of block production time
2022-11-07 08:06:20 -06:00
Kevin Heifner 7790b4618d Merge remote-tracking branch 'origin/release/3.2' into GH-419-trx-finality-test-main 2022-11-04 18:41:59 -05:00
Kevin Heifner 87359e262a Merge pull request #443 from AntelopeIO/GH-419-trx-finality-test-3.2
[3.1 -> 3.2] Fix test failure due to trx hitting near end of block production time
2022-11-04 18:41:47 -05:00
Jonathan Giszczak 58c9879d69 Use cleos to generate unique producer keys for non-bios producer nodes 2022-11-04 18:33:04 -05:00
Jonathan Giszczak 6eabcab35e Merge branch 'eosio-launcher-data-and-topology' of github.com:AntelopeIO/leap into eosio-launcher-data-and-topology 2022-11-04 17:48:59 -05:00
Jonathan Giszczak 8034303068 Move launcher.py out of TestHarness. 2022-11-04 17:43:48 -05:00
Huang-Ming Huang a99c1d5f1e increase trx_finality_status_test timeout 2022-11-04 17:37:02 -05:00
jgiszczak 760ddde988 Merge pull request #432 from AntelopeIO/eosio-launcher-write-genesis-file
Write a genesis file for each node.
2022-11-04 16:35:58 -05:00
Peter Oschwald 2fcd2f1ec5 Consolidate some of the arguments to log_reader.py's calcAndReport
Factor related arguments out into classes to cut down on how verbose the method signature is.
2022-11-04 16:16:21 -05:00
Jonathan Giszczak 8e6242da0f Support using an existing genesis.json file. 2022-11-04 16:09:43 -05:00
Huang-Ming Huang 06c9e25327 enable http connection resuse 2022-11-04 15:40:13 -05:00
Peter Oschwald 1b3ef361c5 Update documentation for updates to launch transaction generators script.
Documentation updates were missed when the script was updated.
2022-11-04 15:19:48 -05:00
Peter Oschwald 695f9e1d5d Add support for additional producer configuration.
Leverage extraNodeosArgs configuration argument to support performance tuning of last block and cpu effort percentages, last block and produce time offsets, and signature cpu billable percent.

Default these performance tuning options for single producer node topology where production window will not pass to another producer node.

Update documentation for new features.
2022-11-04 15:18:43 -05:00
Huang-Ming Huang 728faf5339 increase trace_plugin_test timeout 2022-11-04 12:11:24 -05:00
Huang-Ming Huang 25b35c17d4 fix make_scoped_exit 2022-11-04 11:31:32 -05:00
Peter Oschwald 17218ec24d Merge pull request #445 from AntelopeIO/ph-merge-main
[PH] merge main
2022-11-04 10:00:58 -05:00
Peter Oschwald c8501e7de0 Merge branch 'main' into feature_performance_harness 2022-11-04 08:08:46 -05:00
Huang-Ming Huang 2664e0c918 address PR comments 2022-11-04 08:02:10 -05:00
Huang-Ming Huang 18f58f62c7 fix test failures 2022-11-03 19:17:10 -05:00
Kevin Heifner 339853d3f5 GH-271 Update comment to be clearer and not reference speculative mode which no longer exists. 2022-11-03 16:37:06 -05:00
Huang-Ming Huang 26f6f341f4 change cleos to use libcurl 2022-11-03 14:23:45 -05:00
Kevin Heifner 9b948c0150 Merge remote-tracking branch 'origin/release/3.1' into GH-419-trx-finality-test-3.2 2022-11-03 13:03:30 -05:00
Kevin Heifner ae0439ba8c Merge pull request #441 from AntelopeIO/GH-419-trx-finality-test-3.1
[3.1] Fix test failure due to trx hitting near end of block production time
2022-11-03 13:03:17 -05:00
Peter Oschwald 218e27e60e Merge pull request #402 from AntelopeIO/ph-launch-trx-gens-updates
[PH] Launch Trx Generators updates
2022-11-03 12:38:00 -05:00
Peter Oschwald e4b96908e1 Merge branch 'feature_performance_harness' into ph-launch-trx-gens-updates 2022-11-03 12:09:23 -05:00
Peter Oschwald dab2d3b3df Merge pull request #393 from AntelopeIO/ph-default-keep-logs
[PH] Default perf harness to saving logs
2022-11-03 12:05:38 -05:00
Clayton Calabrese d377753da3 replace usage of curl in python with urllib 2022-11-03 11:46:34 -05:00
Kevin Heifner 4dcb8318a3 GH-419 Improve assertion message by including both expected states. 2022-11-03 10:48:19 -05:00
Kevin Heifner b92b997c6b GH-419 Update to address PR comments. Revert to explicit present. 2022-11-03 10:34:48 -05:00
Kevin Heifner 59ee6ed2ee GH-419 Previous fix for test was incomplete in that the validateTrxState needed to be updated for IN_BLOCK 2022-11-03 08:27:25 -05:00
Matt Witherspoon bf33fdabea Merge pull request #439 from AntelopeIO/http_server_header_main
[3.2 -> main] change the HTTP Server header to be nodeos/keosd version
2022-11-02 22:02:38 -04:00
Matt Witherspoon fab0b7c793 Merge remote-tracking branch 'origin/release/3.2' into http_server_header_main 2022-11-02 21:41:34 -04:00
Matt Witherspoon b52647b2c9 Merge pull request #438 from AntelopeIO/http_server_header_32x
[3.2] RFC: change the HTTP Server header to be nodeos/keosd version
2022-11-02 21:40:42 -04:00
Matt Witherspoon 8d2637e6a5 change the HTTP Server header to be nodeos/keosd version 2022-11-02 16:56:59 -04:00
Matt Witherspoon 27573c7724 Merge pull request #437 from AntelopeIO/armlinux_from_json_float_war
work around abieos test failure on ARM float min/max roundtrip to&from string in JSON parsing
2022-11-02 14:33:48 -04:00
Matt Witherspoon 0c4352e821 bump abieos submod to main with ARM float JSON string workaround 2022-11-02 14:11:13 -04:00
Matt Witherspoon 91af790fca bump abieos submod to version with ARM float JSON string workaround 2022-11-02 12:10:13 -04:00
Chris Gundlach 3c699a43ec used new alias 2022-11-02 11:07:03 -05:00
Chris Gundlach a084e2e001 update runtime_metric to int64_t; added aliases 2022-11-02 10:51:01 -05:00
Chris Gundlach 3b4fa6f59c added num_clients/num_peers metrics 2022-11-01 18:03:18 -05:00
Chris Gundlach 811ac8aab8 added handling of runtime_metrics from net plugin 2022-11-01 18:02:46 -05:00
Chris Gundlach 50859e7b81 added definition for runtime_metrics 2022-11-01 18:01:45 -05:00
Kevin Heifner 7b77458c9a Merge branch 'main' into GH-271-kill-speculative 2022-11-01 15:04:01 -05:00
Jonathan Giszczak bab3b16795 Support max-[block,transaction]-cpu-usage when writing genesis.json 2022-11-01 14:50:29 -05:00
Jonathan Giszczak 590dfce426 Write a genesis file for each node. 2022-11-01 14:39:38 -05:00
Kevin Heifner 2b64357ccb GH-271 Remove persist until expired functionality 2022-11-01 13:54:24 -05:00
Kevin Heifner aab82cdc40 GH-271 Keep trx metas in pending so abort puts them in unapplied queue. 2022-11-01 09:46:18 -05:00
Kevin Heifner 9003617853 GH-271 Dump error details too much logging for high transaction test 2022-10-31 19:18:41 -05:00
Kevin Heifner 46df41c112 GH-271 Add wait for block 2022-10-31 19:16:53 -05:00
Kevin Heifner 62dd2b0b94 GH-271 Remove disable-api-persisted-trx option, functionality will be removed soon. 2022-10-31 17:04:04 -05:00
Huang-Ming Huang 19cf07a664 fix alt_bn128_add 2022-10-31 17:02:22 -05:00
Kevin Heifner 17932b2bb8 GH-271 Hardcode disable-api-persisted-trx=true for now, will be removed soon. 2022-10-31 16:48:56 -05:00
Huang-Ming Huang e3b10cbec2 replace benchmark alt_bn128 2022-10-31 15:29:53 -05:00
Kevin Heifner 295ef4a3c5 GH-271 Increase timeout and turn on debug output. 2022-10-31 15:21:47 -05:00
Kevin Heifner 6a6d8ddceb GH-271 Add wait for blocks as transactions are no longer persisted by default. 2022-10-31 15:00:06 -05:00
Kevin Heifner a96e206b3b GH-271 Temporary fix until python regression test framework removes this file which is already in work. 2022-10-31 13:48:08 -05:00
Huang-Ming Huang d62951ae14 Fix alt_bn128_pair 2022-10-31 13:40:01 -05:00
Huang-Ming Huang f3e5344136 update bn256 2022-10-31 12:32:20 -05:00
Kevin Heifner 0f4ad02f85 GH-271 Check for ephemeral case and use is_speculative_block for better documentation 2022-10-31 12:06:37 -05:00
Kevin Heifner 1ee599636a GH-271 Update tests for removal of read-mode speculative 2022-10-31 11:53:25 -05:00
Kevin Heifner cc2513cdb4 GH-271 Update docs for removal of read-mode speculative and read-only 2022-10-31 11:53:05 -05:00
Kevin Heifner 5da9f20157 GH-271 WIP Removed db_read_modes SPECULATIVE and READ_ONLY. Added new block_status type ephemeral to distinguish between a block being produced which should not roll-back state and a block only created for speculative trx execution. Renamed is_producing_block to is_speculative_block as producing implies too much. 2022-10-31 10:36:11 -05:00
Peter Oschwald abc5c4150d Address peer review comments. 2022-10-28 16:57:06 -05:00
Peter Oschwald 8e7cf9c1cb Factor out TpsTrxGensConfig to allow numGenerators and list of each generator's tps target to be used for launching and populating in report.
This pushes the calculations for number of generators required to hit overall target tps and the per-generator target tps to balance tps generation across all launched generators into one location to be referenced by others instead of needing to reproduce the calculations in multiple locations.
2022-10-28 16:20:02 -05:00
Peter Oschwald a0cb06ef93 Remove unused function. 2022-10-28 16:12:29 -05:00
ClaytonCalabrese a902785a14 Merge pull request #398 from AntelopeIO/perf_harness_wait_transactions_in_block
[PH] Perf harness wait for transactions in block
2022-10-28 12:58:18 -05:00
Huang-Ming Huang 74e80f86e9 update to use bn256 2022-10-28 12:50:21 -05:00
Jonathan Giszczak 70bc518bb8 Fix mesh topology generator and eliminate redundant links.
Per original C++, peera->peerb and peerb->peera are both configured.
2022-10-27 17:57:38 -05:00
Clayton Calabrese 60bbd3a80f address peer feedback on performance test wait for trx 2022-10-27 17:45:46 -05:00
Peter Oschwald ddd7c7a449 Make use of import module to launch trx generators. 2022-10-27 16:24:55 -05:00
Peter Oschwald 14fa915f9f Begin refactoring launch_transaction_generators.py into an import module.
Refactor to take string lists of comma separated account names and private keys to match trx_generator.
2022-10-27 16:15:36 -05:00
Peter Oschwald cf19caced4 Fix conflicting needs for low level logs.
Move capturing of low level log artifacts until after cluster has shutdown to guarantee it is not longer needing the logs for its clean shutdown.  Remove --keep-logs argument access and control it internally based on --del-perf-logs so that TestHelper and Cluster can continue to function normally with their arguments during shutdown and performance tests can still capture logs if necessary.  Update documentation.
2022-10-27 13:42:54 -05:00
Clayton Calabrese 9be93bf881 fix a bug in waitForTransactionsInBlockRange when None is the wait 2022-10-27 13:09:49 -05:00
Clayton Calabrese 257fa0d082 change from wait for empty blocks to waiting for generated transactions in performance test basic 2022-10-27 13:08:42 -05:00
Peter Oschwald 57b94656e6 Default to saving test reports.
Update command line arguments to reflect the default capture of reports and, if choosing to not capture use the --del-report style arguments.

Update documentation to reflect argument changes and changes to log directory structure.
2022-10-27 11:13:02 -05:00
Christopher Gundlach 3aefcbbe8c Merge pull request #333 from AntelopeIO/prometheus_pull
Add pull functionality
2022-10-27 10:21:33 -05:00
Peter Oschwald 905c6859b5 Capture low level artifacts into performance test log directories.
Test logs in etc and var are overwritten with each subsequent run of the test if left in place, thus move them out to test logs directories for later debugging use.

By default these logs will be captured unless explicitly disabled with --del-perf-logs argument.
2022-10-27 08:42:25 -05:00
Peter Oschwald 27e1e07a8e Dynamically determine the location of the validation node's log file. 2022-10-27 08:39:25 -05:00
Jonathan Giszczak fbefdd1490 Interpret total nodes as per C++ version.
Revise graphviz labels for utility and readability.
Fix off-by-one error in star topology and add missing loop increment.
Prevent self-peers in star topology.
2022-10-26 18:59:08 -05:00
Peter Oschwald d7116c0c28 Add argument --del-perf-logs to control perf harness log lifetime.
No longer overload the --keep-logs argument.

Allows performance harness tests to default behavior to collecting and saving log files unless explicitly directly to delete logs.
2022-10-26 15:19:12 -05:00
Peter Oschwald 987134a72c Merge pull request #391 from AntelopeIO/ph-long-running-use-linear-search
[PH] Performance Test - Long running Tests to use linear search
2022-10-26 15:07:43 -05:00
Jonathan Giszczak cf28213223 Add bind nodes to new Pythonic make_line()
Make a ring of nodes 00 through nn rather than bios through nn.
2022-10-26 14:28:50 -05:00
Peter Oschwald 9913824e2c Re-order items in report to be more in line with how one would read them.
Now that reports aren't always explicity reordered to be alphabetical, put them in a general logical order here as well.
2022-10-26 13:59:10 -05:00
Peter Oschwald f50a1f43e9 For initial binary search, try a short run using ceiling tps first.
In the general case, where --max-tps-to-test has been set well above achievable, this change adds one --test-iteration-duration-sec of time to the overarching test. In the case where it is successful it could save many cycles of time.  It also puts one data point in the results summary that is basically an optimistic execution showing at potential overload what the avg tps looks like.
2022-10-26 13:52:23 -05:00
Peter Oschwald a925c90fcb Performance Test Long Duration Tests now use linearly decrementing search instead of binary search.
This avoids a problem where the long running test max is outside the window previously dictated for binary search and incorrectly reporting LongRunningMaxTpsAchieved = 0.  Long Running max TPS should always be <= short running max tps, thus linearly decrementing search works well for this case.
2022-10-26 13:49:36 -05:00
Peter Oschwald 8943e61e92 Merge pull request #387 from AntelopeIO/ph-test-updates
[PH] Perf Harness test updates
2022-10-26 12:27:18 -05:00
Peter Oschwald f2cbb7a45c Merge pull request #385 from AntelopeIO/ph-config-prod-trace-api
[PH] Add ability to configure whether producer nodes enable trace api plugin
2022-10-26 12:27:01 -05:00
Peter Oschwald f2e88d4867 Include testAnalysisBlockCnt in search scenario summary.
Update documenation.
2022-10-26 10:32:30 -05:00
Peter Oschwald d72cd0cf80 Update default test durations to something higher for more reasonable block count to analyze 2022-10-26 09:35:41 -05:00
Peter Oschwald f4b7ab20c3 Correct documentation and help strings to correctly identify keosd. 2022-10-26 09:06:49 -05:00
Peter Oschwald 097e64e476 Correct documentation on transfers. 2022-10-26 09:06:06 -05:00
Peter Oschwald 3e902f46ed Merge pull request #361 from AntelopeIO/ph-quiet-reporting
[PH] Add option to quiet reporting from performance tests.
2022-10-26 08:44:17 -05:00
Peter Oschwald 68ee2eac5c Update to dynamically calculate validation node id.
This allows minimal initial support for dynamic configuration of the cluster via -p and -n arguments

Always guarantee one validation node is present by keeping _totalNodes always at least 1 greater than pnodes.
2022-10-26 08:42:43 -05:00
Peter Oschwald 2da71f44ad Merge branch 'feature_performance_harness' into ph-quiet-reporting 2022-10-26 07:47:37 -05:00
Peter Oschwald fe596e7613 Merge pull request #360 from AntelopeIO/ph-report-start-end-times
[PH] Report start end times for tests
2022-10-26 07:43:50 -05:00
Jonathan Giszczak f2aae03434 Assign network port numbers correctly.
Start using the config directory.
Prefer pathlib rather than os.path.
Replace port of C++ version of make_line with Pythonic make_line.
2022-10-26 01:01:58 -05:00
Peter Oschwald 59a7a1658f Update docs for new feature arguments. 2022-10-25 22:14:17 -05:00
Peter Oschwald bd95fbc845 Fix initialization of node ids to be earlier for use in create accounts. 2022-10-25 22:08:27 -05:00
Peter Oschwald 34e5857866 Use same time for testStart and timestamp for test logs dir. 2022-10-25 22:01:57 -05:00
Peter Oschwald 5ffdb64ab1 Use same time for testStart and timestamp for test logs dir. 2022-10-25 21:51:37 -05:00
Peter Oschwald 38f4076c8f Define the node id for the validation node in the test to reuse throughout. 2022-10-25 19:01:50 -05:00
Peter Oschwald 8ade49c7f8 Use dict (report) and datetime (testStart, testFinish) types as long as possible. Only convert to str or json at the last moment when required. 2022-10-25 18:42:06 -05:00
Peter Oschwald 458e2a118c Update boolean command line arguments to use add_bool.
Fixes issue where using a boolean type command line argument specifying False on the command line is actually interpreted as True.
2022-10-25 17:08:07 -05:00
Peter Oschwald 35e689dc38 Fix loggingDict to be an instance field. 2022-10-25 17:06:17 -05:00
Peter Oschwald 0bcd49e192 Fix spelling. 2022-10-25 17:05:02 -05:00
Peter Oschwald 705d030125 Add feature to enable/disable trace_api_plugin on producer nodes.
When disabling trace_api_plugin on producer nodes, can make use of specificExtraNodeosArgs to enable trace_api_plugin on specific nodes.

Default enable trace_api_plugin on bios node in eosio-launcher.

Allow Cluster createAccounts to specify which node is used to validate the transactions, as a node with trace_api_plugin enabled is required.
2022-10-25 17:04:34 -05:00
Jonathan Giszczak 122a7ae43b Add additional command line arguments to support custom config dir
Add some default values.
Calculated p2p and http port sequence not working right still.
2022-10-24 10:47:59 -05:00
Chris Gundlach 81495ef1fd fix problem where empty string was returned; made stats its own struct 2022-10-21 12:56:03 -05:00
Chris Gundlach 1735247897 refactored based on review comments 2022-10-21 10:55:14 -05:00
Peter Oschwald 395516e144 Merge pull request #352 from AntelopeIO/ph-docs
[PH] Performance Harness MVP Documentation
2022-10-20 12:35:26 -05:00
Peter Oschwald df911b7070 Add option to quiet reporting from performance tests.
Provide option in both Performance Harness and basic test.

Update docs to reflect argument addition
2022-10-20 11:55:50 -05:00
Peter Oschwald 7dc550c6f9 Add start and end times to test reports.
Updated report examples to include start and end times. Cleaned up some of the report formatting.

Updated timestamped log directories to be in UTC so that all timestamps are easier to trace back to log files and timestamps therein.
2022-10-20 10:41:20 -05:00
Peter Oschwald 7a11caa408 Addressing additional peer review comments. 2022-10-20 07:57:04 -05:00
Peter Oschwald 1ffe1ccf0e Update build and test instructions in README for additional python dependencies for Performance Harness. 2022-10-19 16:39:22 -05:00
Peter Oschwald f7aff36f34 Addressing peer review comments. 2022-10-19 16:32:14 -05:00
Peter Oschwald b641304b5c Addressing peer review comments. 2022-10-19 16:28:07 -05:00
Peter Oschwald e96ea2af60 Added Transaction Generator README 2022-10-19 15:22:01 -05:00
Peter Oschwald 2de701f7d2 Additional details and clarifications. 2022-10-19 14:53:14 -05:00
Peter Oschwald c4120f1807 Begin to document Performance Harness in README 2022-10-19 12:04:48 -05:00
Peter Oschwald 9a28459655 Merge branch 'main' into feature_performance_harness 2022-10-19 08:51:59 -05:00
Peter Oschwald c080290778 Merge pull request #302 from AntelopeIO/ph-runner
[PH] TPS Scenario Runner
2022-10-19 07:44:40 -05:00
Peter Oschwald fc5a91e8b2 Use standard library function to same effect. 2022-10-19 07:16:36 -05:00
ClaytonCalabrese 01589aa80d Merge pull request #314 from AntelopeIO/performance_harness_waitOnBlockTransactions
[PH] Add method to wait and check blocks for transactions
2022-10-18 17:24:11 -05:00
Peter Oschwald 97711cb482 Simplify loop condition as well as fixup binary search algorithm a bit. 2022-10-18 16:26:52 -05:00
Clayton Calabrese c0ddbf9176 refactor maxFutureBlocks in waitForTransactionsInBlockRange 2022-10-18 13:20:01 -05:00
Peter Oschwald dab4422fa0 Address peer review comment. Use dictionary comprehension. 2022-10-18 11:38:25 -05:00
Peter Oschwald d45d5b0551 Address peer review comments. Use local helper functions to alleviate need for duplicate code. 2022-10-18 11:37:29 -05:00
Clayton Calabrese 8471ed7d9d rename some variables so that waitForTransactionsInBlockRange reads easier 2022-10-17 17:02:26 -05:00
Jonathan Giszczak 21e342fc80 Revert to generic python3 in shebang.
Make sure nodeDefinition name is initialized.
Use sensible default values that align with minimum network topology.
Default make_line to making a ring to match original behavior.
Remove extraneous line.
2022-10-17 16:34:14 -05:00
Peter Oschwald 84c2732bf3 Merge branch 'feature_performance_harness' into ph-runner 2022-10-17 13:15:10 -05:00
ClaytonCalabrese deb1fe13bc Merge pull request #304 from AntelopeIO/performance_harness_additional_logging
[PH] Add some additional parameters to performance harness output
2022-10-17 10:37:39 -05:00
Chris Gundlach b6e93df693 added pull functionality 2022-10-17 09:09:04 -05:00
Jonathan Giszczak 5ec19e70dc Add data classes, populators, and topology generators 2022-10-17 01:50:33 -05:00
Peter Oschwald 7e9117ec2f Cleanup & Organized imports and from imports. 2022-10-13 21:37:47 -05:00
Clayton Calabrese 4ea4f5c976 update waitOnBlockTransactions based off PR feedback. Fix a number of bugs in it. 2022-10-13 18:27:58 -05:00
Clayton Calabrese 4c7ca0337d remove uncessecary imports from log_reader.py 2022-10-13 17:05:12 -05:00
Peter Oschwald b78f465a7b Report env and nodeos version. 2022-10-13 09:12:44 -05:00
Peter Oschwald 73e4b846f1 Fix edge case in search algorithm causing infinite test loop. 2022-10-13 08:07:43 -05:00
Peter Oschwald 9d5e0f2c35 Fix log dir cleanup to honor save json reports.
Previously, if not specifying --keep-logs, the reports would be deleted along with the logs. Now honor the --save-json and new --save-test-json parameters such that logs may all be deleted by json reports saved.

Introduced new --save-test-json argument to dictate whether to save json reports from each test scenario.
2022-10-12 15:49:26 -05:00
Peter Oschwald 35ff3091c3 Updates from peer review.
Update granularity of TPS values during search and max reporting to be nearest 100.

Update default min step size to 500.

Update binary search algorithm to keep floor and ceiling values at expected precision granularity (100).

Keep min step size the same for long running search scenario.
2022-10-12 15:46:33 -05:00
Clayton Calabrese 8a832b0f99 Add function that takes a list of transactions and examines a number of blocks to find those transactions. 2022-10-11 20:39:44 -05:00
Peter Oschwald 021307f035 Add performance_test.py to run performance basic test scenarios to determine max TPS and report results.
Performance Test runs a binary search of the TPS space using short runs to determine an effective TPS max. Then runs a series of longer test runs once it has zeroed in on a test range around the discovered max tps. Currently it determines success based on a very rudimentary success criteria looking at avg tps being close to target as well as all trxs sent being accounted for in blocks.

Update performance_test_basic.py to allow specification of a root directory for the logs to be stored in. Remove duplicate saveJsonReport in report in args. Move analyzedResultsAndReport before the shutdown sequence so that it will work if keep-logs is false, as it needs the logs to compute. Move test assert out of the test run itself so that when used as in import module the test doesn't assert and exit.
2022-10-11 16:41:58 -05:00
Christopher Gundlach bb86490614 Merge pull request #311 from AntelopeIO/prometheus_cpp_submodule
Add prometheus-cpp as a submodule
2022-10-11 10:10:15 -05:00
Chris Gundlach cc81f9e137 updated prometheus_plugin not to use submodule library version 2022-10-10 15:46:38 -05:00
Chris Gundlach cf1ca0678b added prometheus-cpp files to prometheus-core lib 2022-10-10 15:25:21 -05:00
Chris Gundlach 3c5561dd70 removed ported files 2022-10-10 15:18:01 -05:00
Chris Gundlach 0881ece722 added prometheus-cpp as submodule 2022-10-10 15:10:00 -05:00
Peter Oschwald 11179c7642 Fix up formatting to break up long lines. 2022-10-07 08:54:30 -05:00
Clayton Calabrese 286ef417da print some additional parameters in performance harness 2022-10-06 19:58:38 -05:00
Peter Oschwald cb4e466bdc Rework performance_test_basic.py to work as an import module and as a script.
This was necessary as a first step to being able to use this functionality as an import module for an orchestrator to run multiple instances of PerformanceTestBasic with different tps configurations.

Some rework to how args are handled in the report.  When run as an import module, command line args won't be the same or available.  Get args/config info from how the PerformanceTestBasic was configured instead.

Created TestHelperConfig and ClusterConfig objects to help simplify and separate concerns for all the parameters to the test.
2022-10-06 16:01:59 -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
Peter Oschwald 94c6fd6f2c Merge branch 'main' into feature_performance_harness 2022-10-05 13:50:18 -05:00
Peter Oschwald ee30a6872a Merge pull request #285 from AntelopeIO/ph-addl-trx-stats
[PH] Add support for calculating and reporting individual transaction CPU and net time
2022-10-05 11:07:55 -05:00
Peter Oschwald 2eb7b36542 Merge pull request #267 from AntelopeIO/ph-trx-latency
[PH] Calculate & Report Transaction Latency Stats
2022-10-05 11:07:33 -05:00
Peter Oschwald 384efd1f28 Merge branch 'feature_performance_harness' into ph-trx-latency 2022-10-05 11:05:55 -05:00
ClaytonCalabrese 0f51325e89 Merge pull request #261 from AntelopeIO/performance_harness_per_node_logging
[PH] Cluster: Node Specific Logging Levels
2022-10-05 09:36:55 -05:00
Peter Oschwald 23fc3b7fd4 Calculatue trx cpu and net stats and add to report. 2022-10-05 09:26:21 -05:00
Peter Oschwald 05024c3305 Move canonical handling of logs to calculate stats and create a performance report into one location in log_reader.py. 2022-10-05 08:57:38 -05:00
Peter Oschwald 344a30f9b7 Remove sleep. Vestige of earlier dev testing. 2022-10-05 08:13:52 -05:00
Peter Oschwald e873a074e0 Updates to better structure log dirs and make compatible with read_log_data.py
Move dataclasses and log scraping out of performance_test_basic.py into log_reader.py

Update read_log_data.py to properly calc trx latency as well as fix its ability to create the report from logs.

Update blkData to also use @property decorator

Write intermediate block data and trx data to log files to support read_log_data.py

Provide better log directory structure, setup and cleanup, and keep-logs support.

Move --num-blocks-to-prune into a CL argument to the script.

Fix timestamp for older versions of Python by not using fromisoformat and using strptime instead
2022-10-04 17:21:32 -05:00
Clayton Calabrese 260bfa9563 adress pr comments to change how space stripping works, and give an example for logging-level-map in help. 2022-10-03 13:49:08 -05:00
Peter Oschwald 504638416b Log total trx sent when reporting number lost 2022-10-03 13:46:20 -05:00
Peter Oschwald fa2c4145b6 Don't log all the transactions if not found. Simply notify of total. 2022-10-03 13:32:40 -05:00
Peter Oschwald 40305a544c Peer review comments. 2022-10-03 12:59:16 -05:00
Peter Oschwald f7d5ec955a Address peer review comments. 2022-10-03 10:55:46 -05:00
Peter Oschwald e19956d89e Calculate trx latency stats. 2022-09-30 18:10:04 -05:00
Peter Oschwald 3595e228a9 Log trx provider's sent transactions and timestamps to new log directory.
Setup, manage, and cleanup log directory for test.
2022-09-30 18:07:29 -05:00
Clayton Calabrese 682ad39205 revert expectations change due for performance_test_basic, as it was already handled in cmake 2022-09-30 10:17:09 -05:00
Clayton Calabrese 14886933ba adjust test expectations until missing transactions are resolved. 2022-09-30 10:07:55 -05:00
Clayton Calabrese 4835a0494d Merge branch 'feature_performance_harness' into performance_harness_per_node_logging 2022-09-29 16:34:33 -05:00
Christopher Gundlach 26b8e59066 Merge pull request #258 from AntelopeIO/add_prometheus_library
Add Prometheus Library
2022-09-29 14:57:33 -05:00
Clayton Calabrese c5b07a3b18 allow node specific customization of logging levels via cluster 2022-09-29 14:52:40 -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
Peter Oschwald bb50177fd4 Merge branch 'main' into feature_performance_harness 2022-09-29 10:10:53 -05:00
Peter Oschwald b5d19148ee Merge branch 'main' into feature_performance_harness 2022-09-28 13:10:12 -05:00
ClaytonCalabrese b172da3f66 Merge pull request #213 from AntelopeIO/performance_harness_multiple_generators
[PH] Performance harness multiple generators
2022-09-28 13:02:36 -05:00
Peter Oschwald da66222b92 Merge branch 'feature_performance_harness' into performance_harness_multiple_generators 2022-09-28 07:50:47 -05:00
Kevin Heifner 56844c3b44 Mandel-301 Fix replay to correctly add needed trxs into the de-dup list 2022-09-27 13:09:06 -05:00
Peter Oschwald 43555bd49b Merge branch 'main' into feature_performance_harness 2022-09-27 12:59:45 -05:00
Clayton Calabrese c0c85a7808 lower expectations for performance_test_basic in CI 2022-09-27 11:43:04 -05:00
Peter Oschwald 5b1f23e824 Merge pull request #232 from AntelopeIO/ph-block-size
[PH] Add calculating and reporting on block size over time during test.
2022-09-27 10:59:28 -05:00
ClaytonCalabrese ebfb7397db Add space for formatting in launch_transaction_generators.py
Co-authored-by: Peter Oschwald <oschwaldp@objectcomputing.com>
2022-09-27 10:46:00 -05:00
Peter Oschwald 4b28484eab Merge branch 'ph-block-size' of https://github.com/AntelopeIO/leap into ph-block-size 2022-09-27 10:40:23 -05:00
Peter Oschwald acc5ca7bef Merge branch 'feature_performance_harness' into ph-block-size 2022-09-27 10:38:35 -05:00
ClaytonCalabrese aa13c29043 Merge pull request #237 from AntelopeIO/performance_harness_graceful_shutdown
[PH] Performance harness graceful shutdown
2022-09-27 10:06:21 -05:00
Chris Gundlach eaeaf4ab3d Merge branch 'main' into feature_prometheus_plugin 2022-09-27 09:26:53 -05:00
Peter Oschwald 1c6030e834 Update tests/performance_tests/log_reader.py 2022-09-27 07:55:08 -05:00
Clayton Calabrese 8c0fc29d4d cause trx_generators to exit upon sigint, handle log checking inside of finally, so that even early exits get analyzed, print new line in json to indicate if run exited early or not 2022-09-26 16:17:21 -05:00
Peter Oschwald 21b315277e Merge pull request #233 from AntelopeIO/migrate-numpy-ubuntu-pkg
[PH] Migrate numpy to ubuntu pkg
2022-09-26 10:35:28 -05:00
Peter Oschwald 2907e20fa6 Use Ubuntu python3-numpy package instead of installing through pip 2022-09-26 10:02:51 -05:00
Peter Oschwald 2ff87c60d5 Add calculating and reporting on block size over time during test. 2022-09-26 09:45:51 -05:00
Clayton Calabrese dd755d814d adopt a indentation style for python involving multiple line function calls 2022-09-23 15:29:53 -05:00
Clayton Calabrese 3178edf599 code review to address formatting of code. 2022-09-23 14:40:42 -05:00
Clayton Calabrese ef6000c787 Improve performance_test_basic. Solve failure. Add seperate script for spawning multi trx generators. 2022-09-23 10:32:02 -05:00
Clayton Calabrese 609fadc0ed initial changes to setup multiple transaction generators. 2022-09-22 14:56:15 -05:00
Peter Oschwald 6d20226f37 Merge pull request #193 from AntelopeIO/ph-blocks-data-sep
[PH] Break out chain data section knowledge into chainGuide.
2022-09-22 14:03:13 -05:00
Peter Oschwald 0bcb481783 Update report format. Allow report creation separate from writing to file.
Rename chainBlocksGuide to better describe its role.
2022-09-22 11:37:59 -05:00
Peter Oschwald 53324fc92e Merge branch 'feature_performance_harness' into ph-blocks-data-sep 2022-09-21 09:40:32 -05:00
Peter Oschwald 2b9c20113d Merge pull request #164 from AntelopeIO/performance_harness_export_json
[PH] Export Performance Harness Results as JSON
2022-09-21 09:12:54 -05:00
Peter Oschwald 0de1447909 Fix whitespace. 2022-09-20 15:31:02 -05:00
Peter Oschwald 338fd61f1b Fix whitespace. 2022-09-20 15:30:13 -05:00
Peter Oschwald 7e36408ade Install numpy and dataclasses where necessary in docker builds. 2022-09-20 15:22:09 -05:00
Peter Oschwald 9210f04267 Use float for avg and std deviation for additional needed procision. 2022-09-20 15:06:45 -05:00
Peter Oschwald 6db64d5963 Update ubuntu18 to install python3 dataclasses 2022-09-20 14:40:29 -05:00
Christopher Gundlach cf24fe9cbf Merge pull request #190 from AntelopeIO/add_prometheus_plugin
Add Prometheus Plugin
2022-09-20 14:10:21 -05:00
Peter Oschwald ba38c3f48f Update ubuntu18 to install numpy 2022-09-20 14:02:29 -05:00
Peter Oschwald a3795d7086 Update ubuntu18 to install numpy 2022-09-20 13:59:55 -05:00
Peter Oschwald 7bc7c4d290 Update ubuntu22 to install numpy 2022-09-20 13:43:01 -05:00
Peter Oschwald eff8cf3b4a Merge branch 'feature_performance_harness' into ph-blocks-data-sep 2022-09-20 12:59:24 -05:00
Peter Oschwald 6039acd372 Merge branch 'main' into feature_performance_harness 2022-09-20 12:58:45 -05:00
Peter Oschwald 93fb1f71f9 Break out chain data section knowledge into chainGuide. 2022-09-20 12:57:54 -05:00
Chris Gundlach d351840a70 changed to make building prometheus plugin mandatory 2022-09-20 09:16:40 -05:00
Jonathan Giszczak 3b71f2a74a Port eosio-launcher to Python - initial commit with command line parsing 2022-09-19 17:14:02 -05:00
Clayton Calabrese a4dcb35158 merge again from origin branch and resolve conflicts. 2022-09-19 15:16:51 -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
Clayton Calabrese 8f0a22e7a4 merge from origin and resolve conflict 2022-09-19 14:32:05 -05:00
Chris Gundlach cdb4156702 added prometheus plugin skeleton code 2022-09-19 14:22:21 -05:00
Peter Oschwald bef7f3426d Merge pull request #181 from AntelopeIO/ph_tps_scoring_test
[PH] Add testing around TPS scoring implementation.
2022-09-19 14:22:12 -05:00
Chris Gundlach 642653a37f cmake changes to add prometheus plugin 2022-09-19 14:21:08 -05:00
Christopher Gundlach f5953b89bc Merge pull request #177 from AntelopeIO/ph_early_termination_status
[PH] Added early termination status
2022-09-19 10:51:13 -05:00
Chris Gundlach 7bbf911e6e added error code handling for python script 2022-09-19 09:59:09 -05:00
Clayton Calabrese 55acfd1b06 fix format of arguments 2022-09-16 16:24:36 -05:00
Clayton Calabrese 926964f4a9 allow both the option to save logs and the path 2022-09-16 16:00:15 -05:00
Peter Oschwald 6c58ca374d Add testing around TPS scoring implementation.
Rename nodeos_log_scraping_test.py to log_reader_tests.py to house additional test coverage.

Cover block data log pruning and tps analysis in testing.

Fixes edge cases for 0 and 1 blocks in tps scoring algorithm.
2022-09-16 15:18:06 -05:00
Clayton Calabrese 7e5c3f433d performance stats json: provide default path and make path settable rather than option to save or not 2022-09-16 14:03:38 -05:00
Clayton Calabrese 071e359880 address PR comments concerning how nodeos version is obtained and adding a save-json option to performance_test_basic. 2022-09-16 11:22:25 -05:00
Chris Gundlach f5e126156f added early termination status 2022-09-16 09:00:02 -05:00
Peter Oschwald 48537e63c7 Merge pull request #160 from AntelopeIO/update_test_config
[PH] Update Python Perf Harness to run CI/CD configuration.
2022-09-15 12:36:04 -05:00
Peter Oschwald b8cddd079e Have help display defaults by default.
Remove now redundant default statement from argument help strings
2022-09-15 12:21:44 -05:00
Christopher Gundlach 7617245621 Merge pull request #159 from AntelopeIO/ph_improved_logging
[PH] Updated logging for trx_generator
2022-09-15 10:39:31 -05:00
Peter Oschwald fbb0f5d442 Clean up argument. 2022-09-15 08:48:01 -05:00
Peter Oschwald d4c60a0434 Increase max block net usage.
Updates to 1024*1024*40
2022-09-15 08:01:00 -05:00
Clayton Calabrese 57d733111d don't assume location of nodeos in exportAsJSON 2022-09-14 17:50:30 -05:00
Clayton Calabrese fefbc5ad51 rewrite exportAsJSON to use a json object rather than string. Get nodeos version from console. 2022-09-14 17:49:15 -05:00
Peter Oschwald d159aaf6c9 Update max-transaction-cpu-usage per peer review. 2022-09-14 17:27:01 -05:00
Peter Oschwald b2996c607b Provide genesis.json file for performance harness
To test performance limits, need to update genesis values that artificially impose performance limits on throughput. Of particular note: max_block_net_usage, max_block_cpu_usage, min_transaction_cpu_usage.

Update Cluster's defaults for --max-block-cpu-usage and --max-transaction-cpu-usage to only be applied if a genesis.json is not specified. Also updated to be in line with max allowed max-block-cpu-usage and typical default for max-transaction-cpu-usage
2022-09-14 17:18:26 -05:00
Clayton Calabrese abac6b72a0 allow exporting of data from numpy analysis to json for later consumption 2022-09-14 15:56:01 -05:00
Chris Gundlach b568684103 Merge branch 'feature_performance_harness' into ph_improved_logging 2022-09-14 13:09:55 -05:00
Peter Oschwald 7abb8b6184 Merge branch 'feature_performance_harness' into update_test_config 2022-09-14 13:06:30 -05:00
Peter Oschwald 2a5dd76856 Merge pull request #161 from AntelopeIO/fix_numpy_dependency_ubuntu20
Add numpy dependency installation to Dockerfile for ubuntu20
2022-09-14 13:03:28 -05:00
Peter Oschwald 22446a0ed0 Need to install python3-pip first. 2022-09-14 12:45:56 -05:00
Peter Oschwald ace914e1a4 Add numpy dependency installation to Dockerfile for ubuntu20 2022-09-14 12:39:05 -05:00
Peter Oschwald 2b5b06ae84 Make duration and tps configurable to python test script.
Update defaults to be in line with expected typical CICD run
2022-09-14 10:52:50 -05:00
Chris Gundlach 55455cb845 Merge branch 'feature_performance_harness' into ph_improved_logging 2022-09-14 10:51:43 -05:00
Chris Gundlach 77f84d2164 improved logging on test failure 2022-09-14 10:16:44 -05:00
Peter Oschwald fafa357219 Merge branch 'main' into feature_performance_harness 2022-09-14 08:22:03 -05:00
Peter Oschwald 366fa37a4a Merge pull request #147 from AntelopeIO/implement-tps-scoring
Add TPS scoring
2022-09-13 17:48:06 -05:00
Peter Oschwald 708ef81198 Some addl whitespace cleanup. 2022-09-13 17:17:07 -05:00
Peter Oschwald c92cb04315 Some whitespace cleanup. 2022-09-13 17:12:15 -05:00
Peter Oschwald 3c6bc1dea3 Update to better use python idioms and libraries. Add minor inline documentation of behavior. 2022-09-13 16:57:06 -05:00
Peter Oschwald 8931260450 Add TPS scoring including min, max, average, and standard deviation using measurements of pairs of consecutive blocks over a defined window of blocks. 2022-09-12 16:12:15 -05:00
Christopher Gundlach bcab39611d Merge pull request #140 from AntelopeIO/ph_integrate_performance_monitor
Integrate tps_performance_monitor into trx_generator program
2022-09-12 16:05:54 -05:00
ClaytonCalabrese 658ce50603 Merge pull request #129 from AntelopeIO/nodeos_log_scraping_test
Nodeos log scraping test
2022-09-12 16:04:47 -05:00
Chris Gundlach 14ae5df533 fixes to trx_generator param and added validation 2022-09-12 10:38:08 -05:00
Christopher Gundlach fb297c1eee Merge branch 'feature_performance_harness' into ph_integrate_performance_monitor 2022-09-12 09:32:45 -05:00
Chris Gundlach 762306538a added creation of and parameters for tps_performance_monitor 2022-09-12 09:10:01 -05:00
Clayton Calabrese 86a4a50488 name nodeos logs after their patch number. Add explicit defaults in test. 2022-09-09 16:36:08 -05:00
Clayton Calabrese 036d1cf4ad Rework nodeos_log_scraping_test and add old logging form to test. 2022-09-09 13:35:01 -05:00
Clayton Calabrese 1f2d832ad8 Create a test to ensure Nodeos log scraping works as expected. 2022-09-08 13:03:28 -05:00
ClaytonCalabrese 1aebbbf91e Merge pull request #100 from AntelopeIO/performance_harness_separate_scripts
Refactor and Separate Python Script for Performance Harness
2022-09-07 12:35:07 -05:00
Clayton Calabrese bad58ad1dc merge from parent 2022-09-07 11:42:08 -05:00
Peter Oschwald fe38c8af7e Merge pull request #92 from AntelopeIO/update_to_test_harness_python_package
Update to test harness python package
2022-09-07 11:32:45 -05:00
Clayton Calabrese f6b1c2ddfa Change from checking == to is for None comparison 2022-09-07 11:25:04 -05:00
Clayton Calabrese 73dcde5d9d added option to pass ceaseBlock to read_log_data 2022-09-07 10:42:44 -05:00
Christopher Gundlach bd250c605d Merge pull request #110 from AntelopeIO/ph_txn_performance_monitor
Added tps_performance_monitor
2022-09-07 09:35:35 -05:00
Chris Gundlach c49a7fa951 added case to check for lag start resetting 2022-09-06 18:44:02 -05:00
Clayton Calabrese d5c0aeb7de Rename some functions and move waitForEmptyBlocks back to test where it is used. 2022-09-06 17:09:39 -05:00
Chris Gundlach c10b971949 Merge branch 'feature_performance_harness' into ph_txn_performance_monitor 2022-09-06 16:24:05 -05:00
Chris Gundlach dbf40894f8 added tests for tps_performance_monitor 2022-09-06 15:56:22 -05:00
Chris Gundlach c86664142a added tps_performance_monitor 2022-09-06 15:55:36 -05:00
Clayton Calabrese d4bb984805 add script to scrap data from nodeos logs. Separate out helper functions from performance_test_basic. Fix a bug in the test regarding cease block 2022-09-01 15:23:03 -05:00
Peter Oschwald 8dee4b18ba Update import for new TestHarness package 2022-09-01 08:54:27 -05:00
Peter Oschwald ec4ff67601 Merge branch 'main' into update_to_test_harness_python_package 2022-09-01 08:28:19 -05:00
Christopher Gundlach ede1177407 Merge pull request #81 from AntelopeIO/ph_main_refactor
Refactored the trx_generator main code
2022-08-31 18:27:51 -05:00
ClaytonCalabrese 97a6a9665e Merge pull request #50 from AntelopeIO/performance_harness_cluster_configurable_logging
Performance harness cluster configurable logging
2022-08-31 11:01:46 -05:00
Chris Gundlach 99b9b47907 modified rate test to look at return value from generate and send call 2022-08-31 09:52:56 -05:00
Chris Gundlach 6ad75b6ca4 fixed member variable being hidden by local variable 2022-08-31 09:51:48 -05:00
Chris Gundlach 89bc704233 removed code from main and put in trx_generator 2022-08-30 17:31:40 -05:00
Chris Gundlach 53b8f6dc02 added check for null monitor 2022-08-30 17:31:11 -05:00
Chris Gundlach cb0107c9a6 added trx_generator to cmake 2022-08-30 17:29:11 -05:00
Clayton Calabrese 55f1fe482d use from_variant to determine logging_level in less code 2022-08-29 17:30:05 -05:00
ClaytonCalabrese 5af29f7d78 Merge pull request #40 from AntelopeIO/performance_harness_create_data_structures
Capture data and create usable data structures storing data in performance_test_basic.py
2022-08-29 12:05:21 -05:00
Clayton Calabrese b84603abc8 update regex parsing in performance_test_basic to handle the old version of logging 2022-08-26 17:25:54 -05:00
Clayton Calabrese 8495376b40 rename trxResult to actually fit what is is a result of, a block 2022-08-26 14:20:34 -05:00
Clayton Calabrese 8c3c89f4ed change blockId variable to better reflect what it actually is. 2022-08-26 14:11:52 -05:00
Clayton Calabrese c2e02ac718 address PR comments about fstrings and type conversion 2022-08-26 13:16:04 -05:00
Christopher Gundlach cace23e324 Merge pull request #45 from AntelopeIO/ph_add_tps_tester
Added unit tests for the tps_tester
2022-08-26 12:32:00 -05:00
Peter Oschwald 1f25aed130 Merge branch 'feature_performance_harness' into ph_add_tps_tester 2022-08-26 11:36:54 -05:00
Peter Oschwald df590967b0 Fix generator, for now, to at least honor the number of trxs expected to send (not rate or time limit).
Fix warning about type narrowing.
2022-08-26 11:35:55 -05:00
Peter Oschwald 195061dbaf Update test as trace api moved into default setup. 2022-08-26 11:34:13 -05:00
Chris Gundlach e522483249 fixed cmake test for trx_generator 2022-08-25 16:14:14 -05:00
Chris Gundlach 082497643a updated delay time 2022-08-25 15:51:14 -05:00
Chris Gundlach b2f41f8818 added include of <thread> 2022-08-25 15:50:38 -05:00
Chris Gundlach 9178ff6bb8 added trx generator tests 2022-08-25 15:50:09 -05:00
Clayton Calabrese add306379a update totals on the fly in performance_test. Reduce code. capture stats better. 2022-08-25 15:31:48 -05:00
Chris Gundlach c4978cd537 reverted params back to uint32_t; changed sleep_time stat name 2022-08-25 14:45:54 -05:00
Chris Gundlach da0ad0ec88 added test with longer simulated processing time 2022-08-25 14:44:42 -05:00
Chris Gundlach e74580f1de added validation of test parameters 2022-08-25 14:00:47 -05:00
Clayton Calabrese 035fba9680 clean and consolidate python functions in performance_test_basic. 2022-08-25 13:53:16 -05:00
Clayton Calabrese 8f0db470d7 Merge remote-tracking branch 'origin/feature_performance_harness' into performance_harness_create_data_structures 2022-08-25 11:27:03 -05:00
Clayton Calabrese a725f99bf6 Merge remote-tracking branch 'origin/feature_performance_harness' into performance_harness_cluster_configurable_logging 2022-08-25 10:58:05 -05:00
Peter Oschwald 48fba4a1ee Merge branch 'main' into feature_performance_harness 2022-08-25 09:14:41 -05:00
Clayton Calabrese b05090bfa6 allowed passing of a logging level to cluster that will be applied to created logging.json 2022-08-24 13:26:46 -05:00
Chris Gundlach e564f1bf43 added unit tests; fixed various issues identified by tests 2022-08-24 13:23:29 -05:00
Clayton Calabrese d599c8e56b Merge branch 'main' into feature_performance_harness 2022-08-24 00:55:19 -05:00
Clayton Calabrese d78ebeb969 expand data stored by performance_test_basic.py. Capture data into the python itself for future use. Add some helper functions and classes to facilitate all this. 2022-08-22 22:17:09 -05:00
Christopher Gundlach 03af897906 Merge pull request #27 from AntelopeIO/ph_add_tps_tester
Added initial version of the TPS tester
2022-08-22 09:14:15 -05:00
Chris Gundlach b393de5628 fixed arithmetic error; used std conversion 2022-08-19 10:16:37 -05:00
Chris Gundlach 6a1f3ed1b9 initial trx_tps_tester 2022-08-19 09:34:30 -05:00
ClaytonCalabrese 0478825ebf Merge pull request #821 from eosnetworkfoundation/performance_harness_python_checklogs
Validate Number of Trx in Generator Match Nodeos Log
2022-08-17 14:24:43 -05:00
Clayton Calabrese 950bfae967 revert unintended whitespace changes 2022-08-16 17:32:07 -05:00
Clayton Calabrese beca545f38 remove unused import 2022-08-16 17:17:23 -05:00
Clayton Calabrese f8645a86f2 change from microseconds to seconds for transaction experation to resolve failures due to expired transactions. Add missing declaration to trx/generator main.cpp. 2022-08-16 17:10:36 -05:00
Clayton Calabrese 73087f04e4 clean up variables in performance_test_basic. 2022-08-16 17:09:18 -05:00
Clayton Calabrese 4d5535e7ee remove print statement 2022-08-16 17:04:14 -05:00
Clayton Calabrese 2a3e69b428 merge in dev branch. Add missing declaration to trx_generator. Add checking for transaction count and waiting for blank blocks in performance_test_basic.py 2022-08-16 17:03:30 -05:00
Clayton Calabrese 1fa0727cd0 performance_test_basic.py:clean up log files. wait for lib to advance before and after trx_generator call. scrap log for transaction count. 2022-08-16 13:58:39 -05:00
Peter Oschwald 83a89ad3d2 Merge pull request #820 from eosnetworkfoundation/ph_tps_config
Configurable test duration and tps
2022-08-16 12:50:48 -05:00
Chris Gundlach 2a9c334a5e fixed buffer creation bug; added logging 2022-08-16 12:26:47 -05:00
Peter Oschwald 949407c8a1 Add cli params for configuring test transaction duration (sec) and target generation transactions per second (tps). 2022-08-16 10:52:21 -05:00
Christopher Gundlach d2c5a3034e Merge pull request #817 from eosnetworkfoundation/ph_define_trx_provider
Moved to using a sync socket implementation
2022-08-16 09:34:55 -05:00
Chris Gundlach d9f89749c4 cleaned up spacing, naming and added comments 2022-08-15 15:39:10 -05:00
Peter Oschwald 54a3d1c352 Merge pull request #818 from eosnetworkfoundation/perf_harness_parts_integration
Create actions and transactions in more efficient manner.
2022-08-15 15:00:19 -05:00
Peter Oschwald 42c5900bc2 Address peer review comments. 2022-08-15 13:26:47 -05:00
Peter Oschwald fb0dd3ada0 Address peer review comments: exclusively use snake case except in template types. 2022-08-15 13:18:37 -05:00
Chris Gundlach 2d17d0bdc5 added single send for signed trx 2022-08-15 13:12:06 -05:00
Peter Oschwald b25c717149 Create actions and transactions in more efficient manner. 2022-08-15 12:24:40 -05:00
Chris Gundlach 2fcad33359 Merge branch 'feature_performance_harness' into ph_define_trx_provider 2022-08-15 10:53:43 -05:00
Chris Gundlach 8f6d25c355 switched to a socket implementation 2022-08-15 10:34:13 -05:00
Peter Oschwald c6231eac2e Merge pull request #815 from eosnetworkfoundation/perf_harness_parts_integration
Perf harness parts integration
2022-08-15 09:30:52 -05:00
Peter Oschwald 5e87aa90a0 Create command line argument for providing the last irreversible block id to the generator.
Update python script to provide lib id
2022-08-12 15:53:34 -05:00
Peter Oschwald 4f4f8bfeb2 Pass in account private keys, for signing transactions, from the test harness script. 2022-08-12 15:26:51 -05:00
Peter Oschwald 48708f51ad Add ability to update & re-sign transactions before sending.
Create some simple structs for managing action pairs, private keys, and transactions.

Factor out private keys into accessible objects for re-signing needs.

Before sending trxs on p2p provider interface update the trxs to be current and re-sign.
2022-08-12 14:47:20 -05:00
Peter Oschwald c7fc7ca6fc Quick reformat to clean up a couple things. 2022-08-12 11:16:07 -05:00
Peter Oschwald 9f5ac3be4b Add method to update and resign transactions for eventual transaction reuse. 2022-08-12 11:13:07 -05:00
Peter Oschwald 86c9f95287 Update method name for clarity and logging. 2022-08-12 11:11:39 -05:00
Peter Oschwald d2eceded95 Remove previous push transaction implementations and tie into trx_provider send interface. 2022-08-12 11:06:50 -05:00
Peter Oschwald 32805774a6 Remove notion of batching transactions and simply create initial vector of all base transactions. 2022-08-12 11:03:37 -05:00
Peter Oschwald afaa2628b2 Add the microseconds timestamp of the transaction update right before signing for use in calculating transaction latency downstream 2022-08-12 10:56:21 -05:00
Peter Oschwald 3d3339a05e Add delimeter between nonce prefix and nonce to allow for easier parsing out of transaction downstream 2022-08-12 10:54:40 -05:00
Peter Oschwald 5bf07dda17 Fix send_transaction method arguments so it will compile. 2022-08-12 10:45:33 -05:00
Christopher Gundlach 6b88de8ddc Merge pull request #795 from eosnetworkfoundation/ph_define_trx_provider
Added p2p_trx_provider
2022-08-09 18:44:21 -05:00
Chris Gundlach 302d062e74 culled net plugin p2p code 2022-08-09 12:57:36 -05:00
Chris Gundlach 76cf18f41b removed txn_generator 2022-08-09 09:30:39 -05:00
Chris Gundlach 8dc363276e updated constructor for p2p_trx_provider 2022-08-09 09:25:57 -05:00
Chris Gundlach f8b90bd26a Merge branch 'feature_performance_harness' into ph_define_trx_provider 2022-08-08 11:45:24 -05:00
Peter Oschwald 6f7457c8fe Quick formatting updates. 2022-08-04 16:33:33 -05:00
Peter Oschwald d572759b0b Renaming to trx_generator 2022-08-04 16:15:45 -05:00
Peter Oschwald 30f6d5dad1 Finish wiring up the performance_test_basic.py to call the txn_generator and provide initial arguments 2022-08-04 16:07:54 -05:00
Peter Oschwald 927710c077 Merge pull request #746 from eosnetworkfoundation/test_trx_generator
trx generator continued
2022-08-04 14:58:31 -05:00
Peter Oschwald e965747dc3 Starting to provide command line interface for transaction generator.
Additional clean up throughout.

Support dynamic number of passed in accounts to create actions and transactions between.

Remove start_generation as it really wasn't doing anythig any more.
2022-08-04 14:46:39 -05:00
Jonathan Giszczak 31ef362c7b Basic performance test runner. 2022-08-03 18:34:48 -05:00
Peter Oschwald 2de62cb2aa Transaction generator will assume test accounts are already created and will be passed in via command line arguments. 2022-08-03 16:32:56 -05:00
Peter Oschwald 7d492eba95 Merge pull request #737 from eosnetworkfoundation/test_transaction_generator_beginnings
Transaction Generator - Initial commit.
2022-08-03 15:37:46 -05:00
Peter Oschwald c85f169e88 Transaction Generator - Initial commit.
Very rough first draft of a transaction generator to lay the basis for development. Much of this will be refactored or removed as responsibility is delegated to other pieces of the perf harness.  As well as adding command line options as much is hard coded at this time.
2022-08-03 10:24:17 -05:00
Peter Oschwald b3aa74dce5 Transaction Generator - Initial commit.
Very rough first draft of a transaction generator to lay the basis for development. Much of this will be refactored or removed as responsibility is delegated to other pieces of the perf harness.  As well as adding command line options as much is hard coded at this time.
2022-08-02 15:53:47 -05:00
721 changed files with 41904 additions and 43551 deletions
+9
View File
@@ -0,0 +1,9 @@
{
"cdt":{
"target":"4",
"prerelease":false
},
"eossystemcontracts":{
"ref":"release/3.1"
}
}
-3
View File
@@ -1,7 +1,4 @@
{
"ubuntu18": {
"dockerfile": ".cicd/platforms/ubuntu18.Dockerfile"
},
"ubuntu20": {
"dockerfile": ".cicd/platforms/ubuntu20.Dockerfile"
},
-35
View File
@@ -1,35 +0,0 @@
FROM ubuntu:bionic
RUN apt-get update && apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \
cmake \
curl \
g++-8 \
git \
jq \
libgmp-dev \
libssl-dev \
llvm-7-dev \
ninja-build \
python3 \
software-properties-common \
zlib1g-dev \
zstd
# GitHub's actions/checkout requires git 2.18+ but Ubuntu 18 only provides 2.17
RUN add-apt-repository ppa:git-core/ppa && apt update && apt install -y git
# Leap requires boost 1.67+ but Ubuntu 18 only provides 1.65
# Probably need 1.70+ to work properly with old cmake provided in Ubuntu 18
RUN curl -L https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2 | tar jx && \
cd boost_* && \
./bootstrap.sh --prefix=/boost && \
./b2 --with-iostreams --with-date_time --with-filesystem --with-system \
--with-program_options --with-chrono --with-test -j$(nproc) install && \
cd .. && \
rm -rf boost_*
ENV CC=gcc-8
ENV CXX=g++-8
ENV BOOST_ROOT=/boost
ENV LLVM_DIR=/usr/lib/llvm-7/
+15 -12
View File
@@ -1,14 +1,17 @@
# spoon was here
FROM ubuntu:focal
ENV TZ="America/New_York"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \
cmake \
curl \
git \
jq \
libboost-all-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev \
ninja-build \
zstd
apt-get install -y build-essential \
cmake \
git \
jq \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev \
ninja-build \
python3-numpy \
zstd
+15 -12
View File
@@ -1,14 +1,17 @@
# spoon was here
FROM ubuntu:jammy
ENV TZ="America/New_York"
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get upgrade -y && \
DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential \
cmake \
curl \
git \
jq \
libboost-all-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev \
ninja-build \
zstd
apt-get install -y build-essential \
cmake \
git \
jq \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev \
ninja-build \
python3-numpy \
zstd
@@ -9,6 +9,8 @@ inputs:
required: true
tests-label:
required: true
test-timeout:
required: true
runs:
using: 'node16'
main: 'dist/index.mjs'
File diff suppressed because one or more lines are too long
@@ -10,25 +10,27 @@ 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});
const test_timeout = core.getInput('test-timeout', {required: true});
const repo_name = process.env.GITHUB_REPOSITORY.split('/')[1];
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)
if(child_process.spawnSync("docker", ["run", "--name", "base", "-v", `${process.cwd()}/build.tar.zst:/build.tar.zst`, "--workdir", `/__w/${repo_name}/${repo_name}`, 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:]]'`]);
const test_query_result = child_process.spawnSync("docker", ["run", "--rm", "baseimage", "bash", "-e", "-o", "pipefail", "-c", `cd build; ctest -L '${tests_label}' --show-only=json-v1`]);
if(test_query_result.status)
throw new Error("Failed to discover tests with label")
const tests = JSON.parse(test_query_result.stdout);
const tests = JSON.parse(test_query_result.stdout).tests;
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));
child_process.spawn("docker", ["run", "--security-opt", "seccomp=unconfined", "-e", "GITHUB_ACTIONS=True", "--name", t.name, "--init", "baseimage", "bash", "-c", `cd build; ctest --output-on-failure -R '^${t.name}$' --timeout ${test_timeout}`], {stdio:"inherit"}).on('close', code => resolve(code));
}));
});
@@ -45,13 +47,13 @@ try {
let packer = tar.pack();
extractor.on('entry', (header, stream, next) => {
if(!header.name.startsWith(`__w/leap/leap/build`)) {
if(!header.name.startsWith(`__w/${repo_name}/${repo_name}/build`)) {
stream.on('end', () => next());
stream.resume();
return;
}
header.name = header.name.substring(`__w/leap/leap/`.length);
header.name = header.name.substring(`__w/${repo_name}/${repo_name}/`.length);
if(header.name !== "build/" && error_log_paths.filter(p => header.name.startsWith(p)).length === 0) {
stream.on('end', () => next());
stream.resume();
@@ -61,8 +63,8 @@ try {
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`));
child_process.spawn("docker", ["export", tests[i].name]).stdout.pipe(extractor);
stream.promises.pipeline(packer, zlib.createGzip(), fs.createWriteStream(`${log_tarball_prefix}-${tests[i].name}-logs.tar.gz`));
}
} catch(e) {
core.setFailed(`Uncaught exception ${e.message}`);
+168 -88
View File
@@ -7,6 +7,20 @@ on:
- "release/*"
pull_request:
workflow_dispatch:
inputs:
override-cdt:
description: 'Override cdt target'
type: string
override-cdt-prerelease:
type: choice
description: Override cdt prelease
options:
- default
- true
- false
override-eos-system-contracts:
description: 'Override eos-system-contracts ref'
type: string
permissions:
packages: read
@@ -17,81 +31,51 @@ defaults:
shell: bash
jobs:
d:
name: Discover Platforms
runs-on: ubuntu-latest
outputs:
missing-platforms: ${{steps.discover.outputs.missing-platforms}}
p: ${{steps.discover.outputs.platforms}}
steps:
- name: Discover Platforms
id: discover
uses: AntelopeIO/discover-platforms-action@v1
with:
platform-file: .cicd/platforms.json
password: ${{secrets.GITHUB_TOKEN}}
package-name: builders
build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
matrix:
platform: ${{fromJSON(needs.d.outputs.missing-platforms)}}
runs-on: ["self-hosted", "enf-x86-beefy"]
build-base:
name: Run Build Workflow
uses: ./.github/workflows/build_base.yaml
permissions:
packages: write
contents: read
steps:
- name: Login to Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}
Build:
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
fail-fast: false
matrix:
platform: [ubuntu18, ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-beefy"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
v:
name: Discover Versions
runs-on: ubuntu-latest
outputs:
cdt-target: ${{steps.versions.outputs.cdt-target}}
cdt-prerelease: ${{steps.versions.outputs.cdt-prerelease}}
eos-system-contracts-ref: ${{steps.versions.outputs.eos-system-contracts-ref}}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
id: build
run: |
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja ..
ninja
tar -pc -C .. --exclude "*.o" build | zstd --long -T0 -9 > ../build.tar.zst
- name: Upload builddir
uses: AntelopeIO/upload-artifact-large-chunks-action@v1
with:
name: ${{matrix.platform}}-build
path: build.tar.zst
- name: Setup cdt and eos-system-contracts versions
id: versions
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
DEFAULTS_JSON=$(curl -sSfL $(gh api https://api.github.com/repos/${{github.repository}}/contents/.cicd/defaults.json?ref=${{github.sha}} --jq .download_url))
echo cdt-target=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.target') >> $GITHUB_OUTPUT
echo cdt-prerelease=$(echo "$DEFAULTS_JSON" | jq -r '.cdt.prerelease') >> $GITHUB_OUTPUT
echo eos-system-contracts-ref=$(echo "$DEFAULTS_JSON" | jq -r '.eossystemcontracts.ref') >> $GITHUB_OUTPUT
if [[ "${{inputs.override-cdt}}" != "" ]]; then
echo cdt-target=${{inputs.override-cdt}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-cdt-prerelease}}" == +(true|false) ]]; then
echo cdt-prerelease=${{inputs.override-cdt-prerelease}} >> $GITHUB_OUTPUT
fi
if [[ "${{inputs.override-eos-system-contracts}}" != "" ]]; then
echo eos-system-contracts-ref=${{inputs.override-eos-system-contracts}} >> $GITHUB_OUTPUT
fi
dev-package:
name: Build leap-dev package
needs: [d, Build]
if: always() && needs.Build.result == 'success'
needs: [build-base]
if: always() && needs.build-base.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
runs-on: ubuntu-latest
container: ${{fromJSON(needs.d.outputs.p)['ubuntu20'].image}}
container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}}
steps:
- uses: actions/checkout@v3
with:
@@ -99,28 +83,37 @@ jobs:
- name: Download builddir
uses: actions/download-artifact@v3
with:
name: ubuntu20-build
name: ${{matrix.platform}}-build
- name: Build dev package
run: |
zstdcat build.tar.zst | tar x
cd build
cpack
- name: Install dev package
run: |
apt update && apt upgrade -y
apt install -y ./build/leap_*.deb ./build/leap-dev*.deb
- name: Test using TestHarness
run: |
python3 -c "from TestHarness import Cluster"
- name: Upload dev package
uses: actions/upload-artifact@v3
with:
name: leap-dev-ubuntu20-amd64
name: leap-dev-${{matrix.platform}}-amd64
path: build/leap-dev*.deb
tests:
name: Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
needs: [build-base]
if: always() && needs.build-base.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-hightier"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
container:
image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}}
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- name: Download builddir
@@ -131,21 +124,18 @@ 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)"
ctest --output-on-failure -j $(nproc) -LE "(nonparallelizable_tests|long_running_tests)" --timeout 420
np-tests:
name: NP Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
needs: [build-base]
if: always() && needs.build-base.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu18, ubuntu20, ubuntu22]
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-midtier"]
steps:
- uses: actions/checkout@v3
@@ -156,11 +146,12 @@ jobs:
- 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"]'
container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}}
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]'
log-tarball-prefix: ${{matrix.platform}}
tests-label: nonparallelizable_tests
- name: Upload logs from failed tests
test-timeout: 420
- name: Upload logs from failed tests
uses: actions/upload-artifact@v3
if: failure()
with:
@@ -169,12 +160,12 @@ jobs:
lr-tests:
name: LR Tests
needs: [d, Build]
if: always() && needs.Build.result == 'success'
needs: [build-base]
if: always() && needs.build-base.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu18, ubuntu20, ubuntu22]
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-lowtier"]
steps:
- uses: actions/checkout@v3
@@ -185,10 +176,11 @@ jobs:
- 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"]'
container: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}}
error-log-paths: '["build/etc", "build/var", "build/leap-ignition-wd", "build/TestLogs"]'
log-tarball-prefix: ${{matrix.platform}}
tests-label: long_running_tests
test-timeout: 1800
- name: Upload logs from failed tests
uses: actions/upload-artifact@v3
if: failure()
@@ -196,11 +188,99 @@ jobs:
name: ${{matrix.platform}}-lr-logs
path: '*-logs.tar.gz'
libtester-tests:
name: libtester tests
needs: [build-base, v, dev-package]
if: always() && needs.v.result == 'success' && needs.dev-package.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
test: [build-tree, make-dev-install, deb-install]
runs-on: ["self-hosted", "enf-x86-midtier"]
container: ${{ matrix.test != 'deb-install' && fromJSON(needs.build-base.outputs.p)[matrix.platform].image || matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }}
steps:
# LEAP
- if: ${{ matrix.test != 'deb-install' }}
name: Clone leap
uses: actions/checkout@v3
with:
submodules: recursive
- if: ${{ matrix.test != 'deb-install' }}
name: Download leap builddir
uses: actions/download-artifact@v3
with:
name: ${{matrix.platform}}-build
- if: ${{ matrix.test != 'deb-install' }}
name: Extract leap build
run: |
zstdcat build.tar.zst | tar x
- if: ${{ matrix.test == 'build-tree' }}
name: Set leap_DIR env var
run: |
echo "leap_DIR=$PWD/build/lib/cmake/leap" >> "$GITHUB_ENV"
- if: ${{ matrix.test == 'make-dev-install' }}
name: leap dev-install
run: |
cmake --install build
cmake --install build --component dev
- if: ${{ matrix.test == 'make-dev-install' }}
name: Delete leap artifacts
run: |
rm -r *
- if: ${{ matrix.test == 'deb-install' }}
name: Download leap-dev
uses: actions/download-artifact@v3
with:
name: leap-dev-${{matrix.platform}}-amd64
- if: ${{ matrix.test == 'deb-install' }}
name: Install leap-dev Package
run: |
apt-get update
export DEBIAN_FRONTEND='noninteractive'
export TZ='Etc/UTC'
apt-get install -y ./*.deb
rm ./*.deb
# CDT
- name: Download cdt
uses: AntelopeIO/asset-artifact-download-action@v2
with:
owner: AntelopeIO
repo: cdt
file: 'cdt_.*amd64.deb'
target: '${{needs.v.outputs.cdt-target}}'
prereleases: ${{fromJSON(needs.v.outputs.cdt-prerelease)}}
artifact-name: cdt_ubuntu_package_amd64
token: ${{github.token}}
- name: Install cdt Packages
run: |
apt install -y ./*.deb
rm ./*.deb
# Reference Contracts
- name: checkout eos-system-contracts
uses: actions/checkout@v3
with:
repository: eosnetworkfoundation/eos-system-contracts
path: eos-system-contracts
ref: '${{needs.v.outputs.eos-system-contracts-ref}}'
- if: ${{ matrix.test == 'deb-install' }}
name: Install eos-system-contracts deps
run: |
apt-get -y install cmake build-essential
- name: Build & Test eos-system-contracts
run: |
cmake -S eos-system-contracts -B eos-system-contracts/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DSYSTEM_ENABLE_LEAP_VERSION_CHECK=Off -DSYSTEM_ENABLE_CDT_VERSION_CHECK=Off
cmake --build eos-system-contracts/build -- -j $(nproc)
cd eos-system-contracts/build/tests
ctest --output-on-failure -j $(nproc)
all-passing:
name: All Required Tests Passed
needs: [dev-package, tests, np-tests]
needs: [dev-package, tests, np-tests, libtester-tests]
if: always()
runs-on: ubuntu-latest
steps:
- if: needs.dev-package.result != 'success' || needs.tests.result != 'success' || needs.np-tests.result != 'success'
- if: needs.dev-package.result != 'success' || needs.tests.result != 'success' || needs.np-tests.result != 'success' || needs.libtester-tests.result != 'success'
run: false
+87
View File
@@ -0,0 +1,87 @@
name: "Build leap"
on:
workflow_dispatch:
workflow_call:
outputs:
p:
description: "Discovered Build Platforms"
value: ${{ jobs.d.outputs.p }}
permissions:
packages: read
contents: read
defaults:
run:
shell: bash
jobs:
d:
name: Discover Platforms
runs-on: ubuntu-latest
outputs:
missing-platforms: ${{steps.discover.outputs.missing-platforms}}
p: ${{steps.discover.outputs.platforms}}
steps:
- name: Discover Platforms
id: discover
uses: AntelopeIO/discover-platforms-action@v1
with:
platform-file: .cicd/platforms.json
password: ${{secrets.GITHUB_TOKEN}}
package-name: builders
build-platforms:
name: Build Platforms
needs: d
if: needs.d.outputs.missing-platforms != '[]'
strategy:
fail-fast: false
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
with:
registry: ghcr.io
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
file: ${{fromJSON(needs.d.outputs.p)[matrix.platform].dockerfile}}
Build:
name: Build leap
needs: [d, build-platforms]
if: always() && needs.d.result == 'success' && (needs.build-platforms.result == 'success' || needs.build-platforms.result == 'skipped')
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-beefy"]
container: ${{fromJSON(needs.d.outputs.p)[matrix.platform].image}}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
id: build
run: |
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -GNinja
cmake --build build
tar -pc --exclude "*.o" build | zstd --long -T0 -9 > build.tar.zst
- name: Upload builddir
uses: AntelopeIO/upload-artifact-large-chunks-action@v1
with:
name: ${{matrix.platform}}-build
path: build.tar.zst
@@ -0,0 +1,21 @@
name: "Performance Harness Run"
on:
workflow_dispatch:
permissions:
packages: read
contents: read
defaults:
run:
shell: bash
jobs:
tmp:
name: Stub
runs-on: ubuntu-latest
steps:
- name: Workflow Stub
run: |
echo "Workflow Stub"
@@ -0,0 +1,70 @@
name: "Performance Harness Backwards Compatibility"
on:
workflow_dispatch:
permissions:
packages: read
contents: read
defaults:
run:
shell: bash
jobs:
build-base:
name: Run Build Workflow
uses: ./.github/workflows/build_base.yaml
permissions:
packages: write
contents: read
tests:
name: Tests
needs: [build-base]
if: always() && needs.build-base.result == 'success'
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
release: [3.1, 3.2, 4.0]
runs-on: ["self-hosted", "enf-x86-lowtier"]
container:
image: ${{fromJSON(needs.build-base.outputs.p)[matrix.platform].image}}
options: --security-opt seccomp=unconfined
steps:
- uses: actions/checkout@v3
- name: Download builddir
uses: actions/download-artifact@v3
with:
name: ${{matrix.platform}}-build
- name: Extract Build Directory
run: |
zstdcat build.tar.zst | tar x
- name: Download Prev Leap Version
uses: AntelopeIO/asset-artifact-download-action@v2
with:
owner: AntelopeIO
repo: leap
file: '(leap).*${{matrix.platform}}.04.*(x86_64|amd64).deb'
target: '${{matrix.release}}'
token: ${{github.token}}
- name: Install leap & replace binaries for PH use
run: |
apt-get update
apt-get install -y ./leap*.deb
rm build/bin/nodeos
rm build/bin/cleos
cp /usr/bin/nodeos build/bin
cp /usr/bin/cleos build/bin
./build/bin/nodeos --version
- if: ${{ matrix.release == '3.1' || matrix.release == '3.2' }}
name: Run Performance Tests (<v4.0)
run: |
cd build
ctest --output-on-failure -R performance_test -E read_only --timeout 480
- if: ${{ matrix.release != '3.1' && matrix.release != '3.2' }}
name: Run Performance Tests (>=v4.0)
run: |
cd build
ctest --output-on-failure -R performance_test --timeout 480
+51
View File
@@ -0,0 +1,51 @@
name: "Pinned Build"
on:
workflow_dispatch:
permissions:
packages: read
contents: read
defaults:
run:
shell: bash
jobs:
Build:
name: Build
strategy:
fail-fast: false
matrix:
platform: [ubuntu20, ubuntu22]
runs-on: ["self-hosted", "enf-x86-beefy-long"]
container: ${{ matrix.platform == 'ubuntu20' && 'ubuntu:focal' || 'ubuntu:jammy' }}
steps:
- name: Update and Install git
run: |
apt-get update
apt-get install -y git
git --version
- name: Clone leap
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
# https://github.com/actions/runner/issues/2033
chown -R $(id -u):$(id -g) $PWD
./scripts/install_deps.sh
- name: Build Pinned Build
env:
LEAP_PINNED_INSTALL_PREFIX: /usr
run: |
./scripts/pinned_build.sh deps build "$(nproc)"
- name: Upload package
uses: actions/upload-artifact@v3
with:
name: leap-${{matrix.platform}}-pinned-amd64
path: build/leap_*.deb
- name: Run Parallel Tests
run: |
cd build
ctest --output-on-failure -j $(nproc) -LE "(nonparallelizable_tests|long_running_tests)" --timeout 420
+5 -3
View File
@@ -75,19 +75,21 @@ witness_node_data_dir
*.pyc
*.pyo
*.gdb_history
Testing/*
build.tar.gz
build/*
build-debug/*
[Bb]uild*/*
deps/*
dependencies/*
etc/eosio/node_*
var/lib/node_*
TestLogs*
.vscode
.idea/
*.iws
.DS_Store
CMakeLists.txt.user
!*.swagger.*
+9 -3
View File
@@ -22,6 +22,12 @@
[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/prometheus-cpp"]
path = libraries/prometheus/prometheus-cpp
url = https://github.com/jupp0r/prometheus-cpp.git
[submodule "libraries/libfc/libraries/bn256"]
path = libraries/libfc/libraries/bn256
url = https://github.com/AntelopeIO/bn256
[submodule "libraries/cli11/cli11"]
path = libraries/cli11/cli11
url = https://github.com/AntelopeIO/CLI11.git
+62 -17
View File
@@ -1,4 +1,4 @@
cmake_minimum_required( VERSION 3.8 )
cmake_minimum_required( VERSION 3.16 )
project( leap )
include(CTest) # suppresses DartConfiguration.tcl error
@@ -14,7 +14,7 @@ set( CMAKE_CXX_EXTENSIONS ON )
set( CXX_STANDARD_REQUIRED ON)
set(VERSION_MAJOR 4)
set(VERSION_MINOR 0)
set(VERSION_MINOR 1)
set(VERSION_PATCH 0)
set(VERSION_SUFFIX dev)
@@ -24,6 +24,12 @@ else()
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
endif()
# Options
option(ENABLE_WERROR "Enable `-Werror` compilation flag." Off)
option(ENABLE_WEXTRA "Enable `-Wextra` compilation flag." Off)
set( CLI_CLIENT_EXECUTABLE_NAME cleos )
set( NODE_EXECUTABLE_NAME nodeos )
set( KEY_STORE_EXECUTABLE_NAME keosd )
@@ -31,12 +37,8 @@ set( LEAP_UTIL_EXECUTABLE_NAME leap-util )
# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
message(FATAL_ERROR "GCC version must be at least 8.0!")
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
message(FATAL_ERROR "Clang version must be at least 5.0!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
message(FATAL_ERROR "GCC version must be at least 9.0!")
endif()
endif()
@@ -103,7 +105,7 @@ set(Boost_USE_MULTITHREADED ON)
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
# Most boost deps get implictly picked up via fc, as just about everything links to fc. In addition we pick up
# the pthread dependency through fc.
find_package(Boost 1.67 REQUIRED COMPONENTS program_options unit_test_framework system)
find_package(Boost 1.71 REQUIRED COMPONENTS program_options unit_test_framework system)
if( APPLE AND UNIX )
# Apple Specific Options Here
@@ -126,6 +128,16 @@ else()
endif()
endif()
if(ENABLE_WERROR)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror" )
endif()
if(ENABLE_WEXTRA)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra" )
endif()
option(EOSIO_ENABLE_DEVELOPER_OPTIONS "enable developer options for Leap" OFF)
# based on http://www.delorie.com/gnu/docs/gdb/gdb_70.html
@@ -162,9 +174,10 @@ endif()
message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )
find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling Leap with TCMalloc")
option(ENABLE_TCMALLOC "use tcmalloc (requires gperftools)" OFF)
if( ENABLE_TCMALLOC )
find_package( Gperftools REQUIRED )
message( STATUS "Compiling Leap with TCMalloc")
#if doing this by the book, simply link_libraries( ${GPERFTOOLS_TCMALLOC} ) here. That will
#give the performance benefits of tcmalloc but since it won't be linked last
#the heap profiler & checker may not be accurate. This here is rather undocumented behavior
@@ -184,9 +197,6 @@ add_subdirectory( benchmark )
option(DISABLE_WASM_SPEC_TESTS "disable building of wasm spec unit tests" OFF)
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)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio.version.in ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR} COMPONENT dev EXCLUDE_FROM_ALL)
@@ -218,13 +228,48 @@ configure_file(libraries/softfloat/COPYING.txt licen
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(libraries/prometheus/prometheus-cpp/LICENSE licenses/leap/LICENSE.prom COPYONLY)
configure_file(programs/cleos/LICENSE.CLI11 licenses/leap/LICENSE.CLI11 COPYONLY)
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/licenses/leap" DESTINATION "${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/" COMPONENT base)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libraries/testing/contracts DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/libraries/testing COMPONENT dev EXCLUDE_FROM_ALL
PATTERN "CMakeFiles" EXCLUDE
PATTERN "*.cmake" EXCLUDE
PATTERN "Makefile" EXCLUDE)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/unittests/contracts DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/unittests COMPONENT dev EXCLUDE_FROM_ALL
PATTERN "CMakeFiles" EXCLUDE
PATTERN "*.cmake" EXCLUDE
PATTERN "Makefile" EXCLUDE)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tests/TestHarness DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing/tests COMPONENT dev EXCLUDE_FROM_ALL
FILES_MATCHING
PATTERN "*.py"
PATTERN "*.json"
PATTERN "__pycache__" EXCLUDE
PATTERN "CMakeFiles" EXCLUDE)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.21)
# Cmake versions < 3.21 did not support installing symbolic links to a directory via install(FILES ...)
# Cmake 3.21 fixed this (https://gitlab.kitware.com/cmake/cmake/-/commit/d71a7cc19d6e03f89581efdaa8d63db216184d40)
# If/when the lowest cmake version supported becomes >= 3.21, the else block as well as the postinit and prerm scripts
# would be a good option to remove in favor of using the facilities in cmake / cpack directly.
add_custom_target(link_target ALL
COMMAND ${CMAKE_COMMAND} -E make_directory lib/python3/dist-packages
COMMAND ${CMAKE_COMMAND} -E create_symlink ../../../share/leap_testing/tests/TestHarness lib/python3/dist-packages/TestHarness
COMMAND ${CMAKE_COMMAND} -E make_directory share/leap_testing
COMMAND ${CMAKE_COMMAND} -E create_symlink ../../bin share/leap_testing/bin)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/lib/python3/dist-packages/TestHarness DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/python3/dist-packages COMPONENT dev EXCLUDE_FROM_ALL)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/share/leap_testing/bin DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/leap_testing COMPONENT dev EXCLUDE_FROM_ALL)
else()
# The following install(SCRIPT ...) steps are necessary for `make dev-install` to work on cmake versions < 3.21.
install(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/scripts/install_testharness_symlinks.cmake COMPONENT dev EXCLUDE_FROM_ALL)
# The `make package` installation of symlinks happens via the `postinst` script installed in cmake.package via the line below
endif()
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
+3 -16
View File
@@ -14,12 +14,6 @@ if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
set(LLVM_DIR @LLVM_DIR@)
endif()
find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling tests with TCMalloc")
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
endif()
if(NOT "@LLVM_FOUND@" STREQUAL "")
find_package(LLVM @LLVM_VERSION@ EXACT REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native DebugInfoDWARF orcjit)
@@ -41,8 +35,6 @@ else ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall")
endif ( APPLE )
### Remove after Boost 1.70 CMake fixes are in place
set( Boost_NO_BOOST_CMAKE ON CACHE STRING "ON or OFF" )
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED COMPONENTS
date_time
@@ -56,18 +48,15 @@ find_library(libtester eosio_testing @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH
find_library(libchain eosio_chain @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libfc fc @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libbn256 bn256 @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)
find_library(libwast WAST @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libir IR @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(liblogging Logging @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libruntime Runtime @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libsoftfloat softfloat @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
get_filename_component(cryptodir @OPENSSL_CRYPTO_LIBRARY@ DIRECTORY)
find_library(liboscrypto crypto "${cryptodir}" NO_DEFAULT_PATH)
get_filename_component(ssldir @OPENSSL_SSL_LIBRARY@ DIRECTORY)
find_library(libosssl ssl "${ssldir}" NO_DEFAULT_PATH)
find_library(libchainbase chainbase @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
find_library(libbuiltins builtins @CMAKE_INSTALL_FULL_LIBDIR@ NO_DEFAULT_PATH)
@@ -89,16 +78,14 @@ macro(add_eosio_test_executable test_name)
${libfc}
${libwast}
${libwasm}
${libruntime}
${libir}
${libsoftfloat}
${liboscrypto}
${libosssl}
${liblogging}
${libchainbase}
${libbuiltins}
${libsecp256k1}
${libff}
${libbn256}
@GMP_LIBRARY@
${Boost_FILESYSTEM_LIBRARY}
@@ -115,7 +102,7 @@ macro(add_eosio_test_executable test_name)
${WRAP_MAIN}
Threads::Threads
)
#adds -ltr. Ubuntu eosio.contracts build breaks without this
if(UNIX AND NOT APPLE)
target_link_libraries(${test_name} ${LIBRT})
+3 -16
View File
@@ -12,12 +12,6 @@ if (LLVM_DIR STREQUAL "" OR NOT LLVM_DIR)
set(LLVM_DIR @LLVM_DIR@)
endif()
find_package( Gperftools QUIET )
if( GPERFTOOLS_FOUND )
message( STATUS "Found gperftools; compiling tests with TCMalloc")
list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc )
endif()
if(NOT "@LLVM_FOUND@" STREQUAL "")
find_package(LLVM @LLVM_VERSION@ EXACT REQUIRED CONFIG)
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native DebugInfoDWARF orcjit)
@@ -38,8 +32,6 @@ else ( APPLE )
set( CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} -Wall")
endif ( APPLE )
### Remove after Boost 1.70 CMake fixes are in place
set( Boost_NO_BOOST_CMAKE ON CACHE STRING "ON or OFF" )
set( Boost_USE_STATIC_LIBS ON CACHE STRING "ON or OFF" )
find_package(Boost @Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@ EXACT REQUIRED COMPONENTS
date_time
@@ -53,18 +45,15 @@ find_library(libtester eosio_testing @CMAKE_BINARY_DIR@/libraries/testing NO_DEF
find_library(libchain eosio_chain @CMAKE_BINARY_DIR@/libraries/chain NO_DEFAULT_PATH)
find_library(libfc fc @CMAKE_BINARY_DIR@/libraries/libfc NO_DEFAULT_PATH)
find_library(libsecp256k1 secp256k1 @CMAKE_BINARY_DIR@/libraries/libfc/secp256k1 NO_DEFAULT_PATH)
find_library(libbn256 bn256 @CMAKE_BINARY_DIR@/libraries/libfc/libraries/bn256/src 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)
find_library(liblogging Logging @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/Logging NO_DEFAULT_PATH)
find_library(libruntime Runtime @CMAKE_BINARY_DIR@/libraries/wasm-jit/Source/Runtime NO_DEFAULT_PATH)
find_library(libsoftfloat softfloat @CMAKE_BINARY_DIR@/libraries/softfloat NO_DEFAULT_PATH)
get_filename_component(cryptodir @OPENSSL_CRYPTO_LIBRARY@ DIRECTORY)
find_library(liboscrypto crypto "${cryptodir}" NO_DEFAULT_PATH)
get_filename_component(ssldir @OPENSSL_SSL_LIBRARY@ DIRECTORY)
find_library(libosssl ssl "${ssldir}" NO_DEFAULT_PATH)
find_library(libchainbase chainbase @CMAKE_BINARY_DIR@/libraries/chainbase NO_DEFAULT_PATH)
find_library(libbuiltins builtins @CMAKE_BINARY_DIR@/libraries/builtins NO_DEFAULT_PATH)
@@ -86,16 +75,14 @@ macro(add_eosio_test_executable test_name)
${libfc}
${libwast}
${libwasm}
${libruntime}
${libir}
${libsoftfloat}
${liboscrypto}
${libosssl}
${liblogging}
${libchainbase}
${libbuiltins}
${libsecp256k1}
${libff}
${libbn256}
@GMP_LIBRARY@
${Boost_FILESYSTEM_LIBRARY}
@@ -112,7 +99,7 @@ macro(add_eosio_test_executable test_name)
${WRAP_MAIN}
Threads::Threads
)
#adds -ltr. Ubuntu eosio.contracts build breaks without this
if(UNIX AND NOT APPLE)
target_link_libraries(${test_name} ${LIBRT})
+14 -54
View File
@@ -8,7 +8,6 @@ The `main` branch is the development branch; do not use it for production. Refer
We currently support the following operating systems.
- Ubuntu 22.04 Jammy
- Ubuntu 20.04 Focal
- Ubuntu 18.04 Bionic
Other Unix derivatives such as macOS are tended to on a best-effort basis and may not be full featured. If you aren't using Ubuntu, please visit the "[Build Unsupported OS](./docs/00_install/01_build-from-source/00_build-unsupported-os.md)" page to explore your options.
@@ -45,15 +44,16 @@ You will need to build on a [supported operating system](#supported-operating-sy
Requirements to build:
- C++17 compiler and standard library
- boost 1.67+
- CMake 3.8+
- boost 1.70+
- CMake 3.16+
- LLVM 7 - 11 - for Linux only
- newer versions do not work
- openssl 1.1+
- curl
- libcurl 7.40.0+
- git
- GMP
- Python 3
- python3-numpy
- zlib
### Step 1 - Clone
@@ -109,12 +109,14 @@ Make sure you are in the root of the `leap` repo, then run the `install_depts.sh
sudo scripts/install_deps.sh
```
Next, run the pinned build script. You have to give it three arguments, in the following order:
- A temporary folder, for all dependencies that need to be built from source.
- A build folder, where the binaries you need to install will be built to.
- The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above).
Next, run the pinned build script. You have to give it three arguments in the following order:
1. A temporary folder, for all dependencies that need to be built from source.
1. A build folder, where the binaries you need to install will be built to.
1. The number of jobs or CPU cores/threads to use (note the [jobs flag](#step-3---build) warning above).
The following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads (Note: you don't need `sudo` for this command):
> 🔒 You do not need to run this script with `sudo` or as root.
For example, the following command runs the `pinned_build.sh` script, specifies a `deps` and `build` folder in the root of the Leap repo for the first two arguments, then builds the packages using all of your computer's CPU threads:
```bash
scripts/pinned_build.sh deps build "$(nproc)"
```
@@ -123,20 +125,19 @@ Now you can optionally [test](#step-4---test) your build, or [install](#step-5--
#### Unpinned Build
The following 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. If you are in an Ubuntu docker container, omit `sudo` because you run as `root` by default.
<details> <summary>Ubuntu 22.04 Jammy & Ubuntu 20.04 Focal</summary>
Install dependencies:
```bash
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
curl \
git \
libboost-all-dev \
libcurl4-openssl-dev \
libgmp-dev \
libssl-dev \
llvm-11-dev
llvm-11-dev \
python3-numpy
```
To build, make sure you are in the root of the `leap` repo, then run the following command:
```bash
@@ -145,47 +146,6 @@ cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=/usr/lib/llvm-11 ..
make -j "$(nproc)" package
```
</details>
<details> <summary>Ubuntu 18.04 Bionic</summary>
Install dependencies:
```bash
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
curl \
g++-8 \
git \
libgmp-dev \
libssl-dev \
llvm-7-dev \
python3 \
zlib1g-dev
```
You need to build Boost from source on this distribution:
```bash
curl -fL https://boostorg.jfrog.io/artifactory/main/release/1.79.0/source/boost_1_79_0.tar.bz2 -o ~/Downloads/boost_1_79_0.tar.bz2
tar -jvxf ~/Downloads/boost_1_79_0.tar.bz2 -C ~/Downloads/
pushd ~/Downloads/boost_1_79_0
./bootstrap.sh --prefix="$HOME/boost1.79"
./b2 --with-iostreams --with-date_time --with-filesystem --with-system --with-program_options --with-chrono --with-test -j "$(nproc)" install
popd
```
The Boost `*.tar.bz2` download and `boost_1_79_0` folder can be removed now if you want more space.
```bash
rm -r ~/Downloads/boost_1_79_0.tar.bz2 ~/Downloads/boost_1_79_0
```
From a terminal in the root of the `leap` repo, build.
```bash
mkdir -p build
cd build
cmake -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 -DCMAKE_PREFIX_PATH="$HOME/boost1.79;/usr/lib/llvm-7/" -DCMAKE_BUILD_TYPE=Release ..
make -j "$(nproc)" package
```
After building, you may remove the `~/boost1.79` directory or you may keep it around for your next build.
</details>
Now you can optionally [test](#step-4---test) your build, or [install](#step-5---install) the `*.deb` binary packages, which will be in the root of your build directory.
+1 -1
View File
@@ -1,7 +1,7 @@
file(GLOB BENCHMARK "*.cpp")
add_executable( benchmark ${BENCHMARK} )
target_link_libraries( benchmark fc Boost::program_options )
target_link_libraries( benchmark fc Boost::program_options bn256)
target_include_directories( benchmark PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
)
+25 -36
View File
@@ -1,6 +1,6 @@
#include <iostream>
#include <fc/crypto/alt_bn128.hpp>
#include <bn256/bn256.h>
#include <benchmark.hpp>
@@ -10,22 +10,20 @@ using bytes = std::vector<char>;
using g1g2_pair = std::vector<std::string>;
void add_benchmarking() {
std::vector<unsigned char> point1_raw = {
const unsigned char point1[64] = {
12,175,215,144,98,95,151,228,179,85,31,170,172,159,40,255,250,252,68,28,235,65,172,180,69,164,153,29,187,239,220,201, // x
18,102,219,76,79,148,120,28,39,149,42,172,41,248,120,249,255,69,42,51,160,239,13,219,239,183,77,174,217,158,130,10,}; // y
std::vector<unsigned char> point2_raw = {
const unsigned char point2[64] = {
12,144,10,32,104,85,103,36,222,232,48,152,108,217,40,145,230,48,8,54,0,7,134,164,7,10,139,110,95,205,124,121, // x
22,254,176,251,18,168,78,220,142,100,102,113,58,176,83,186,212,62,154,138,235,135,34,46,237,117,54,36,198,40,79,73,}; // y
bytes point1, point2;
point1.insert(point1.begin(), point1_raw.begin(), point1_raw.end());
point2.insert(point2.begin(), point2_raw.begin(), point2_raw.end());
22,254,176,251,18,168,78,220,142,100,102,113,58,176,83,186,212,62,154,138,235,135,34,46,237,117,54,36,198,40,79,73,}; // y
unsigned char ans[64] ={};
auto f = [&]() {
auto res = fc::alt_bn128_add(point1, point2);
if (std::holds_alternative<fc::alt_bn128_error>(res)) {
std::cout << "alt_bn128_add failed: "
<< (int)std::get<fc::alt_bn128_error>(res) << std::endl;
auto res = bn256::g1_add(point1, point2, ans);
if (res == -1) {
std::cout << "alt_bn128_add failed" << std::endl;
}
};
@@ -33,21 +31,18 @@ void add_benchmarking() {
}
void mul_benchmarking() {
std::vector<unsigned char> point_raw = {
const unsigned char point[64] = {
12,175,215,144,98,95,151,228,179,85,31,170,172,159,40,255,250,252,68,28,235,65,172,180,69,164,153,29,187,239,220,201, // x
18,102,219,76,79,148,120,28,39,149,42,172,41,248,120,249,255,69,42,51,160,239,13,219,239,183,77,174,217,158,130,10,}; // y
std::vector<unsigned char> scaler_raw = {
const unsigned char scalar[32] = {
25,62,182,170,104,140,135,90,37,150,0,77,2,77,146,71,54,101,113,69,177,216,157,4,229,213,33,215,169,99,150,91, }; // scaler size 256 bits
bytes point, scaler;
point.insert(point.begin(), point_raw.begin(), point_raw.end());
scaler.insert(scaler.begin(), scaler_raw.begin(), scaler_raw.end());
unsigned char ans[64] = {};
auto f = [&]() {
auto res = fc::alt_bn128_mul(point, scaler);
if (std::holds_alternative<fc::alt_bn128_error>(res)) {
std::cout << "alt_bn128_mul failed: "
<< (int)std::get<fc::alt_bn128_error>(res) << std::endl;
auto res = bn256::g1_scalar_mul(point, scalar, ans);
if (res == -1) {
std::cout << "alt_bn128_mul failed" << std::endl;
}
};
@@ -55,7 +50,7 @@ void mul_benchmarking() {
}
void pair_benchmarking() {
std::vector<unsigned char> g1_g2_pairs_raw = {
const unsigned char g1_g2_pairs[] = {
/* pair 1 */
12,175,215,144,98,95,151,228,179,85,31,170,172,159,40,255,250,252,68,28,235,65,172,180,69,164,153,29,187,239,220,201,18,102,219,76,79,148,120,28,39,149,42,172,41,248,120,249,255,69,42,51,160,239,13,219,239,183,77,174,217,158,130,10,
46,24,234,176,148,82,198,136,44,30,157,18,217,25,49,241,63,197,2,151,14,150,136,210,114,4,74,124,145,225,131,139,13,60,0,50,236,103,39,15,150,226,246,189,209,113,0,46,151,39,41,6,87,119,228,213,45,225,29,234,161,110,43,87,3,237,74,227,93,23,171,129,49,118,228,173,154,111,168,220,161,46,140,103,155,56,168,207,254,90,228,76,188,232,25,34,44,102,159,35,193,216,177,31,131,247,226,19,170,222,26,227,86,37,81,149,202,144,188,126,120,168,9,195,32,169,147,161,
@@ -87,27 +82,21 @@ void pair_benchmarking() {
30,204,212,77,212,159,135,173,195,194,165,112,62,248,180,204,66,73,253,99,65,111,39,171,19,211,171,203,35,66,146,20,33,241,46,6,167,133,80,76,238,165,59,232,120,58,211,157,50,212,86,191,95,6,134,164,36,227,79,58,119,98,108,171,
48,49,12,141,166,151,158,56,136,255,197,138,114,195,39,59,71,236,82,57,149,249,170,55,187,95,193,171,14,124,45,87,7,157,47,178,153,237,194,157,142,194,100,14,40,51,61,201,244,93,61,196,154,59,14,135,209,72,102,186,14,228,228,152,40,246,109,82,93,249,92,105,191,121,77,108,20,87,3,87,167,173,171,255,189,34,155,239,218,95,181,153,222,20,120,195,27,28,47,82,113,3,218,129,54,210,185,165,206,99,126,61,217,19,237,5,12,90,148,246,128,231,63,53,37,223,204,195
};
// benchmarking 1 pair of points
bytes g1_g2_1_pair;
g1_g2_1_pair.insert(g1_g2_1_pair.begin(), g1_g2_pairs_raw.begin(), g1_g2_pairs_raw.begin() + 384);
auto f_1_pair = [&]() {
auto res = fc::alt_bn128_pair(g1_g2_1_pair, [](){});
if (std::holds_alternative<fc::alt_bn128_error>(res)) {
std::cout << "alt_bn128_pair 1 pair failed: "
<< (int)std::get<fc::alt_bn128_error>(res) << std::endl;
auto res = bn256::pairing_check({ g1_g2_pairs, 384}, [](){});
if (res == -1) {
std::cout << "alt_bn128_pair 1 pair failed" << std::endl;
}
};
benchmarking("alt_bn128_pair (1 pair)", f_1_pair);
// benchmarking 10 pair of points
bytes g1_g2_10_pairs;
g1_g2_10_pairs.insert(g1_g2_10_pairs.begin(), g1_g2_pairs_raw.begin(), g1_g2_pairs_raw.end());
auto f_10_pairs = [&]() {
auto res = fc::alt_bn128_pair(g1_g2_10_pairs, [](){});
if (std::holds_alternative<fc::alt_bn128_error>(res)) {
std::cout << "alt_bn128_pair 10 pairs failed: "
<< (int)std::get<fc::alt_bn128_error>(res) << std::endl;
auto res = bn256::pairing_check(g1_g2_pairs, [](){});
if (res == -1) {
std::cout << "alt_bn128_pair 10 pair failed" << std::endl;
}
};
-1
View File
@@ -12,7 +12,6 @@ Antelope currently supports the following operating systems:
1. Ubuntu 22.04 Jammy
2. Ubuntu 20.04 Focal
3. Ubuntu 18.04 Bionic
[[info | Note]]
| 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.
@@ -143,7 +143,7 @@ We now have an account that is available to have a contract assigned to it, enab
In the fourth terminal window, start a second `nodeos` instance. Notice that this command line is substantially longer than the one we used above to create the first producer. This is necessary to avoid collisions with the first `nodeos` instance. Fortunately, you can just cut and paste this command line and adjust the keys:
```sh
nodeos --producer-name inita --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --http-server-address 127.0.0.1:8889 --p2p-listen-endpoint 127.0.0.1:9877 --p2p-peer-address 127.0.0.1:9876 --config-dir node2 --data-dir node2 --private-key [\"EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg\",\"5JgbL2ZnoEAhTudReWH1RnMuQS6DBeLZt4ucV6t8aymVEuYg7sr\"]
nodeos --producer-name inita --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --http-server-address 127.0.0.1:8889 --p2p-listen-endpoint 127.0.0.1:9877 --p2p-peer-address 127.0.0.1:9876 --config-dir node2 --data-dir node2 --signature-provider EOS6hMjoWRF2L8x9YpeqtUEcsDKAyxSuM1APicxgRU1E3oyV5sDEg=KEY:5JgbL2ZnoEAhTudReWH1RnMuQS6DBeLZt4ucV6t8aymVEuYg7sr
```
The output from this new node will show a little activity but will stop reporting until the last step in this tutorial, when the `inita` account is registered as a producer account and activated. Here is some example output from a newly started node. Your output might look a little different, depending on how much time you took entering each of these commands. Furthermore, this example is only the last few lines of output:
+126 -104
View File
@@ -21,33 +21,35 @@ These can only be specified from the `nodeos` command-line:
```console
Command Line Options for eosio::chain_plugin:
--genesis-json arg File to read Genesis State from
--genesis-timestamp arg override the initial timestamp in the
--genesis-timestamp arg override the initial timestamp in the
Genesis State file
--print-genesis-json extract genesis_state from blocks.log
--print-genesis-json extract genesis_state from blocks.log
as JSON, print to console, and exit
--extract-genesis-json arg extract genesis_state from blocks.log
--extract-genesis-json arg extract genesis_state from blocks.log
as JSON, write into specified file, and
exit
--print-build-info print build environment information to
--print-build-info print build environment information to
console as JSON and exit
--extract-build-info arg extract build environment information
--extract-build-info arg extract build environment information
as JSON, write into specified file, and
exit
--force-all-checks do not skip any checks that can be
skipped while replaying irreversible
blocks
--force-all-checks do not skip any validation checks while
replaying blocks (useful for replaying
blocks from untrusted source)
--disable-replay-opts disable optimizations that specifically
target replay
--replay-blockchain clear chain state database and replay
--replay-blockchain clear chain state database and replay
all blocks
--hard-replay-blockchain clear chain state database, recover as
many blocks as possible from the block
--hard-replay-blockchain clear chain state database, recover as
many blocks as possible from the block
log, and then replay those blocks
--delete-all-blocks clear chain state database and block
--delete-all-blocks clear chain state database and block
log
--truncate-at-block arg (=0) stop hard replay / block log recovery
at this block number (if set to
--truncate-at-block arg (=0) stop hard replay / block log recovery
at this block number (if set to
non-zero number)
--terminate-at-block arg (=0) terminate after reaching this block
number (if set to a non-zero number)
--snapshot arg File to read Snapshot State from
```
@@ -58,162 +60,182 @@ These can be specified from both the `nodeos` command-line or the `config.ini` f
```console
Config Options for eosio::chain_plugin:
--blocks-dir arg (="blocks") the location of the blocks directory
(absolute path or relative to
--blocks-dir arg (="blocks") the location of the blocks directory
(absolute path or relative to
application data dir)
--state-dir arg (="state") the location of the state directory
(absolute path or relative to
application data dir)
--protocol-features-dir arg (="protocol_features")
the location of the protocol_features
the location of the protocol_features
directory (absolute path or relative to
application config dir)
--checkpoint arg Pairs of [BLOCK_NUM,BLOCK_ID] that
--checkpoint arg Pairs of [BLOCK_NUM,BLOCK_ID] that
should be enforced as checkpoints.
--wasm-runtime runtime (=eos-vm-jit) Override default WASM runtime (
--wasm-runtime runtime (=eos-vm-jit) Override default WASM runtime (
"eos-vm-jit", "eos-vm")
"eos-vm-jit" : A WebAssembly runtime
that compiles WebAssembly code to
"eos-vm-jit" : A WebAssembly runtime
that compiles WebAssembly code to
native x86 code prior to execution.
"eos-vm" : A WebAssembly interpreter.
--profile-account arg The name of an account whose code will
--profile-account arg The name of an account whose code will
be profiled
--abi-serializer-max-time-ms arg (=15)
Override default maximum ABI
Override default maximum ABI
serialization time allowed in ms
--chain-state-db-size-mb arg (=1024) Maximum size (in MiB) of the chain
--chain-state-db-size-mb arg (=1024) Maximum size (in MiB) of the chain
state database
--chain-state-db-guard-size-mb arg (=128)
Safely shut down node when free space
remaining in the chain state database
Safely shut down node when free space
remaining in the chain state database
drops below this size (in MiB).
--signature-cpu-billable-pct arg (=50)
Percentage of actual signature recovery
cpu to bill. Whole number percentages,
cpu to bill. Whole number percentages,
e.g. 50 for 50%
--chain-threads arg (=2) Number of worker threads in controller
--chain-threads arg (=2) Number of worker threads in controller
thread pool
--contracts-console print contract's output to console
--deep-mind print deeper information about chain
--deep-mind print deeper information about chain
operations
--actor-whitelist arg Account added to actor whitelist (may
--actor-whitelist arg Account added to actor whitelist (may
specify multiple times)
--actor-blacklist arg Account added to actor blacklist (may
--actor-blacklist arg Account added to actor blacklist (may
specify multiple times)
--contract-whitelist arg Contract account added to contract
--contract-whitelist arg Contract account added to contract
whitelist (may specify multiple times)
--contract-blacklist arg Contract account added to contract
--contract-blacklist arg Contract account added to contract
blacklist (may specify multiple times)
--action-blacklist arg Action (in the form code::action) added
to action blacklist (may specify
to action blacklist (may specify
multiple times)
--key-blacklist arg Public key added to blacklist of keys
that should not be included in
authorities (may specify multiple
--key-blacklist arg Public key added to blacklist of keys
that should not be included in
authorities (may specify multiple
times)
--sender-bypass-whiteblacklist arg Deferred transactions sent by accounts
in this list do not have any of the
subjective whitelist/blacklist checks
applied to them (may specify multiple
--sender-bypass-whiteblacklist arg Deferred transactions sent by accounts
in this list do not have any of the
subjective whitelist/blacklist checks
applied to them (may specify multiple
times)
--read-mode arg (=speculative) Database read mode ("speculative",
"head", "read-only", "irreversible").
In "speculative" mode: database
contains state changes by transactions
in the blockchain up to the head block
as well as some transactions not yet
included in the blockchain.
--read-mode arg (=head) Database read mode ("head",
"irreversible", "speculative").
In "head" mode: database contains state
changes by only transactions in the
blockchain up to the head block;
transactions received by the node are
changes up to the head block;
transactions received by the node are
relayed if valid.
In "read-only" mode: (DEPRECATED: see
p2p-accept-transactions &
api-accept-transactions) database
contains state changes by only
transactions in the blockchain up to
the head block; transactions received
via the P2P network are not relayed and
transactions cannot be pushed via the
chain API.
In "irreversible" mode: database
contains state changes by only
transactions in the blockchain up to
the last irreversible block;
transactions received via the P2P
network are not relayed and
transactions cannot be pushed via the
chain API.
--api-accept-transactions arg (=1) Allow API transactions to be evaluated
In "irreversible" mode: database
contains state changes up to the last
irreversible block; transactions
received via the P2P network are not
relayed and transactions cannot be
pushed via the chain API.
In "speculative" mode: database
contains state changes by transactions
in the blockchain up to the head block
as well as some transactions not yet
included in the blockchain;
transactions received by the node are
relayed if valid.
--api-accept-transactions arg (=1) Allow API transactions to be evaluated
and relayed if valid.
--validation-mode arg (=full) Chain validation mode ("full" or
--validation-mode arg (=full) Chain validation mode ("full" or
"light").
In "full" mode all incoming blocks will
be fully validated.
In "light" mode all incoming blocks
headers will be fully validated;
transactions in those validated blocks
will be trusted
--disable-ram-billing-notify-checks Disable the check which subjectively
In "light" mode all incoming blocks
headers will be fully validated;
transactions in those validated blocks
will be trusted
--disable-ram-billing-notify-checks Disable the check which subjectively
fails a transaction if a contract bills
more RAM to another account within the
more RAM to another account within the
context of a notification handler (i.e.
when the receiver is not the code of
when the receiver is not the code of
the action).
--maximum-variable-signature-length arg (=16384)
Subjectively limit the maximum length
of variable components in a variable
Subjectively limit the maximum length
of variable components in a variable
legnth signature to this size in bytes
--trusted-producer arg Indicate a producer whose blocks
headers signed by it will be fully
validated, but transactions in those
--trusted-producer arg Indicate a producer whose blocks
headers signed by it will be fully
validated, but transactions in those
validated blocks will be trusted.
--database-map-mode arg (=mapped) Database map mode ("mapped", "heap", or
"locked").
In "mapped" mode database is memory
In "mapped" mode database is memory
mapped as a file.
In "heap" mode database is preloaded in
to swappable memory and will use huge
to swappable memory and will use huge
pages if available.
In "locked" mode database is preloaded,
locked in to memory, and will use huge
locked in to memory, and will use huge
pages if available.
--enable-account-queries arg (=0) enable queries to find accounts by
--eos-vm-oc-cache-size-mb arg (=1024) Maximum size (in MiB) of the EOS VM OC
code cache
--eos-vm-oc-compile-threads arg (=1) Number of threads to use for EOS VM OC
tier-up
--eos-vm-oc-enable arg (=auto) Enable EOS VM OC tier-up runtime
('auto', 'all', 'none').
'auto' - EOS VM OC tier-up is enabled
for eosio.* accounts, read-only trxs,
and applying blocks.
'all' - EOS VM OC tier-up is enabled
for all contract execution.
'none' - EOS VM OC tier-up is
completely disabled.
--enable-account-queries arg (=0) enable queries to find accounts by
various metadata.
--max-nonprivileged-inline-action-size arg (=4096)
maximum allowed size (in bytes) of an
inline action for a nonprivileged
maximum allowed size (in bytes) of an
inline action for a nonprivileged
account
--transaction-retry-max-storage-size-gb arg
Maximum size (in GiB) allowed to be
allocated for the Transaction Retry
feature. Setting above 0 enables this
Maximum size (in GiB) allowed to be
allocated for the Transaction Retry
feature. Setting above 0 enables this
feature.
--transaction-retry-interval-sec arg (=20)
How often, in seconds, to resend an
incoming transaction to network if not
seen in a block.
--transaction-retry-max-expiration-sec arg (=90)
Needs to be at least twice as large as
p2p-dedup-cache-expire-time-sec.
--transaction-retry-max-expiration-sec arg (=120)
Maximum allowed transaction expiration
for retry transactions, will retry
transactions up to this value.
Should be larger than
transaction-retry-interval-sec.
--transaction-finality-status-max-storage-size-gb arg
Maximum size (in GiB) allowed to be
allocated for the Transaction Finality
Maximum size (in GiB) allowed to be
allocated for the Transaction Finality
Status feature. Setting above 0 enables
this feature.
--transaction-finality-status-success-duration-sec arg (=180)
Duration (in seconds) a successful
transaction's Finality Status will
remain available from being first
Duration (in seconds) a successful
transaction's Finality Status will
remain available from being first
identified.
--transaction-finality-status-failure-duration-sec arg (=180)
Duration (in seconds) a failed
transaction's Finality Status will
remain available from being first
Duration (in seconds) a failed
transaction's Finality Status will
remain available from being first
identified.
--integrity-hash-on-start Log the state integrity hash on startup
--integrity-hash-on-stop Log the state integrity hash on
shutdown
--block-log-retain-blocks arg If set to greater than 0, periodically
prune the block log to store only
configured number of most recent
blocks.
If set to 0, no blocks are be written
to the block log; block log file is
removed after startup.
```
@@ -1,59 +0,0 @@
[[warning | Deprecation Notice]]
| The `history_plugin` that the `history_api_plugin` depends upon is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) instead.
## Description
The `history_api_plugin` exposes functionality from the [`history_plugin`](../history_plugin/index.md) to the RPC API interface managed by the [`http_plugin`](../http_plugin/index.md), providing read-only access to blockchain data.
It provides four RPC API endpoints:
* get_actions
* get_transaction
* get_key_accounts
* get_controlled_accounts
The four actions listed above are used by the following `cleos` commands (matching order):
* get actions
* get transaction
* get accounts
* get servants
## Usage
```console
# config.ini
plugin = eosio::history_api_plugin
```
```sh
# command-line
nodeos ... --plugin eosio::history_api_plugin
```
## Options
None
## Dependencies
* [`history_plugin`](../history_plugin/index.md)
* [`chain_plugin`](../chain_plugin/index.md)
* [`http_plugin`](../http_plugin/index.md)
### Load Dependency Examples
```console
# config.ini
plugin = eosio::history_plugin
[options]
plugin = eosio::chain_plugin
[options]
plugin = eosio::http_plugin
[options]
```
```sh
# command-line
nodeos ... --plugin eosio::history_plugin [options] \
--plugin eosio::chain_plugin [operations] [options] \
--plugin eosio::http_plugin [options]
```
@@ -1,41 +0,0 @@
[[warning | Deprecation Notice]]
| The `history_plugin` is deprecated and will no longer be maintained. Please use the [`state_history_plugin`](../state_history_plugin/index.md) instead.
## Description
The `history_plugin` provides a cache layer to obtain historical data about the blockchain objects. It depends on [`chain_plugin`](../chain_plugin/index.md) for the data.
## Usage
```console
# config.ini
plugin = eosio::history_plugin
[options]
```
```sh
# command-line
nodeos ... --plugin eosio::history_plugin [options]
```
## Options
These can be specified from both the `nodeos` command-line or the `config.ini` file:
```console
Config Options for eosio::history_plugin:
-f [ --filter-on ] arg Track actions which match
receiver:action:actor. Actor may be
blank to include all. Action and Actor
both blank allows all from Recieiver.
Receiver may not be blank.
-F [ --filter-out ] arg Do not track actions which match
receiver:action:actor. Action and Actor
both blank excludes all from Reciever.
Actor blank excludes all from
reciever:action. Receiver may not be
blank.
```
## Dependencies
* [`chain_plugin`](../chain_plugin/index.md)
@@ -1,39 +0,0 @@
## Description
The `http_client_plugin` is an internal utility plugin, providing the `producer_plugin` the ability to use securely an external `keosd` instance as its block signer. It can only be used when the `producer_plugin` is configured to produce blocks.
## Usage
```console
# config.ini
plugin = eosio::http_client_plugin
https-client-root-cert = "path/to/my/certificate.pem"
https-client-validate-peers = 1
```
```sh
# command-line
nodeos ... --plugin eosio::http_client_plugin \
--https-client-root-cert "path/to/my/certificate.pem" \
--https-client-validate-peers 1
```
## Options
These can be specified from both the `nodeos` command-line or the `config.ini` file:
```console
Config Options for eosio::http_client_plugin:
--https-client-root-cert arg PEM encoded trusted root certificate
(or path to file containing one) used
to validate any TLS connections made.
(may specify multiple times)
--https-client-validate-peers arg (=1)
true: validate that the peer
certificates are valid and trusted,
false: ignore cert errors
```
## Dependencies
* [`producer_plugin`](../producer_plugin/index.md)
+28 -28
View File
@@ -22,49 +22,49 @@ These can be specified from both the command-line or the `config.ini` file:
```console
Config Options for eosio::http_plugin:
--unix-socket-path arg The filename (relative to data-dir) to
create a unix socket for HTTP RPC; set
blank to disable (=keosd.sock for keosd)
--http-server-address arg (=127.0.0.1:8888 for nodeos)
The local IP and port to listen for
--unix-socket-path arg The filename (relative to data-dir) to
create a unix socket for HTTP RPC; set
blank to disable.
--http-server-address arg (=127.0.0.1:8888)
The local IP and port to listen for
incoming http connections; set blank to
disable.
--https-server-address arg The local IP and port to listen for
incoming https connections; leave blank
to disable.
--https-certificate-chain-file arg Filename with the certificate chain to
present on https connections. PEM
format. Required for https.
--https-private-key-file arg Filename with https private key in PEM
format. Required for https
--https-ecdh-curve arg (=secp384r1) Configure https ECDH curve to use:
secp384r1 or prime256v1
--access-control-allow-origin arg Specify the Access-Control-Allow-Origin
to be returned on each request.
to be returned on each request
--access-control-allow-headers arg Specify the Access-Control-Allow-Header
s to be returned on each request.
--access-control-max-age arg Specify the Access-Control-Max-Age to
s to be returned on each request
--access-control-max-age arg Specify the Access-Control-Max-Age to
be returned on each request.
--access-control-allow-credentials Specify if Access-Control-Allow-Credent
ials: true should be returned on each
ials: true should be returned on each
request.
--max-body-size arg (=1048576) The maximum body size in bytes allowed
--max-body-size arg (=2097152) The maximum body size in bytes allowed
for incoming RPC requests
--http-max-bytes-in-flight-mb arg (=500)
Maximum size in megabytes http_plugin
should use for processing http
requests. 503 error response when
Maximum size in megabytes http_plugin
should use for processing http
requests. -1 for unlimited. 429 error
response when exceeded.
--http-max-in-flight-requests arg (=-1)
Maximum number of requests http_plugin
should use for processing http
requests. 429 error response when
exceeded.
--http-max-response-time-ms arg (=30) Maximum time for processing a request,
-1 for unlimited
--verbose-http-errors Append the error log to HTTP responses
--http-validate-host arg (=1) If set to false, then any incoming
--http-validate-host arg (=1) If set to false, then any incoming
"Host" header is considered valid
--http-alias arg Additionaly acceptable values for the
"Host" header of incoming HTTP
requests, can be specified multiple
times. Includes http/s_server_address
--http-alias arg Additionaly acceptable values for the
"Host" header of incoming HTTP
requests, can be specified multiple
times. Includes http/s_server_address
by default.
--http-threads arg (=2) Number of worker threads in http thread
pool
--http-keep-alive arg (=1) If set to false, do not keep HTTP
connections alive, even if client
requests.
```
## Dependencies
-2
View File
@@ -11,7 +11,6 @@ For information on specific plugins, just select from the list below:
* [`chain_api_plugin`](chain_api_plugin/index.md)
* [`chain_plugin`](chain_plugin/index.md)
* [`db_size_api_plugin`](db_size_api_plugin/index.md)
* [`http_client_plugin`](http_client_plugin/index.md)
* [`http_plugin`](http_plugin/index.md)
* [`net_api_plugin`](net_api_plugin/index.md)
* [`net_plugin`](net_plugin/index.md)
@@ -20,7 +19,6 @@ For information on specific plugins, just select from the list below:
* [`test_control_api_plugin`](test_control_api_plugin/index.md)
* [`test_control_plugin`](test_control_plugin/index.md)
* [`trace_api_plugin`](trace_api_plugin/index.md)
* [`txn_test_gen_plugin`](txn_test_gen_plugin/index.md)
[[info | Nodeos is modular]]
| Plugins add incremental functionality to `nodeos`. Unlike runtime plugins, `nodeos` plugins are built at compile-time.
@@ -44,7 +44,7 @@ Config Options for eosio::net_plugin:
--p2p-accept-transactions arg (=1) Allow transactions received over p2p
network to be evaluated and relayed if
valid.
--agent-name arg (="EOS Test Agent") The name supplied to identify this node
--agent-name arg (=EOS Test Agent) The name supplied to identify this node
amongst the peers.
--allowed-connection arg (=any) Can be 'any' or 'producers' or
'specified' or 'none'. If 'specified',
@@ -73,13 +73,15 @@ Config Options for eosio::net_plugin:
synchronization
--use-socket-read-watermark arg (=0) Enable experimental socket read
watermark optimization
--peer-log-format arg (=["${_name}" ${_ip}:${_port}])
--peer-log-format arg (=["${_name}" - ${_cid} ${_ip}:${_port}] )
The string used to format peers when
logging messages about them. Variables
are escaped with ${<variable name>}.
Available Variables:
_name self-reported name
_cid assigned connection id
_id self-reported ID (64 hex
characters)
@@ -94,7 +96,10 @@ Config Options for eosio::net_plugin:
peer
_lport local port number connected
to peer
to peer
--p2p-keepalive-interval-ms arg (=10000)
peer heartbeat keepalive message
interval in milliseconds
```
## Dependencies
@@ -23,7 +23,6 @@ These can be specified from both the `nodeos` command-line or the `config.ini` f
```console
Config Options for eosio::producer_plugin:
-e [ --enable-stale-production ] Enable block production, even if the
chain is stale.
-x [ --pause-on-startup ] Start this node in a state where
@@ -40,26 +39,22 @@ Config Options for eosio::producer_plugin:
-p [ --producer-name ] arg ID of producer controlled by this node
(e.g. inita; may specify multiple
times)
--private-key arg (DEPRECATED - Use signature-provider
instead) Tuple of [public key, WIF
private key] (may specify multiple
times)
--signature-provider arg (=EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3)
Key=Value pairs in the form
<public-key>=<provider-spec>
Where:
<public-key> is a string form of
a vaild Antelope public
a valid EOS public
key
<provider-spec> is a string in the
form <provider-type>
:<data>
<provider-type> is KEY, or KEOSD
<provider-type> is KEY, KEOSD, or SE
KEY:<data> is a string form of
a valid Antelope
a valid EOS
private key which
maps to the provided
public key
@@ -69,10 +64,6 @@ Config Options for eosio::producer_plugin:
and the approptiate
wallet(s) are
unlocked
--keosd-provider-timeout arg (=5) Limits the maximum time (in
milliseconds) that is allowed for
sending blocks to a keosd provider for
signing
--greylist-account arg account that can not access to extended
CPU/NET virtual resources
--greylist-limit arg (=1000) Limit (between 1 and 1000) on the
@@ -107,9 +98,10 @@ Config Options for eosio::producer_plugin:
--max-scheduled-transaction-time-per-block-ms arg (=100)
Maximum wall-clock time, in
milliseconds, spent retiring scheduled
transactions in any block before
returning to normal transaction
processing.
transactions (and incoming transactions
according to incoming-defer-ratio) in
any block before returning to normal
transaction processing.
--subjective-cpu-leeway-us arg (=31000)
Time in microseconds allowed for a
transaction that starts with
@@ -119,11 +111,6 @@ Config Options for eosio::producer_plugin:
Sets the maximum amount of failures
that are allowed for a given account
per block.
Disregarded for accounts that have been
whitelisted by disabling subjective
billing for the account using the
disable-subjective-account-billing
configuration option.
--subjective-account-decay-time-minutes arg (=1440)
Sets the time to return full subjective
cpu for accounts
@@ -135,16 +122,9 @@ Config Options for eosio::producer_plugin:
transaction queue. Exceeding this value
will subjectively drop transaction with
resource exhaustion.
--disable-api-persisted-trx Disable the re-apply of API
transactions.
--disable-subjective-billing arg (=1) Disable subjective CPU billing for
API/P2P transactions
--disable-subjective-account-billing arg
Account which is excluded from
subjective CPU billing
Account is considered whitelisted and
will not be subject to enforcement of
subjective-account-max-failures.
--disable-subjective-p2p-billing arg (=1)
Disable subjective CPU billing for P2P
transactions
@@ -1,19 +1,10 @@
## Overview
The `resource_monitor_plugin` monitors space usage in the computing system where `nodeos` is running. Specifically, every `resource-monitor-interval-seconds` seconds,
it measures the individual space used by each of the file systems mounted
by `data-dir`, `state-dir`, `blocks-log-dir`, `snapshots-dir`,
`state-history-dir`, and `trace-dir`.
When space usage in any of the monitored file system is within `5%` of the threshold
specified by `resource-monitor-space-threshold`, a warning containing the file system
path and percentage of space has used is printed out.
When space usage exceeds the threshold,
if `resource-monitor-not-shutdown-on-threshold-exceeded` is not set,
`nodeos` gracefully shuts down; if `resource-monitor-not-shutdown-on-threshold-exceeded` is set, `nodeos` prints out warnings periodically
until space usage goes under the threshold.
The `resource_monitor_plugin` monitors space usage in the computing system where `nodeos` is running. Specifically, every `resource-monitor-interval-seconds` seconds, it measures the individual space used by each of the file systems mounted by `data-dir`, `state-dir`, `blocks-log-dir`, `snapshots-dir`, `state-history-dir`, and `trace-dir`. When space usage in any of the monitored file system is within `5%` of the threshold specified by `resource-monitor-space-threshold`, a warning containing the file system path and percentage of space has used is printed out. When space usage exceeds the threshold, if `resource-monitor-not-shutdown-on-threshold-exceeded` is not set, `nodeos` gracefully shuts down; if `resource-monitor-not-shutdown-on-threshold-exceeded` is set, `nodeos` prints out warnings periodically until space usage goes under the threshold.
`resource_monitor_plugin` is always loaded.
## Usage
```console
@@ -32,33 +23,28 @@ These can be specified from both the `nodeos` command-line or the `config.ini` f
```console
Config Options for eosio::resource_monitor_plugin:
--resource-monitor-interval-seconds arg (=2)
Time in seconds between two consecutive checks
of space usage. Should be between 1 and 300.
Time in seconds between two consecutive
checks of resource usage. Should be
between 1 and 300
--resource-monitor-space-threshold arg (=90)
Threshold in terms of percentage of used space
vs total space. If the used space is within
`5%` of the threshold, a warning is generated.
If the used space is above the threshold and
`resource-monitor-not-shutdown-on-threshold-exceeded`
is enabled, a shutdown is initiated; otherwise
a warning will be continuously printed out.
The value should be between 6 and 99.
Threshold in terms of percentage of
used space vs total space. If used
space is above (threshold - 5%), a
warning is generated. Unless
resource-monitor-not-shutdown-on-thresh
old-exceeded is enabled, a graceful
shutdown is initiated if used space is
above the threshold. The value should
be between 6 and 99
--resource-monitor-not-shutdown-on-threshold-exceeded
A switch used to indicate `nodeos` will "not"
shutdown when threshold is exceeded. When not
set, `nodeos` will shutdown.
Used to indicate nodeos will not
shutdown when threshold is exceeded.
--resource-monitor-warning-interval arg (=30)
Number of monitor intervals between which a
warning is displayed. For example, if
`resource-monitor-warning-interval` is to 10
and `resource-monitor-interval-seconds` is 2,
a warning will be displayed every 20 seconds,
even though the space usage is checked every
2 seconds. This is used to throttle the
number of warnings in the `nodeos` log file.
Should be between 1 and 450.
Number of resource monitor intervals
between two consecutive warnings when
the threshold is hit. Should be between
1 and 450
```
## Plugin Dependencies
@@ -31,19 +31,24 @@ These can be specified from both the `nodeos` command-line or the `config.ini` f
```console
Config Options for eosio::state_history_plugin:
--state-history-dir arg (="state-history")
the location of the state-history
the location of the state-history
directory (absolute path or relative to
application data dir)
--trace-history enable trace history
--chain-state-history enable chain state history
--state-history-endpoint arg (=127.0.0.1:8080)
the endpoint upon which to listen for
incoming connections. Caution: only
expose this port to your internal
the endpoint upon which to listen for
incoming connections. Caution: only
expose this port to your internal
network.
--state-history-unix-socket-path arg the path (relative to data-dir) to
create a unix socket upon which to
listen for incoming connections.
--trace-history-debug-mode enable debug mode for trace history
--state-history-log-retain-blocks arg if set, periodically prune the state
history files to store only configured
number of most recent blocks
```
## Examples
@@ -1,40 +0,0 @@
## Description
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/AntelopeIO/leap/tree/main/plugins/txn_test_gen_plugin) on the `AntelopeIO/leap` repository.
## Usage
```console
# config.ini
plugin = eosio::txn_test_gen_plugin
[options]
```
```sh
# command-line
nodeos ... --plugin eosio::txn_test_gen_plugin [options]
```
## Options
These can be specified from both the `nodeos` command-line or the `config.ini` file:
```console
Config Options for eosio::txn_test_gen_plugin:
--txn-reference-block-lag arg (=0) Lag in number of blocks from the head
block when selecting the reference
block for transactions (-1 means Last
Irreversible Block)
--txn-test-gen-threads arg (=2) Number of worker threads in
txn_test_gen thread pool
--txn-test-gen-account-prefix arg (=txn.test.)
Prefix to use for accounts generated
and used by this plugin
```
## Dependencies
None
@@ -81,7 +81,7 @@ Sample `logging.json`:
- 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`.
- 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`, `transient_trx_success_tracing`, `transient_trx_failure_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.
@@ -27,44 +27,34 @@ The `nodeos` service provides query access to the chain database via the HTTP [R
The `nodeos` service can be run in different "read" modes. These modes control how the node operates and how it processes blocks and transactions:
- `speculative`: this includes the side effects of confirmed and unconfirmed transactions.
- `head`: this only includes the side effects of confirmed transactions, this mode processes unconfirmed transactions but does not include them.
- `read-only`: this mode is deprecated. Similar functionality can be achieved by combining options: `read-mode = head`, `p2p-accept-transactions = false`, `api-accept-transactions = false`. When these options are set, the local database will contain state changes made by transactions in the chain up to the head block. Also, transactions received via the P2P network are not relayed and transactions cannot be pushed via the chain API.
- `irreversible`: this mode also includes confirmed transactions only up to those included in the last irreversible block.
- `speculative`: this includes the side effects of confirmed and unconfirmed transactions.
A transaction is considered confirmed when a `nodeos` instance has received, processed, and written it to a block on the blockchain, i.e. it is in the head block or an earlier block.
### Speculative Mode
Clients such as `cleos` and the RPC API, will see database state as of the current head block plus changes made by all transactions known to this node but potentially not included in the chain, unconfirmed transactions for example.
Speculative mode is low latency but fragile, there is no guarantee that the transactions reflected in the state will be included in the chain OR that they will reflected in the same order the state implies.
This mode features the lowest latency, but is the least consistent.
In speculative mode `nodeos` is able to execute transactions which have TaPoS (Transaction as Proof of Stake) pointing to any valid block in a fork considered to be the best fork by this node.
### Head Mode
Clients such as `cleos` and the RPC API will see database state as of the current head block of the chain. Since current head block is not yet irreversible and short-lived forks are possible, state read in this mode may become inaccurate if `nodeos` switches to a better fork. Note that this is also true of speculative mode.
This mode represents a good trade-off between highly consistent views of the data and latency.
Clients such as `cleos` and the RPC API will see database state as of the current head block of the chain. Since current head block is not yet irreversible and short-lived forks are possible, state read in this mode may become inaccurate if `nodeos` switches to a better fork.
In this mode `nodeos` is able to execute transactions which have TaPoS pointing to any valid block in a fork considered to be the best fork by this node.
### Read-Only Mode
[[caution | Deprecation Notice]]
| The explicit `read-mode = read-only` mode is deprecated. Similar functionality can now be achieved in `head` mode by combining options: `read-mode = head`, `p2p-accept-transactions = false`, `api-accept-transactions = false`.
Clients such as `cleos` and the RPC API will see database state as of the current head block of the chain. It **will not** include changes made by transactions known to this node but not included in the chain, such as unconfirmed transactions.
### Irreversible Mode
When `nodeos` is configured to be in irreversible read mode, it will still track the most up-to-date blocks in the fork database, but the state will lag behind the current best head block, sometimes referred to as the fork DB head, to always reflect the state of the last irreversible block.
Clients such as `cleos` and the RPC API will see database state as of the current head block of the chain. It **will not** include changes made by transactions known to this node but not included in the chain, such as unconfirmed transactions.
### Speculative Mode ( Deprecated )
Clients such as `cleos` and the RPC API, will see database state as of the current head block plus changes made by all transactions known to this node but potentially not included in the chain, unconfirmed transactions for example.
Speculative mode is low latency but fragile, there is no guarantee that the transactions reflected in the state will be included in the chain OR that they will reflected in the same order the state implies.
This mode features the lowest latency, but is the least consistent.
In speculative mode `nodeos` is able to execute transactions which have TaPoS (Transaction as Proof of Stake) pointing to any valid block in a fork considered to be the best fork by this node.
## How To Specify the Read Mode
The mode in which `nodeos` is run can be specified using the `--read-mode` option from the `eosio::chain_plugin`.
-10
View File
@@ -44,16 +44,6 @@ Config Options for eosio::http_plugin:
--http-server-address arg The local IP and port to listen for
incoming http connections; leave blank
to disable.
--https-server-address arg The local IP and port to listen for
incoming https connections; leave blank
to disable.
--https-certificate-chain-file arg Filename with the certificate chain to
present on https connections. PEM
format. Required for https.
--https-private-key-file arg Filename with https private key in PEM
format. Required for https
--https-ecdh-curve arg (=secp384r1) Configure https ECDH curve to use:
secp384r1 or prime256v1
--access-control-allow-origin arg Specify the Access-Control-Allow-Origin
to be returned on each request.
--access-control-allow-headers arg Specify the Access-Control-Allow-Header
-38
View File
@@ -1,38 +0,0 @@
---
content_title: eosio-blocklog
link_text: eosio-blocklog
---
`eosio-blocklog` is a command-line interface (CLI) utility that allows node operators to perform low-level tasks on the block logs created by a `nodeos` instance. `eosio-blocklog` can perform one of the following operations:
* Convert a range of blocks to JSON format, as single objects or array.
* Generate `blocks.index` from `blocks.log` in blocks directory.
* Trim `blocks.log` and `blocks.index` between a range of blocks.
* Perform consistency test between `blocks.log` and `blocks.index`.
* Output the results of the operation to a file or `stdout` (default).
## Usage
```sh
eosio-blocklog <options> ...
```
## Options
Option (=default) | Description
-|-
`--blocks-dir arg (="blocks")` | The location of the blocks directory (absolute path or relative to the current directory)
`-o [ --output-file ] arg` | The file to write the generated output to (absolute or relative path). If not specified then output is to `stdout`
`-f [ --first ] arg (=0)` | The first block number to log or the first block to keep if `trim-blocklog` specified
`-l [ --last ] arg (=4294967295)` | the last block number to log or the last block to keep if `trim-blocklog` specified
`--no-pretty-print` | Do not pretty print the output. Useful if piping to `jq` to improve performance
`--as-json-array` | Print out JSON blocks wrapped in JSON array (otherwise the output is free-standing JSON objects)
`--make-index` | Create `blocks.index` from `blocks.log`. Must give `blocks-dir` location. Give `output-file` relative to current directory or absolute path (default is `<blocks-dir>/blocks.index`)
`--trim-blocklog` | Trim `blocks.log` and `blocks.index`. Must give `blocks-dir` and `first` and/or `last` options.
`--smoke-test` | Quick test that `blocks.log` and `blocks.index` are well formed and agree with each other
`-h [ --help ]` | Print this help message and exit
## Remarks
When `eosio-blocklog` is launched, the utility attempts to perform the specified operation, then yields the following possible outcomes:
* If successful, the selected operation is performed and the utility terminates with a zero error code (no error).
* If unsuccessful, the utility outputs an error to `stderr` and terminates with a non-zero error code (indicating an error).
-1
View File
@@ -5,5 +5,4 @@ link_text: Antelope Utilities
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).
+3
View File
@@ -3,6 +3,7 @@ set(FC_INSTALL_COMPONENT "dev")
set(APPBASE_INSTALL_COMPONENT "dev")
set(SOFTFLOAT_INSTALL_COMPONENT "dev")
set(EOSVM_INSTALL_COMPONENT "dev")
set(BN256_INSTALL_COMPONENT "dev")
add_subdirectory( libfc )
add_subdirectory( builtins )
@@ -11,6 +12,7 @@ add_subdirectory( wasm-jit )
add_subdirectory( chainbase )
set(APPBASE_ENABLE_AUTO_VERSION OFF CACHE BOOL "enable automatic discovery of version via 'git describe'")
add_subdirectory( appbase )
add_subdirectory( custom_appbase )
add_subdirectory( chain )
add_subdirectory( testing )
add_subdirectory( version )
@@ -26,3 +28,4 @@ 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()
add_subdirectory( prometheus )
+6 -4
View File
@@ -5,8 +5,8 @@ file(GLOB HEADERS "include/eosio/chain/*.hpp"
"include/eosio/chain/webassembly/*.hpp"
"${CMAKE_CURRENT_BINARY_DIR}/include/eosio/chain/core_symbol.hpp" )
if(APPLE AND UNIX)
set(PLATFORM_TIMER_IMPL platform_timer_macos.cpp)
if((APPLE AND UNIX) OR (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"))
set(PLATFORM_TIMER_IMPL platform_timer_kqueue.cpp)
else()
try_run(POSIX_TIMER_TEST_RUN_RESULT POSIX_TIMER_TEST_COMPILE_RESULT ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/platform_timer_posix_test.c)
if(POSIX_TIMER_TEST_RUN_RESULT EQUAL 0)
@@ -42,7 +42,7 @@ if("eos-vm-oc" IN_LIST EOSIO_WASM_RUNTIMES)
endif()
llvm_map_components_to_libnames(LLVM_LIBS support core passes mcjit native orcjit)
include_directories(${LLVM_INCLUDE_DIRS})
include_directories(SYSTEM ${LLVM_INCLUDE_DIRS})
add_definitions(${LLVM_DEFINITIONS})
option(EOSVMOC_ENABLE_DEVELOPER_OPTIONS "enable developer options for EOS VM OC" OFF)
@@ -107,6 +107,7 @@ add_library( eosio_chain
abi_serializer.cpp
asset.cpp
snapshot.cpp
snapshot_scheduler.cpp
deep_mind.cpp
${CHAIN_EOSVMOC_SOURCES}
@@ -121,6 +122,7 @@ add_library( eosio_chain
protocol_feature_manager.cpp
producer_schedule.cpp
genesis_intrinsics.cpp
symbol.cpp
whitelisted_intrinsics.cpp
thread_utils.cpp
platform_timer_accuracy.cpp
@@ -128,7 +130,7 @@ add_library( eosio_chain
${HEADERS}
)
target_link_libraries( eosio_chain PUBLIC fc chainbase eosio_rapidjson Logging IR WAST WASM Runtime
target_link_libraries( eosio_chain PUBLIC bn256 fc chainbase eosio_rapidjson Logging IR WAST WASM
softfloat builtins ${CHAIN_EOSVM_LIBRARIES} ${LLVM_LIBS} ${CHAIN_RT_LINKAGE}
)
target_include_directories( eosio_chain
+62 -46
View File
@@ -4,6 +4,7 @@
#include <fc/io/raw.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <fc/io/varint.hpp>
#include <fc/time.hpp>
namespace eosio { namespace chain {
@@ -23,11 +24,11 @@ namespace eosio { namespace chain {
template <typename T>
inline fc::variant variant_from_stream(fc::datastream<const char*>& stream, const abi_serializer::yield_function_t& yield) {
fc::yield_function_t y = [&yield](){ yield(0); }; // create yield function matching fc::variant requirements, 0 for recursive depth
T temp;
fc::raw::unpack( stream, temp );
y();
return fc::variant( temp, y );
yield(0);
// create yield function matching fc::variant requirements, 0 for recursive depth
return fc::variant( temp, [yield](){ yield(0); } );
}
template <typename T>
@@ -70,9 +71,9 @@ namespace eosio { namespace chain {
);
}
abi_serializer::abi_serializer( const abi_def& abi, const yield_function_t& yield ) {
abi_serializer::abi_serializer( abi_def abi, const yield_function_t& yield ) {
configure_built_in_types();
set_abi(abi, yield);
set_abi(std::move(abi), yield);
}
abi_serializer::abi_serializer( const abi_def& abi, const fc::microseconds& max_serialization_time) {
@@ -128,11 +129,19 @@ namespace eosio { namespace chain {
built_in_types.emplace("extended_asset", pack_unpack<extended_asset>());
}
void abi_serializer::set_abi(const abi_def& abi, const yield_function_t& yield) {
impl::abi_traverse_context ctx(yield);
void abi_serializer::set_abi(abi_def abi, const yield_function_t& yield) {
impl::abi_traverse_context ctx(yield, fc::microseconds{});
EOS_ASSERT(starts_with(abi.version, "eosio::abi/1."), unsupported_abi_version_exception, "ABI has an unsupported version");
size_t types_size = abi.types.size();
size_t structs_size = abi.structs.size();
size_t actions_size = abi.actions.size();
size_t tables_size = abi.tables.size();
size_t error_messages_size = abi.error_messages.size();
size_t variants_size = abi.variants.value.size();
size_t action_results_size = abi.action_results.value.size();
typedefs.clear();
structs.clear();
actions.clear();
@@ -141,41 +150,41 @@ namespace eosio { namespace chain {
variants.clear();
action_results.clear();
for( const auto& st : abi.structs )
structs[st.name] = st;
for( auto& st : abi.structs )
structs[st.name] = std::move(st);
for( const auto& td : abi.types ) {
for( auto& td : abi.types ) {
EOS_ASSERT(!_is_type(td.new_type_name, ctx), duplicate_abi_type_def_exception,
"type already exists", ("new_type_name",impl::limit_size(td.new_type_name)));
typedefs[td.new_type_name] = td.type;
typedefs[std::move(td.new_type_name)] = std::move(td.type);
}
for( const auto& a : abi.actions )
actions[a.name] = a.type;
for( auto& a : abi.actions )
actions[std::move(a.name)] = std::move(a.type);
for( const auto& t : abi.tables )
tables[t.name] = t.type;
for( auto& t : abi.tables )
tables[std::move(t.name)] = std::move(t.type);
for( const auto& e : abi.error_messages )
error_messages[e.error_code] = e.error_msg;
for( auto& e : abi.error_messages )
error_messages[std::move(e.error_code)] = std::move(e.error_msg);
for( const auto& v : abi.variants.value )
variants[v.name] = v;
for( auto& v : abi.variants.value )
variants[v.name] = std::move(v);
for( const auto& r : abi.action_results.value )
action_results[r.name] = r.result_type;
for( auto& r : abi.action_results.value )
action_results[std::move(r.name)] = std::move(r.result_type);
/**
* The ABI vector may contain duplicates which would make it
* an invalid ABI
*/
EOS_ASSERT( typedefs.size() == abi.types.size(), duplicate_abi_type_def_exception, "duplicate type definition detected" );
EOS_ASSERT( structs.size() == abi.structs.size(), duplicate_abi_struct_def_exception, "duplicate struct definition detected" );
EOS_ASSERT( actions.size() == abi.actions.size(), duplicate_abi_action_def_exception, "duplicate action definition detected" );
EOS_ASSERT( tables.size() == abi.tables.size(), duplicate_abi_table_def_exception, "duplicate table definition detected" );
EOS_ASSERT( error_messages.size() == abi.error_messages.size(), duplicate_abi_err_msg_def_exception, "duplicate error message definition detected" );
EOS_ASSERT( variants.size() == abi.variants.value.size(), duplicate_abi_variant_def_exception, "duplicate variant definition detected" );
EOS_ASSERT( action_results.size() == abi.action_results.value.size(), duplicate_abi_action_results_def_exception, "duplicate action results definition detected" );
EOS_ASSERT( typedefs.size() == types_size, duplicate_abi_type_def_exception, "duplicate type definition detected" );
EOS_ASSERT( structs.size() == structs_size, duplicate_abi_struct_def_exception, "duplicate struct definition detected" );
EOS_ASSERT( actions.size() == actions_size, duplicate_abi_action_def_exception, "duplicate action definition detected" );
EOS_ASSERT( tables.size() == tables_size, duplicate_abi_table_def_exception, "duplicate table definition detected" );
EOS_ASSERT( error_messages.size() == error_messages_size, duplicate_abi_err_msg_def_exception, "duplicate error message definition detected" );
EOS_ASSERT( variants.size() == variants_size, duplicate_abi_variant_def_exception, "duplicate variant definition detected" );
EOS_ASSERT( action_results.size() == action_results_size, duplicate_abi_action_results_def_exception, "duplicate action results definition detected" );
validate(ctx);
}
@@ -227,7 +236,7 @@ namespace eosio { namespace chain {
}
bool abi_serializer::is_type(const std::string_view& type, const yield_function_t& yield)const {
impl::abi_traverse_context ctx(yield);
impl::abi_traverse_context ctx(yield, fc::microseconds{});
return _is_type(type, ctx);
}
@@ -456,23 +465,27 @@ namespace eosio { namespace chain {
}
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, const bytes& binary, const yield_function_t& yield, bool short_path )const {
impl::binary_to_variant_context ctx(*this, yield, type);
impl::binary_to_variant_context ctx(*this, yield, fc::microseconds{}, type);
ctx.short_path = short_path;
return _binary_to_variant(type, binary, ctx);
}
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, const bytes& binary, const fc::microseconds& max_serialization_time, bool short_path )const {
return binary_to_variant( type, binary, create_yield_function(max_serialization_time), short_path );
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, const bytes& binary, const fc::microseconds& max_action_data_serialization_time, bool short_path )const {
impl::binary_to_variant_context ctx(*this, create_depth_yield_function(), max_action_data_serialization_time, type);
ctx.short_path = short_path;
return _binary_to_variant(type, binary, ctx);
}
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const yield_function_t& yield, bool short_path )const {
impl::binary_to_variant_context ctx(*this, yield, type);
impl::binary_to_variant_context ctx(*this, yield, fc::microseconds{}, type);
ctx.short_path = short_path;
return _binary_to_variant(type, binary, ctx);
}
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const fc::microseconds& max_serialization_time, bool short_path )const {
return binary_to_variant( type, binary, create_yield_function(max_serialization_time), short_path );
fc::variant abi_serializer::binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const fc::microseconds& max_action_data_serialization_time, bool short_path )const {
impl::binary_to_variant_context ctx(*this, create_depth_yield_function(), max_action_data_serialization_time, type);
ctx.short_path = short_path;
return _binary_to_variant(type, binary, ctx);
}
void abi_serializer::_variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char *>& ds, impl::variant_to_binary_context& ctx )const
@@ -535,14 +548,15 @@ namespace eosio { namespace chain {
bool disallow_additional_fields = false;
for( uint32_t i = 0; i < st.fields.size(); ++i ) {
const auto& field = st.fields[i];
if( vo.contains( string(field.name).c_str() ) ) {
bool present = vo.contains(string(field.name).c_str());
if( present || is_optional(field.type) ) {
if( disallow_additional_fields )
EOS_THROW( pack_exception, "Unexpected field '${f}' found in input object while processing struct '${p}'",
("f", ctx.maybe_shorten(field.name))("p", ctx.get_path_string()) );
{
auto h1 = ctx.push_to_path( impl::field_path_item{ .parent_struct_itr = s_itr, .field_ordinal = i } );
auto h2 = ctx.disallow_extensions_unless( &field == &st.fields.back() );
_variant_to_binary(_remove_bin_extension(field.type), vo[field.name], ds, ctx);
_variant_to_binary(_remove_bin_extension(field.type), present ? vo[field.name] : fc::variant(nullptr), ds, ctx);
}
} else if( ends_with(field.type, "$") && ctx.extensions_allowed() ) {
disallow_additional_fields = true;
@@ -595,23 +609,27 @@ namespace eosio { namespace chain {
} FC_CAPTURE_AND_RETHROW() }
bytes abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, const yield_function_t& yield, bool short_path )const {
impl::variant_to_binary_context ctx(*this, yield, type);
impl::variant_to_binary_context ctx(*this, yield, fc::microseconds{}, type);
ctx.short_path = short_path;
return _variant_to_binary(type, var, ctx);
}
bytes abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, const fc::microseconds& max_serialization_time, bool short_path ) const {
return variant_to_binary( type, var, create_yield_function(max_serialization_time), short_path );
bytes abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, const fc::microseconds& max_action_data_serialization_time, bool short_path ) const {
impl::variant_to_binary_context ctx(*this, create_depth_yield_function(), max_action_data_serialization_time, type);
ctx.short_path = short_path;
return _variant_to_binary(type, var, ctx);
}
void abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const yield_function_t& yield, bool short_path )const {
impl::variant_to_binary_context ctx(*this, yield, type);
impl::variant_to_binary_context ctx(*this, yield, fc::microseconds{}, type);
ctx.short_path = short_path;
_variant_to_binary(type, var, ds, ctx);
}
void abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const fc::microseconds& max_serialization_time, bool short_path ) const {
variant_to_binary( type, var, create_yield_function(max_serialization_time), short_path );
void abi_serializer::variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const fc::microseconds& max_action_data_serialization_time, bool short_path ) const {
impl::variant_to_binary_context ctx(*this, create_depth_yield_function(), max_action_data_serialization_time, type);
ctx.short_path = short_path;
_variant_to_binary(type, var, ds, ctx);
}
type_name abi_serializer::get_action_type(name action)const {
@@ -642,9 +660,7 @@ namespace eosio { namespace chain {
namespace impl {
fc::scoped_exit<std::function<void()>> abi_traverse_context::enter_scope() {
std::function<void()> callback = [old_recursion_depth=recursion_depth, this](){
recursion_depth = old_recursion_depth;
};
std::function<void()> callback = [this](){ --recursion_depth; };
++recursion_depth;
yield( recursion_depth );
+96 -54
View File
@@ -19,15 +19,26 @@ namespace eosio { namespace chain {
static inline void print_debug(account_name receiver, const action_trace& ar) {
if (!ar.console.empty()) {
auto prefix = fc::format_string(
"\n[(${a},${n})->${r}]",
fc::mutable_variant_object()
("a", ar.act.account)
("n", ar.act.name)
("r", receiver));
dlog(prefix + ": CONSOLE OUTPUT BEGIN =====================\n"
+ ar.console
+ prefix + ": CONSOLE OUTPUT END =====================" );
if (fc::logger::get(DEFAULT_LOGGER).is_enabled( fc::log_level::debug )) {
std::string prefix;
prefix.reserve(3 + 13 + 1 + 13 + 3 + 13 + 1);
prefix += "\n[(";
prefix += ar.act.account.to_string();
prefix += ",";
prefix += ar.act.name.to_string();
prefix += ")->";
prefix += receiver.to_string();
prefix += "]";
std::string output;
output.reserve(512);
output += prefix;
output += ": CONSOLE OUTPUT BEGIN =====================\n";
output += ar.console;
output += prefix;
output += ": CONSOLE OUTPUT END =====================";
dlog( std::move(output) );
}
}
}
@@ -75,7 +86,7 @@ void apply_context::exec_one()
privileged = receiver_account->is_privileged();
auto native = control.find_apply_handler( receiver, act->account, act->name );
if( native ) {
if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
if( trx_context.enforce_whiteblacklist && control.is_speculative_block() ) {
control.check_contract_list( receiver );
control.check_action_list( act->account, act->name );
}
@@ -89,7 +100,7 @@ void apply_context::exec_one()
|| control.is_builtin_activated( builtin_protocol_feature_t::forward_setcode )
)
) {
if( trx_context.enforce_whiteblacklist && control.is_producing_block() ) {
if( trx_context.enforce_whiteblacklist && control.is_speculative_block() ) {
control.check_contract_list( receiver );
control.check_action_list( act->account, act->name );
}
@@ -182,7 +193,7 @@ void apply_context::exec_one()
print_debug(receiver, trace);
}
if (auto dm_logger = control.get_deep_mind_logger())
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient()))
{
dm_logger->on_end_action();
}
@@ -289,7 +300,7 @@ void apply_context::require_recipient( account_name recipient ) {
schedule_action( action_ordinal, recipient, false )
);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_require_recipient();
}
}
@@ -316,12 +327,12 @@ void apply_context::execute_inline( action&& a ) {
EOS_ASSERT( code != nullptr, action_validate_exception,
"inline action's code account ${account} does not exist", ("account", a.account) );
bool enforce_actor_whitelist_blacklist = trx_context.enforce_whiteblacklist && control.is_producing_block();
bool enforce_actor_whitelist_blacklist = trx_context.enforce_whiteblacklist && control.is_speculative_block();
flat_set<account_name> actors;
bool disallow_send_to_self_bypass = control.is_builtin_activated( builtin_protocol_feature_t::restrict_action_to_self );
bool send_to_self = (a.account == receiver);
bool inherit_parent_authorizations = (!disallow_send_to_self_bypass && send_to_self && (receiver == act->account) && control.is_producing_block());
bool inherit_parent_authorizations = (!disallow_send_to_self_bypass && send_to_self && (receiver == act->account) && control.is_speculative_block());
flat_set<permission_level> inherited_authorizations;
if( inherit_parent_authorizations ) {
@@ -347,14 +358,14 @@ void apply_context::execute_inline( action&& a ) {
control.check_actor_list( actors );
}
if( !privileged && control.is_producing_block() ) {
if( !privileged && control.is_speculative_block() ) {
const auto& chain_config = control.get_global_properties().configuration;
EOS_ASSERT( a.data.size() < std::min(chain_config.max_inline_action_size, control.get_max_nonprivileged_inline_action_size()),
inline_action_too_big_nonprivileged,
"inline action too big for nonprivileged account ${account}", ("account", a.account));
}
// No need to check authorization if replaying irreversible blocks or contract is privileged
if( !control.skip_auth_check() && !privileged ) {
if( !control.skip_auth_check() && !privileged && !trx_context.is_read_only() ) {
try {
control.get_authorization_manager()
.check_authorization( {a},
@@ -363,7 +374,7 @@ void apply_context::execute_inline( action&& a ) {
control.pending_block_time() - trx_context.published,
std::bind(&transaction_context::checktime, &this->trx_context),
false,
trx_context.is_read_only,
trx_context.is_dry_run(), // check_but_dont_fail
inherited_authorizations
);
@@ -373,7 +384,7 @@ void apply_context::execute_inline( action&& a ) {
} catch( const fc::exception& e ) {
if( disallow_send_to_self_bypass || !send_to_self ) {
throw;
} else if( control.is_producing_block() ) {
} else if( control.is_speculative_block() ) {
subjective_block_production_exception new_exception(FC_LOG_MESSAGE( error, "Authorization failure with inline action sent to self"));
for (const auto& log: e.get_log()) {
new_exception.append_log(log);
@@ -383,7 +394,7 @@ void apply_context::execute_inline( action&& a ) {
} catch( ... ) {
if( disallow_send_to_self_bypass || !send_to_self ) {
throw;
} else if( control.is_producing_block() ) {
} else if( control.is_speculative_block() ) {
EOS_THROW(subjective_block_production_exception, "Unexpected exception occurred validating inline action sent to self");
}
}
@@ -394,7 +405,7 @@ void apply_context::execute_inline( action&& a ) {
schedule_action( std::move(a), inline_receiver, false )
);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_send_inline();
}
}
@@ -407,7 +418,7 @@ void apply_context::execute_context_free_inline( action&& a ) {
EOS_ASSERT( a.authorization.size() == 0, action_validate_exception,
"context-free actions cannot have authorizations" );
if( !privileged && control.is_producing_block() ) {
if( !privileged && control.is_speculative_block() ) {
const auto& chain_config = control.get_global_properties().configuration;
EOS_ASSERT( a.data.size() < std::min(chain_config.max_inline_action_size, control.get_max_nonprivileged_inline_action_size()),
inline_action_too_big_nonprivileged,
@@ -419,16 +430,17 @@ void apply_context::execute_context_free_inline( action&& a ) {
schedule_action( std::move(a), inline_receiver, true )
);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_send_context_free_inline();
}
}
void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, account_name payer, transaction&& trx, bool replace_existing ) {
EOS_ASSERT( !trx_context.is_read_only(), transaction_exception, "cannot schedule a deferred transaction from within a readonly transaction" );
EOS_ASSERT( trx.context_free_actions.size() == 0, cfa_inside_generated_tx, "context free actions are not currently allowed in generated transactions" );
bool enforce_actor_whitelist_blacklist = trx_context.enforce_whiteblacklist && control.is_producing_block()
bool enforce_actor_whitelist_blacklist = trx_context.enforce_whiteblacklist && control.is_speculative_block()
&& !control.sender_avoids_whitelist_blacklist_enforcement( receiver );
trx_context.validate_referenced_accounts( trx, enforce_actor_whitelist_blacklist );
@@ -466,7 +478,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
trx.ref_block_num = 0;
trx.ref_block_prefix = 0;
} else {
trx.expiration = control.pending_block_time() + fc::microseconds(999'999); // Rounds up to nearest second (makes expiration check unnecessary)
trx.expiration = time_point_sec{control.pending_block_time() + fc::microseconds(999'999)}; // Rounds up to nearest second (makes expiration check unnecessary)
trx.set_reference_block(control.head_block_id()); // No TaPoS check necessary
}
@@ -530,7 +542,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
} catch( const fc::exception& e ) {
if( disallow_send_to_self_bypass || !is_sending_only_to_self(receiver) ) {
throw;
} else if( control.is_producing_block() ) {
} else if( control.is_speculative_block() ) {
subjective_block_production_exception new_exception(FC_LOG_MESSAGE( error, "Authorization failure with sent deferred transaction consisting only of actions to self"));
for (const auto& log: e.get_log()) {
new_exception.append_log(log);
@@ -540,7 +552,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
} catch( ... ) {
if( disallow_send_to_self_bypass || !is_sending_only_to_self(receiver) ) {
throw;
} else if( control.is_producing_block() ) {
} else if( control.is_speculative_block() ) {
EOS_THROW(subjective_block_production_exception, "Unexpected exception occurred validating sent deferred transaction consisting only of actions to self");
}
}
@@ -552,12 +564,12 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
bool replace_deferred_activated = control.is_builtin_activated(builtin_protocol_feature_t::replace_deferred);
EOS_ASSERT( replace_deferred_activated || !control.is_producing_block()
EOS_ASSERT( replace_deferred_activated || !control.is_speculative_block()
|| control.all_subjective_mitigations_disabled(),
subjective_block_production_exception,
"Replacing a deferred transaction is temporarily disabled." );
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", ptr->id)), "deferred_trx", "cancel", "deferred_trx_cancel");
}
@@ -575,7 +587,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
trx_id_for_new_obj = ptr->trx_id;
}
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_cancel_deferred(deep_mind_handler::operation_qualifier::modify, *ptr);
}
@@ -592,7 +604,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
trx_size = gtx.set( trx );
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_send_deferred(deep_mind_handler::operation_qualifier::modify, gtx);
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", gtx.id)), "deferred_trx", "update", "deferred_trx_add");
}
@@ -609,7 +621,7 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
trx_size = gtx.set( trx );
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_send_deferred(deep_mind_handler::operation_qualifier::none, gtx);
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", gtx.id)), "deferred_trx", "add", "deferred_trx_add");
}
@@ -626,10 +638,11 @@ void apply_context::schedule_deferred_transaction( const uint128_t& sender_id, a
}
bool apply_context::cancel_deferred_transaction( const uint128_t& sender_id, account_name sender ) {
EOS_ASSERT( !trx_context.is_read_only(), transaction_exception, "cannot cancel a deferred transaction from within a readonly transaction" );
auto& generated_transaction_idx = db.get_mutable_index<generated_transaction_multi_index>();
const auto* gto = db.find<generated_transaction_object,by_sender_id>(boost::make_tuple(sender, sender_id));
if ( gto ) {
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_cancel_deferred(deep_mind_handler::operation_qualifier::none, *gto);
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", gto->id)), "deferred_trx", "cancel", "deferred_trx_cancel");
}
@@ -670,7 +683,7 @@ const table_id_object& apply_context::find_or_create_table( name code, name scop
return *existing_tid;
}
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${code}:${scope}:${table}",
("code", code)
("scope", scope)
@@ -687,14 +700,14 @@ const table_id_object& apply_context::find_or_create_table( name code, name scop
t_id.table = table;
t_id.payer = payer;
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_create_table(t_id);
}
});
}
void apply_context::remove_table( const table_id_object& tid ) {
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${code}:${scope}:${table}",
("code", tid.code)
("scope", tid.scope)
@@ -705,7 +718,7 @@ void apply_context::remove_table( const table_id_object& tid ) {
update_db_usage(tid.payer, - config::billable_size_v<table_id_object>);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_remove_table(tid);
}
@@ -778,11 +791,13 @@ int apply_context::get_context_free_data( uint32_t index, char* buffer, size_t b
}
int apply_context::db_store_i64( name scope, name table, const account_name& payer, uint64_t id, const char* buffer, size_t buffer_size ) {
EOS_ASSERT( !trx_context.is_read_only(), table_operation_not_permitted, "cannot store a db record when executing a readonly transaction" );
return db_store_i64( receiver, scope, table, payer, id, buffer, buffer_size);
}
int apply_context::db_store_i64( name code, name scope, name table, const account_name& payer, uint64_t id, const char* buffer, size_t buffer_size ) {
// require_write_lock( scope );
EOS_ASSERT( !trx_context.is_read_only(), table_operation_not_permitted, "cannot store a db record when executing a readonly transaction" );
const auto& tab = find_or_create_table( code, scope, table, payer );
auto tableid = tab.id;
@@ -801,7 +816,7 @@ int apply_context::db_store_i64( name code, name scope, name table, const accoun
int64_t billable_size = (int64_t)(buffer_size + config::billable_size_v<key_value_object>);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${table_code}:${scope}:${table_name}:${primkey}",
("table_code", tab.code)
("scope", tab.scope)
@@ -813,7 +828,7 @@ int apply_context::db_store_i64( name code, name scope, name table, const accoun
update_db_usage( payer, billable_size);
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_db_store_i64(tab, obj);
}
@@ -822,6 +837,7 @@ int apply_context::db_store_i64( name code, name scope, name table, const accoun
}
void apply_context::db_update_i64( int iterator, account_name payer, const char* buffer, size_t buffer_size ) {
EOS_ASSERT( !trx_context.is_read_only(), table_operation_not_permitted, "cannot update a db record when executing a readonly transaction" );
const key_value_object& obj = keyval_cache.get( iterator );
const auto& table_obj = keyval_cache.get_table( obj.t_id );
@@ -836,7 +852,7 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
if( payer == account_name() ) payer = obj.payer;
std::string event_id;
if (control.get_deep_mind_logger() != nullptr) {
if (control.get_deep_mind_logger(trx_context.is_transient()) != nullptr) {
event_id = RAM_EVENT_ID("${table_code}:${scope}:${table_name}:${primkey}",
("table_code", table_obj.code)
("scope", table_obj.scope)
@@ -847,27 +863,27 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
if( account_name(obj.payer) != payer ) {
// refund the existing payer
if (auto dm_logger = control.get_deep_mind_logger())
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient()))
{
dm_logger->on_ram_trace(std::string(event_id), "table_row", "remove", "primary_index_update_remove_old_payer");
}
update_db_usage( obj.payer, -(old_size) );
// charge the new payer
if (auto dm_logger = control.get_deep_mind_logger())
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient()))
{
dm_logger->on_ram_trace(std::move(event_id), "table_row", "add", "primary_index_update_add_new_payer");
}
update_db_usage( payer, (new_size));
} else if(old_size != new_size) {
// charge/refund the existing payer the difference
if (auto dm_logger = control.get_deep_mind_logger())
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient()))
{
dm_logger->on_ram_trace(std::move(event_id) , "table_row", "update", "primary_index_update");
}
update_db_usage( obj.payer, new_size - old_size);
}
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_db_update_i64(table_obj, obj, payer, buffer, buffer_size);
}
@@ -878,6 +894,7 @@ void apply_context::db_update_i64( int iterator, account_name payer, const char*
}
void apply_context::db_remove_i64( int iterator ) {
EOS_ASSERT( !trx_context.is_read_only(), table_operation_not_permitted, "cannot remove a db record when executing a readonly transaction" );
const key_value_object& obj = keyval_cache.get( iterator );
const auto& table_obj = keyval_cache.get_table( obj.t_id );
@@ -885,7 +902,7 @@ void apply_context::db_remove_i64( int iterator ) {
// require_write_lock( table_obj.scope );
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${table_code}:${scope}:${table_name}:${primkey}",
("table_code", table_obj.code)
("scope", table_obj.scope)
@@ -897,7 +914,7 @@ void apply_context::db_remove_i64( int iterator ) {
update_db_usage( obj.payer, -(obj.value.size() + config::billable_size_v<key_value_object>) );
if (auto dm_logger = control.get_deep_mind_logger()) {
if (auto dm_logger = control.get_deep_mind_logger(trx_context.is_transient())) {
dm_logger->on_db_remove_i64(table_obj, obj);
}
@@ -1029,17 +1046,27 @@ int apply_context::db_end_i64( name code, name scope, name table ) {
uint64_t apply_context::next_global_sequence() {
const auto& p = control.get_dynamic_global_properties();
db.modify( p, [&]( auto& dgp ) {
++dgp.global_action_sequence;
});
return p.global_action_sequence;
if ( trx_context.is_read_only() ) {
// To avoid confusion of duplicated global sequence number, hard code to be 0.
return 0;
} else {
db.modify( p, [&]( auto& dgp ) {
++dgp.global_action_sequence;
});
return p.global_action_sequence;
}
}
uint64_t apply_context::next_recv_sequence( const account_metadata_object& receiver_account ) {
db.modify( receiver_account, [&]( auto& ra ) {
++ra.recv_sequence;
});
return receiver_account.recv_sequence;
if ( trx_context.is_read_only() ) {
// To avoid confusion of duplicated receive sequence number, hard code to be 0.
return 0;
} else {
db.modify( receiver_account, [&]( auto& ra ) {
++ra.recv_sequence;
});
return receiver_account.recv_sequence;
}
}
uint64_t apply_context::next_auth_sequence( account_name actor ) {
const auto& amo = db.get<account_metadata_object,by_name>( actor );
@@ -1067,4 +1094,19 @@ action_name apply_context::get_sender() const {
return action_name();
}
// Context | OC?
//-------------------------------------------------------------------------------
// Building block | baseline, OC for eosio.*
// Applying block | OC unless a producer, OC for eosio.* including producers
// Speculative API trx | baseline, OC for eosio.*
// Speculative P2P trx | baseline, OC for eosio.*
// Compute trx | baseline, OC for eosio.*
// Read only trx | OC
bool apply_context::should_use_eos_vm_oc()const {
return receiver.prefix() == config::system_account_name // "eosio"_n, all cases use OC
|| (is_applying_block() && !control.is_producer_node()) // validating/applying block
|| trx_context.is_read_only();
}
} } /// eosio::chain
+9 -4
View File
@@ -1,9 +1,14 @@
#include <string>
#include <eosio/chain/asset.hpp>
#include <boost/rational.hpp>
#include <boost/algorithm/string.hpp>
#include <fc/reflect/variant.hpp>
#include <fc/safe.hpp>
namespace eosio { namespace chain {
using fc::safe;
uint8_t asset::decimals()const {
return sym.decimals();
}
@@ -19,11 +24,11 @@ int64_t asset::precision()const {
string asset::to_string()const {
string sign = amount < 0 ? "-" : "";
int64_t abs_amount = std::abs(amount);
string result = fc::to_string( static_cast<int64_t>(abs_amount) / precision());
string result = std::to_string( static_cast<int64_t>(abs_amount) / precision());
if( decimals() )
{
auto fract = static_cast<int64_t>(abs_amount) % precision();
result += "." + fc::to_string(precision() + fract).erase(0,1);
result += "." + std::to_string(precision() + fract).erase(0,1);
}
return sign + result + " " + symbol_name();
}
@@ -31,12 +36,12 @@ string asset::to_string()const {
asset asset::from_string(const string& from)
{
try {
string s = fc::trim(from);
string s = boost::algorithm::trim_copy(from);
// Find space in order to split amount and symbol
auto space_pos = s.find(' ');
EOS_ASSERT((space_pos != string::npos), asset_type_exception, "Asset's amount and symbol should be separated with space");
auto symbol_str = fc::trim(s.substr(space_pos + 1));
auto symbol_str = boost::algorithm::trim_copy(s.substr(space_pos + 1));
auto amount_str = s.substr(0, space_pos);
// Ensure that if decimal point is used (.), decimal fraction is specified
+11 -9
View File
@@ -134,6 +134,7 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
const authority& auth,
bool is_trx_transient,
time_point initial_creation_time
)
{
@@ -158,7 +159,7 @@ namespace eosio { namespace chain {
p.last_updated = creation_time;
p.auth = auth;
if (auto dm_logger = _control.get_deep_mind_logger()) {
if (auto dm_logger = _control.get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_create_permission(p);
}
});
@@ -169,6 +170,7 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
authority&& auth,
bool is_trx_transient,
time_point initial_creation_time
)
{
@@ -193,20 +195,20 @@ namespace eosio { namespace chain {
p.last_updated = creation_time;
p.auth = std::move(auth);
if (auto dm_logger = _control.get_deep_mind_logger()) {
if (auto dm_logger = _control.get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_create_permission(p);
}
});
return perm;
}
void authorization_manager::modify_permission( const permission_object& permission, const authority& auth ) {
void authorization_manager::modify_permission( const permission_object& permission, const authority& auth, bool is_trx_transient ) {
for(const key_weight& k: auth.keys)
EOS_ASSERT(k.key.which() < _db.get<protocol_state_object>().num_supported_key_types, unactivated_key_type,
"Unactivated key type used when modifying permission");
_db.modify( permission, [&](permission_object& po) {
auto dm_logger = _control.get_deep_mind_logger();
auto dm_logger = _control.get_deep_mind_logger(is_trx_transient);
std::optional<permission_object> old_permission;
if (dm_logger) {
@@ -216,13 +218,13 @@ namespace eosio { namespace chain {
po.auth = auth;
po.last_updated = _control.pending_block_time();
if (auto dm_logger = _control.get_deep_mind_logger()) {
if (auto dm_logger = _control.get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_modify_permission(*old_permission, po);
}
});
}
void authorization_manager::remove_permission( const permission_object& permission ) {
void authorization_manager::remove_permission( const permission_object& permission, bool is_trx_transient ) {
const auto& index = _db.template get_index<permission_index, by_parent>();
auto range = index.equal_range(permission.id);
EOS_ASSERT( range.first == range.second, action_validate_exception,
@@ -230,7 +232,7 @@ namespace eosio { namespace chain {
_db.get_mutable_index<permission_usage_index>().remove_object( permission.usage_id._id );
if (auto dm_logger = _control.get_deep_mind_logger()) {
if (auto dm_logger = _control.get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_remove_permission(permission);
}
@@ -557,8 +559,8 @@ namespace eosio { namespace chain {
}
if( !allow_unused_keys || check_but_dont_fail) {
EOS_ASSERT( checker.all_keys_used(), tx_irrelevant_sig,
if( !allow_unused_keys ) {
EOS_ASSERT( checker.all_keys_used() || check_but_dont_fail, tx_irrelevant_sig,
"transaction bears irrelevant signatures from these keys: ${keys}",
("keys", checker.unused_keys()) );
}
+1564 -1360
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+27 -16
View File
@@ -54,7 +54,7 @@ void validate_authority_precondition( const apply_context& context, const author
}
}
if( context.trx_context.enforce_whiteblacklist && context.control.is_producing_block() ) {
if( context.trx_context.enforce_whiteblacklist && context.control.is_speculative_block() ) {
for( const auto& p : auth.keys ) {
context.control.check_key_list( p.key );
}
@@ -65,6 +65,7 @@ void validate_authority_precondition( const apply_context& context, const author
* This method is called assuming precondition_system_newaccount succeeds a
*/
void apply_eosio_newaccount(apply_context& context) {
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "newaccount not allowed in read-only transaction" );
auto create = context.get_action().data_as<newaccount>();
try {
context.require_authorization(create.creator);
@@ -107,18 +108,18 @@ void apply_eosio_newaccount(apply_context& context) {
}
const auto& owner_permission = authorization.create_permission( create.name, config::owner_name, 0,
std::move(create.owner) );
std::move(create.owner), context.trx_context.is_transient() );
const auto& active_permission = authorization.create_permission( create.name, config::active_name, owner_permission.id,
std::move(create.active) );
std::move(create.active), context.trx_context.is_transient() );
context.control.get_mutable_resource_limits_manager().initialize_account(create.name);
context.control.get_mutable_resource_limits_manager().initialize_account(create.name, context.trx_context.is_transient());
int64_t ram_delta = config::overhead_per_account_ram_bytes;
ram_delta += 2*config::billable_size_v<permission_object>;
ram_delta += owner_permission.auth.get_billable_size();
ram_delta += active_permission.auth.get_billable_size();
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${name}", ("name", create.name)), "account", "add", "newaccount");
}
@@ -127,6 +128,7 @@ void apply_eosio_newaccount(apply_context& context) {
} FC_CAPTURE_AND_RETHROW( (create) ) }
void apply_eosio_setcode(apply_context& context) {
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "setcode not allowed in read-only transaction" );
auto& db = context.db;
auto act = context.get_action().data_as<setcode>();
context.require_authorization(act.account);
@@ -158,7 +160,7 @@ void apply_eosio_setcode(apply_context& context) {
old_size = (int64_t)old_code_entry.code.size() * config::setcode_ram_bytes_multiplier;
if( old_code_entry.code_ref_count == 1 ) {
db.remove(old_code_entry);
context.control.get_wasm_interface().code_block_num_last_used(account.code_hash, account.vm_type, account.vm_version, context.control.head_block_num() + 1);
context.control.code_block_num_last_used(account.code_hash, account.vm_type, account.vm_version, context.control.head_block_num() + 1);
} else {
db.modify(old_code_entry, [](code_object& o) {
--o.code_ref_count;
@@ -194,7 +196,7 @@ void apply_eosio_setcode(apply_context& context) {
});
if (new_size != old_size) {
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
const char* operation = "update";
if (old_size <= 0) {
operation = "add";
@@ -210,6 +212,7 @@ void apply_eosio_setcode(apply_context& context) {
}
void apply_eosio_setabi(apply_context& context) {
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "setabi ot allowed in read-only transaction" );
auto& db = context.db;
auto act = context.get_action().data_as<setabi>();
@@ -232,7 +235,7 @@ void apply_eosio_setabi(apply_context& context) {
});
if (new_size != old_size) {
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
const char* operation = "update";
if (old_size <= 0) {
operation = "add";
@@ -248,6 +251,7 @@ void apply_eosio_setabi(apply_context& context) {
}
void apply_eosio_updateauth(apply_context& context) {
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "updateauth not allowed in read-only transaction" );
auto update = context.get_action().data_as<updateauth>();
context.require_authorization(update.account); // only here to mark the single authority on this action as used
@@ -297,21 +301,21 @@ void apply_eosio_updateauth(apply_context& context) {
int64_t old_size = (int64_t)(config::billable_size_v<permission_object> + permission->auth.get_billable_size());
authorization.modify_permission( *permission, update.auth );
authorization.modify_permission( *permission, update.auth, context.trx_context.is_transient() );
int64_t new_size = (int64_t)(config::billable_size_v<permission_object> + permission->auth.get_billable_size());
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", permission->id)), "auth", "update", "updateauth_update");
}
context.add_ram_usage( permission->owner, new_size - old_size );
} else {
const auto& p = authorization.create_permission( update.account, update.permission, parent_id, update.auth );
const auto& p = authorization.create_permission( update.account, update.permission, parent_id, update.auth, context.trx_context.is_transient() );
int64_t new_size = (int64_t)(config::billable_size_v<permission_object> + p.auth.get_billable_size());
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", p.id)), "auth", "add", "updateauth_create");
}
@@ -322,6 +326,8 @@ void apply_eosio_updateauth(apply_context& context) {
void apply_eosio_deleteauth(apply_context& context) {
// context.require_write_lock( config::eosio_auth_scope );
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "deleteauth not allowed in read-only transaction" );
auto remove = context.get_action().data_as<deleteauth>();
context.require_authorization(remove.account); // only here to mark the single authority on this action as used
@@ -344,11 +350,11 @@ void apply_eosio_deleteauth(apply_context& context) {
const auto& permission = authorization.get_permission({remove.account, remove.permission});
int64_t old_size = config::billable_size_v<permission_object> + permission.auth.get_billable_size();
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", permission.id)), "auth", "remove", "deleteauth");
}
authorization.remove_permission( permission );
authorization.remove_permission( permission, context.trx_context.is_transient() );
context.add_ram_usage( remove.account, -old_size );
@@ -357,6 +363,8 @@ void apply_eosio_deleteauth(apply_context& context) {
void apply_eosio_linkauth(apply_context& context) {
// context.require_write_lock( config::eosio_auth_scope );
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "linkauth not allowed in read-only transaction" );
auto requirement = context.get_action().data_as<linkauth>();
try {
EOS_ASSERT(!requirement.requirement.empty(), action_validate_exception, "Required permission cannot be empty");
@@ -401,7 +409,7 @@ void apply_eosio_linkauth(apply_context& context) {
link.required_permission = requirement.requirement;
});
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", l.id)), "auth_link", "add", "linkauth");
}
@@ -417,6 +425,8 @@ void apply_eosio_linkauth(apply_context& context) {
void apply_eosio_unlinkauth(apply_context& context) {
// context.require_write_lock( config::eosio_auth_scope );
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "unlinkauth not allowed in read-only transaction" );
auto& db = context.db;
auto unlink = context.get_action().data_as<unlinkauth>();
@@ -426,7 +436,7 @@ void apply_eosio_unlinkauth(apply_context& context) {
auto link = db.find<permission_link_object, by_action_name>(link_key);
EOS_ASSERT(link != nullptr, action_validate_exception, "Attempting to unlink authority, but no link found");
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
dm_logger->on_ram_trace(RAM_EVENT_ID("${id}", ("id", link->id)), "auth_link", "remove", "unlinkauth");
}
@@ -439,6 +449,7 @@ void apply_eosio_unlinkauth(apply_context& context) {
}
void apply_eosio_canceldelay(apply_context& context) {
EOS_ASSERT( !context.trx_context.is_read_only(), action_validate_exception, "canceldelay not allowed in read-only transaction" );
auto cancel = context.get_action().data_as<canceldelay>();
context.require_authorization(cancel.canceling_auth.actor); // only here to mark the single authority on this action as used
+191 -103
View File
@@ -9,6 +9,7 @@
#include <boost/multi_index/composite_key.hpp>
#include <fc/io/fstream.hpp>
#include <fstream>
#include <shared_mutex>
namespace eosio { namespace chain {
using boost::multi_index_container;
@@ -60,27 +61,44 @@ namespace eosio { namespace chain {
}
struct fork_database_impl {
fork_database_impl( fork_database& self, const fc::path& data_dir )
:self(self)
,datadir(data_dir)
explicit fork_database_impl( const std::filesystem::path& data_dir )
:datadir(data_dir)
{}
fork_database& self;
std::shared_mutex mtx;
fork_multi_index_type index;
block_state_ptr root; // Only uses the block_header_state portion
block_state_ptr head;
fc::path datadir;
std::filesystem::path datadir;
void add( const block_state_ptr& n,
bool ignore_duplicate, bool validate,
const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator );
void open_impl( const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator );
void close_impl();
block_header_state_ptr get_block_header_impl( const block_id_type& id )const;
block_state_ptr get_block_impl( const block_id_type& id )const;
void reset_impl( const block_header_state& root_bhs );
void rollback_head_to_root_impl();
void advance_root_impl( const block_id_type& id );
void remove_impl( const block_id_type& id );
branch_type fetch_branch_impl( const block_id_type& h, uint32_t trim_after_block_num )const;
block_state_ptr search_on_branch_impl( const block_id_type& h, uint32_t block_num )const;
pair<branch_type, branch_type> fetch_branch_from_impl( const block_id_type& first,
const block_id_type& second )const;
void mark_valid_impl( const block_state_ptr& h );
void add_impl( const block_state_ptr& n,
bool ignore_duplicate, bool validate,
const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator );
};
fork_database::fork_database( const fc::path& data_dir )
:my( new fork_database_impl( *this, data_dir ) )
fork_database::fork_database( const std::filesystem::path& data_dir )
:my( new fork_database_impl( data_dir ) )
{}
@@ -88,11 +106,19 @@ namespace eosio { namespace chain {
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator )
{
if (!fc::is_directory(my->datadir))
fc::create_directories(my->datadir);
std::lock_guard g( my->mtx );
my->open_impl( validator );
}
auto fork_db_dat = my->datadir / config::forkdb_filename;
if( fc::exists( fork_db_dat ) ) {
void fork_database_impl::open_impl( const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator )
{
if (!std::filesystem::is_directory(datadir))
std::filesystem::create_directories(datadir);
auto fork_db_dat = datadir / config::forkdb_filename;
if( std::filesystem::exists( fork_db_dat ) ) {
try {
string content;
fc::read_file_contents( fork_db_dat, content );
@@ -102,29 +128,29 @@ namespace eosio { namespace chain {
// validate totem
uint32_t totem = 0;
fc::raw::unpack( ds, totem );
EOS_ASSERT( totem == magic_number, fork_database_exception,
EOS_ASSERT( totem == fork_database::magic_number, fork_database_exception,
"Fork database file '${filename}' has unexpected magic number: ${actual_totem}. Expected ${expected_totem}",
("filename", fork_db_dat.generic_string())
("filename", fork_db_dat)
("actual_totem", totem)
("expected_totem", magic_number)
("expected_totem", fork_database::magic_number)
);
// validate version
uint32_t version = 0;
fc::raw::unpack( ds, version );
EOS_ASSERT( version >= min_supported_version && version <= max_supported_version,
EOS_ASSERT( version >= fork_database::min_supported_version && version <= fork_database::max_supported_version,
fork_database_exception,
"Unsupported version of fork database file '${filename}'. "
"Fork database version is ${version} while code supports version(s) [${min},${max}]",
("filename", fork_db_dat.generic_string())
("filename", fork_db_dat)
("version", version)
("min", min_supported_version)
("max", max_supported_version)
("min", fork_database::min_supported_version)
("max", fork_database::max_supported_version)
);
block_header_state bhs;
fc::raw::unpack( ds, bhs );
reset( bhs );
reset_impl( bhs );
unsigned_int size; fc::raw::unpack( ds, size );
for( uint32_t i = 0, n = size.value; i < n; ++i ) {
@@ -132,55 +158,60 @@ namespace eosio { namespace chain {
fc::raw::unpack( ds, s );
// do not populate transaction_metadatas, they will be created as needed in apply_block with appropriate key recovery
s.header_exts = s.block->validate_and_extract_header_extensions();
my->add( std::make_shared<block_state>( move( s ) ), false, true, validator );
add_impl( std::make_shared<block_state>( std::move( s ) ), false, true, validator );
}
block_id_type head_id;
fc::raw::unpack( ds, head_id );
if( my->root->id == head_id ) {
my->head = my->root;
if( root->id == head_id ) {
head = root;
} else {
my->head = get_block( head_id );
EOS_ASSERT( my->head, fork_database_exception,
head = get_block_impl( head_id );
EOS_ASSERT( head, fork_database_exception,
"could not find head while reconstructing fork database from file; '${filename}' is likely corrupted",
("filename", fork_db_dat.generic_string()) );
("filename", fork_db_dat) );
}
auto candidate = my->index.get<by_lib_block_num>().begin();
if( candidate == my->index.get<by_lib_block_num>().end() || !(*candidate)->is_valid() ) {
EOS_ASSERT( my->head->id == my->root->id, fork_database_exception,
auto candidate = index.get<by_lib_block_num>().begin();
if( candidate == index.get<by_lib_block_num>().end() || !(*candidate)->is_valid() ) {
EOS_ASSERT( head->id == root->id, fork_database_exception,
"head not set to root despite no better option available; '${filename}' is likely corrupted",
("filename", fork_db_dat.generic_string()) );
("filename", fork_db_dat) );
} else {
EOS_ASSERT( !first_preferred( **candidate, *my->head ), fork_database_exception,
EOS_ASSERT( !first_preferred( **candidate, *head ), fork_database_exception,
"head not set to best available option available; '${filename}' is likely corrupted",
("filename", fork_db_dat.generic_string()) );
("filename", fork_db_dat) );
}
} FC_CAPTURE_AND_RETHROW( (fork_db_dat) )
fc::remove( fork_db_dat );
std::filesystem::remove( fork_db_dat );
}
}
void fork_database::close() {
auto fork_db_dat = my->datadir / config::forkdb_filename;
std::lock_guard g( my->mtx );
my->close_impl();
}
if( !my->root ) {
if( my->index.size() > 0 ) {
void fork_database_impl::close_impl() {
auto fork_db_dat = datadir / config::forkdb_filename;
if( !root ) {
if( index.size() > 0 ) {
elog( "fork_database is in a bad state when closing; not writing out '${filename}'",
("filename", fork_db_dat.generic_string()) );
("filename", fork_db_dat) );
}
return;
}
std::ofstream out( fork_db_dat.generic_string().c_str(), std::ios::out | std::ios::binary | std::ofstream::trunc );
fc::raw::pack( out, magic_number );
fc::raw::pack( out, max_supported_version ); // write out current version which is always max_supported_version
fc::raw::pack( out, *static_cast<block_header_state*>(&*my->root) );
uint32_t num_blocks_in_fork_db = my->index.size();
fc::raw::pack( out, fork_database::magic_number );
fc::raw::pack( out, fork_database::max_supported_version ); // write out current version which is always max_supported_version
fc::raw::pack( out, *static_cast<block_header_state*>(&*root) );
uint32_t num_blocks_in_fork_db = index.size();
fc::raw::pack( out, unsigned_int{num_blocks_in_fork_db} );
const auto& indx = my->index.get<by_lib_block_num>();
const auto& indx = index.get<by_lib_block_num>();
auto unvalidated_itr = indx.rbegin();
auto unvalidated_end = boost::make_reverse_iterator( indx.lower_bound( false ) );
@@ -215,30 +246,40 @@ namespace eosio { namespace chain {
fc::raw::pack( out, *(*itr) );
}
if( my->head ) {
fc::raw::pack( out, my->head->id );
if( head ) {
fc::raw::pack( out, head->id );
} else {
elog( "head not set in fork database; '${filename}' will be corrupted",
("filename", fork_db_dat.generic_string()) );
("filename", fork_db_dat) );
}
my->index.clear();
index.clear();
}
fork_database::~fork_database() {
close();
my->close_impl();
}
void fork_database::reset( const block_header_state& root_bhs ) {
my->index.clear();
my->root = std::make_shared<block_state>();
static_cast<block_header_state&>(*my->root) = root_bhs;
my->root->validated = true;
my->head = my->root;
std::lock_guard g( my->mtx );
my->reset_impl(root_bhs);
}
void fork_database_impl::reset_impl( const block_header_state& root_bhs ) {
index.clear();
root = std::make_shared<block_state>();
static_cast<block_header_state&>(*root) = root_bhs;
root->validated = true;
head = root;
}
void fork_database::rollback_head_to_root() {
auto& by_id_idx = my->index.get<by_block_id>();
std::lock_guard g( my->mtx );
my->rollback_head_to_root_impl();
}
void fork_database_impl::rollback_head_to_root_impl() {
auto& by_id_idx = index.get<by_block_id>();
auto itr = by_id_idx.begin();
while (itr != by_id_idx.end()) {
by_id_idx.modify( itr, [&]( block_state_ptr& bsp ) {
@@ -246,13 +287,18 @@ namespace eosio { namespace chain {
} );
++itr;
}
my->head = my->root;
head = root;
}
void fork_database::advance_root( const block_id_type& id ) {
EOS_ASSERT( my->root, fork_database_exception, "root not yet set" );
std::lock_guard g( my->mtx );
my->advance_root_impl( id );
}
auto new_root = get_block( id );
void fork_database_impl::advance_root_impl( const block_id_type& id ) {
EOS_ASSERT( root, fork_database_exception, "root not yet set" );
auto new_root = get_block_impl( id );
EOS_ASSERT( new_root, fork_database_exception,
"cannot advance root to a block that does not exist in the fork database" );
EOS_ASSERT( new_root->is_valid(), fork_database_exception,
@@ -262,48 +308,53 @@ namespace eosio { namespace chain {
deque<block_id_type> blocks_to_remove;
for( auto b = new_root; b; ) {
blocks_to_remove.emplace_back( b->header.previous );
b = get_block( blocks_to_remove.back() );
EOS_ASSERT( b || blocks_to_remove.back() == my->root->id, fork_database_exception, "invariant violation: orphaned branch was present in forked database" );
b = get_block_impl( blocks_to_remove.back() );
EOS_ASSERT( b || blocks_to_remove.back() == root->id, fork_database_exception, "invariant violation: orphaned branch was present in forked database" );
}
// The new root block should be erased from the fork database index individually rather than with the remove method,
// because we do not want the blocks branching off of it to be removed from the fork database.
my->index.erase( my->index.find( id ) );
index.erase( index.find( id ) );
// The other blocks to be removed are removed using the remove method so that orphaned branches do not remain in the fork database.
for( const auto& block_id : blocks_to_remove ) {
remove( block_id );
remove_impl( block_id );
}
// Even though fork database no longer needs block or trxs when a block state becomes a root of the tree,
// avoid mutating the block state at all, for example clearing the block shared pointer, because other
// parts of the code which run asynchronously may later expect it remain unmodified.
my->root = new_root;
root = new_root;
}
block_header_state_ptr fork_database::get_block_header( const block_id_type& id )const {
if( my->root->id == id ) {
return my->root;
std::shared_lock g( my->mtx );
return my->get_block_header_impl( id );
}
block_header_state_ptr fork_database_impl::get_block_header_impl( const block_id_type& id )const {
if( root->id == id ) {
return root;
}
auto itr = my->index.find( id );
if( itr != my->index.end() )
auto itr = index.find( id );
if( itr != index.end() )
return *itr;
return block_header_state_ptr();
}
void fork_database_impl::add( const block_state_ptr& n,
bool ignore_duplicate, bool validate,
const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator )
void fork_database_impl::add_impl( const block_state_ptr& n,
bool ignore_duplicate, bool validate,
const std::function<void( block_timestamp_type,
const flat_set<digest_type>&,
const vector<digest_type>& )>& validator )
{
EOS_ASSERT( root, fork_database_exception, "root not yet set" );
EOS_ASSERT( n, fork_database_exception, "attempt to add null block state" );
auto prev_bh = self.get_block_header( n->header.previous );
auto prev_bh = get_block_header_impl( n->header.previous );
EOS_ASSERT( prev_bh, unlinkable_block_exception,
"unlinkable block", ("id", n->id)("previous", n->header.previous) );
@@ -332,19 +383,27 @@ namespace eosio { namespace chain {
}
void fork_database::add( const block_state_ptr& n, bool ignore_duplicate ) {
my->add( n, ignore_duplicate, false,
[]( block_timestamp_type timestamp,
const flat_set<digest_type>& cur_features,
const vector<digest_type>& new_features )
{}
std::lock_guard g( my->mtx );
my->add_impl( n, ignore_duplicate, false,
[]( block_timestamp_type timestamp,
const flat_set<digest_type>& cur_features,
const vector<digest_type>& new_features )
{}
);
}
const block_state_ptr& fork_database::root()const { return my->root; }
block_state_ptr fork_database::root()const {
std::shared_lock g( my->mtx );
return my->root;
}
const block_state_ptr& fork_database::head()const { return my->head; }
block_state_ptr fork_database::head()const {
std::shared_lock g( my->mtx );
return my->head;
}
block_state_ptr fork_database::pending_head()const {
std::shared_lock g( my->mtx );
const auto& indx = my->index.get<by_lib_block_num>();
auto itr = indx.lower_bound( false );
@@ -357,8 +416,13 @@ namespace eosio { namespace chain {
}
branch_type fork_database::fetch_branch( const block_id_type& h, uint32_t trim_after_block_num )const {
std::shared_lock g( my->mtx );
return my->fetch_branch_impl( h, trim_after_block_num );
}
branch_type fork_database_impl::fetch_branch_impl( const block_id_type& h, uint32_t trim_after_block_num )const {
branch_type result;
for( auto s = get_block(h); s; s = get_block( s->header.previous ) ) {
for( auto s = get_block_impl(h); s; s = get_block_impl( s->header.previous ) ) {
if( s->block_num <= trim_after_block_num )
result.push_back( s );
}
@@ -367,7 +431,12 @@ namespace eosio { namespace chain {
}
block_state_ptr fork_database::search_on_branch( const block_id_type& h, uint32_t block_num )const {
for( auto s = get_block(h); s; s = get_block( s->header.previous ) ) {
std::shared_lock g( my->mtx );
return my->search_on_branch_impl( h, block_num );
}
block_state_ptr fork_database_impl::search_on_branch_impl( const block_id_type& h, uint32_t block_num )const {
for( auto s = get_block_impl(h); s; s = get_block_impl( s->header.previous ) ) {
if( s->block_num == block_num )
return s;
}
@@ -381,9 +450,15 @@ namespace eosio { namespace chain {
*/
pair< branch_type, branch_type > fork_database::fetch_branch_from( const block_id_type& first,
const block_id_type& second )const {
std::shared_lock g( my->mtx );
return my->fetch_branch_from_impl( first, second );
}
pair< branch_type, branch_type > fork_database_impl::fetch_branch_from_impl( const block_id_type& first,
const block_id_type& second )const {
pair<branch_type,branch_type> result;
auto first_branch = (first == my->root->id) ? my->root : get_block(first);
auto second_branch = (second == my->root->id) ? my->root : get_block(second);
auto first_branch = (first == root->id) ? root : get_block_impl(first);
auto second_branch = (second == root->id) ? root : get_block_impl(second);
EOS_ASSERT(first_branch, fork_db_block_not_found, "block ${id} does not exist", ("id", first));
EOS_ASSERT(second_branch, fork_db_block_not_found, "block ${id} does not exist", ("id", second));
@@ -392,7 +467,7 @@ namespace eosio { namespace chain {
{
result.first.push_back(first_branch);
const auto& prev = first_branch->header.previous;
first_branch = (prev == my->root->id) ? my->root : get_block( prev );
first_branch = (prev == root->id) ? root : get_block_impl( prev );
EOS_ASSERT( first_branch, fork_db_block_not_found,
"block ${id} does not exist",
("id", prev)
@@ -403,7 +478,7 @@ namespace eosio { namespace chain {
{
result.second.push_back( second_branch );
const auto& prev = second_branch->header.previous;
second_branch = (prev == my->root->id) ? my->root : get_block( prev );
second_branch = (prev == root->id) ? root : get_block_impl( prev );
EOS_ASSERT( second_branch, fork_db_block_not_found,
"block ${id} does not exist",
("id", prev)
@@ -417,9 +492,9 @@ namespace eosio { namespace chain {
result.first.push_back(first_branch);
result.second.push_back(second_branch);
const auto &first_prev = first_branch->header.previous;
first_branch = get_block( first_prev );
first_branch = get_block_impl( first_prev );
const auto &second_prev = second_branch->header.previous;
second_branch = get_block( second_prev );
second_branch = get_block_impl( second_prev );
EOS_ASSERT( first_branch, fork_db_block_not_found,
"block ${id} does not exist",
("id", first_prev)
@@ -436,13 +511,18 @@ namespace eosio { namespace chain {
result.second.push_back(second_branch);
}
return result;
} /// fetch_branch_from
} /// fetch_branch_from_impl
/// remove all of the invalid forks built off of this id including this id
void fork_database::remove( const block_id_type& id ) {
std::lock_guard g( my->mtx );
return my->remove_impl( id );
}
void fork_database_impl::remove_impl( const block_id_type& id ) {
deque<block_id_type> remove_queue{id};
const auto& previdx = my->index.get<by_prev>();
const auto& head_id = my->head->id;
const auto& previdx = index.get<by_prev>();
const auto& head_id = head->id;
for( uint32_t i = 0; i < remove_queue.size(); ++i ) {
EOS_ASSERT( remove_queue[i] != head_id, fork_database_exception,
@@ -456,16 +536,19 @@ namespace eosio { namespace chain {
}
for( const auto& block_id : remove_queue ) {
auto itr = my->index.find( block_id );
if( itr != my->index.end() )
my->index.erase(itr);
index.erase( block_id );
}
}
void fork_database::mark_valid( const block_state_ptr& h ) {
std::lock_guard g( my->mtx );
my->mark_valid_impl( h );
}
void fork_database_impl::mark_valid_impl( const block_state_ptr& h ) {
if( h->validated ) return;
auto& by_id_idx = my->index.get<by_block_id>();
auto& by_id_idx = index.get<by_block_id>();
auto itr = by_id_idx.find( h->id );
EOS_ASSERT( itr != by_id_idx.end(), fork_database_exception,
@@ -476,15 +559,20 @@ namespace eosio { namespace chain {
bsp->validated = true;
} );
auto candidate = my->index.get<by_lib_block_num>().begin();
if( first_preferred( **candidate, *my->head ) ) {
my->head = *candidate;
auto candidate = index.get<by_lib_block_num>().begin();
if( first_preferred( **candidate, *head ) ) {
head = *candidate;
}
}
block_state_ptr fork_database::get_block(const block_id_type& id)const {
auto itr = my->index.find( id );
if( itr != my->index.end() )
block_state_ptr fork_database::get_block(const block_id_type& id)const {
std::shared_lock g( my->mtx );
return my->get_block_impl(id);
}
block_state_ptr fork_database_impl::get_block_impl(const block_id_type& id)const {
auto itr = index.find( id );
if( itr != index.end() )
return *itr;
return block_state_ptr();
}
@@ -6,8 +6,9 @@
#include <utility>
#include <fc/variant_object.hpp>
#include <fc/scoped_exit.hpp>
#include <fc/time.hpp>
namespace eosio { namespace chain {
namespace eosio::chain {
using std::map;
using std::string;
@@ -23,6 +24,7 @@ namespace impl {
struct abi_traverse_context_with_path;
struct binary_to_variant_context;
struct variant_to_binary_context;
struct action_data_to_variant_context;
}
/**
@@ -35,10 +37,10 @@ struct abi_serializer {
using yield_function_t = fc::optional_delegate<void(size_t)>;
abi_serializer(){ configure_built_in_types(); }
abi_serializer( const abi_def& abi, const yield_function_t& yield );
abi_serializer( abi_def abi, const yield_function_t& yield );
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
abi_serializer( const abi_def& abi, const fc::microseconds& max_serialization_time );
void set_abi( const abi_def& abi, const yield_function_t& yield );
void set_abi( abi_def abi, const yield_function_t& yield );
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
void set_abi(const abi_def& abi, const fc::microseconds& max_serialization_time);
@@ -48,7 +50,6 @@ struct abi_serializer {
bool is_szarray(const std::string_view& type)const;
bool is_optional(const std::string_view& type)const;
bool is_type( const std::string_view& type, const yield_function_t& yield )const;
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
bool is_type(const std::string_view& type, const fc::microseconds& max_serialization_time)const;
bool is_builtin_type(const std::string_view& type)const;
bool is_integer(const std::string_view& type) const;
@@ -67,33 +68,29 @@ struct abi_serializer {
std::optional<string> get_error_message( uint64_t error_code )const;
fc::variant binary_to_variant( const std::string_view& type, const bytes& binary, const yield_function_t& yield, bool short_path = false )const;
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
fc::variant binary_to_variant( const std::string_view& type, const bytes& binary, const fc::microseconds& max_serialization_time, bool short_path = false )const;
fc::variant binary_to_variant( const std::string_view& type, const bytes& binary, const fc::microseconds& max_action_data_serialization_time, bool short_path = false )const;
fc::variant binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const yield_function_t& yield, bool short_path = false )const;
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
fc::variant binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const fc::microseconds& max_serialization_time, bool short_path = false )const;
fc::variant binary_to_variant( const std::string_view& type, fc::datastream<const char*>& binary, const fc::microseconds& max_action_data_serialization_time, bool short_path = false )const;
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
bytes variant_to_binary( const std::string_view& type, const fc::variant& var, const fc::microseconds& max_serialization_time, bool short_path = false )const;
bytes variant_to_binary( const std::string_view& type, const fc::variant& var, const fc::microseconds& max_action_data_serialization_time, bool short_path = false )const;
bytes variant_to_binary( const std::string_view& type, const fc::variant& var, const yield_function_t& yield, bool short_path = false )const;
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
void variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const fc::microseconds& max_serialization_time, bool short_path = false )const;
void variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const fc::microseconds& max_action_data_serialization_time, bool short_path = false )const;
void variant_to_binary( const std::string_view& type, const fc::variant& var, fc::datastream<char*>& ds, const yield_function_t& yield, bool short_path = false )const;
template<typename T, typename Resolver>
static void to_variant( const T& o, fc::variant& vo, Resolver resolver, const yield_function_t& yield );
static void to_variant( const T& o, fc::variant& vo, const Resolver& resolver, const yield_function_t& yield );
template<typename T, typename Resolver>
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
static void to_variant( const T& o, fc::variant& vo, Resolver resolver, const fc::microseconds& max_serialization_time );
static void to_variant( const T& o, fc::variant& vo, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time );
template<typename T, typename Resolver>
static void to_log_variant( const T& o, fc::variant& vo, Resolver resolver, const yield_function_t& yield );
static void to_log_variant( const T& o, fc::variant& vo, const Resolver& resolver, const yield_function_t& yield );
template<typename T, typename Resolver>
static void to_log_variant( const T& o, fc::variant& vo, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time );
template<typename T, typename Resolver>
static void from_variant( const fc::variant& v, T& o, Resolver resolver, const yield_function_t& yield );
static void from_variant( const fc::variant& v, T& o, const Resolver& resolver, const yield_function_t& yield );
template<typename T, typename Resolver>
[[deprecated("use the overload with yield_function_t[=create_yield_function(max_serialization_time)]")]]
static void from_variant( const fc::variant& v, T& o, Resolver resolver, const fc::microseconds& max_serialization_time );
static void from_variant( const fc::variant& v, T& o, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time );
template<typename Vec>
static bool is_empty_abi(const Vec& abi_vec)
@@ -120,14 +117,10 @@ struct abi_serializer {
static constexpr size_t max_recursion_depth = 32; // arbitrary depth to prevent infinite recursion
// create standard yield function that checks for max_serialization_time and max_recursion_depth.
// now() deadline caputered at time of this call
// restricts serialization time from creation of yield function until serialization is complete.
// now() deadline captured at time of this call
static yield_function_t create_yield_function(const fc::microseconds& max_serialization_time) {
fc::time_point deadline = fc::time_point::now();
if( max_serialization_time > fc::microseconds::maximum() - deadline.time_since_epoch() ) {
deadline = fc::time_point::maximum();
} else {
deadline += max_serialization_time;
}
fc::time_point deadline = fc::time_point::now().safe_add(max_serialization_time);
return [max_serialization_time, deadline](size_t recursion_depth) {
EOS_ASSERT( recursion_depth < max_recursion_depth, abi_recursion_depth_exception,
"recursive definition, max_recursion_depth ${r} ", ("r", max_recursion_depth) );
@@ -137,6 +130,13 @@ struct abi_serializer {
};
}
static yield_function_t create_depth_yield_function() {
return [](size_t recursion_depth) {
EOS_ASSERT( recursion_depth < max_recursion_depth, abi_recursion_depth_exception,
"recursive definition, max_recursion_depth ${r} ", ("r", max_recursion_depth) );
};
}
private:
map<type_name, type_name, std::less<>> typedefs;
@@ -172,8 +172,9 @@ private:
namespace impl {
const static size_t hex_log_max_size = 64;
struct abi_traverse_context {
explicit abi_traverse_context( abi_serializer::yield_function_t yield )
abi_traverse_context( abi_serializer::yield_function_t yield, fc::microseconds max_action_data_serialization )
: yield(std::move( yield ))
, max_action_serialization_time(max_action_data_serialization)
{
}
@@ -187,7 +188,9 @@ namespace impl {
protected:
abi_serializer::yield_function_t yield;
size_t recursion_depth = 0;
// if set then restricts each individual action data serialization
fc::microseconds max_action_serialization_time;
size_t recursion_depth = 1;
bool log = false;
};
@@ -226,8 +229,8 @@ namespace impl {
using path_item = std::variant<empty_path_item, array_index_path_item, field_path_item, variant_path_item>;
struct abi_traverse_context_with_path : public abi_traverse_context {
abi_traverse_context_with_path( const abi_serializer& abis, abi_serializer::yield_function_t yield, const std::string_view& type )
: abi_traverse_context( std::move( yield ) ), abis(abis)
abi_traverse_context_with_path( const abi_serializer& abis, abi_serializer::yield_function_t yield, fc::microseconds max_action_data_serialization_time, const std::string_view& type )
: abi_traverse_context( std::move( yield ), max_action_data_serialization_time ), abis(abis)
{
set_path_root(type);
}
@@ -263,6 +266,22 @@ namespace impl {
using abi_traverse_context_with_path::abi_traverse_context_with_path;
};
struct action_data_to_variant_context : public binary_to_variant_context {
action_data_to_variant_context( const abi_serializer& abis, const abi_traverse_context& ctx, const std::string_view& type )
: binary_to_variant_context(abis, ctx, type)
{
short_path = true; // Just to be safe while avoiding the complexity of threading an override boolean all over the place
if (max_action_serialization_time.count() > 0) {
fc::time_point deadline = fc::time_point::now().safe_add(max_action_serialization_time);
yield = [deadline, y=yield, max=max_action_serialization_time](size_t depth) {
y(depth); // call provided yield that might include an overall time limit or not
EOS_ASSERT( fc::time_point::now() < deadline, abi_serialization_deadline_exception,
"serialization action data time limit ${t}us exceeded", ("t", max) );
};
}
}
};
struct variant_to_binary_context : public abi_traverse_context_with_path {
using abi_traverse_context_with_path::abi_traverse_context_with_path;
@@ -335,7 +354,7 @@ namespace impl {
* and can be degraded to the normal ::to_variant(...) processing
*/
template<typename M, typename Resolver, not_require_abi_t<M> = 1>
static void add( mutable_variant_object &mvo, const char* name, const M& v, Resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &mvo, const char* name, const M& v, const Resolver&, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
mvo(name,v);
@@ -346,14 +365,14 @@ namespace impl {
* for these types we create new ABI aware visitors
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void add( mutable_variant_object &mvo, const char* name, const M& v, Resolver resolver, abi_traverse_context& ctx );
static void add( mutable_variant_object &mvo, const char* name, const M& v, const Resolver& resolver, abi_traverse_context& ctx );
/**
* template which overloads add for vectors of types which contain ABI information in their trees
* for these members we call ::add in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void add( mutable_variant_object &mvo, const char* name, const vector<M>& v, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &mvo, const char* name, const vector<M>& v, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
vector<fc::variant> array;
@@ -372,7 +391,7 @@ namespace impl {
* for these members we call ::add in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void add( mutable_variant_object &mvo, const char* name, const deque<M>& v, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &mvo, const char* name, const deque<M>& v, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
deque<fc::variant> array;
@@ -389,7 +408,7 @@ namespace impl {
* for these members we call ::add in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void add( mutable_variant_object &mvo, const char* name, const std::shared_ptr<M>& v, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &mvo, const char* name, const std::shared_ptr<M>& v, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
if( !v ) return;
@@ -402,10 +421,10 @@ namespace impl {
struct add_static_variant
{
mutable_variant_object& obj_mvo;
Resolver& resolver;
const Resolver& resolver;
abi_traverse_context& ctx;
add_static_variant( mutable_variant_object& o, Resolver& r, abi_traverse_context& ctx )
add_static_variant( mutable_variant_object& o, const Resolver& r, abi_traverse_context& ctx )
:obj_mvo(o), resolver(r), ctx(ctx) {}
typedef void result_type;
@@ -416,7 +435,7 @@ namespace impl {
};
template<typename Resolver, typename... Args>
static void add( mutable_variant_object &mvo, const char* name, const std::variant<Args...>& v, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &mvo, const char* name, const std::variant<Args...>& v, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
mutable_variant_object obj_mvo;
@@ -426,7 +445,7 @@ namespace impl {
}
template<typename Resolver>
static bool add_special_logging( mutable_variant_object& mvo, const char* name, const action& act, Resolver& resolver, abi_traverse_context& ctx ) {
static bool add_special_logging( mutable_variant_object& mvo, const char* name, const action& act, const Resolver& resolver, abi_traverse_context& ctx ) {
if( !ctx.is_logging() ) return false;
try {
@@ -455,7 +474,7 @@ namespace impl {
* @return
*/
template<typename Resolver>
static void add( mutable_variant_object &out, const char* name, const action& act, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &out, const char* name, const action& act, const Resolver& resolver, abi_traverse_context& ctx )
{
static_assert(fc::reflector<action>::total_member_count == 4);
auto h = ctx.enter_scope();
@@ -485,16 +504,16 @@ namespace impl {
};
try {
auto abi = resolver(act.account);
if (abi) {
auto type = abi->get_action_type(act.name);
auto abi_optional = resolver(act.account);
if (abi_optional) {
const abi_serializer& abi = *abi_optional;
auto type = abi.get_action_type(act.name);
if (!type.empty()) {
try {
binary_to_variant_context _ctx(*abi, ctx, type);
_ctx.short_path = true; // Just to be safe while avoiding the complexity of threading an override boolean all over the place
mvo( "data", abi->_binary_to_variant( type, act.data, _ctx ));
action_data_to_variant_context _ctx(abi, ctx, type);
mvo( "data", abi._binary_to_variant( type, act.data, _ctx ));
} catch(...) {
// any failure to serialize data, then leave as not serailzed
// any failure to serialize data, then leave as not serialized
set_hex_data(mvo, "data", act.data);
}
} else {
@@ -520,7 +539,7 @@ namespace impl {
* @return
*/
template<typename Resolver>
static void add( mutable_variant_object& out, const char* name, const action_trace& act_trace, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object& out, const char* name, const action_trace& act_trace, const Resolver& resolver, abi_traverse_context& ctx )
{
static_assert(fc::reflector<action_trace>::total_member_count == 17);
auto h = ctx.enter_scope();
@@ -546,13 +565,13 @@ namespace impl {
mvo("return_value_hex_data", act_trace.return_value);
auto act = act_trace.act;
try {
auto abi = resolver(act.account);
if (abi) {
auto type = abi->get_action_result_type(act.name);
auto abi_optional = resolver(act.account);
if (abi_optional) {
const abi_serializer& abi = *abi_optional;
auto type = abi.get_action_result_type(act.name);
if (!type.empty()) {
binary_to_variant_context _ctx(*abi, ctx, type);
_ctx.short_path = true; // Just to be safe while avoiding the complexity of threading an override boolean all over the place
mvo( "return_value_data", abi->_binary_to_variant( type, act_trace.return_value, _ctx ));
action_data_to_variant_context _ctx(abi, ctx, type);
mvo( "return_value_data", abi._binary_to_variant( type, act_trace.return_value, _ctx ));
}
}
} catch(...) {}
@@ -569,7 +588,7 @@ namespace impl {
* @return
*/
template<typename Resolver>
static void add( mutable_variant_object &out, const char* name, const packed_transaction& ptrx, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &out, const char* name, const packed_transaction& ptrx, const Resolver& resolver, abi_traverse_context& ctx )
{
static_assert(fc::reflector<packed_transaction>::total_member_count == 4);
auto h = ctx.enter_scope();
@@ -593,7 +612,7 @@ namespace impl {
* This matches the FC_REFLECT for this type, but this is provided to allow extracting the contents of trx.transaction_extensions
*/
template<typename Resolver>
static void add( mutable_variant_object &out, const char* name, const transaction& trx, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &out, const char* name, const transaction& trx, const Resolver& resolver, abi_traverse_context& ctx )
{
static_assert(fc::reflector<transaction>::total_member_count == 9);
auto h = ctx.enter_scope();
@@ -624,7 +643,7 @@ namespace impl {
* block.header_extensions and block.block_extensions
*/
template<typename Resolver>
static void add( mutable_variant_object &out, const char* name, const signed_block& block, Resolver resolver, abi_traverse_context& ctx )
static void add( mutable_variant_object &out, const char* name, const signed_block& block, const Resolver& resolver, abi_traverse_context& ctx )
{
static_assert(fc::reflector<signed_block>::total_member_count == 12);
auto h = ctx.enter_scope();
@@ -648,7 +667,7 @@ namespace impl {
for (auto feature : new_protocol_features) {
mutable_variant_object feature_mvo;
add(feature_mvo, "feature_digest", feature, resolver, ctx);
pf_array.push_back(feature_mvo);
pf_array.push_back(std::move(feature_mvo));
}
mvo("new_protocol_features", pf_array);
}
@@ -678,13 +697,13 @@ namespace impl {
* this will degrade to the common fc::to_variant as soon as the type no longer contains
* ABI related info
*
* @tparam Reslover - callable with the signature (const name& code_account) -> std::optional<abi_def>
* @tparam Resolver - callable with the signature (const name& code_account) -> std::optional<abi_def>
*/
template<typename T, typename Resolver>
class abi_to_variant_visitor
{
public:
abi_to_variant_visitor( mutable_variant_object& _mvo, const T& _val, Resolver _resolver, abi_traverse_context& _ctx )
abi_to_variant_visitor( mutable_variant_object& _mvo, const T& _val, const Resolver& _resolver, abi_traverse_context& _ctx )
:_vo(_mvo)
,_val(_val)
,_resolver(_resolver)
@@ -707,7 +726,7 @@ namespace impl {
private:
mutable_variant_object& _vo;
const T& _val;
Resolver _resolver;
const Resolver& _resolver;
abi_traverse_context& _ctx;
};
@@ -717,7 +736,7 @@ namespace impl {
* and can be degraded to the normal ::from_variant(...) processing
*/
template<typename M, typename Resolver, not_require_abi_t<M> = 1>
static void extract( const fc::variant& v, M& o, Resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, M& o, const Resolver&, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
from_variant(v, o);
@@ -728,14 +747,14 @@ namespace impl {
* for these types we create new ABI aware visitors
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void extract( const fc::variant& v, M& o, Resolver resolver, abi_traverse_context& ctx );
static void extract( const fc::variant& v, M& o, const Resolver& resolver, abi_traverse_context& ctx );
/**
* template which overloads extract for vectors of types which contain ABI information in their trees
* for these members we call ::extract in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void extract( const fc::variant& v, vector<M>& o, Resolver resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, vector<M>& o, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variants& array = v.get_array();
@@ -753,7 +772,7 @@ namespace impl {
* for these members we call ::extract in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void extract( const fc::variant& v, deque<M>& o, Resolver resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, deque<M>& o, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variants& array = v.get_array();
@@ -771,7 +790,7 @@ namespace impl {
* for these members we call ::extract in order to trigger further processing
*/
template<typename M, typename Resolver, require_abi_t<M> = 1>
static void extract( const fc::variant& v, std::shared_ptr<M>& o, Resolver resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, std::shared_ptr<M>& o, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variant_object& vo = v.get_object();
@@ -786,7 +805,7 @@ namespace impl {
* exploded and processed explicitly
*/
template<typename Resolver>
static void extract( const fc::variant& v, action& act, Resolver resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, action& act, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variant_object& vo = v.get_object();
@@ -806,13 +825,14 @@ namespace impl {
from_variant(data, act.data);
valid_empty_data = act.data.empty();
} else if ( data.is_object() ) {
auto abi = resolver(act.account);
if (abi) {
auto type = abi->get_action_type(act.name);
auto abi_optional = resolver(act.account);
if (abi_optional) {
const abi_serializer& abi = *abi_optional;
auto type = abi.get_action_type(act.name);
if (!type.empty()) {
variant_to_binary_context _ctx(*abi, ctx, type);
variant_to_binary_context _ctx(abi, ctx, type);
_ctx.short_path = true; // Just to be safe while avoiding the complexity of threading an override boolean all over the place
act.data = std::move( abi->_variant_to_binary( type, data, _ctx ));
act.data = abi._variant_to_binary( type, data, _ctx );
valid_empty_data = act.data.empty();
}
}
@@ -833,7 +853,7 @@ namespace impl {
}
template<typename Resolver>
static void extract( const fc::variant& v, packed_transaction& ptrx, Resolver resolver, abi_traverse_context& ctx )
static void extract( const fc::variant& v, packed_transaction& ptrx, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variant_object& vo = v.get_object();
@@ -890,7 +910,7 @@ namespace impl {
class abi_from_variant_visitor : public reflector_init_visitor<T>
{
public:
abi_from_variant_visitor( const variant_object& _vo, T& v, Resolver _resolver, abi_traverse_context& _ctx )
abi_from_variant_visitor( const variant_object& _vo, T& v, const Resolver& _resolver, abi_traverse_context& _ctx )
: reflector_init_visitor<T>(v)
,_vo(_vo)
,_resolver(_resolver)
@@ -914,12 +934,12 @@ namespace impl {
private:
const variant_object& _vo;
Resolver _resolver;
const Resolver& _resolver;
abi_traverse_context& _ctx;
};
template<typename M, typename Resolver, require_abi_t<M>>
void abi_to_variant::add( mutable_variant_object &mvo, const char* name, const M& v, Resolver resolver, abi_traverse_context& ctx )
void abi_to_variant::add( mutable_variant_object &mvo, const char* name, const M& v, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
mutable_variant_object member_mvo;
@@ -928,7 +948,7 @@ namespace impl {
}
template<typename M, typename Resolver, require_abi_t<M>>
void abi_from_variant::extract( const fc::variant& v, M& o, Resolver resolver, abi_traverse_context& ctx )
void abi_from_variant::extract( const fc::variant& v, M& o, const Resolver& resolver, abi_traverse_context& ctx )
{
auto h = ctx.enter_scope();
const variant_object& vo = v.get_object();
@@ -937,38 +957,158 @@ namespace impl {
} /// namespace eosio::chain::impl
template<typename T, typename Resolver>
void abi_serializer::to_variant( const T& o, fc::variant& vo, Resolver resolver, const yield_function_t& yield ) try {
void abi_serializer::to_variant( const T& o, fc::variant& vo, const Resolver& resolver, const yield_function_t& yield ) try {
mutable_variant_object mvo;
impl::abi_traverse_context ctx( yield );
impl::abi_traverse_context ctx( yield, fc::microseconds{} );
impl::abi_to_variant::add(mvo, "_", o, resolver, ctx);
vo = std::move(mvo["_"]);
} FC_RETHROW_EXCEPTIONS(error, "Failed to serialize: ${type}", ("type", boost::core::demangle( typeid(o).name() ) ))
template<typename T, typename Resolver>
void abi_serializer::to_variant( const T& o, fc::variant& vo, Resolver resolver, const fc::microseconds& max_serialization_time ) {
to_variant( o, vo, resolver, create_yield_function(max_serialization_time) );
}
void abi_serializer::to_variant( const T& o, fc::variant& vo, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time ) try {
mutable_variant_object mvo;
impl::abi_traverse_context ctx( create_depth_yield_function(), max_action_data_serialization_time );
impl::abi_to_variant::add(mvo, "_", o, resolver, ctx);
vo = std::move(mvo["_"]);
} FC_RETHROW_EXCEPTIONS(error, "Failed to serialize: ${type}", ("type", boost::core::demangle( typeid(o).name() ) ))
template<typename T, typename Resolver>
void abi_serializer::to_log_variant( const T& o, fc::variant& vo, Resolver resolver, const yield_function_t& yield ) try {
void abi_serializer::to_log_variant( const T& o, fc::variant& vo, const Resolver& resolver, const yield_function_t& yield ) try {
mutable_variant_object mvo;
impl::abi_traverse_context ctx( yield );
impl::abi_traverse_context ctx( yield, fc::microseconds{} );
ctx.logging();
impl::abi_to_variant::add(mvo, "_", o, resolver, ctx);
vo = std::move(mvo["_"]);
} FC_RETHROW_EXCEPTIONS(error, "Failed to serialize: ${type}", ("type", boost::core::demangle( typeid(o).name() ) ))
template<typename T, typename Resolver>
void abi_serializer::to_log_variant( const T& o, fc::variant& vo, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time ) try {
mutable_variant_object mvo;
impl::abi_traverse_context ctx( create_depth_yield_function(), max_action_data_serialization_time );
ctx.logging();
impl::abi_to_variant::add(mvo, "_", o, resolver, ctx);
vo = std::move(mvo["_"]);
} FC_RETHROW_EXCEPTIONS(error, "Failed to serialize: ${type}", ("type", boost::core::demangle( typeid(o).name() ) ))
template<typename T, typename Resolver>
void abi_serializer::from_variant( const fc::variant& v, T& o, Resolver resolver, const yield_function_t& yield ) try {
impl::abi_traverse_context ctx( yield );
void abi_serializer::from_variant( const fc::variant& v, T& o, const Resolver& resolver, const yield_function_t& yield ) try {
impl::abi_traverse_context ctx( yield, fc::microseconds{} );
impl::abi_from_variant::extract(v, o, resolver, ctx);
} FC_RETHROW_EXCEPTIONS(error, "Failed to deserialize variant", ("variant",v))
template<typename T, typename Resolver>
void abi_serializer::from_variant( const fc::variant& v, T& o, Resolver resolver, const fc::microseconds& max_serialization_time ) {
from_variant( v, o, resolver, create_yield_function(max_serialization_time) );
}
void abi_serializer::from_variant( const fc::variant& v, T& o, const Resolver& resolver, const fc::microseconds& max_action_data_serialization_time ) try {
impl::abi_traverse_context ctx( create_depth_yield_function(), max_action_data_serialization_time );
impl::abi_from_variant::extract(v, o, resolver, ctx);
} FC_RETHROW_EXCEPTIONS(error, "Failed to deserialize variant", ("variant",v))
using abi_serializer_cache_t = std::unordered_map<account_name, std::optional<abi_serializer>>;
using resolver_fn_t = std::function<std::optional<abi_serializer>(const account_name& name)>;
class abi_resolver {
public:
explicit abi_resolver(abi_serializer_cache_t&& abi_serializers) :
abi_serializers(std::move(abi_serializers))
{}
} } // eosio::chain
std::optional<std::reference_wrapper<const abi_serializer>> operator()(const account_name& account) const {
auto it = abi_serializers.find(account);
if (it != abi_serializers.end() && it->second)
return std::reference_wrapper<const abi_serializer>(*it->second);
return {};
};
private:
abi_serializer_cache_t abi_serializers;
};
class abi_serializer_cache_builder {
public:
explicit abi_serializer_cache_builder(resolver_fn_t resolver) :
resolver_(std::move(resolver))
{
}
abi_serializer_cache_builder(const abi_serializer_cache_builder&) = delete;
abi_serializer_cache_builder&& add_serializers(const chain::signed_block_ptr& block) && {
for( const auto& receipt: block->transactions ) {
if( std::holds_alternative<chain::packed_transaction>( receipt.trx ) ) {
const auto& pt = std::get<chain::packed_transaction>( receipt.trx );
const auto& t = pt.get_transaction();
for( const auto& a: t.actions )
add_to_cache( a );
for( const auto& a: t.context_free_actions )
add_to_cache( a );
}
}
return std::move(*this);
}
abi_serializer_cache_builder&& add_serializers(const transaction_trace_ptr& trace_ptr) && {
for( const auto& trace: trace_ptr->action_traces ) {
add_to_cache(trace.act);
}
return std::move(*this);
}
abi_serializer_cache_t&& get() && {
return std::move(abi_serializers);
}
private:
void add_to_cache(const chain::action& a) {
auto it = abi_serializers.find( a.account );
if( it == abi_serializers.end() ) {
try {
abi_serializers.emplace_hint( it, a.account, resolver_( a.account ) );
} catch( ... ) {
// keep behavior of not throwing on invalid abi, will result in hex data
}
}
}
resolver_fn_t resolver_;
abi_serializer_cache_t abi_serializers;
};
/*
* This is equivalent to a resolver, except that everytime the abi_serializer for an account
* is retrieved, it is stored in an unordered_map, so we won't waste time retrieving it again.
* This is handy when parsing packed_transactions received in a fc::variant.
*/
class caching_resolver {
public:
explicit caching_resolver(resolver_fn_t resolver) :
resolver_(std::move(resolver))
{
}
// make it non-copiable (we should only move it for performance reasons)
caching_resolver(const caching_resolver&) = delete;
caching_resolver& operator=(const caching_resolver&) = delete;
std::optional<std::reference_wrapper<const abi_serializer>> operator()(const account_name& account) const {
auto it = abi_serializers.find(account);
if (it != abi_serializers.end()) {
if (it->second)
return *it->second;
return {};
}
auto serializer = resolver_(account);
auto& dest = abi_serializers[account]; // add entry regardless
if (serializer) {
// we got a serializer, so move it into the cache
dest = abi_serializer_cache_t::mapped_type{std::move(*serializer)};
return *dest; // and return a reference to it
}
return {};
};
private:
const resolver_fn_t resolver_;
mutable abi_serializer_cache_t abi_serializers;
};
} // eosio::chain
@@ -1,6 +1,7 @@
#pragma once
#include <eosio/chain/controller.hpp>
#include <eosio/chain/transaction.hpp>
#include <eosio/chain/transaction_context.hpp>
#include <eosio/chain/contract_table_objects.hpp>
#include <eosio/chain/deep_mind.hpp>
#include <fc/utility.hpp>
@@ -13,7 +14,6 @@ namespace chainbase { class database; }
namespace eosio { namespace chain {
class controller;
class transaction_context;
class apply_context {
private:
@@ -177,6 +177,7 @@ class apply_context {
int store( uint64_t scope, uint64_t table, const account_name& payer,
uint64_t id, secondary_key_proxy_const_type value )
{
EOS_ASSERT( !context.trx_context.is_read_only(), table_operation_not_permitted, "cannot store a db record when executing a readonly transaction" );
EOS_ASSERT( payer != account_name(), invalid_table_payer, "must specify a valid account to pay for new record" );
// context.require_write_lock( scope );
@@ -193,7 +194,7 @@ class apply_context {
context.db.modify( tab, [&]( auto& t ) {
++t.count;
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${code}:${scope}:${table}:${index_name}",
("code", t.code)
("scope", t.scope)
@@ -211,12 +212,13 @@ class apply_context {
}
void remove( int iterator ) {
EOS_ASSERT( !context.trx_context.is_read_only(), table_operation_not_permitted, "cannot remove a db record when executing a readonly transaction" );
const auto& obj = itr_cache.get( iterator );
const auto& table_obj = itr_cache.get_table( obj.t_id );
EOS_ASSERT( table_obj.code == context.receiver, table_access_violation, "db access violation" );
if (auto dm_logger = context.control.get_deep_mind_logger()) {
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient())) {
std::string event_id = RAM_EVENT_ID("${code}:${scope}:${table}:${index_name}",
("code", table_obj.code)
("scope", table_obj.scope)
@@ -243,6 +245,7 @@ class apply_context {
}
void update( int iterator, account_name payer, secondary_key_proxy_const_type secondary ) {
EOS_ASSERT( !context.trx_context.is_read_only(), table_operation_not_permitted, "cannot update a db record when executing a readonly transaction" );
const auto& obj = itr_cache.get( iterator );
const auto& table_obj = itr_cache.get_table( obj.t_id );
@@ -255,7 +258,7 @@ class apply_context {
int64_t billing_size = config::billable_size_v<ObjectType>;
std::string event_id;
if (context.control.get_deep_mind_logger() != nullptr) {
if (context.control.get_deep_mind_logger(context.trx_context.is_transient()) != nullptr) {
event_id = RAM_EVENT_ID("${code}:${scope}:${table}:${index_name}",
("code", table_obj.code)
("scope", table_obj.scope)
@@ -265,12 +268,12 @@ class apply_context {
}
if( obj.payer != payer ) {
if (auto dm_logger = context.control.get_deep_mind_logger())
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient()))
{
dm_logger->on_ram_trace(std::string(event_id), "secondary_index", "remove", "secondary_index_remove");
}
context.update_db_usage( obj.payer, -(billing_size) );
if (auto dm_logger = context.control.get_deep_mind_logger())
if (auto dm_logger = context.control.get_deep_mind_logger(context.trx_context.is_transient()))
{
dm_logger->on_ram_trace(std::move(event_id), "secondary_index", "add", "secondary_index_update_add_new_payer");
}
@@ -595,6 +598,9 @@ class apply_context {
action_name get_sender() const;
bool is_applying_block() const { return trx_context.explicit_billed_cpu_time; }
bool should_use_eos_vm_oc()const;
/// Fields:
public:
@@ -188,7 +188,7 @@ struct authority {
}
authority( uint32_t t, vector<key_weight> k, vector<permission_level_weight> p = {}, vector<wait_weight> w = {} )
:threshold(t),keys(move(k)),accounts(move(p)),waits(move(w)){}
:threshold(t),keys(std::move(k)),accounts(std::move(p)),waits(std::move(w)){}
authority(){}
uint32_t threshold = 0;
@@ -31,6 +31,7 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
const authority& auth,
bool is_trx_transient,
time_point initial_creation_time = time_point()
);
@@ -38,12 +39,13 @@ namespace eosio { namespace chain {
permission_name name,
permission_id_type parent,
authority&& auth,
bool is_trx_transient,
time_point initial_creation_time = time_point()
);
void modify_permission( const permission_object& permission, const authority& auth );
void modify_permission( const permission_object& permission, const authority& auth, bool is_trx_transient );
void remove_permission( const permission_object& permission );
void remove_permission( const permission_object& permission, bool is_trx_transient );
void update_permission_usage( const permission_object& permission );
@@ -2,10 +2,11 @@
#include <fc/filesystem.hpp>
#include <eosio/chain/block.hpp>
#include <eosio/chain/genesis_state.hpp>
#include <eosio/chain/block_log_config.hpp>
namespace eosio { namespace chain {
namespace detail { class block_log_impl; }
namespace detail { struct block_log_impl; }
/* The block log is an external append only log of the blocks with a header. Blocks should only
* be written to the log after they irreverisble as the log is append only. The log is a doubly
@@ -34,18 +35,15 @@ namespace eosio { namespace chain {
* An optional "pruned" mode can be activated which stores a 4 byte trailer on the log file indicating
* how many blocks at the end of the log are valid. Any earlier blocks in the log are assumed destroyed
* and unreadable due to reclamation for purposes of saving space.
*
* Object thread-safe. Not safe to have multiple block_log objects to same data_dir.
*/
struct block_log_prune_config {
uint32_t prune_blocks; //number of blocks to prune to when doing a prune
size_t prune_threshold = 4*1024*1024; //(approximately) how many bytes need to be added before a prune is performed
std::optional<size_t> vacuum_on_close; //when set, a vacuum is performed on dtor if log contains less than this many live bytes
};
class block_log {
public:
block_log(const fc::path& data_dir, std::optional<block_log_prune_config> prune_config);
block_log(block_log&& other);
explicit block_log(const std::filesystem::path& data_dir, const block_log_config& config = block_log_config{});
block_log(block_log&& other) noexcept;
~block_log();
void append(const signed_block_ptr& b, const block_id_type& id);
@@ -54,12 +52,11 @@ namespace eosio { namespace chain {
void flush();
void reset( const genesis_state& gs, const signed_block_ptr& genesis_block );
void reset( const chain_id_type& chain_id, uint32_t first_block_num );
void remove(); // remove blocks.log and blocks.index
signed_block_ptr read_block(uint64_t file_pos)const;
void read_block_header(block_header& bh, uint64_t file_pos)const;
signed_block_ptr read_block_by_num(uint32_t block_num)const;
std::optional<signed_block_header> read_block_header_by_num(uint32_t block_num)const;
block_id_type read_block_id_by_num(uint32_t block_num)const;
signed_block_ptr read_block_by_id(const block_id_type& id)const {
return read_block_by_num(block_header::num_from_id(id));
}
@@ -67,10 +64,11 @@ namespace eosio { namespace chain {
/**
* Return offset of block in file, or block_log::npos if it does not exist.
*/
uint64_t get_block_pos(uint32_t block_num) const;
signed_block_ptr read_head()const;
const signed_block_ptr& head()const;
const block_id_type& head_id()const;
signed_block_ptr read_head()const; //use blocklog
signed_block_ptr head()const;
std::optional<block_id_type> head_id()const;
uint32_t first_block_num() const;
static const uint64_t npos = std::numeric_limits<uint64_t>::max();
@@ -78,13 +76,25 @@ namespace eosio { namespace chain {
static const uint32_t min_supported_version;
static const uint32_t max_supported_version;
static fc::path repair_log( const fc::path& data_dir, uint32_t truncate_at_block = 0, const char* reversible_block_dir_name="" );
/**
* All static methods expected to be called on quiescent block log
*/
static std::optional<genesis_state> extract_genesis_state( const fc::path& data_dir );
static std::filesystem::path repair_log( const std::filesystem::path& data_dir, uint32_t truncate_at_block = 0, const char* reversible_block_dir_name="" );
static chain_id_type extract_chain_id( const fc::path& data_dir );
using chain_context = std::variant<genesis_state, chain_id_type>;
static std::optional<chain_context> extract_chain_context(const std::filesystem::path& data_dir,
const std::filesystem::path& retained_dir);
static void construct_index(const fc::path& block_file_name, const fc::path& index_file_name);
static std::optional<genesis_state>
extract_genesis_state(const std::filesystem::path& data_dir,
const std::filesystem::path& retained_dir = std::filesystem::path{});
static std::optional<chain_id_type>
extract_chain_id(const std::filesystem::path& data_dir,
const std::filesystem::path& retained_dir = std::filesystem::path{});
static void construct_index(const std::filesystem::path& block_file_name, const std::filesystem::path& index_file_name);
static bool contains_genesis_state(uint32_t version, uint32_t first_block_num);
@@ -92,39 +102,26 @@ namespace eosio { namespace chain {
static bool is_supported_version(uint32_t version);
static bool is_pruned_log(const fc::path& data_dir);
static bool is_pruned_log(const std::filesystem::path& data_dir);
static bool extract_block_range(const fc::path& block_dir, const fc::path&output_dir, block_num_type& start, block_num_type& end, bool rename_input=false);
static void extract_block_range(const std::filesystem::path& block_dir, const std::filesystem::path&output_dir, block_num_type start, block_num_type end);
static bool trim_blocklog_front(const std::filesystem::path& block_dir, const std::filesystem::path& temp_dir, uint32_t truncate_at_block);
static int trim_blocklog_end(const std::filesystem::path& block_dir, uint32_t n);
// used for unit test to generate older version blocklog
static void set_initial_version(uint32_t);
uint32_t version() const;
uint64_t get_block_pos(uint32_t block_num) const;
/**
* @param n Only test 1 block out of every n blocks. If n is 0, the interval is adjusted so that at most 8 blocks are tested.
*/
static void smoke_test(const std::filesystem::path& block_dir, uint32_t n);
static void split_blocklog(const std::filesystem::path& block_dir, const std::filesystem::path& dest_dir, uint32_t stride);
static void merge_blocklogs(const std::filesystem::path& block_dir, const std::filesystem::path& dest_dir);
private:
void open(const fc::path& data_dir);
void construct_index();
std::unique_ptr<detail::block_log_impl> my;
};
//to derive blknum_offset==14 see block_header.hpp and note on disk struct is packed
// block_timestamp_type timestamp; //bytes 0:3
// account_name producer; //bytes 4:11
// uint16_t confirmed; //bytes 12:13
// block_id_type previous; //bytes 14:45, low 4 bytes is big endian block number of previous block
struct trim_data { //used by trim_blocklog_front(), trim_blocklog_end(), and smoke_test()
trim_data(fc::path block_dir);
~trim_data();
uint64_t block_index(uint32_t n) const;
uint64_t block_pos(uint32_t n);
fc::path block_file_name, index_file_name; //full pathname for blocks.log and blocks.index
uint32_t version = 0; //blocklog version
uint32_t first_block = 0; //first block in blocks.log
uint32_t last_block = 0; //last block in blocks.log
FILE* blk_in = nullptr; //C style files for reading blocks.log and blocks.index
FILE* ind_in = nullptr; //C style files for reading blocks.log and blocks.index
//we use low level file IO because it is distinctly faster than C++ filebuf or iostream
uint64_t first_block_pos = 0; //file position in blocks.log for the first block in the log
genesis_state gs;
chain_id_type chain_id;
static constexpr int blknum_offset{14}; //offset from start of block to 4 byte block number, valid for the only allowed versions
};
} }
@@ -0,0 +1,29 @@
#pragma once
#include <variant>
namespace eosio { namespace chain {
struct basic_blocklog_config {};
struct empty_blocklog_config {};
struct partitioned_blocklog_config {
std::filesystem::path retained_dir;
std::filesystem::path archive_dir;
uint32_t stride = UINT32_MAX;
uint32_t max_retained_files = UINT32_MAX;
};
struct prune_blocklog_config {
uint32_t prune_blocks; // number of blocks to prune to when doing a prune
size_t prune_threshold =
4 * 1024 * 1024; //(approximately) how many bytes need to be added before a prune is performed
std::optional<size_t>
vacuum_on_close; // when set, a vacuum is performed on dtor if log contains less than this many live bytes
};
using block_log_config =
std::variant<basic_blocklog_config, empty_blocklog_config, partitioned_blocklog_config, prune_blocklog_config>;
}} // namespace eosio::chain
@@ -37,6 +37,10 @@ namespace chain {
void reflector_init()const;
static chain_id_type empty_chain_id() {
return {};
}
private:
chain_id_type() = default;
@@ -76,7 +76,7 @@ const static uint32_t default_max_inline_action_size = 512 * 102
const static uint16_t default_max_inline_action_depth = 4;
const static uint16_t default_max_auth_depth = 6;
const static uint32_t default_sig_cpu_bill_pct = 50 * percent_1; // billable percentage of signature recovery
const static uint32_t default_block_cpu_effort_pct = 80 * percent_1; // percentage of block time used for producing block
const static uint32_t default_block_cpu_effort_pct = 90 * percent_1; // percentage of block time used for producing block
const static uint16_t default_controller_thread_pool_size = 2;
const static uint32_t default_max_variable_signature_length = 16384u;
const static uint32_t default_max_nonprivileged_inline_action_size = 4 * 1024; // 4 KB
@@ -39,6 +39,7 @@ namespace eosio { namespace chain {
class permission_object;
class account_object;
class deep_mind_handler;
class subjective_billing;
using resource_limits::resource_limits_manager;
using apply_handler = std::function<void(apply_context&)>;
using forked_branch_callback = std::function<void(const branch_type&)>;
@@ -48,10 +49,9 @@ namespace eosio { namespace chain {
class fork_database;
enum class db_read_mode {
SPECULATIVE,
HEAD,
READ_ONLY,
IRREVERSIBLE
IRREVERSIBLE,
SPECULATIVE
};
enum class validation_mode {
@@ -70,7 +70,7 @@ namespace eosio { namespace chain {
flat_set< pair<account_name, action_name> > action_blacklist;
flat_set<public_key_type> key_blacklist;
path blocks_dir = chain::config::default_blocks_dir_name;
std::optional<block_log_prune_config> prune_config;
block_log_config blog;
path state_dir = chain::config::default_state_dir_name;
uint64_t state_size = chain::config::default_state_size;
uint64_t state_guard_size = chain::config::default_state_guard_size;
@@ -84,15 +84,15 @@ namespace eosio { namespace chain {
bool allow_ram_billing_in_notify = false;
uint32_t maximum_variable_signature_length = chain::config::default_max_variable_signature_length;
bool disable_all_subjective_mitigations = false; //< for developer & testing purposes, can be configured using `disable-all-subjective-mitigations` when `EOSIO_DEVELOPER` build option is provided
uint32_t terminate_at_block = 0; //< primarily for testing purposes
uint32_t terminate_at_block = 0;
bool integrity_hash_on_start= false;
bool integrity_hash_on_stop = false;
wasm_interface::vm_type wasm_runtime = chain::config::default_wasm_runtime;
eosvmoc::config eosvmoc_config;
bool eosvmoc_tierup = false;
wasm_interface::vm_oc_enable eosvmoc_tierup = wasm_interface::vm_oc_enable::oc_auto;
db_read_mode read_mode = db_read_mode::SPECULATIVE;
db_read_mode read_mode = db_read_mode::HEAD;
validation_mode block_validation_mode = validation_mode::FULL;
pinnable_mapped_file::map_mode db_map_mode = pinnable_mapped_file::map_mode::mapped;
@@ -108,7 +108,8 @@ namespace eosio { namespace chain {
irreversible = 0, ///< this block has already been applied before by this node and is considered irreversible
validated = 1, ///< this is a complete block signed by a valid producer and has been previously applied by this node and therefore validated but it is not yet irreversible
complete = 2, ///< this is a complete block signed by a valid producer but is not yet irreversible nor has it yet been applied by this node
incomplete = 3, ///< this is an incomplete block (either being produced by a producer or speculatively produced by a node)
incomplete = 3, ///< this is an incomplete block being produced by a producer
ephemeral = 4 ///< this is an incomplete block created for speculative execution of trxs, will always be aborted
};
controller( const config& cfg, const chain_id_type& chain_id );
@@ -120,27 +121,19 @@ namespace eosio { namespace chain {
void startup( std::function<void()> shutdown, std::function<bool()> check_shutdown, const genesis_state& genesis);
void startup( std::function<void()> shutdown, std::function<bool()> check_shutdown);
void preactivate_feature( const digest_type& feature_digest );
void preactivate_feature( const digest_type& feature_digest, bool is_trx_transient );
vector<digest_type> get_preactivated_protocol_features()const;
void validate_protocol_features( const vector<digest_type>& features_to_activate )const;
/**
* Starts a new pending block session upon which new transactions can
* be pushed.
*
* Will only activate protocol features that have been pre-activated.
*/
void start_block( block_timestamp_type time = block_timestamp_type(), uint16_t confirm_block_count = 0 );
/**
* Starts a new pending block session upon which new transactions can
* be pushed.
* Starts a new pending block session upon which new transactions can be pushed.
*/
void start_block( block_timestamp_type time,
uint16_t confirm_block_count,
const vector<digest_type>& new_protocol_feature_activations,
block_status bs,
const fc::time_point& deadline = fc::time_point::maximum() );
/**
@@ -175,16 +168,19 @@ namespace eosio { namespace chain {
void sign_block( const signer_callback_type& signer_callback );
void commit_block();
// thread-safe
std::future<block_state_ptr> create_block_state_future( const block_id_type& id, const signed_block_ptr& b );
// thread-safe
block_state_ptr create_block_state( const block_id_type& id, const signed_block_ptr& b ) const;
/**
* @param br returns statistics for block
* @param block_state_future provide from call to create_block_state_future
* @param bsp block to push
* @param cb calls cb with forked applied transactions for each forked block
* @param trx_lookup user provided lookup function for externally cached transaction_metadata
*/
void push_block( block_report& br,
std::future<block_state_ptr>& block_state_future,
const block_state_ptr& bsp,
const forked_branch_callback& cb,
const trx_meta_cache_lookup& trx_lookup );
@@ -202,6 +198,8 @@ namespace eosio { namespace chain {
const authorization_manager& get_authorization_manager()const;
authorization_manager& get_mutable_authorization_manager();
const protocol_feature_manager& get_protocol_feature_manager()const;
const subjective_billing& get_subjective_billing()const;
subjective_billing& get_mutable_subjective_billing();
uint32_t get_max_nonprivileged_inline_action_size()const;
const flat_set<account_name>& get_actor_whitelist() const;
@@ -227,15 +225,9 @@ namespace eosio { namespace chain {
uint32_t fork_db_head_block_num()const;
block_id_type fork_db_head_block_id()const;
time_point fork_db_head_block_time()const;
account_name fork_db_head_block_producer()const;
uint32_t fork_db_pending_head_block_num()const;
block_id_type fork_db_pending_head_block_id()const;
time_point fork_db_pending_head_block_time()const;
account_name fork_db_pending_head_block_producer()const;
time_point pending_block_time()const;
block_timestamp_type pending_block_timestamp()const;
account_name pending_block_producer()const;
const block_signing_authority& pending_block_signing_authority()const;
std::optional<block_id_type> pending_producer_block_id()const;
@@ -249,12 +241,19 @@ namespace eosio { namespace chain {
block_id_type last_irreversible_block_id() const;
time_point last_irreversible_block_time() const;
// thread-safe
signed_block_ptr fetch_block_by_number( uint32_t block_num )const;
signed_block_ptr fetch_block_by_id( block_id_type id )const;
// thread-safe
signed_block_ptr fetch_block_by_id( const block_id_type& id )const;
// thread-safe
std::optional<signed_block_header> fetch_block_header_by_number( uint32_t block_num )const;
// thread-safe
std::optional<signed_block_header> fetch_block_header_by_id( const block_id_type& id )const;
// return block_state from forkdb, thread-safe
block_state_ptr fetch_block_state_by_number( uint32_t block_num )const;
// return block_state from forkdb, thread-safe
block_state_ptr fetch_block_state_by_id( block_id_type id )const;
// thread-safe
block_id_type get_block_id_for_num( uint32_t block_num )const;
sha256 calculate_integrity_hash();
@@ -266,7 +265,7 @@ namespace eosio { namespace chain {
void check_action_list( account_name code, action_name action )const;
void check_key_list( const public_key_type& key )const;
bool is_building_block()const;
bool is_producing_block()const;
bool is_speculative_block()const;
bool is_ram_billing_in_notify_allowed()const;
@@ -316,13 +315,16 @@ namespace eosio { namespace chain {
void add_to_ram_correction( account_name account, uint64_t ram_bytes );
bool all_subjective_mitigations_disabled()const;
deep_mind_handler* get_deep_mind_logger() const;
deep_mind_handler* get_deep_mind_logger(bool is_trx_transient) const;
void enable_deep_mind( deep_mind_handler* logger );
uint32_t earliest_available_block_num() const;
#if defined(EOSIO_EOS_VM_RUNTIME_ENABLED) || defined(EOSIO_EOS_VM_JIT_RUNTIME_ENABLED)
vm::wasm_allocator& get_wasm_allocator();
#endif
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
bool is_eos_vm_oc_enabled() const;
#endif
static std::optional<uint64_t> convert_exception_to_error_code( const fc::exception& e );
@@ -348,27 +350,6 @@ namespace eosio { namespace chain {
const apply_handler* find_apply_handler( account_name contract, scope_name scope, action_name act )const;
wasm_interface& get_wasm_interface();
std::optional<abi_serializer> get_abi_serializer( account_name n, const abi_serializer::yield_function_t& yield )const {
if( n.good() ) {
try {
const auto& a = get_account( n );
abi_def abi;
if( abi_serializer::to_abi( a.abi, abi ))
return abi_serializer( abi, yield );
} FC_CAPTURE_AND_LOG((n))
}
return std::optional<abi_serializer>();
}
template<typename T>
fc::variant to_variant_with_abi( const T& obj, const abi_serializer::yield_function_t& yield )const {
fc::variant pretty_output;
abi_serializer::to_variant( obj, pretty_output,
[&]( account_name n ){ return get_abi_serializer( n, yield ); }, yield );
return pretty_output;
}
static chain_id_type extract_chain_id(snapshot_reader& snapshot);
static std::optional<chain_id_type> extract_chain_id_from_db( const path& state_dir );
@@ -376,6 +357,17 @@ namespace eosio { namespace chain {
void replace_producer_keys( const public_key_type& key );
void replace_account_keys( name account, name permission, const public_key_type& key );
void set_producer_node(bool is_producer_node);
bool is_producer_node()const;
void set_db_read_only_mode();
void unset_db_read_only_mode();
void init_thread_local_data();
void set_to_write_window();
void set_to_read_window();
bool is_write_window() const;
void code_block_num_last_used(const digest_type& code_hash, uint8_t vm_type, uint8_t vm_version, uint32_t block_num);
private:
friend class apply_context;
friend class transaction_context;
@@ -170,7 +170,7 @@ namespace fc {
inline
void from_variant( const variant& v, eosio::chain::shared_string& s ) {
string _s;
std::string _s;
from_variant(v, _s);
s = eosio::chain::shared_string(_s.begin(), _s.end(), s.get_allocator());
}
@@ -182,7 +182,7 @@ namespace fc {
inline
void from_variant( const variant& v, eosio::chain::shared_blob& b ) {
string _s = base64_decode(v.as_string());
std::string _s = base64_decode(v.as_string());
b = eosio::chain::shared_blob(_s.begin(), _s.end(), b.get_allocator());
}
@@ -87,6 +87,26 @@
NEXT(e.dynamic_copy_exception());\
}
/**
* Capture all exceptions and return return_type which is constructible from a fc::exception_ptr
*/
#define CATCH_AND_RETURN(return_type)\
catch ( const fc::exception& err ) {\
return return_type(err.dynamic_copy_exception());\
} catch ( const std::exception& e ) {\
fc::exception fce( \
FC_LOG_MESSAGE( warn, "rethrow ${what}: ", ("what",e.what())),\
fc::std_exception_code,\
BOOST_CORE_TYPEID(e).name(),\
e.what() ) ;\
return return_type(fce.dynamic_copy_exception());\
} catch( ... ) {\
fc::unhandled_exception e(\
FC_LOG_MESSAGE(warn, "rethrow"),\
std::current_exception());\
return return_type(e.dynamic_copy_exception());\
}
#define EOS_RECODE_EXC( cause_type, effect_type ) \
catch( const cause_type& e ) \
{ throw( effect_type( e.what(), e.get_log() ) ); }
@@ -361,6 +381,10 @@ namespace eosio { namespace chain {
3080007, "Transaction exceeded the current greylisted account network usage limit" )
FC_DECLARE_DERIVED_EXCEPTION( greylist_cpu_usage_exceeded, resource_exhausted_exception,
3080008, "Transaction exceeded the current greylisted account CPU usage limit" )
FC_DECLARE_DERIVED_EXCEPTION( ro_trx_vm_oc_compile_temporary_failure, resource_exhausted_exception,
3080009, "Read-only transaction eos-vm-oc compile temporary failure" )
FC_DECLARE_DERIVED_EXCEPTION( ro_trx_vm_oc_compile_permanent_failure, resource_exhausted_exception,
3080010, "Read-only transaction eos-vm-oc compile permanent failure" )
FC_DECLARE_DERIVED_EXCEPTION( leeway_deadline_exception, deadline_exception,
3081001, "Transaction reached the deadline set due to leeway on account CPU limits" )
@@ -573,6 +597,14 @@ namespace eosio { namespace chain {
3170011, "The signer returned no valid block signatures" )
FC_DECLARE_DERIVED_EXCEPTION( unsupported_multiple_block_signatures, producer_exception,
3170012, "The signer returned multiple signatures but that is not supported" )
FC_DECLARE_DERIVED_EXCEPTION( duplicate_snapshot_request, producer_exception,
3170013, "Snapshot has been already scheduled with specified parameters" )
FC_DECLARE_DERIVED_EXCEPTION( snapshot_request_not_found, producer_exception,
3170014, "Snapshot request not found" )
FC_DECLARE_DERIVED_EXCEPTION( invalid_snapshot_request, producer_exception,
3170015, "Invalid snapshot request" )
FC_DECLARE_DERIVED_EXCEPTION( snapshot_execution_exception, producer_exception,
3170016, "Snapshot execution exception" )
FC_DECLARE_DERIVED_EXCEPTION( reversible_blocks_exception, chain_exception,
3180000, "Reversible Blocks exception" )
@@ -16,11 +16,13 @@ namespace eosio { namespace chain {
* database tracks the longest chain and the last irreversible block number. All
* blocks older than the last irreversible block are freed after emitting the
* irreversible signal.
*
* An internal mutex is used to provide thread-safety.
*/
class fork_database {
public:
explicit fork_database( const fc::path& data_dir );
explicit fork_database( const std::filesystem::path& data_dir );
~fork_database();
void open( const std::function<void( block_timestamp_type,
@@ -55,9 +57,9 @@ namespace eosio { namespace chain {
void remove( const block_id_type& id );
const block_state_ptr& root()const;
const block_state_ptr& head()const;
block_state_ptr pending_head()const;
block_state_ptr root()const;
block_state_ptr head()const;
block_state_ptr pending_head()const;
/**
* Returns the sequence of block states resulting from trimming the branch from the
@@ -0,0 +1,278 @@
#pragma once
#include <fc/io/cfile.hpp>
#include <fc/io/datastream.hpp>
#include <filesystem>
#include <regex>
#include <map>
namespace eosio {
namespace chain {
template <typename Lambda>
void for_each_file_in_dir_matches(const std::filesystem::path& dir, std::string_view pattern, Lambda&& lambda) {
const std::regex my_filter(pattern.begin(), pattern.size());
std::smatch what;
std::filesystem::directory_iterator end_itr; // Default ctor yields past-the-end
for (std::filesystem::directory_iterator p(dir); p != end_itr; ++p) {
// Skip if not a file
if (!std::filesystem::is_regular_file(p->status()))
continue;
auto name = p->path().filename().string();
// skip if it does not match the pattern
if (!std::regex_match(name, what, my_filter))
continue;
lambda(p->path());
}
}
struct null_verifier {
template <typename LogData>
void verify(const LogData&, const std::filesystem::path&) {}
};
template <typename LogData, typename LogIndex, typename LogVerifier = null_verifier>
struct log_catalog {
using block_num_t = uint32_t;
struct mapped_type {
block_num_t last_block_num = 0;
std::filesystem::path filename_base;
};
using collection_t = std::map<block_num_t, mapped_type>;
using size_type = typename collection_t::size_type;
static constexpr size_type npos = std::numeric_limits<size_type>::max();
std::filesystem::path retained_dir;
std::filesystem::path archive_dir;
size_type max_retained_files = std::numeric_limits<size_type>::max();
collection_t collection;
size_type active_index = npos;
LogData log_data;
LogIndex log_index;
LogVerifier verifier;
bool empty() const { return collection.empty(); }
block_num_t first_block_num() const {
if (empty())
return std::numeric_limits<block_num_t>::max();
return collection.begin()->first;
}
block_num_t last_block_num() const {
if (empty())
return std::numeric_limits<block_num_t>::min();
return collection.rbegin()->second.last_block_num;
}
static std::filesystem::path make_absolute_dir(const std::filesystem::path& base_dir, std::filesystem::path new_dir) {
if (new_dir.is_relative())
new_dir = base_dir / new_dir;
if (!std::filesystem::is_directory(new_dir))
std::filesystem::create_directories(new_dir);
return new_dir;
}
void open(const std::filesystem::path& log_dir, const std::filesystem::path& retained_path, const std::filesystem::path& archive_path, const char* name,
const char* suffix_pattern = R"(-\d+-\d+\.log)") {
retained_dir = make_absolute_dir(log_dir, retained_path.empty() ? log_dir : retained_path);
if (!archive_path.empty()) {
archive_dir = make_absolute_dir(log_dir, archive_path);
}
std::string pattern = std::string(name) + suffix_pattern;
for_each_file_in_dir_matches(retained_dir, pattern, [this](std::filesystem::path path) {
auto log_path = path;
const auto& index_path = path.replace_extension("index");
auto path_without_extension = log_path.parent_path() / log_path.stem().string();
LogData log(log_path);
verifier.verify(log, log_path);
// check if index file matches the log file
if (!index_matches_data(index_path, log)) {
ilog("Recreating index for: ${i}", ("i", index_path.string()));
log.construct_index( index_path );
}
auto existing_itr = collection.find(log.first_block_num());
if (existing_itr != collection.end()) {
if (log.last_block_num() <= existing_itr->second.last_block_num) {
wlog("${log_path} contains the overlapping range with ${existing_path}.log, dropping ${log_path} "
"from catalog",
("log_path", log_path.string())("existing_path", existing_itr->second.filename_base.string()));
return;
} else {
wlog(
"${log_path} contains the overlapping range with ${existing_path}.log, droping ${existing_path}.log "
"from catelog",
("log_path", log_path.string())("existing_path", existing_itr->second.filename_base.string()));
}
}
collection.insert_or_assign(log.first_block_num(), mapped_type{log.last_block_num(), std::move(path_without_extension)});
});
}
bool index_matches_data(const std::filesystem::path& index_path, LogData& log) const {
if (!std::filesystem::exists(index_path))
return false;
LogIndex log_i;
log_i.open(index_path);
if (log_i.num_blocks() != log.num_blocks())
return false;
return log_i.back() == log.last_block_position();
}
std::optional<uint64_t> get_block_position(uint32_t block_num) {
try {
if (active_index != npos) {
auto active_item = std::next(collection.begin(), active_index);
if (active_item->first <= block_num && block_num <= active_item->second.last_block_num) {
return log_index.nth_block_position(block_num - log_data.first_block_num());
}
}
if (block_num < first_block_num())
return {};
auto it = --collection.upper_bound(block_num);
if (block_num <= it->second.last_block_num) {
auto name = it->second.filename_base;
log_data.open(name.replace_extension("log"));
log_index.open(name.replace_extension("index"));
active_index = std::distance(collection.begin(), it);
return log_index.nth_block_position(block_num - log_data.first_block_num());
}
return {};
} catch (...) {
active_index = npos;
return {};
}
}
fc::datastream<fc::cfile>* ro_stream_for_block(uint32_t block_num) {
auto pos = get_block_position(block_num);
if (pos) {
return &log_data.ro_stream_at(*pos);
}
return nullptr;
}
template <typename ...Rest>
auto ro_stream_for_block(uint32_t block_num, Rest&& ...rest) -> std::optional<decltype( std::declval<LogData>().ro_stream_at(0, std::forward<Rest&&>(rest)...))> {
auto pos = get_block_position(block_num);
if (pos) {
return log_data.ro_stream_at(*pos, std::forward<Rest&&>(rest)...);
}
return {};
}
std::optional<block_id_type> id_for_block(uint32_t block_num) {
auto pos = get_block_position(block_num);
if (pos) {
return log_data.block_id_at(*pos);
}
return {};
}
static void rename_if_not_exists(std::filesystem::path old_name, std::filesystem::path new_name) {
if (!std::filesystem::exists(new_name)) {
std::filesystem::rename(old_name, new_name);
} else {
std::filesystem::remove(old_name);
wlog("${new_name} already exists, just removing ${old_name}",
("old_name", old_name.string())("new_name", new_name.string()));
}
}
static void rename_bundle(std::filesystem::path orig_path, std::filesystem::path new_path) {
rename_if_not_exists(orig_path.replace_extension(".log"), new_path.replace_extension(".log"));
rename_if_not_exists(orig_path.replace_extension(".index"), new_path.replace_extension(".index"));
}
/// Add a new entry into the catalog.
///
/// Notice that \c start_block_num must be monotonically increasing between the invocations of this function
/// so that the new entry would be inserted at the 'end' of the map; otherwise, \c active_index would be
/// invalidated and the mapping between the log data their block range would be wrong. This function is only used
/// during the splitting of block log. Using this function for other purpose should make sure if the monotonically
/// increasing block num guarantee can be met.
void add(uint32_t start_block_num, uint32_t end_block_num, const std::filesystem::path& dir, const char* name) {
const int bufsize = 64;
char buf[bufsize];
snprintf(buf, bufsize, "%s-%u-%u", name, start_block_num, end_block_num);
std::filesystem::path new_path = retained_dir / buf;
rename_bundle(dir / name, new_path);
size_type items_to_erase = 0;
collection.emplace(start_block_num, mapped_type{end_block_num, std::move(new_path)});
if (collection.size() >= max_retained_files) {
items_to_erase =
max_retained_files > 0 ? collection.size() - max_retained_files : collection.size();
auto last = std::next( collection.begin(), items_to_erase);
for (auto it = collection.begin(); it != last; ++it) {
auto orig_name = it->second.filename_base;
if (archive_dir.empty()) {
// delete the old files when no backup dir is specified
std::filesystem::remove(orig_name.replace_extension("log"));
std::filesystem::remove(orig_name.replace_extension("index"));
} else {
// move the archive dir
rename_bundle(orig_name, archive_dir / orig_name.filename());
}
}
collection.erase(collection.begin(), last);
active_index = active_index == npos || active_index < items_to_erase
? npos
: active_index - items_to_erase;
}
}
/// Truncate the catalog so that the log/index bundle containing the block with \c block_num
/// would be rename to \c new_name; the log/index bundles with blocks strictly higher
/// than \c block_num would be deleted, and all the renamed/removed entries would be erased
/// from the catalog.
///
/// \return if nonzero, it's the starting block number for the log/index bundle being renamed.
uint32_t truncate(uint32_t block_num, std::filesystem::path new_name) {
if (collection.empty())
return 0;
auto remove_files = [](typename collection_t::const_reference v) {
auto name = v.second.filename_base;
std::filesystem::remove(name.replace_extension("log"));
std::filesystem::remove(name.replace_extension("index"));
};
active_index = npos;
auto it = collection.upper_bound(block_num);
if (it == collection.begin() || block_num > std::prev(it)->second.last_block_num) {
std::for_each(it, collection.end(), remove_files);
collection.erase(it, collection.end());
return 0;
} else {
auto truncate_it = --it;
auto name = truncate_it->second.filename_base;
std::filesystem::rename(name.replace_extension("log"), new_name.replace_extension("log"));
std::filesystem::rename(name.replace_extension("index"), new_name.replace_extension("index"));
std::for_each(std::next(truncate_it), collection.end(), remove_files);
auto result = truncate_it->first;
collection.erase(truncate_it, collection.end());
return result;
}
}
};
} // namespace chain
} // namespace eosio
@@ -0,0 +1,49 @@
#pragma once
#include <fc/io/cfile.hpp>
namespace eosio {
namespace chain {
template <typename T>
T read_data_at(fc::datastream<fc::cfile>& file, std::size_t offset) {
file.seek(offset);
T value;
fc::raw::unpack(file, value);
return value;
}
template <typename Derived>
class log_data_base {
protected:
fc::datastream<fc::cfile> file;
Derived* self() { return static_cast<Derived*>(this); }
const Derived* self() const { return static_cast<const Derived*>(this); }
public:
log_data_base() = default;
void close() { file.close(); }
bool is_open() const { return file.is_open(); }
uint64_t size() const { return self()->size(); }
uint32_t last_block_num() { return self()->block_num_at(last_block_position()); }
uint64_t last_block_position() {
uint32_t offset = sizeof(uint64_t);
if (self()->is_currently_pruned())
offset += sizeof(uint32_t);
return read_data_at<uint64_t>(file, size() - offset);
}
uint32_t num_blocks() {
if (self()->first_block_position() == size())
return 0;
else if (self()->is_currently_pruned())
return read_data_at<uint32_t>(file, size() - sizeof(uint32_t));
return last_block_num() - self()->first_block_num() + 1;
}
};
} // namespace chain
} // namespace eosio
@@ -0,0 +1,50 @@
#pragma once
#include <fc/io/cfile.hpp>
namespace eosio {
namespace chain {
/// copy up to n bytes from the current position of src to dest
void copy_file_content(fc::cfile& src, fc::cfile& dest, uint64_t n = UINT64_MAX);
template <typename Exception>
class log_index {
fc::cfile file_;
std::size_t num_blocks_ = 0;
public:
log_index() = default;
log_index(const std::filesystem::path& path) {
open(path);
}
void open(const std::filesystem::path& path) {
if (file_.is_open())
file_.close();
file_.set_file_path(path);
file_.open("rb");
file_.seek_end(0);
num_blocks_ = file_.tellp()/ sizeof(uint64_t);
EOS_ASSERT(file_.tellp() % sizeof(uint64_t) == 0, Exception,
"The size of ${file} is not a multiple of sizeof(uint64_t)", ("file", path));
}
bool is_open() const { return file_.is_open(); }
uint64_t back() { return nth_block_position(num_blocks()-1); }
uint32_t num_blocks() const { return num_blocks_; }
uint64_t nth_block_position(uint32_t n) {
file_.seek(n*sizeof(uint64_t));
uint64_t r;
file_.read((char*)&r, sizeof(r));
return r;
}
void copy_to(fc::cfile& dest, uint64_t nbytes) {
file_.seek(0);
copy_file_content(file_, dest, nbytes);
}
};
} // namespace chain
} // namespace eosio
@@ -75,6 +75,41 @@ namespace eosio::chain {
friend constexpr bool operator != ( const name& a, uint64_t b ) { return a.value != b; }
constexpr explicit operator bool()const { return value != 0; }
/**
* Returns the prefix.
* for exmaple:
* "eosio.any" -> "eosio"
* "eosio" -> "eosio"
*/
constexpr name prefix() const {
uint64_t result = value;
bool not_dot_character_seen = false;
uint64_t mask = 0xFull;
// Get characters one-by-one in name in order from right to left
for (int32_t offset = 0; offset <= 59;) {
auto c = (value >> offset) & mask;
if (!c) { // if this character is a dot
if (not_dot_character_seen) { // we found the rightmost dot character
result = (value >> offset) << offset;
break;
}
} else {
not_dot_character_seen = true;
}
if (offset == 0) {
offset += 4;
mask = 0x1Full;
} else {
offset += 5;
}
}
return name{ result };
}
};
// Each char of the string is encoded into 5-bit chunk and left-shifted
@@ -0,0 +1,61 @@
#pragma once
#include <eosio/chain/controller.hpp>
#include <eosio/chain/types.hpp>
#include <string>
namespace eosio::chain {
namespace fs = std::filesystem;
template<typename T>
class pending_snapshot {
public:
using next_t = eosio::chain::next_function<T>;
pending_snapshot(const chain::block_id_type& block_id, const next_t& next, std::string pending_path, std::string final_path)
: block_id(block_id), next(next), pending_path(std::move(pending_path)), final_path(std::move(final_path)) {}
uint32_t get_height() const {
return chain::block_header::num_from_id(block_id);
}
static fs::path get_final_path(const chain::block_id_type& block_id, const fs::path& snapshots_dir) {
return snapshots_dir / fc::format_string("snapshot-${id}.bin", fc::mutable_variant_object()("id", block_id));
}
static fs::path get_pending_path(const chain::block_id_type& block_id, const fs::path& snapshots_dir) {
return snapshots_dir / fc::format_string(".pending-snapshot-${id}.bin", fc::mutable_variant_object()("id", block_id));
}
static fs::path get_temp_path(const chain::block_id_type& block_id, const fs::path& snapshots_dir) {
return snapshots_dir / fc::format_string(".incomplete-snapshot-${id}.bin", fc::mutable_variant_object()("id", block_id));
}
T finalize(const chain::controller& chain) const {
auto block_ptr = chain.fetch_block_by_id(block_id);
auto in_chain = (bool) block_ptr;
std::error_code ec;
if(!in_chain) {
fs::remove(fs::path(pending_path), ec);
EOS_THROW(chain::snapshot_finalization_exception,
"Snapshotted block was forked out of the chain. ID: ${block_id}",
("block_id", block_id));
}
fs::rename(fs::path(pending_path), fs::path(final_path), ec);
EOS_ASSERT(!ec, chain::snapshot_finalization_exception,
"Unable to finalize valid snapshot of block number ${bn}: [code: ${ec}] ${message}",
("bn", get_height())("ec", ec.value())("message", ec.message()));
return {block_id, block_ptr->block_num(), block_ptr->timestamp, chain::chain_snapshot_header::current_version, final_path};
}
chain::block_id_type block_id;
next_t next;
std::string pending_path;
std::string final_path;
};
}// namespace eosio::chain
@@ -335,4 +335,3 @@ FC_REFLECT_DERIVED( eosio::chain::producer_schedule_change_extension, (eosio::ch
FC_REFLECT( eosio::chain::shared_block_signing_authority_v0, (threshold)(keys))
FC_REFLECT( eosio::chain::shared_producer_authority, (producer_name)(authority) )
FC_REFLECT( eosio::chain::shared_producer_authority_schedule, (version)(producers) )
@@ -264,7 +264,7 @@ protected:
class protocol_feature_manager {
public:
protocol_feature_manager( protocol_feature_set&& pfs, std::function<deep_mind_handler*()> get_deep_mind_logger );
protocol_feature_manager( protocol_feature_set&& pfs, std::function<deep_mind_handler*(bool is_trx_transient)> get_deep_mind_logger );
class const_iterator {
public:
@@ -393,9 +393,12 @@ protected:
bool _initialized = false;
private:
std::function<deep_mind_handler*()> _get_deep_mind_logger;
std::function<deep_mind_handler*(bool is_trx_transient)> _get_deep_mind_logger;
};
std::optional<builtin_protocol_feature> read_builtin_protocol_feature( const std::filesystem::path& p );
protocol_feature_set initialize_protocol_features( const std::filesystem::path& p, bool populate_missing_builtins = true );
} } // namespace eosio::chain
FC_REFLECT(eosio::chain::protocol_feature_subjective_restrictions,
@@ -64,7 +64,7 @@ namespace eosio { namespace chain {
class resource_limits_manager {
public:
explicit resource_limits_manager(chainbase::database& db, std::function<deep_mind_handler*()> get_deep_mind_logger)
explicit resource_limits_manager(chainbase::database& db, std::function<deep_mind_handler*(bool is_trx_transient)> get_deep_mind_logger)
:_db(db),_get_deep_mind_logger(get_deep_mind_logger)
{
}
@@ -74,17 +74,17 @@ namespace eosio { namespace chain {
void add_to_snapshot( const snapshot_writer_ptr& snapshot ) const;
void read_from_snapshot( const snapshot_reader_ptr& snapshot );
void initialize_account( const account_name& account );
void initialize_account( const account_name& account, bool is_trx_transient );
void set_block_parameters( const elastic_limit_parameters& cpu_limit_parameters, const elastic_limit_parameters& net_limit_parameters );
void update_account_usage( const flat_set<account_name>& accounts, uint32_t ordinal );
void add_transaction_usage( const flat_set<account_name>& accounts, uint64_t cpu_usage, uint64_t net_usage, uint32_t ordinal );
void add_transaction_usage( const flat_set<account_name>& accounts, uint64_t cpu_usage, uint64_t net_usage, uint32_t ordinal, bool is_trx_transient = false );
void add_pending_ram_usage( const account_name account, int64_t ram_delta );
void add_pending_ram_usage( const account_name account, int64_t ram_delta, bool is_trx_transient = false );
void verify_account_ram_usage( const account_name accunt )const;
/// set_account_limits returns true if new ram_bytes limit is more restrictive than the previously set one
bool set_account_limits( const account_name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight);
bool set_account_limits( const account_name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight, bool is_trx_transient);
void get_account_limits( const account_name& account, int64_t& ram_bytes, int64_t& net_weight, int64_t& cpu_weight) const;
bool is_unlimited_cpu( const account_name& account ) const;
@@ -114,7 +114,7 @@ namespace eosio { namespace chain {
private:
chainbase::database& _db;
std::function<deep_mind_handler*()> _get_deep_mind_logger;
std::function<deep_mind_handler*(bool is_trx_transient)> _get_deep_mind_logger;
};
} } } /// eosio::chain
@@ -376,7 +376,7 @@ namespace eosio { namespace chain {
class istream_json_snapshot_reader : public snapshot_reader {
public:
explicit istream_json_snapshot_reader(const fc::path& p);
explicit istream_json_snapshot_reader(const std::filesystem::path& p);
~istream_json_snapshot_reader();
void validate() const override;
@@ -0,0 +1,223 @@
#pragma once
#include <eosio/chain/pending_snapshot.hpp>
#include <eosio/chain/block_state.hpp>
#include <eosio/chain/config.hpp>
#include <eosio/chain/exceptions.hpp>
#include <eosio/chain/resource_limits.hpp>
#include <eosio/chain/resource_limits_private.hpp>
#include <eosio/chain/transaction.hpp>
#include <eosio/chain/types.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/ordered_index.hpp>
#include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>
#include <limits>
namespace eosio::chain {
namespace bmi = boost::multi_index;
namespace fs = std::filesystem;
class snapshot_scheduler {
public:
struct snapshot_information {
chain::block_id_type head_block_id;
uint32_t head_block_num;
fc::time_point head_block_time;
uint32_t version;
std::string snapshot_name;
};
struct snapshot_request_information {
uint32_t block_spacing = 0;
uint32_t start_block_num = 0;
uint32_t end_block_num = std::numeric_limits<uint32_t>::max();
std::string snapshot_description = "";
};
// this struct used to hold request params in api call
// it is differentiate between 0 and empty values
struct snapshot_request_params {
std::optional<uint32_t> block_spacing;
std::optional<uint32_t> start_block_num;
std::optional<uint32_t> end_block_num;
std::optional<std::string> snapshot_description;
};
struct snapshot_request_id_information {
uint32_t snapshot_request_id = 0;
};
struct snapshot_schedule_result : public snapshot_request_id_information, public snapshot_request_information {
};
struct snapshot_schedule_information : public snapshot_request_id_information, public snapshot_request_information {
std::vector<snapshot_information> pending_snapshots;
};
struct get_snapshot_requests_result {
std::vector<snapshot_schedule_information> snapshot_requests;
};
template<typename T>
using next_function = eosio::chain::next_function<T>;
struct by_height;
using pending_snapshot_index = bmi::multi_index_container<
pending_snapshot<snapshot_information>,
indexed_by<
bmi::hashed_unique<tag<by_id>, BOOST_MULTI_INDEX_MEMBER(pending_snapshot<snapshot_information>, block_id_type, block_id)>,
bmi::ordered_non_unique<tag<by_height>, BOOST_MULTI_INDEX_CONST_MEM_FUN(pending_snapshot<snapshot_information>, uint32_t, get_height)>>>;
class snapshot_db_json {
public:
snapshot_db_json() = default;
~snapshot_db_json() = default;
void set_path(std::filesystem::path path) {
db_path = std::move(path);
}
std::filesystem::path get_json_path() const {
return db_path / "snapshot-schedule.json";
}
const snapshot_db_json& operator>>(std::vector<snapshot_schedule_information>& sr) {
boost::property_tree::ptree root;
try {
std::ifstream file(get_json_path().string());
file.exceptions(std::istream::failbit | std::istream::eofbit);
boost::property_tree::read_json(file, root);
// parse ptree
for(boost::property_tree::ptree::value_type& req: root.get_child("snapshot_requests")) {
snapshot_schedule_information ssi;
ssi.snapshot_request_id = req.second.get<uint32_t>("snapshot_request_id");
ssi.snapshot_description = req.second.get<std::string>("snapshot_description");
ssi.block_spacing = req.second.get<uint32_t>("block_spacing");
ssi.start_block_num = req.second.get<uint32_t>("start_block_num");
ssi.end_block_num = req.second.get<uint32_t>("end_block_num");
sr.push_back(ssi);
}
} catch(std::ifstream::failure& e) {
elog("unable to restore snapshots schedule from filesystem ${jsonpath}, details: ${details}",
("jsonpath", get_json_path().string())("details", e.what()));
}
return *this;
}
const snapshot_db_json& operator<<(const std::vector<snapshot_schedule_information>& sr) const {
boost::property_tree::ptree root;
boost::property_tree::ptree node_srs;
for(const auto& key: sr) {
boost::property_tree::ptree node;
node.put("snapshot_request_id", key.snapshot_request_id);
node.put("snapshot_description", key.snapshot_description);
node.put("block_spacing", key.block_spacing);
node.put("start_block_num", key.start_block_num);
node.put("end_block_num", key.end_block_num);
node_srs.push_back(std::make_pair("", node));
}
root.push_back(std::make_pair("snapshot_requests", node_srs));
try {
std::ofstream file(get_json_path().string());
file.exceptions(std::istream::failbit | std::istream::eofbit);
boost::property_tree::write_json(file, root);
} catch(std::ofstream::failure& e) {
elog("unable to store snapshots schedule to filesystem to ${jsonpath}, details: ${details}",
("jsonpath", get_json_path().string())("details", e.what()));
}
return *this;
}
private:
fs::path db_path;
};
private:
struct by_snapshot_id;
struct by_snapshot_value;
struct as_vector;
using snapshot_requests = bmi::multi_index_container<
snapshot_schedule_information,
indexed_by<
bmi::hashed_unique<tag<by_snapshot_id>, BOOST_MULTI_INDEX_MEMBER(snapshot_request_id_information, uint32_t, snapshot_request_id)>,
bmi::random_access<tag<as_vector>>,
bmi::ordered_unique<tag<by_snapshot_value>,
composite_key<snapshot_schedule_information,
BOOST_MULTI_INDEX_MEMBER(snapshot_request_information, uint32_t, block_spacing),
BOOST_MULTI_INDEX_MEMBER(snapshot_request_information, uint32_t, start_block_num),
BOOST_MULTI_INDEX_MEMBER(snapshot_request_information, uint32_t, end_block_num)>>>>;
snapshot_requests _snapshot_requests;
snapshot_db_json _snapshot_db;
pending_snapshot_index _pending_snapshot_index;
uint32_t _snapshot_id = 0;
uint32_t _inflight_sid = 0;
// path to write the snapshots to
fs::path _snapshots_dir;
void x_serialize() {
auto& vec = _snapshot_requests.get<as_vector>();
std::vector<snapshot_schedule_information> sr(vec.begin(), vec.end());
_snapshot_db << sr;
};
public:
snapshot_scheduler() = default;
// snapshot scheduler listener
void on_start_block(uint32_t height, chain::controller& chain);
// to promote pending snapshots
void on_irreversible_block(const signed_block_ptr& lib, const chain::controller& chain);
// snapshot scheduler handlers
snapshot_schedule_result schedule_snapshot(const snapshot_request_information& sri);
snapshot_schedule_result unschedule_snapshot(uint32_t sri);
get_snapshot_requests_result get_snapshot_requests();
// initialize with storage
void set_db_path(fs::path db_path);
// set snapshot path
void set_snapshots_path(fs::path sn_path);
// add pending snapshot info to inflight snapshot request
void add_pending_snapshot_info(const snapshot_information& si);
// execute snapshot
void execute_snapshot(uint32_t srid, chain::controller& chain);
// former producer_plugin snapshot fn
void create_snapshot(next_function<snapshot_information> next, chain::controller& chain, std::function<void(void)> predicate);
};
}// namespace eosio::chain
FC_REFLECT(eosio::chain::snapshot_scheduler::snapshot_information, (head_block_id) (head_block_num) (head_block_time) (version) (snapshot_name))
FC_REFLECT(eosio::chain::snapshot_scheduler::snapshot_request_information, (block_spacing) (start_block_num) (end_block_num) (snapshot_description))
FC_REFLECT(eosio::chain::snapshot_scheduler::snapshot_request_params, (block_spacing) (start_block_num) (end_block_num) (snapshot_description))
FC_REFLECT(eosio::chain::snapshot_scheduler::snapshot_request_id_information, (snapshot_request_id))
FC_REFLECT(eosio::chain::snapshot_scheduler::get_snapshot_requests_result, (snapshot_requests))
FC_REFLECT_DERIVED(eosio::chain::snapshot_scheduler::snapshot_schedule_information, (eosio::chain::snapshot_scheduler::snapshot_request_id_information)(eosio::chain::snapshot_scheduler::snapshot_request_information), (pending_snapshots))
FC_REFLECT_DERIVED(eosio::chain::snapshot_scheduler::snapshot_schedule_result, (eosio::chain::snapshot_scheduler::snapshot_request_id_information)(eosio::chain::snapshot_scheduler::snapshot_request_information), )
@@ -8,28 +8,23 @@
#include <eosio/chain/resource_limits_private.hpp>
#include <eosio/chain/config.hpp>
#include <fc/time.hpp>
#include <boost/multi_index_container.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/ordered_index.hpp>
namespace eosio {
namespace bmi = boost::multi_index;
using chain::transaction_id_type;
using chain::account_name;
using chain::block_state_ptr;
using chain::packed_transaction;
namespace config = chain::config;
namespace eosio::chain {
class subjective_billing {
private:
struct trx_cache_entry {
transaction_id_type trx_id;
account_name account;
int64_t subjective_cpu_bill;
fc::time_point expiry;
chain::transaction_id_type trx_id;
chain::account_name account;
int64_t subjective_cpu_bill = 0;
fc::time_point expiry;
};
struct by_id;
struct by_expiry;
@@ -37,7 +32,7 @@ private:
using trx_cache_index = bmi::multi_index_container<
trx_cache_entry,
indexed_by<
bmi::hashed_unique<tag<by_id>, BOOST_MULTI_INDEX_MEMBER( trx_cache_entry, transaction_id_type, trx_id ) >,
bmi::hashed_unique<tag<by_id>, BOOST_MULTI_INDEX_MEMBER( trx_cache_entry, chain::transaction_id_type, trx_id ) >,
ordered_non_unique<tag<by_expiry>, BOOST_MULTI_INDEX_MEMBER( trx_cache_entry, fc::time_point, expiry ) >
>
>;
@@ -45,26 +40,24 @@ private:
using decaying_accumulator = chain::resource_limits::impl::exponential_decay_accumulator<>;
struct subjective_billing_info {
uint64_t pending_cpu_us; // tracked cpu us for transactions that may still succeed in a block
uint64_t pending_cpu_us = 0; // tracked cpu us for transactions that may still succeed in a block
decaying_accumulator expired_accumulator; // accumulator used to account for transactions that have expired
bool empty(uint32_t time_ordinal, uint32_t expired_accumulator_average_window) {
bool empty(uint32_t time_ordinal, uint32_t expired_accumulator_average_window) const {
return pending_cpu_us == 0 && expired_accumulator.value_at(time_ordinal, expired_accumulator_average_window) == 0;
}
};
using account_subjective_bill_cache = std::map<account_name, subjective_billing_info>;
using block_subjective_bill_cache = std::map<account_name, uint64_t>;
using account_subjective_bill_cache = std::map<chain::account_name, subjective_billing_info>;
bool _disabled = false;
trx_cache_index _trx_cache_index;
account_subjective_bill_cache _account_subjective_bill_cache;
block_subjective_bill_cache _block_subjective_bill_cache;
std::set<chain::account_name> _disabled_accounts;
uint32_t _expired_accumulator_average_window = config::account_cpu_usage_average_window_ms / subjective_time_interval_ms;
uint32_t _expired_accumulator_average_window = chain::config::account_cpu_usage_average_window_ms / subjective_time_interval_ms;
private:
uint32_t time_ordinal_for( const fc::time_point& t ) const {
static uint32_t time_ordinal_for( const fc::time_point& t ) {
auto ordinal = t.time_since_epoch().count() / (1000U * (uint64_t)subjective_time_interval_ms);
EOS_ASSERT(ordinal <= std::numeric_limits<uint32_t>::max(), chain::tx_resource_exhaustion, "overflow of quantized time in subjective billing");
return ordinal;
@@ -88,11 +81,11 @@ private:
}
}
void remove_subjective_billing( const block_state_ptr& bsp, uint32_t time_ordinal ) {
void remove_subjective_billing( const chain::block_state_ptr& bsp, uint32_t time_ordinal ) {
if( !_trx_cache_index.empty() ) {
for( const auto& receipt : bsp->block->transactions ) {
if( std::holds_alternative<packed_transaction>(receipt.trx) ) {
const auto& pt = std::get<packed_transaction>(receipt.trx);
if( std::holds_alternative<chain::packed_transaction>(receipt.trx) ) {
const auto& pt = std::get<chain::packed_transaction>(receipt.trx);
remove_subjective_billing( pt.id(), time_ordinal );
}
}
@@ -101,8 +94,8 @@ private:
public: // public for tests
static constexpr uint32_t subjective_time_interval_ms = 5'000;
void remove_subjective_billing( const transaction_id_type& trx_id, uint32_t time_ordinal ) {
size_t get_account_cache_size() const {return _account_subjective_bill_cache.size();}
void remove_subjective_billing( const chain::transaction_id_type& trx_id, uint32_t time_ordinal ) {
auto& idx = _trx_cache_index.get<by_id>();
auto itr = idx.find( trx_id );
if( itr != idx.end() ) {
@@ -114,11 +107,10 @@ public: // public for tests
public:
void disable() { _disabled = true; }
void disable_account( chain::account_name a ) { _disabled_accounts.emplace( a ); }
bool is_account_disabled(const account_name& a ) const { return _disabled || _disabled_accounts.count( a ); }
bool is_account_disabled(const chain::account_name& a ) const { return _disabled || _disabled_accounts.count( a ); }
/// @param in_pending_block pass true if pt's bill time is accounted for in the pending block
void subjective_bill( const transaction_id_type& id, const fc::time_point& expire, const account_name& first_auth,
const fc::microseconds& elapsed, bool in_pending_block )
void subjective_bill( const chain::transaction_id_type& id, fc::time_point_sec expire,
const chain::account_name& first_auth, const fc::microseconds& elapsed )
{
if( !_disabled && !_disabled_accounts.count( first_auth ) ) {
int64_t bill = std::max<int64_t>( 0, elapsed.count() );
@@ -126,17 +118,14 @@ public:
trx_cache_entry{id,
first_auth,
bill,
expire} );
expire.to_time_point()} );
if( p.second ) {
_account_subjective_bill_cache[first_auth].pending_cpu_us += bill;
if( in_pending_block ) {
_block_subjective_bill_cache[first_auth] += bill;
}
}
}
}
void subjective_bill_failure( const account_name& first_auth, const fc::microseconds& elapsed, const fc::time_point& now )
void subjective_bill_failure( const chain::account_name& first_auth, const fc::microseconds& elapsed, const fc::time_point& now )
{
if( !_disabled && !_disabled_accounts.count( first_auth ) ) {
int64_t bill = std::max<int64_t>( 0, elapsed.count() );
@@ -145,7 +134,7 @@ public:
}
}
int64_t get_subjective_bill( const account_name& first_auth, const fc::time_point& now ) const {
int64_t get_subjective_bill( const chain::account_name& first_auth, const fc::time_point& now ) const {
if( _disabled || _disabled_accounts.count( first_auth ) ) return 0;
const auto time_ordinal = time_ordinal_for(now);
const subjective_billing_info* sub_bill_info = nullptr;
@@ -153,34 +142,28 @@ public:
if( aitr != _account_subjective_bill_cache.end() ) {
sub_bill_info = &aitr->second;
}
uint64_t in_block_pending_cpu_us = 0;
auto bitr = _block_subjective_bill_cache.find( first_auth );
if( bitr != _block_subjective_bill_cache.end() ) {
in_block_pending_cpu_us = bitr->second;
}
if (sub_bill_info) {
EOS_ASSERT(sub_bill_info->pending_cpu_us >= in_block_pending_cpu_us, chain::tx_resource_exhaustion, "Logic error subjective billing ${a}", ("a", first_auth) );
int64_t sub_bill = sub_bill_info->pending_cpu_us - in_block_pending_cpu_us + sub_bill_info->expired_accumulator.value_at(time_ordinal, _expired_accumulator_average_window );
int64_t sub_bill = sub_bill_info->pending_cpu_us + sub_bill_info->expired_accumulator.value_at(time_ordinal, _expired_accumulator_average_window );
return sub_bill;
} else {
return 0;
}
}
void abort_block() {
_block_subjective_bill_cache.clear();
}
void on_block( fc::logger& log, const block_state_ptr& bsp, const fc::time_point& now ) {
void on_block( fc::logger& log, const chain::block_state_ptr& bsp, const fc::time_point& now ) {
if( bsp == nullptr || _disabled ) return;
const auto time_ordinal = time_ordinal_for(now);
const auto orig_count = _account_subjective_bill_cache.size();
remove_subjective_billing( bsp, time_ordinal );
fc_dlog( log, "Subjective billed accounts ${n} removed ${r}", ("n", orig_count)("r", orig_count - _account_subjective_bill_cache.size()) );
if (orig_count > 0) {
fc_dlog( log, "Subjective billed accounts ${n} removed ${r}",
("n", orig_count)("r", orig_count - _account_subjective_bill_cache.size()) );
}
}
bool remove_expired( fc::logger& log, const fc::time_point& pending_block_time, const fc::time_point& now, const fc::time_point& deadline ) {
template <typename Yield>
bool remove_expired( fc::logger& log, const fc::time_point& pending_block_time, const fc::time_point& now, Yield&& yield ) {
bool exhausted = false;
auto& idx = _trx_cache_index.get<by_expiry>();
if( !idx.empty() ) {
@@ -189,7 +172,7 @@ public:
uint32_t num_expired = 0;
while( !idx.empty() ) {
if( deadline <= fc::time_point::now() ) {
if( yield() ) {
exhausted = true;
break;
}
@@ -216,4 +199,4 @@ public:
}
};
} //eosio
} //eosio::chain
+4 -18
View File
@@ -1,12 +1,12 @@
#pragma once
#include <fc/exception/exception.hpp>
#include <eosio/chain/exceptions.hpp>
#include <eosio/chain/types.hpp>
#include <eosio/chain/core_symbol.hpp>
#include <string>
#include <functional>
namespace eosio {
namespace chain {
namespace eosio::chain {
/**
class symbol represents a token and contains precision and name.
@@ -65,20 +65,7 @@ namespace eosio {
explicit symbol(uint64_t v = CORE_SYMBOL): m_value(v) {
EOS_ASSERT(valid(), symbol_type_exception, "invalid symbol: ${name}", ("name",name()));
}
static symbol from_string(const string& from)
{
try {
string s = fc::trim(from);
EOS_ASSERT(!s.empty(), symbol_type_exception, "creating symbol from empty string");
auto comma_pos = s.find(',');
EOS_ASSERT(comma_pos != string::npos, symbol_type_exception, "missing comma in symbol");
auto prec_part = s.substr(0, comma_pos);
uint8_t p = fc::to_int64(prec_part);
string name_part = s.substr(comma_pos + 1);
EOS_ASSERT( p <= max_precision, symbol_type_exception, "precision ${p} should be <= 18", ("p", p));
return symbol(string_to_symbol(p, name_part.c_str()));
} FC_CAPTURE_LOG_AND_RETHROW((from))
}
static symbol from_string(const string& from);
uint64_t value() const { return m_value; }
bool valid() const
{
@@ -184,8 +171,7 @@ namespace eosio {
{
return std::tie(lhs.sym, lhs.contract) > std::tie(rhs.sym, rhs.contract);
}
} // namespace chain
} // namespace eosio
} // namespace eosio::chain
namespace fc {
inline void to_variant(const eosio::chain::symbol& var, fc::variant& vo) { vo = var.to_string(); }
@@ -1,46 +1,166 @@
#pragma once
#include <eosio/chain/name.hpp>
#include <fc/exception/exception.hpp>
#include <fc/log/logger_config.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/thread_pool.hpp>
#include <boost/asio/post.hpp>
#include <future>
#include <memory>
#include <optional>
#include <thread>
namespace eosio { namespace chain {
/**
* Wrapper class for boost asio thread pool and io_context run.
* Wrapper class for thread pool of boost asio io_context run.
* Also names threads so that tools like htop can see thread name.
* Example: named_thread_pool<struct net> thread_pool;
* or: struct net{}; named_thread_pool<net> thread_pool;
* @param NamePrefixTag is a type name appended with -## of thread.
* A short NamePrefixTag type name (6 chars or under) is recommended as console_appender uses
* 9 chars for the thread name.
*/
template<typename NamePrefixTag>
class named_thread_pool {
public:
// name_prefix is name appended with -## of thread.
// short name_prefix (6 chars or under) is recommended as console_appender uses 9 chars for thread name
named_thread_pool( std::string name_prefix, size_t num_threads );
using on_except_t = std::function<void(const fc::exception& e)>;
using init_t = std::function<void()>;
// calls stop()
~named_thread_pool();
named_thread_pool() = default;
~named_thread_pool(){
stop();
}
boost::asio::io_context& get_executor() { return _ioc; }
// destroy work guard, stop io_context, join thread_pool, and stop thread_pool
void stop();
/// Spawn threads, can be re-started after stop().
/// Assumes start()/stop() called from the same thread or externally protected.
/// Blocks until all threads are created and completed their init function, or an exception is thrown
/// during thread startup or an init function. Exceptions thrown during these stages are rethrown from start()
/// but some threads might still have been started. Calling stop() after such a failure is safe.
/// @param num_threads is number of threads spawned
/// @param on_except is the function to call if io_context throws an exception, is called from thread pool thread.
/// if an empty function then logs and rethrows exception on thread which will terminate. Not called
/// for exceptions during the init function (such exceptions are rethrown from start())
/// @param init is an optional function to call at startup to initialize any data.
/// @throw assert_exception if already started and not stopped.
void start( size_t num_threads, on_except_t on_except, init_t init = {} ) {
FC_ASSERT( !_ioc_work, "Thread pool already started" );
_ioc_work.emplace( boost::asio::make_work_guard( _ioc ) );
_ioc.restart();
_thread_pool.reserve( num_threads );
std::promise<void> start_complete;
std::atomic<uint32_t> threads_remaining = num_threads;
std::exception_ptr pending_exception;
std::mutex pending_exception_mutex;
try {
for( size_t i = 0; i < num_threads; ++i ) {
_thread_pool.emplace_back( std::thread( &named_thread_pool::run_thread, this, i, on_except, init, std::ref(start_complete),
std::ref(threads_remaining), std::ref(pending_exception), std::ref(pending_exception_mutex) ) );
}
}
catch( ... ) {
/// only an exception from std::thread's ctor should end up here. shut down all threads to ensure no
/// potential access to the promise, atomic, etc above performed after throwing out of start
stop();
throw;
}
start_complete.get_future().get();
}
/// destroy work guard, stop io_context, join thread_pool
void stop() {
_ioc_work.reset();
_ioc.stop();
for( auto& t : _thread_pool ) {
t.join();
}
_thread_pool.clear();
}
private:
void run_thread( size_t i, const on_except_t& on_except, const init_t& init, std::promise<void>& start_complete,
std::atomic<uint32_t>& threads_remaining, std::exception_ptr& pending_exception, std::mutex& pending_exception_mutex ) {
std::string tn;
auto decrement_remaining = [&]() {
if( !--threads_remaining ) {
if( pending_exception )
start_complete.set_exception( pending_exception );
else
start_complete.set_value();
}
};
try {
try {
tn = boost::core::demangle(typeid(this).name());
auto offset = tn.rfind("::");
if (offset != std::string::npos)
tn.erase(0, offset+2);
tn = tn.substr(0, tn.find('>')) + "-" + std::to_string( i );
fc::set_thread_name( tn );
if ( init )
init();
} FC_LOG_AND_RETHROW()
}
catch( ... ) {
std::lock_guard<std::mutex> l( pending_exception_mutex );
pending_exception = std::current_exception();
decrement_remaining();
return;
}
decrement_remaining();
try {
_ioc.run();
} catch( const fc::exception& e ) {
if( on_except ) {
on_except( e );
} else {
elog( "Exiting thread ${t} on exception: ${e}", ("t", tn)("e", e.to_detail_string()) );
throw;
}
} catch( const std::exception& e ) {
fc::std_exception_wrapper se( FC_LOG_MESSAGE( warn, "${what}: ", ("what", e.what()) ),
std::current_exception(), BOOST_CORE_TYPEID( e ).name(), e.what() );
if( on_except ) {
on_except( se );
} else {
elog( "Exiting thread ${t} on exception: ${e}", ("t", tn)("e", se.to_detail_string()) );
throw;
}
} catch( ... ) {
if( on_except ) {
fc::unhandled_exception ue( FC_LOG_MESSAGE( warn, "unknown exception" ), std::current_exception() );
on_except( ue );
} else {
elog( "Exiting thread ${t} on unknown exception", ("t", tn) );
throw;
}
}
}
private:
using ioc_work_t = boost::asio::executor_work_guard<boost::asio::io_context::executor_type>;
boost::asio::thread_pool _thread_pool;
boost::asio::io_context _ioc;
std::vector<std::thread> _thread_pool;
std::optional<ioc_work_t> _ioc_work;
};
// async on thread_pool and return future
// async on io_context and return future
template<typename F>
auto async_thread_pool( boost::asio::io_context& thread_pool, F&& f ) {
auto post_async_task( boost::asio::io_context& ioc, F&& f ) {
auto task = std::make_shared<std::packaged_task<decltype( f() )()>>( std::forward<F>( f ) );
boost::asio::post( thread_pool, [task]() { (*task)(); } );
boost::asio::post( ioc, [task]() { (*task)(); } );
return task->get_future();
}
@@ -37,9 +37,10 @@ namespace eosio { namespace chain {
transaction_context( controller& c,
const packed_transaction& t,
const transaction_id_type& trx_id, // trx_id diff than t.id() before replace_deferred
transaction_checktime_timer&& timer,
fc::time_point start = fc::time_point::now(),
bool read_only=false);
transaction_metadata::trx_type type = transaction_metadata::trx_type::input);
~transaction_context();
void init_for_implicit_trx( uint64_t initial_net_usage = 0 );
@@ -83,6 +84,10 @@ namespace eosio { namespace chain {
void validate_referenced_accounts( const transaction& trx, bool enforce_actor_whitelist_blacklist )const;
bool is_dry_run()const { return trx_type == transaction_metadata::trx_type::dry_run; };
bool is_read_only()const { return trx_type == transaction_metadata::trx_type::read_only; };
bool is_transient()const { return trx_type == transaction_metadata::trx_type::read_only || trx_type == transaction_metadata::trx_type::dry_run; };
private:
friend struct controller_impl;
@@ -116,11 +121,14 @@ namespace eosio { namespace chain {
void disallow_transaction_extensions( const char* error_msg )const;
std::string get_tx_cpu_usage_exceeded_reason_msg(fc::microseconds& limit) const;
/// Fields:
public:
controller& control;
const packed_transaction& packed_trx;
const transaction_id_type& id;
std::optional<chainbase::database::session> undo_session;
transaction_trace_ptr trace;
fc::time_point start;
@@ -148,9 +156,9 @@ namespace eosio { namespace chain {
transaction_checktime_timer transaction_timer;
const bool is_read_only;
private:
bool is_initialized = false;
transaction_metadata::trx_type trx_type;
uint64_t net_limit = 0;
bool net_limit_due_to_block = true;
@@ -169,6 +177,15 @@ namespace eosio { namespace chain {
int64_t billing_timer_exception_code = block_cpu_usage_exceeded::code_value;
fc::time_point pseudo_start;
fc::microseconds billed_time;
enum class tx_cpu_usage_exceeded_reason {
account_cpu_limit, // includes subjective billing
on_chain_consensus_max_transaction_cpu_usage,
user_specified_trx_max_cpu_usage_ms,
node_configured_max_transaction_time,
speculative_executed_adjusted_max_transaction_time // prev_billed_cpu_time_us > 0
};
tx_cpu_usage_exceeded_reason tx_cpu_usage_reason = tx_cpu_usage_exceeded_reason::account_cpu_limit;
};
} }
@@ -24,6 +24,7 @@ class transaction_metadata {
input,
implicit,
scheduled,
dry_run,
read_only
};
@@ -31,11 +32,9 @@ class transaction_metadata {
const packed_transaction_ptr _packed_trx;
const fc::microseconds _sig_cpu_usage;
const flat_set<public_key_type> _recovered_pub_keys;
const trx_type _trx_type;
public:
const bool implicit;
const bool scheduled;
const bool read_only;
bool accepted = false; // not thread safe
uint32_t billed_cpu_time_us = 0; // not thread safe
@@ -52,13 +51,11 @@ class transaction_metadata {
// creation of tranaction_metadata restricted to start_recover_keys and create_no_recover_keys below, public for make_shared
explicit transaction_metadata( const private_type& pt, packed_transaction_ptr ptrx,
fc::microseconds sig_cpu_usage, flat_set<public_key_type> recovered_pub_keys,
bool _implicit = false, bool _scheduled = false, bool _read_only = false)
trx_type t = trx_type::input )
: _packed_trx( std::move( ptrx ) )
, _sig_cpu_usage( sig_cpu_usage )
, _recovered_pub_keys( std::move( recovered_pub_keys ) )
, implicit( _implicit )
, scheduled( _scheduled )
, read_only( _read_only) {
, _trx_type( t ) {
}
transaction_metadata() = delete;
@@ -73,6 +70,12 @@ class transaction_metadata {
fc::microseconds signature_cpu_usage()const { return _sig_cpu_usage; }
const flat_set<public_key_type>& recovered_keys()const { return _recovered_pub_keys; }
size_t get_estimated_size() const;
trx_type get_trx_type() const { return _trx_type; };
bool implicit() const { return _trx_type == trx_type::implicit; };
bool scheduled() const { return _trx_type == trx_type::scheduled; };
bool is_dry_run() const { return _trx_type == trx_type::dry_run; };
bool is_read_only() const { return _trx_type == trx_type::read_only; };
bool is_transient() const { return _trx_type == trx_type::read_only || _trx_type == trx_type::dry_run; };
/// Thread safe.
/// @returns transaction_metadata_ptr or exception via future
@@ -85,7 +88,7 @@ class transaction_metadata {
static transaction_metadata_ptr
create_no_recover_keys( packed_transaction_ptr trx, trx_type t ) {
return std::make_shared<transaction_metadata>( private_type(), std::move(trx),
fc::microseconds(), flat_set<public_key_type>(), t == trx_type::implicit, t == trx_type::scheduled, t==trx_type::read_only );
fc::microseconds(), flat_set<public_key_type>(), t );
}
};
+28 -16
View File
@@ -8,7 +8,6 @@
#include <fc/io/varint.hpp>
#include <fc/io/enum_type.hpp>
#include <fc/crypto/sha224.hpp>
#include <fc/safe.hpp>
#include <fc/container/flat.hpp>
#include <fc/string.hpp>
#include <fc/io/raw.hpp>
@@ -43,7 +42,7 @@
#define _V(n, v) fc::mutable_variant_object(n, v)
namespace eosio { namespace chain {
namespace eosio::chain {
using std::map;
using std::vector;
using std::unordered_map;
@@ -61,7 +60,7 @@ namespace eosio { namespace chain {
using std::to_string;
using std::all_of;
using fc::path;
using std::filesystem::path;
using fc::variant_object;
using fc::variant;
using fc::enum_type;
@@ -69,7 +68,6 @@ namespace eosio { namespace chain {
using fc::signed_int;
using fc::time_point_sec;
using fc::time_point;
using fc::safe;
using fc::flat_map;
using fc::flat_multimap;
using fc::flat_set;
@@ -78,15 +76,12 @@ namespace eosio { namespace chain {
using public_key_type = fc::crypto::public_key;
using private_key_type = fc::crypto::private_key;
using signature_type = fc::crypto::signature;
#if BOOST_VERSION >= 107100
// configurable boost deque performs much better than std::deque in our use cases
using block_1024_option_t = boost::container::deque_options< boost::container::block_size<1024u> >::type;
template<typename T>
using deque = boost::container::deque< T, void, block_1024_option_t >;
#else
template<typename T>
using deque = std::deque<T>;
#endif
// configurable boost deque (for boost >= 1.71) performs much better than std::deque in our use cases
using block_1024_option_t = boost::container::deque_options< boost::container::block_size<1024u> >::type;
template<typename T>
using deque = boost::container::deque< T, void, block_1024_option_t >;
struct void_t{};
using chainbase::allocator;
@@ -375,7 +370,7 @@ namespace eosio { namespace chain {
}
template<typename E, typename F>
static inline auto has_field( F flags, E field )
static constexpr auto has_field( F flags, E field )
-> std::enable_if_t< std::is_integral<F>::value && std::is_unsigned<F>::value &&
std::is_enum<E>::value && std::is_same< F, std::underlying_type_t<E> >::value, bool>
{
@@ -383,7 +378,7 @@ namespace eosio { namespace chain {
}
template<typename E, typename F>
static inline auto set_field( F flags, E field, bool value = true )
static constexpr auto set_field( F flags, E field, bool value = true )
-> std::enable_if_t< std::is_integral<F>::value && std::is_unsigned<F>::value &&
std::is_enum<E>::value && std::is_same< F, std::underlying_type_t<E> >::value, F >
{
@@ -396,7 +391,24 @@ namespace eosio { namespace chain {
template<class... Ts> struct overloaded : Ts... { using Ts::operator()...; };
template<class... Ts> overloaded(Ts...) -> overloaded<Ts...>;
} } // eosio::chain
// next_function is a function passed to an API (like send_transaction) and which is called at the end of
// the API processing on the main thread. The type T is a description of the API result that can be
// serialized as output.
// The function accepts a variant which can contain an exception_ptr (if an exception occured while
// processing the API) or the result T.
// The third option is a function which can be executed in a multithreaded context (likely on the
// http_plugin thread pool) and which completes the API processing and returns the result T.
// -------------------------------------------------------------------------------------------------------
template<typename T>
using t_or_exception = std::variant<T, fc::exception_ptr>;
template<typename T>
using next_function_variant = std::variant<fc::exception_ptr, T, std::function<t_or_exception<T>()>>;
template<typename T>
using next_function = std::function<void(const next_function_variant<T>&)>;
} // eosio::chain
namespace chainbase {
// chainbase::shared_cow_string
@@ -21,14 +21,13 @@ using namespace boost::multi_index;
enum class trx_enum_type {
unknown = 0,
persisted = 1,
forked = 2,
aborted = 3,
incoming_persisted = 4,
incoming = 5 // incoming_end() needs to be updated if this changes
forked = 1,
aborted = 2,
incoming_api = 3,
incoming_p2p = 4 // incoming_end() needs to be updated if this changes
};
using next_func_t = std::function<void(const std::variant<fc::exception_ptr, transaction_trace_ptr>&)>;
using next_func_t = next_function<transaction_trace_ptr>;
struct unapplied_transaction {
const transaction_metadata_ptr trx_meta;
@@ -38,16 +37,10 @@ struct unapplied_transaction {
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;
unapplied_transaction& operator=(const unapplied_transaction&) = delete;
unapplied_transaction(unapplied_transaction&&) = default;
};
/**
* Track unapplied transactions for persisted, forked blocks, and aborted blocks.
* Persisted are first so that they can be applied in each block until expired.
* Track unapplied transactions for incoming, forked blocks, and aborted blocks.
*/
class unapplied_transaction_queue {
private:
@@ -96,15 +89,15 @@ public:
return itr->trx_meta;
}
template <typename Func>
bool clear_expired( const time_point& pending_block_time, const time_point& deadline, Func&& callback ) {
template <typename Yield, typename Callback>
bool clear_expired( const time_point& pending_block_time, Yield&& yield, Callback&& callback ) {
auto& persisted_by_expiry = queue.get<by_expiry>();
while( !persisted_by_expiry.empty() ) {
const auto& itr = persisted_by_expiry.begin();
if( itr->expiration() > pending_block_time ) {
if( itr->expiration().to_time_point() > pending_block_time ) {
break;
}
if( deadline <= fc::time_point::now() ) {
if( yield() ) {
return false;
}
callback( itr->trx_meta->packed_trx(), itr->trx_type );
@@ -159,26 +152,11 @@ 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() ) {
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)
--incoming_count;
queue.get<by_trx_id>().modify( itr, [](auto& un){
un.trx_type = trx_enum_type::persisted;
un.next = nullptr; // persisted already have ack'ed initial trace
} );
}
}
void add_incoming( const transaction_metadata_ptr& trx, bool persist_until_expired, bool return_failure_trace, next_func_t next ) {
void add_incoming( const transaction_metadata_ptr& trx, bool api_trx, 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() ) {
auto insert_itr = queue.insert(
{ trx, persist_until_expired ? trx_enum_type::incoming_persisted : trx_enum_type::incoming, return_failure_trace, std::move( next ) } );
{ trx, api_trx ? trx_enum_type::incoming_api : trx_enum_type::incoming_p2p, 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
@@ -194,14 +172,11 @@ public:
iterator begin() { return queue.get<by_type>().begin(); }
iterator end() { return queue.get<by_type>().end(); }
// persisted, forked, aborted
// forked, aborted
iterator unapplied_begin() { return queue.get<by_type>().begin(); }
iterator unapplied_end() { return queue.get<by_type>().upper_bound( trx_enum_type::aborted ); }
iterator persisted_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::persisted ); }
iterator persisted_end() { return queue.get<by_type>().upper_bound( trx_enum_type::persisted ); }
iterator incoming_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::incoming_persisted ); }
iterator incoming_begin() { return queue.get<by_type>().lower_bound( trx_enum_type::incoming_api ); }
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 ) {
@@ -220,7 +195,7 @@ private:
template<typename Itr>
void added( Itr itr ) {
auto size = calc_size( itr->trx_meta );
if( itr->trx_type == trx_enum_type::incoming || itr->trx_type == trx_enum_type::incoming_persisted ) {
if( itr->trx_type == trx_enum_type::incoming_p2p || itr->trx_type == trx_enum_type::incoming_api ) {
++incoming_count;
EOS_ASSERT( size_in_bytes + size < max_transaction_queue_size, tx_resource_exhaustion,
"Transaction ${id}, size ${s} bytes would exceed configured "
@@ -233,7 +208,7 @@ private:
template<typename Itr>
void removed( Itr itr ) {
if( itr->trx_type == trx_enum_type::incoming || itr->trx_type == trx_enum_type::incoming_persisted ) {
if( itr->trx_type == trx_enum_type::incoming_p2p || itr->trx_type == trx_enum_type::incoming_api ) {
--incoming_count;
}
size_in_bytes -= calc_size( itr->trx_meta );
@@ -168,121 +168,121 @@ namespace eosio { namespace chain { namespace wasm_injections {
constexpr const char* inject_which_op( uint16_t opcode ) {
switch ( opcode ) {
case wasm_ops::f32_add_code:
return u8"_eosio_f32_add";
return "_eosio_f32_add";
case wasm_ops::f32_sub_code:
return u8"_eosio_f32_sub";
return "_eosio_f32_sub";
case wasm_ops::f32_mul_code:
return u8"_eosio_f32_mul";
return "_eosio_f32_mul";
case wasm_ops::f32_div_code:
return u8"_eosio_f32_div";
return "_eosio_f32_div";
case wasm_ops::f32_min_code:
return u8"_eosio_f32_min";
return "_eosio_f32_min";
case wasm_ops::f32_max_code:
return u8"_eosio_f32_max";
return "_eosio_f32_max";
case wasm_ops::f32_copysign_code:
return u8"_eosio_f32_copysign";
return "_eosio_f32_copysign";
case wasm_ops::f32_abs_code:
return u8"_eosio_f32_abs";
return "_eosio_f32_abs";
case wasm_ops::f32_neg_code:
return u8"_eosio_f32_neg";
return "_eosio_f32_neg";
case wasm_ops::f32_sqrt_code:
return u8"_eosio_f32_sqrt";
return "_eosio_f32_sqrt";
case wasm_ops::f32_ceil_code:
return u8"_eosio_f32_ceil";
return "_eosio_f32_ceil";
case wasm_ops::f32_floor_code:
return u8"_eosio_f32_floor";
return "_eosio_f32_floor";
case wasm_ops::f32_trunc_code:
return u8"_eosio_f32_trunc";
return "_eosio_f32_trunc";
case wasm_ops::f32_nearest_code:
return u8"_eosio_f32_nearest";
return "_eosio_f32_nearest";
case wasm_ops::f32_eq_code:
return u8"_eosio_f32_eq";
return "_eosio_f32_eq";
case wasm_ops::f32_ne_code:
return u8"_eosio_f32_ne";
return "_eosio_f32_ne";
case wasm_ops::f32_lt_code:
return u8"_eosio_f32_lt";
return "_eosio_f32_lt";
case wasm_ops::f32_le_code:
return u8"_eosio_f32_le";
return "_eosio_f32_le";
case wasm_ops::f32_gt_code:
return u8"_eosio_f32_gt";
return "_eosio_f32_gt";
case wasm_ops::f32_ge_code:
return u8"_eosio_f32_ge";
return "_eosio_f32_ge";
case wasm_ops::f64_add_code:
return u8"_eosio_f64_add";
return "_eosio_f64_add";
case wasm_ops::f64_sub_code:
return u8"_eosio_f64_sub";
return "_eosio_f64_sub";
case wasm_ops::f64_mul_code:
return u8"_eosio_f64_mul";
return "_eosio_f64_mul";
case wasm_ops::f64_div_code:
return u8"_eosio_f64_div";
return "_eosio_f64_div";
case wasm_ops::f64_min_code:
return u8"_eosio_f64_min";
return "_eosio_f64_min";
case wasm_ops::f64_max_code:
return u8"_eosio_f64_max";
return "_eosio_f64_max";
case wasm_ops::f64_copysign_code:
return u8"_eosio_f64_copysign";
return "_eosio_f64_copysign";
case wasm_ops::f64_abs_code:
return u8"_eosio_f64_abs";
return "_eosio_f64_abs";
case wasm_ops::f64_neg_code:
return u8"_eosio_f64_neg";
return "_eosio_f64_neg";
case wasm_ops::f64_sqrt_code:
return u8"_eosio_f64_sqrt";
return "_eosio_f64_sqrt";
case wasm_ops::f64_ceil_code:
return u8"_eosio_f64_ceil";
return "_eosio_f64_ceil";
case wasm_ops::f64_floor_code:
return u8"_eosio_f64_floor";
return "_eosio_f64_floor";
case wasm_ops::f64_trunc_code:
return u8"_eosio_f64_trunc";
return "_eosio_f64_trunc";
case wasm_ops::f64_nearest_code:
return u8"_eosio_f64_nearest";
return "_eosio_f64_nearest";
case wasm_ops::f64_eq_code:
return u8"_eosio_f64_eq";
return "_eosio_f64_eq";
case wasm_ops::f64_ne_code:
return u8"_eosio_f64_ne";
return "_eosio_f64_ne";
case wasm_ops::f64_lt_code:
return u8"_eosio_f64_lt";
return "_eosio_f64_lt";
case wasm_ops::f64_le_code:
return u8"_eosio_f64_le";
return "_eosio_f64_le";
case wasm_ops::f64_gt_code:
return u8"_eosio_f64_gt";
return "_eosio_f64_gt";
case wasm_ops::f64_ge_code:
return u8"_eosio_f64_ge";
return "_eosio_f64_ge";
case wasm_ops::f64_promote_f32_code:
return u8"_eosio_f32_promote";
return "_eosio_f32_promote";
case wasm_ops::f32_demote_f64_code:
return u8"_eosio_f64_demote";
return "_eosio_f64_demote";
case wasm_ops::i32_trunc_u_f32_code:
return u8"_eosio_f32_trunc_i32u";
return "_eosio_f32_trunc_i32u";
case wasm_ops::i32_trunc_s_f32_code:
return u8"_eosio_f32_trunc_i32s";
return "_eosio_f32_trunc_i32s";
case wasm_ops::i32_trunc_u_f64_code:
return u8"_eosio_f64_trunc_i32u";
return "_eosio_f64_trunc_i32u";
case wasm_ops::i32_trunc_s_f64_code:
return u8"_eosio_f64_trunc_i32s";
return "_eosio_f64_trunc_i32s";
case wasm_ops::i64_trunc_u_f32_code:
return u8"_eosio_f32_trunc_i64u";
return "_eosio_f32_trunc_i64u";
case wasm_ops::i64_trunc_s_f32_code:
return u8"_eosio_f32_trunc_i64s";
return "_eosio_f32_trunc_i64s";
case wasm_ops::i64_trunc_u_f64_code:
return u8"_eosio_f64_trunc_i64u";
return "_eosio_f64_trunc_i64u";
case wasm_ops::i64_trunc_s_f64_code:
return u8"_eosio_f64_trunc_i64s";
return "_eosio_f64_trunc_i64s";
case wasm_ops::f32_convert_s_i32_code:
return u8"_eosio_i32_to_f32";
return "_eosio_i32_to_f32";
case wasm_ops::f32_convert_u_i32_code:
return u8"_eosio_ui32_to_f32";
return "_eosio_ui32_to_f32";
case wasm_ops::f32_convert_s_i64_code:
return u8"_eosio_i64_f32";
return "_eosio_i64_f32";
case wasm_ops::f32_convert_u_i64_code:
return u8"_eosio_ui64_to_f32";
return "_eosio_ui64_to_f32";
case wasm_ops::f64_convert_s_i32_code:
return u8"_eosio_i32_to_f64";
return "_eosio_i32_to_f64";
case wasm_ops::f64_convert_u_i32_code:
return u8"_eosio_ui32_to_f64";
return "_eosio_ui32_to_f64";
case wasm_ops::f64_convert_s_i64_code:
return u8"_eosio_i64_to_f64";
return "_eosio_i64_to_f64";
case wasm_ops::f64_convert_u_i64_code:
return u8"_eosio_ui64_to_f64";
return "_eosio_ui64_to_f64";
default:
FC_THROW_EXCEPTION( eosio::chain::wasm_execution_error, "Error, unknown opcode in injection ${op}", ("op", opcode));
@@ -483,7 +483,7 @@ namespace eosio { namespace chain { namespace wasm_injections {
static void init() {}
static void accept( wasm_ops::instr* inst, wasm_ops::visitor_arg& arg ) {
int32_t idx;
injector_utils::add_import<ResultType::f64, ValueType::f32>( *(arg.module), u8"_eosio_f32_promote", idx );
injector_utils::add_import<ResultType::f64, ValueType::f32>( *(arg.module), "_eosio_f32_promote", idx );
wasm_ops::op_types<>::call_t f32promote;
f32promote.field = idx;
f32promote.pack(arg.new_code);
@@ -496,7 +496,7 @@ namespace eosio { namespace chain { namespace wasm_injections {
static void init() {}
static void accept( wasm_ops::instr* inst, wasm_ops::visitor_arg& arg ) {
int32_t idx;
injector_utils::add_import<ResultType::f32, ValueType::f64>( *(arg.module), u8"_eosio_f64_demote", idx );
injector_utils::add_import<ResultType::f32, ValueType::f64>( *(arg.module), "_eosio_f64_demote", idx );
wasm_ops::op_types<>::call_t f32promote;
f32promote.field = idx;
f32promote.pack(arg.new_code);
@@ -332,7 +332,7 @@ namespace eosio { namespace chain { namespace wasm_validations {
public:
wasm_binary_validation( const eosio::chain::controller& control, IR::Module& mod ) : _module( &mod ) {
// initialize validators here
nested_validator::init(!control.is_producing_block());
nested_validator::init(!control.is_speculative_block());
}
void validate() {
@@ -4,8 +4,6 @@
#include <eosio/chain/whitelisted_intrinsics.hpp>
#include <eosio/chain/exceptions.hpp>
#include <functional>
#include "Runtime/Linker.h"
#include "Runtime/Runtime.h"
namespace eosio { namespace chain {
@@ -42,9 +40,18 @@ namespace eosio { namespace chain {
}
}
wasm_interface(vm_type vm, bool eosvmoc_tierup, const chainbase::database& d, const boost::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, bool profile);
enum class vm_oc_enable {
oc_auto,
oc_all,
oc_none
};
wasm_interface(vm_type vm, vm_oc_enable eosvmoc_tierup, const chainbase::database& d, const std::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, bool profile);
~wasm_interface();
// initialize exec per thread
void init_thread_local_data();
//call before dtor to skip what can be minutes of dtor overhead with some runtimes; can cause leaks
void indicate_shutting_down();
@@ -60,8 +67,8 @@ namespace eosio { namespace chain {
//Calls apply or error on a given code
void apply(const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version, apply_context& context);
//Immediately exits currently running wasm. UB is called when no wasm running
void exit();
//Returns true if the code is cached
bool is_code_cached(const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) const;
// If substitute_apply is set, then apply calls it before doing anything else. If substitute_apply returns true,
// then apply returns immediately.
@@ -75,6 +82,16 @@ namespace eosio { namespace chain {
namespace eosio{ namespace chain {
std::istream& operator>>(std::istream& in, wasm_interface::vm_type& runtime);
inline std::ostream& operator<<(std::ostream& os, wasm_interface::vm_oc_enable t) {
if (t == wasm_interface::vm_oc_enable::oc_auto) {
os << "auto";
} else if (t == wasm_interface::vm_oc_enable::oc_all) {
os << "all";
} else if (t == wasm_interface::vm_oc_enable::oc_none) {
os << "none";
}
return os;
}
}}
FC_REFLECT_ENUM( eosio::chain::wasm_interface::vm_type, (eos_vm)(eos_vm_jit)(eos_vm_oc) )
@@ -0,0 +1,85 @@
#pragma once
#include <eosio/chain/wasm_interface.hpp>
namespace eosio::chain {
/**
* @class wasm_interface_collection manages the active wasm_interface to use for execution.
*/
class wasm_interface_collection {
public:
wasm_interface_collection(wasm_interface::vm_type vm, wasm_interface::vm_oc_enable eosvmoc_tierup,
const chainbase::database& d, const std::filesystem::path& data_dir,
const eosvmoc::config& eosvmoc_config, bool profile)
: main_thread_id(std::this_thread::get_id())
, wasm_runtime(vm)
, eosvmoc_tierup(eosvmoc_tierup)
, wasmif(vm, eosvmoc_tierup, d, data_dir, eosvmoc_config, profile)
{}
wasm_interface& get_wasm_interface() {
if (is_on_main_thread()
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
|| is_eos_vm_oc_enabled()
#endif
)
return wasmif;
return *threaded_wasmifs[std::this_thread::get_id()];
}
// update current lib of all wasm interfaces
void current_lib(const uint32_t lib) {
// producer_plugin has already asserted irreversible_block signal is called in write window
wasmif.current_lib(lib);
for (auto& w: threaded_wasmifs) {
w.second->current_lib(lib);
}
}
// only called from non-main threads (read-only trx execution threads) when producer_plugin starts them
void init_thread_local_data(const chainbase::database& d, const std::filesystem::path& data_dir,
const eosvmoc::config& eosvmoc_config, bool profile) {
EOS_ASSERT(!is_on_main_thread(), misc_exception, "init_thread_local_data called on the main thread");
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
if (is_eos_vm_oc_enabled()) {
// EOSVMOC needs further initialization of its thread local data
wasmif.init_thread_local_data();
} else
#endif
{
std::lock_guard g(threaded_wasmifs_mtx);
// Non-EOSVMOC needs a wasmif per thread
threaded_wasmifs[std::this_thread::get_id()] = std::make_unique<wasm_interface>(wasm_runtime, eosvmoc_tierup, d, data_dir, eosvmoc_config, profile);
}
}
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
bool is_eos_vm_oc_enabled() const {
return ((eosvmoc_tierup != wasm_interface::vm_oc_enable::oc_none) || wasm_runtime == wasm_interface::vm_type::eos_vm_oc);
}
#endif
void code_block_num_last_used(const digest_type& code_hash, uint8_t vm_type, uint8_t vm_version, uint32_t block_num) {
// The caller of this function apply_eosio_setcode has already asserted that
// the transaction is not a read-only trx, which implies we are
// in write window. Safe to call threaded_wasmifs's code_block_num_last_used
wasmif.code_block_num_last_used(code_hash, vm_type, vm_version, block_num);
for (auto& w: threaded_wasmifs) {
w.second->code_block_num_last_used(code_hash, vm_type, vm_version, block_num);
}
}
private:
bool is_on_main_thread() { return main_thread_id == std::this_thread::get_id(); };
private:
const std::thread::id main_thread_id;
const wasm_interface::vm_type wasm_runtime;
const wasm_interface::vm_oc_enable eosvmoc_tierup;
wasm_interface wasmif; // used by main thread and all threads for EOSVMOC
std::mutex threaded_wasmifs_mtx;
std::unordered_map<std::thread::id, std::unique_ptr<wasm_interface>> threaded_wasmifs; // one for each read-only thread, used by eos-vm and eos-vm-jit
};
} // eosio::chain
@@ -15,7 +15,6 @@
#include <fc/scoped_exit.hpp>
#include "IR/Module.h"
#include "Runtime/Intrinsics.h"
#include "Platform/Platform.h"
#include "WAST/WAST.h"
#include "IR/Validate.h"
@@ -26,7 +25,6 @@
using namespace fc;
using namespace eosio::chain::webassembly;
using namespace IR;
using namespace Runtime;
using boost::multi_index_container;
@@ -37,28 +35,41 @@ namespace eosio { namespace chain {
struct wasm_interface_impl {
struct wasm_cache_entry {
digest_type code_hash;
uint32_t first_block_num_used;
uint32_t last_block_num_used;
std::unique_ptr<wasm_instantiated_module_interface> module;
uint8_t vm_type = 0;
uint8_t vm_version = 0;
};
struct by_hash;
struct by_first_block_num;
struct by_last_block_num;
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
struct eosvmoc_tier {
eosvmoc_tier(const boost::filesystem::path& d, const eosvmoc::config& c, const chainbase::database& db)
: cc(d, c, db), exec(cc),
mem(wasm_constraints::maximum_linear_memory/wasm_constraints::wasm_page_size) {}
eosvmoc_tier(const std::filesystem::path& d, const eosvmoc::config& c, const chainbase::database& db)
: cc(d, c, db) {
// construct exec for the main thread
init_thread_local_data();
}
// Support multi-threaded execution.
void init_thread_local_data() {
exec = std::make_unique<eosvmoc::executor>(cc);
}
eosvmoc::code_cache_async cc;
eosvmoc::executor exec;
eosvmoc::memory mem;
// Each thread requires its own exec and mem. Defined in wasm_interface.cpp
thread_local static std::unique_ptr<eosvmoc::executor> exec;
thread_local static eosvmoc::memory mem;
};
#endif
wasm_interface_impl(wasm_interface::vm_type vm, bool eosvmoc_tierup, const chainbase::database& d, const boost::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, bool profile) : db(d), wasm_runtime_time(vm) {
wasm_interface_impl(wasm_interface::vm_type vm, wasm_interface::vm_oc_enable eosvmoc_tierup, const chainbase::database& d,
const std::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, bool profile)
: db(d)
, wasm_runtime_time(vm)
, eosvmoc_tierup(eosvmoc_tierup)
{
#ifdef EOSIO_EOS_VM_RUNTIME_ENABLED
if(vm == wasm_interface::vm_type::eos_vm)
runtime_interface = std::make_unique<webassembly::eos_vm_runtime::eos_vm_runtime<eosio::vm::interpreter>>();
@@ -79,7 +90,7 @@ namespace eosio { namespace chain {
EOS_THROW(wasm_exception, "${r} wasm runtime not supported on this platform and/or configuration", ("r", vm));
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
if(eosvmoc_tierup) {
if(eosvmoc_tierup != wasm_interface::vm_oc_enable::oc_none) {
EOS_ASSERT(vm != wasm_interface::vm_type::eos_vm_oc, wasm_exception, "You can't use EOS VM OC as the base runtime when tier up is activated");
eosvmoc.emplace(data_dir, eosvmoc_config, d);
}
@@ -94,22 +105,9 @@ namespace eosio { namespace chain {
});
}
std::vector<uint8_t> parse_initial_memory(const Module& module) {
std::vector<uint8_t> mem_image;
for(const DataSegment& data_segment : module.dataSegments) {
EOS_ASSERT(data_segment.baseOffset.type == InitializerExpression::Type::i32_const, wasm_exception, "");
EOS_ASSERT(module.memories.defs.size(), wasm_exception, "");
const U32 base_offset = data_segment.baseOffset.i32;
const Uptr memory_size = (module.memories.defs[0].type.size.min << IR::numBytesPerPageLog2);
if(base_offset >= memory_size || base_offset + data_segment.data.size() > memory_size)
FC_THROW_EXCEPTION(wasm_execution_error, "WASM data segment outside of valid memory range");
if(base_offset + data_segment.data.size() > mem_image.size())
mem_image.resize(base_offset + data_segment.data.size(), 0x00);
memcpy(mem_image.data() + base_offset, data_segment.data.data(), data_segment.data.size());
}
return mem_image;
bool is_code_cached(const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) const {
wasm_cache_index::iterator it = wasm_instantiation_cache.find( boost::make_tuple(code_hash, vm_type, vm_version) );
return it != wasm_instantiation_cache.end();
}
void code_block_num_last_used(const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version, const uint32_t& block_num) {
@@ -142,7 +140,6 @@ namespace eosio { namespace chain {
it = wasm_instantiation_cache.emplace( wasm_interface_impl::wasm_cache_entry{
.code_hash = code_hash,
.first_block_num_used = codeobject->first_block_used,
.last_block_num_used = UINT32_MAX,
.module = nullptr,
.vm_type = vm_type,
@@ -158,24 +155,8 @@ namespace eosio { namespace chain {
trx_context.resume_billing_timer();
});
trx_context.pause_billing_timer();
IR::Module module;
std::vector<U8> bytes = {
(const U8*)codeobject->code.data(),
(const U8*)codeobject->code.data() + codeobject->code.size()};
try {
Serialization::MemoryInputStream stream((const U8*)bytes.data(),
bytes.size());
WASM::scoped_skip_checks no_check;
WASM::serialize(stream, module);
module.userSections.clear();
} catch (const Serialization::FatalSerializationException& e) {
EOS_ASSERT(false, wasm_serialization_error, e.message.c_str());
} catch (const IR::ValidationException& e) {
EOS_ASSERT(false, wasm_serialization_error, e.message.c_str());
}
wasm_instantiation_cache.modify(it, [&](auto& c) {
c.module = runtime_interface->instantiate_module((const char*)bytes.data(), bytes.size(), parse_initial_memory(module), code_hash, vm_type, vm_version);
c.module = runtime_interface->instantiate_module(codeobject->code.data(), codeobject->code.size(), code_hash, vm_type, vm_version);
});
}
return it->module;
@@ -194,7 +175,6 @@ namespace eosio { namespace chain {
member<wasm_cache_entry, uint8_t, &wasm_cache_entry::vm_version>
>
>,
ordered_non_unique<tag<by_first_block_num>, member<wasm_cache_entry, uint32_t, &wasm_cache_entry::first_block_num_used>>,
ordered_non_unique<tag<by_last_block_num>, member<wasm_cache_entry, uint32_t, &wasm_cache_entry::last_block_num_used>>
>
> wasm_cache_index;
@@ -202,6 +182,7 @@ namespace eosio { namespace chain {
const chainbase::database& db;
const wasm_interface::vm_type wasm_runtime_time;
const wasm_interface::vm_oc_enable eosvmoc_tierup;
#ifdef EOSIO_EOS_VM_OC_RUNTIME_ENABLED
std::optional<eosvmoc_tier> eosvmoc;
@@ -1,6 +1,7 @@
#pragma once
#include <vector>
#include <string>
#include <stdint.h>
namespace eosio { namespace chain {
@@ -19,7 +19,6 @@
namespace eosio { namespace chain { namespace webassembly { namespace eosvmoc {
using namespace IR;
using namespace Runtime;
using namespace fc;
using namespace eosio::chain::eosvmoc;
@@ -28,17 +27,21 @@ class eosvmoc_instantiated_module;
class eosvmoc_runtime : public eosio::chain::wasm_runtime_interface {
public:
eosvmoc_runtime(const boost::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
eosvmoc_runtime(const std::filesystem::path data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
~eosvmoc_runtime();
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t> initial_memory,
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size,
const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) override;
void immediately_exit_currently_running_module() override;
void init_thread_local_data() override;
friend eosvmoc_instantiated_module;
eosvmoc::code_cache_sync cc;
eosvmoc::executor exec;
eosvmoc::memory mem;
// Defined in eos-vm-oc.cpp. Used for non-main thread in multi-threaded execution
thread_local static std::unique_ptr<eosvmoc::executor> exec_thread_local;
thread_local static eosvmoc::memory mem_thread_local;
};
/**
@@ -349,7 +352,13 @@ auto fn(A... a) {
: "cc");
}
using native_args = vm::flatten_parameters_t<AUTO_PARAM_WORKAROUND(F)>;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
// If a is unpopulated, this reports "statement has no effect [-Werror=unused-value]"
eosio::vm::native_value stack[] = { a... };
#pragma GCC diagnostic pop
constexpr int cb_ctx_ptr_offset = OFFSET_OF_CONTROL_BLOCK_MEMBER(ctx);
apply_context* ctx;
asm("mov %%gs:%c[applyContextOffset], %[cPtr]\n"
@@ -385,7 +394,7 @@ void register_eosvm_oc(Name n) {
if(n == BOOST_HANA_STRING("env.eosio_exit")) return;
constexpr auto fn = create_function<F, Preconditions, injected>();
constexpr auto index = find_intrinsic_index(n.c_str());
intrinsic the_intrinsic(
[[maybe_unused]] intrinsic the_intrinsic(
n.c_str(),
wasm_function_type_provider<std::remove_pointer_t<decltype(fn)>>::type(),
reinterpret_cast<void*>(fn),
@@ -30,21 +30,27 @@ using namespace boost::multi_index;
using namespace boost::asio;
namespace bip = boost::interprocess;
namespace bfs = boost::filesystem;
using allocator_t = bip::rbtree_best_fit<bip::null_mutex_family, bip::offset_ptr<void>, alignof(std::max_align_t)>;
struct config;
class code_cache_base {
public:
code_cache_base(const bfs::path data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
code_cache_base(const std::filesystem::path& data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
~code_cache_base();
const int& fd() const { return _cache_fd; }
void free_code(const digest_type& code_id, const uint8_t& vm_version);
// get_descriptor_for_code failure reasons
enum class get_cd_failure {
temporary, // oc compile not done yet, users like read-only trxs can retry
permanent // oc will not start, users should not retry
};
protected:
struct by_hash;
@@ -64,16 +70,27 @@ class code_cache_base {
const chainbase::database& _db;
bfs::path _cache_file_path;
int _cache_fd;
std::filesystem::path _cache_file_path;
int _cache_fd;
io_context _ctx;
local::datagram_protocol::socket _compile_monitor_write_socket{_ctx};
local::datagram_protocol::socket _compile_monitor_read_socket{_ctx};
//these are really only useful to the async code cache, but keep them here so
//free_code can be shared
std::unordered_set<code_tuple> _queued_compiles;
//these are really only useful to the async code cache, but keep them here so free_code can be shared
using queued_compilies_t = boost::multi_index_container<
code_tuple,
indexed_by<
sequenced<>,
hashed_unique<tag<by_hash>,
composite_key< code_tuple,
member<code_tuple, digest_type, &code_tuple::code_id>,
member<code_tuple, uint8_t, &code_tuple::vm_version>
>
>
>
>;
queued_compilies_t _queued_compiles;
std::unordered_map<code_tuple, bool> _outstanding_compiles_and_poison;
size_t _free_bytes_eviction_threshold;
@@ -88,13 +105,13 @@ class code_cache_base {
class code_cache_async : public code_cache_base {
public:
code_cache_async(const bfs::path data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
code_cache_async(const std::filesystem::path& data_dir, const eosvmoc::config& eosvmoc_config, const chainbase::database& db);
~code_cache_async();
//If code is in cache: returns pointer & bumps to front of MRU list
//If code is not in cache, and not blacklisted, and not currently compiling: return nullptr and kick off compile
//otherwise: return nullptr
const code_descriptor* const get_descriptor_for_code(const digest_type& code_id, const uint8_t& vm_version);
const code_descriptor* const get_descriptor_for_code(bool high_priority, const digest_type& code_id, const uint8_t& vm_version, bool is_write_window, get_cd_failure& failure);
private:
std::thread _monitor_reply_thread;
@@ -111,7 +128,7 @@ class code_cache_sync : public code_cache_base {
~code_cache_sync();
//Can still fail and return nullptr if, for example, there is an expected instantiation failure
const code_descriptor* const get_descriptor_for_code_sync(const digest_type& code_id, const uint8_t& vm_version);
const code_descriptor* const get_descriptor_for_code_sync(const digest_type& code_id, const uint8_t& vm_version, bool is_write_window);
};
}}}
}}}
@@ -5,7 +5,6 @@
#include <vector>
#include <string>
#include <boost/filesystem/path.hpp>
#include <fc/reflect/reflect.hpp>
namespace eosio { namespace chain { namespace eosvmoc {
@@ -43,15 +43,11 @@ template<typename Backend>
class eos_vm_runtime : public eosio::chain::wasm_runtime_interface {
public:
eos_vm_runtime();
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t>,
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size,
const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) override;
void immediately_exit_currently_running_module() override;
private:
// todo: managing this will get more complicated with sync calls;
// immediately_exit_currently_running_module() should probably
// move from wasm_runtime_interface to wasm_instantiated_module_interface.
eos_vm_backend_t<Backend>* _bkend = nullptr; // non owning pointer to allow for immediate exit
template<typename Impl>
@@ -61,10 +57,8 @@ class eos_vm_runtime : public eosio::chain::wasm_runtime_interface {
class eos_vm_profile_runtime : public eosio::chain::wasm_runtime_interface {
public:
eos_vm_profile_runtime();
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t>,
std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size,
const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) override;
void immediately_exit_currently_running_module() override;
};
}}}}// eosio::chain::webassembly::eos_vm_runtime
@@ -20,13 +20,13 @@ class wasm_instantiated_module_interface {
class wasm_runtime_interface {
public:
virtual std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size, std::vector<uint8_t> initial_memory,
virtual std::unique_ptr<wasm_instantiated_module_interface> instantiate_module(const char* code_bytes, size_t code_size,
const digest_type& code_hash, const uint8_t& vm_type, const uint8_t& vm_version) = 0;
//immediately exit the currently running wasm_instantiated_module_interface. Yep, this assumes only one can possibly run at a time.
virtual void immediately_exit_currently_running_module() = 0;
virtual ~wasm_runtime_interface();
// eosvmoc_runtime needs this
virtual void init_thread_local_data() {};
};
}}
View File
@@ -30,7 +30,7 @@ platform_timer::platform_timer() {
std::promise<void> p;
auto f = p.get_future();
checktime_thread = std::thread([&p]() {
fc::set_os_thread_name("checktime");
fc::set_thread_name("checktime");
checktime_ios = std::make_unique<boost::asio::io_service>();
boost::asio::io_service::work work(*checktime_ios);
p.set_value();
@@ -11,9 +11,18 @@
#include <sys/event.h>
// this makes kqueue calls compatible with FreeBSD and this timer can be safely used
#if defined(__FreeBSD__)
#define EV_SET64(kev, ident, filter, flags, fflags, data, udata, ext0, ext1) EV_SET(kev, ident, filter, flags, fflags, data, reinterpret_cast<void*>(udata))
#define kevent64(kq, changelist, nchanges, eventlist, nevents, flags, timeout) kevent(kq, changelist, nchanges, eventlist, nevents, timeout)
#define kevent64_s kevent
#define KEVENT_FLAG_IMMEDIATE 0
#define NOTE_CRITICAL 0
#endif
namespace eosio { namespace chain {
//a kqueue & thread is shared for all platform_timer_macos instances
// a kqueue & thread is shared for all platform_timer_macos instances
static std::mutex timer_ref_mutex;
static unsigned next_timerid;
static unsigned refcount;
@@ -42,7 +51,7 @@ platform_timer::platform_timer() {
FC_ASSERT(kevent64(kqueue_fd, &quit_event, 1, NULL, 0, KEVENT_FLAG_IMMEDIATE, NULL) == 0, "failed to create quit event");
kevent_thread = std::thread([]() {
fc::set_os_thread_name("checktime");
fc::set_thread_name("checktime");
while(true) {
struct kevent64_s anEvent;
int c = kevent64(kqueue_fd, NULL, 0, &anEvent, 1, 0, NULL);
+202 -2
View File
@@ -4,6 +4,7 @@
#include <eosio/chain/deep_mind.hpp>
#include <fc/scoped_exit.hpp>
#include <fc/io/json.hpp>
#include <algorithm>
#include <boost/assign/list_of.hpp>
@@ -568,7 +569,7 @@ Enables new `get_block_num` intrinsic which returns the current block number.
protocol_feature_manager::protocol_feature_manager(
protocol_feature_set&& pfs,
std::function<deep_mind_handler*()> get_deep_mind_logger
std::function<deep_mind_handler*(bool is_trx_transient)> get_deep_mind_logger
):_protocol_feature_set( std::move(pfs) ), _get_deep_mind_logger(get_deep_mind_logger)
{
_builtin_protocol_features.resize( _protocol_feature_set._recognized_builtin_protocol_features.size() );
@@ -749,7 +750,8 @@ Enables new `get_block_num` intrinsic which returns the current block number.
("digest", feature_digest)
);
if (auto dm_logger = _get_deep_mind_logger()) {
// activate_feature is called by init. no transaction specific logging is possible
if (auto dm_logger = _get_deep_mind_logger(false)) {
dm_logger->on_activate_feature(*itr);
}
@@ -778,4 +780,202 @@ Enables new `get_block_num` intrinsic which returns the current block number.
}
}
std::optional<builtin_protocol_feature> read_builtin_protocol_feature( const std::filesystem::path& p ) {
try {
return fc::json::from_file<builtin_protocol_feature>( p );
} catch( const fc::exception& e ) {
wlog( "problem encountered while reading '${path}':\n${details}",
("path", p)("details",e.to_detail_string()) );
} catch( ... ) {
dlog( "unknown problem encountered while reading '${path}'",
("path", p) );
}
return {};
}
protocol_feature_set initialize_protocol_features( const std::filesystem::path& p, bool populate_missing_builtins ) {
using std::filesystem::directory_iterator;
protocol_feature_set pfs;
bool directory_exists = true;
if( std::filesystem::exists( p ) ) {
EOS_ASSERT( std::filesystem::is_directory( p ), plugin_exception,
"Path to protocol-features is not a directory: ${path}",
("path", p)
);
} else {
if( populate_missing_builtins )
std::filesystem::create_directories( p );
else
directory_exists = false;
}
auto log_recognized_protocol_feature = []( const builtin_protocol_feature& f, const digest_type& feature_digest ) {
if( f.subjective_restrictions.enabled ) {
if( f.subjective_restrictions.preactivation_required ) {
if( f.subjective_restrictions.earliest_allowed_activation_time == time_point{} ) {
ilog( "Support for builtin protocol feature '${codename}' (with digest of '${digest}') is enabled with preactivation required",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
);
} else {
ilog( "Support for builtin protocol feature '${codename}' (with digest of '${digest}') is enabled with preactivation required and with an earliest allowed activation time of ${earliest_time}",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
("earliest_time", f.subjective_restrictions.earliest_allowed_activation_time)
);
}
} else {
if( f.subjective_restrictions.earliest_allowed_activation_time == time_point{} ) {
ilog( "Support for builtin protocol feature '${codename}' (with digest of '${digest}') is enabled without activation restrictions",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
);
} else {
ilog( "Support for builtin protocol feature '${codename}' (with digest of '${digest}') is enabled without preactivation required but with an earliest allowed activation time of ${earliest_time}",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
("earliest_time", f.subjective_restrictions.earliest_allowed_activation_time)
);
}
}
} else {
ilog( "Recognized builtin protocol feature '${codename}' (with digest of '${digest}') but support for it is not enabled",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
);
}
};
map<builtin_protocol_feature_t, std::filesystem::path> found_builtin_protocol_features;
map<digest_type, std::pair<builtin_protocol_feature, bool> > builtin_protocol_features_to_add;
// The bool in the pair is set to true if the builtin protocol feature has already been visited to add
map< builtin_protocol_feature_t, std::optional<digest_type> > visited_builtins;
// Read all builtin protocol features
if( directory_exists ) {
for( directory_iterator enditr, itr{p}; itr != enditr; ++itr ) {
auto file_path = itr->path();
if( !std::filesystem::is_regular_file( file_path ) || file_path.extension().generic_string().compare( ".json" ) != 0 )
continue;
auto f = read_builtin_protocol_feature( file_path );
if( !f ) continue;
auto res = found_builtin_protocol_features.emplace( f->get_codename(), file_path );
EOS_ASSERT( res.second, plugin_exception,
"Builtin protocol feature '${codename}' was already included from a previous_file",
("codename", builtin_protocol_feature_codename(f->get_codename()))
("current_file", file_path)
("previous_file", res.first->second)
);
const auto feature_digest = f->digest();
builtin_protocol_features_to_add.emplace( std::piecewise_construct,
std::forward_as_tuple( feature_digest ),
std::forward_as_tuple( *f, false ) );
}
}
// Add builtin protocol features to the protocol feature manager in the right order (to satisfy dependencies)
using itr_type = map<digest_type, std::pair<builtin_protocol_feature, bool>>::iterator;
std::function<void(const itr_type&)> add_protocol_feature =
[&pfs, &builtin_protocol_features_to_add, &visited_builtins, &log_recognized_protocol_feature, &add_protocol_feature]( const itr_type& itr ) -> void {
if( itr->second.second ) {
return;
} else {
itr->second.second = true;
visited_builtins.emplace( itr->second.first.get_codename(), itr->first );
}
for( const auto& d : itr->second.first.dependencies ) {
auto itr2 = builtin_protocol_features_to_add.find( d );
if( itr2 != builtin_protocol_features_to_add.end() ) {
add_protocol_feature( itr2 );
}
}
pfs.add_feature( itr->second.first );
log_recognized_protocol_feature( itr->second.first, itr->first );
};
for( auto itr = builtin_protocol_features_to_add.begin(); itr != builtin_protocol_features_to_add.end(); ++itr ) {
add_protocol_feature( itr );
}
auto output_protocol_feature = [&p]( const builtin_protocol_feature& f, const digest_type& feature_digest ) {
string filename( "BUILTIN-" );
filename += builtin_protocol_feature_codename( f.get_codename() );
filename += ".json";
auto file_path = p / filename;
EOS_ASSERT( !std::filesystem::exists( file_path ), plugin_exception,
"Could not save builtin protocol feature with codename '${codename}' because a file at the following path already exists: ${path}",
("codename", builtin_protocol_feature_codename( f.get_codename() ))
("path", file_path)
);
if( fc::json::save_to_file( f, file_path ) ) {
ilog( "Saved default specification for builtin protocol feature '${codename}' (with digest of '${digest}') to: ${path}",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
("path", file_path)
);
} else {
elog( "Error occurred while writing default specification for builtin protocol feature '${codename}' (with digest of '${digest}') to: ${path}",
("codename", builtin_protocol_feature_codename(f.get_codename()))
("digest", feature_digest)
("path", file_path)
);
}
};
std::function<digest_type(builtin_protocol_feature_t)> add_missing_builtins =
[&pfs, &visited_builtins, &output_protocol_feature, &log_recognized_protocol_feature, &add_missing_builtins, populate_missing_builtins]
( builtin_protocol_feature_t codename ) -> digest_type {
auto res = visited_builtins.emplace( codename, std::optional<digest_type>() );
if( !res.second ) {
EOS_ASSERT( res.first->second, protocol_feature_exception,
"invariant failure: cycle found in builtin protocol feature dependencies"
);
return *res.first->second;
}
auto f = protocol_feature_set::make_default_builtin_protocol_feature( codename,
[&add_missing_builtins]( builtin_protocol_feature_t d ) {
return add_missing_builtins( d );
} );
if( !populate_missing_builtins )
f.subjective_restrictions.enabled = false;
const auto& pf = pfs.add_feature( f );
res.first->second = pf.feature_digest;
log_recognized_protocol_feature( f, pf.feature_digest );
if( populate_missing_builtins )
output_protocol_feature( f, pf.feature_digest );
return pf.feature_digest;
};
for( const auto& p : builtin_protocol_feature_codenames ) {
auto itr = found_builtin_protocol_features.find( p.first );
if( itr != found_builtin_protocol_features.end() ) continue;
add_missing_builtins( p.first );
}
return pfs;
}
} } // eosio::chain
+25 -16
View File
@@ -65,7 +65,8 @@ void resource_limits_manager::initialize_database() {
state.virtual_net_limit = config.net_limit_parameters.max;
});
if (auto dm_logger = _get_deep_mind_logger()) {
// At startup, no transaction specific logging is possible
if (auto dm_logger = _get_deep_mind_logger(false)) {
dm_logger->on_init_resource_limits(config, state);
}
}
@@ -93,7 +94,7 @@ void resource_limits_manager::read_from_snapshot( const snapshot_reader_ptr& sna
});
}
void resource_limits_manager::initialize_account(const account_name& account) {
void resource_limits_manager::initialize_account(const account_name& account, bool is_trx_transient) {
const auto& limits = _db.create<resource_limits_object>([&]( resource_limits_object& bl ) {
bl.owner = account;
});
@@ -101,7 +102,7 @@ void resource_limits_manager::initialize_account(const account_name& account) {
const auto& usage = _db.create<resource_usage_object>([&]( resource_usage_object& bu ) {
bu.owner = account;
});
if (auto dm_logger = _get_deep_mind_logger()) {
if (auto dm_logger = _get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_newaccount_resource_limits(limits, usage);
}
}
@@ -116,7 +117,9 @@ void resource_limits_manager::set_block_parameters(const elastic_limit_parameter
c.cpu_limit_parameters = cpu_limit_parameters;
c.net_limit_parameters = net_limit_parameters;
if (auto dm_logger = _get_deep_mind_logger()) {
// set_block_parameters is called by controller::finalize_block,
// where transaction specific logging is not possible
if (auto dm_logger = _get_deep_mind_logger(false)) {
dm_logger->on_update_resource_limits_config(c);
}
});
@@ -133,7 +136,7 @@ void resource_limits_manager::update_account_usage(const flat_set<account_name>&
}
}
void resource_limits_manager::add_transaction_usage(const flat_set<account_name>& accounts, uint64_t cpu_usage, uint64_t net_usage, uint32_t time_slot ) {
void resource_limits_manager::add_transaction_usage(const flat_set<account_name>& accounts, uint64_t cpu_usage, uint64_t net_usage, uint32_t time_slot, bool is_trx_transient ) {
const auto& state = _db.get<resource_limits_state_object>();
const auto& config = _db.get<resource_limits_config_object>();
@@ -149,7 +152,7 @@ void resource_limits_manager::add_transaction_usage(const flat_set<account_name>
bu.net_usage.add( net_usage, time_slot, config.account_net_usage_average_window );
bu.cpu_usage.add( cpu_usage, time_slot, config.account_cpu_usage_average_window );
if (auto dm_logger = _get_deep_mind_logger()) {
if (auto dm_logger = _get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_update_account_usage(bu);
}
});
@@ -166,8 +169,9 @@ void resource_limits_manager::add_transaction_usage(const flat_set<account_name>
EOS_ASSERT( cpu_used_in_window <= max_user_use_in_window,
tx_cpu_usage_exceeded,
"authorizing account '${n}' has insufficient cpu resources for this transaction",
("n", name(a))
"authorizing account '${n}' has insufficient objective cpu resources for this transaction,"
" used in window ${cpu_used_in_window}us, allowed in window ${max_user_use_in_window}us",
("n", a)
("cpu_used_in_window",cpu_used_in_window)
("max_user_use_in_window",max_user_use_in_window) );
}
@@ -185,8 +189,9 @@ void resource_limits_manager::add_transaction_usage(const flat_set<account_name>
EOS_ASSERT( net_used_in_window <= max_user_use_in_window,
tx_net_usage_exceeded,
"authorizing account '${n}' has insufficient net resources for this transaction",
("n", name(a))
"authorizing account '${n}' has insufficient net resources for this transaction,"
" used in window ${net_used_in_window}, allowed in window ${max_user_use_in_window}",
("n", a)
("net_used_in_window",net_used_in_window)
("max_user_use_in_window",max_user_use_in_window) );
@@ -203,7 +208,7 @@ void resource_limits_manager::add_transaction_usage(const flat_set<account_name>
EOS_ASSERT( state.pending_net_usage <= config.net_limit_parameters.max, block_resource_exhausted, "Block has insufficient net resources" );
}
void resource_limits_manager::add_pending_ram_usage( const account_name account, int64_t ram_delta ) {
void resource_limits_manager::add_pending_ram_usage( const account_name account, int64_t ram_delta, bool is_trx_transient ) {
if (ram_delta == 0) {
return;
}
@@ -218,7 +223,7 @@ void resource_limits_manager::add_pending_ram_usage( const account_name account,
_db.modify( usage, [&]( auto& u ) {
u.ram_usage += ram_delta;
if (auto dm_logger = _get_deep_mind_logger()) {
if (auto dm_logger = _get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_ram_event(account, u.ram_usage, ram_delta);
}
});
@@ -241,7 +246,7 @@ int64_t resource_limits_manager::get_account_ram_usage( const account_name& name
}
bool resource_limits_manager::set_account_limits( const account_name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight) {
bool resource_limits_manager::set_account_limits( const account_name& account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight, bool is_trx_transient) {
//const auto& usage = _db.get<resource_usage_object,by_owner>( account );
/*
* Since we need to delay these until the next resource limiting boundary, these are created in a "pending"
@@ -287,7 +292,7 @@ bool resource_limits_manager::set_account_limits( const account_name& account, i
pending_limits.net_weight = net_weight;
pending_limits.cpu_weight = cpu_weight;
if (auto dm_logger = _get_deep_mind_logger()) {
if (auto dm_logger = _get_deep_mind_logger(is_trx_transient)) {
dm_logger->on_set_account_limits(pending_limits);
}
});
@@ -354,7 +359,9 @@ void resource_limits_manager::process_account_limit_updates() {
multi_index.remove(*itr);
}
if (auto dm_logger = _get_deep_mind_logger()) {
// process_account_limit_updates is called by controller::finalize_block,
// where transaction specific logging is not possible
if (auto dm_logger = _get_deep_mind_logger(false)) {
dm_logger->on_update_resource_limits_state(state);
}
});
@@ -374,7 +381,9 @@ void resource_limits_manager::process_block_usage(uint32_t block_num) {
state.update_virtual_net_limit(config);
state.pending_net_usage = 0;
if (auto dm_logger = _get_deep_mind_logger()) {
// process_block_usage is called by controller::finalize_block,
// where transaction specific logging is not possible
if (auto dm_logger = _get_deep_mind_logger(false)) {
dm_logger->on_update_resource_limits_state(state);
}
});
+1 -1
View File
@@ -355,7 +355,7 @@ struct istream_json_snapshot_reader_impl {
istream_json_snapshot_reader::~istream_json_snapshot_reader() = default;
istream_json_snapshot_reader::istream_json_snapshot_reader(const fc::path& p)
istream_json_snapshot_reader::istream_json_snapshot_reader(const std::filesystem::path& p)
: impl{new istream_json_snapshot_reader_impl{0, 0, {}, {}}}
{
FILE* fp = fopen(p.string().c_str(), "rb");
+231
View File
@@ -0,0 +1,231 @@
#include <eosio/chain/controller.hpp>
#include <eosio/chain/exceptions.hpp>
#include <eosio/chain/pending_snapshot.hpp>
#include <eosio/chain/snapshot_scheduler.hpp>
#include <fc/scoped_exit.hpp>
namespace eosio::chain {
// snapshot_scheduler_listener
void snapshot_scheduler::on_start_block(uint32_t height, chain::controller& chain) {
bool snapshot_executed = false;
auto execute_snapshot_with_log = [this, height, &snapshot_executed, &chain](const auto& req) {
// one snapshot per height
if(!snapshot_executed) {
dlog("snapshot scheduler creating a snapshot from the request [start_block_num:${start_block_num}, end_block_num=${end_block_num}, block_spacing=${block_spacing}], height=${height}",
("start_block_num", req.start_block_num)("end_block_num", req.end_block_num)("block_spacing", req.block_spacing)("height", height));
execute_snapshot(req.snapshot_request_id, chain);
snapshot_executed = true;
}
};
std::vector<uint32_t> unschedule_snapshot_request_ids;
for(const auto& req: _snapshot_requests.get<0>()) {
// -1 since its called from start block
bool recurring_snapshot = req.block_spacing && (height >= req.start_block_num + 1) && (!((height - req.start_block_num - 1) % req.block_spacing));
bool onetime_snapshot = (!req.block_spacing) && (height == req.start_block_num + 1);
bool marked_for_deletion = ((!req.block_spacing) && (height >= req.start_block_num + 1)) || // if one time snapshot executed or scheduled for the past, it should be gone
(height > 0 && ((height-1) >= req.end_block_num)); // any snapshot can expire by end block num (end_block_num can be max value)
if(recurring_snapshot || onetime_snapshot) {
execute_snapshot_with_log(req);
}
// cleanup - remove expired (or invalid) request
if(marked_for_deletion) {
unschedule_snapshot_request_ids.push_back(req.snapshot_request_id);
}
}
for(const auto& i: unschedule_snapshot_request_ids) {
unschedule_snapshot(i);
}
}
void snapshot_scheduler::on_irreversible_block(const signed_block_ptr& lib, const chain::controller& chain) {
auto& snapshots_by_height = _pending_snapshot_index.get<by_height>();
uint32_t lib_height = lib->block_num();
while(!snapshots_by_height.empty() && snapshots_by_height.begin()->get_height() <= lib_height) {
const auto& pending = snapshots_by_height.begin();
auto next = pending->next;
try {
next(pending->finalize(chain));
}
CATCH_AND_CALL(next);
snapshots_by_height.erase(snapshots_by_height.begin());
}
}
snapshot_scheduler::snapshot_schedule_result snapshot_scheduler::schedule_snapshot(const snapshot_request_information& sri) {
auto& snapshot_by_value = _snapshot_requests.get<by_snapshot_value>();
auto existing = snapshot_by_value.find(std::make_tuple(sri.block_spacing, sri.start_block_num, sri.end_block_num));
EOS_ASSERT(existing == snapshot_by_value.end(), chain::duplicate_snapshot_request, "Duplicate snapshot request");
EOS_ASSERT(sri.start_block_num <= sri.end_block_num, chain::invalid_snapshot_request, "End block number should be greater or equal to start block number");
EOS_ASSERT(sri.start_block_num + sri.block_spacing <= sri.end_block_num, chain::invalid_snapshot_request, "Block spacing exceeds defined by start and end range");
_snapshot_requests.emplace(snapshot_schedule_information{{_snapshot_id++}, {sri.block_spacing, sri.start_block_num, sri.end_block_num, sri.snapshot_description}, {}});
x_serialize();
// returning snapshot_schedule_result
return snapshot_schedule_result{{_snapshot_id - 1}, {sri.block_spacing, sri.start_block_num, sri.end_block_num, sri.snapshot_description}};
}
snapshot_scheduler::snapshot_schedule_result snapshot_scheduler::unschedule_snapshot(uint32_t sri) {
auto& snapshot_by_id = _snapshot_requests.get<by_snapshot_id>();
auto existing = snapshot_by_id.find(sri);
EOS_ASSERT(existing != snapshot_by_id.end(), chain::snapshot_request_not_found, "Snapshot request not found");
snapshot_schedule_result result{{existing->snapshot_request_id}, {existing->block_spacing, existing->start_block_num, existing->end_block_num, existing->snapshot_description}};
_snapshot_requests.erase(existing);
x_serialize();
// returning snapshot_schedule_result
return result;
}
snapshot_scheduler::get_snapshot_requests_result snapshot_scheduler::get_snapshot_requests() {
get_snapshot_requests_result result;
auto& asvector = _snapshot_requests.get<as_vector>();
result.snapshot_requests.reserve(asvector.size());
result.snapshot_requests.insert(result.snapshot_requests.begin(), asvector.begin(), asvector.end());
return result;
}
void snapshot_scheduler::set_db_path(fs::path db_path) {
_snapshot_db.set_path(std::move(db_path));
// init from db
if(std::filesystem::exists(_snapshot_db.get_json_path())) {
std::vector<snapshot_schedule_information> sr;
_snapshot_db >> sr;
// if db read succeeded, clear/load
_snapshot_requests.get<by_snapshot_id>().clear();
_snapshot_requests.insert(sr.begin(), sr.end());
}
}
void snapshot_scheduler::set_snapshots_path(fs::path sn_path) {
_snapshots_dir = std::move(sn_path);
}
void snapshot_scheduler::add_pending_snapshot_info(const snapshot_information& si) {
auto& snapshot_by_id = _snapshot_requests.get<by_snapshot_id>();
auto snapshot_req = snapshot_by_id.find(_inflight_sid);
if(snapshot_req != snapshot_by_id.end()) {
_snapshot_requests.modify(snapshot_req, [&si](auto& p) {
p.pending_snapshots.emplace_back(si);
});
}
}
void snapshot_scheduler::execute_snapshot(uint32_t srid, chain::controller& chain) {
_inflight_sid = srid;
auto next = [srid, this](const chain::next_function_variant<snapshot_information>& result) {
if(std::holds_alternative<fc::exception_ptr>(result)) {
try {
std::get<fc::exception_ptr>(result)->dynamic_rethrow_exception();
} catch(const fc::exception& e) {
EOS_THROW(snapshot_execution_exception,
"Snapshot creation error: ${details}",
("details", e.to_detail_string()));
} catch(const std::exception& e) {
EOS_THROW(snapshot_execution_exception,
"Snapshot creation error: ${details}",
("details", e.what()));
}
} else {
// success, snapshot finalized
auto snapshot_info = std::get<snapshot_information>(result);
auto& snapshot_by_id = _snapshot_requests.get<by_snapshot_id>();
auto snapshot_req = snapshot_by_id.find(srid);
if(snapshot_req != snapshot_by_id.end()) {
_snapshot_requests.modify(snapshot_req, [&](auto& p) {
auto& pending = p.pending_snapshots;
auto it = std::remove_if(pending.begin(), pending.end(), [&snapshot_info](const snapshot_information& s) { return s.head_block_num <= snapshot_info.head_block_num; });
pending.erase(it, pending.end());
});
}
}
};
create_snapshot(next, chain, {});
}
void snapshot_scheduler::create_snapshot(next_function<snapshot_information> next, chain::controller& chain, std::function<void(void)> predicate) {
auto head_id = chain.head_block_id();
const auto head_block_num = chain.head_block_num();
const auto head_block_time = chain.head_block_time();
const auto& snapshot_path = pending_snapshot<snapshot_information>::get_final_path(head_id, _snapshots_dir);
const auto& temp_path = pending_snapshot<snapshot_information>::get_temp_path(head_id, _snapshots_dir);
// maintain legacy exception if the snapshot exists
if(fs::is_regular_file(snapshot_path)) {
auto ex = snapshot_exists_exception(FC_LOG_MESSAGE(error, "snapshot named ${name} already exists", ("name", _snapshots_dir)));
next(ex.dynamic_copy_exception());
return;
}
auto write_snapshot = [&](const fs::path& p) -> void {
if(predicate) predicate();
fs::create_directory(p.parent_path());
auto snap_out = std::ofstream(p.generic_string(), (std::ios::out | std::ios::binary));
auto writer = std::make_shared<ostream_snapshot_writer>(snap_out);
chain.write_snapshot(writer);
writer->finalize();
snap_out.flush();
snap_out.close();
};
// If in irreversible mode, create snapshot and return path to snapshot immediately.
if(chain.get_read_mode() == db_read_mode::IRREVERSIBLE) {
try {
write_snapshot(temp_path);
std::error_code ec;
fs::rename(temp_path, snapshot_path, ec);
EOS_ASSERT(!ec, snapshot_finalization_exception,
"Unable to finalize valid snapshot of block number ${bn}: [code: ${ec}] ${message}",
("bn", head_block_num)("ec", ec.value())("message", ec.message()));
next(snapshot_information{head_id, head_block_num, head_block_time, chain_snapshot_header::current_version, snapshot_path.generic_string()});
}
CATCH_AND_CALL(next);
return;
}
// Otherwise, the result will be returned when the snapshot becomes irreversible.
// determine if this snapshot is already in-flight
auto& pending_by_id = _pending_snapshot_index.get<by_id>();
auto existing = pending_by_id.find(head_id);
if(existing != pending_by_id.end()) {
// if a snapshot at this block is already pending, attach this requests handler to it
pending_by_id.modify(existing, [&next](auto& entry) {
entry.next = [prev = entry.next, next](const next_function_variant<snapshot_information>& res) {
prev(res);
next(res);
};
});
} else {
const auto& pending_path = pending_snapshot<snapshot_information>::get_pending_path(head_id, _snapshots_dir);
try {
write_snapshot(temp_path);// create a new pending snapshot
std::error_code ec;
fs::rename(temp_path, pending_path, ec);
EOS_ASSERT(!ec, snapshot_finalization_exception,
"Unable to promote temp snapshot to pending for block number ${bn}: [code: ${ec}] ${message}",
("bn", head_block_num)("ec", ec.value())("message", ec.message()));
_pending_snapshot_index.emplace(head_id, next, pending_path.generic_string(), snapshot_path.generic_string());
add_pending_snapshot_info(snapshot_information{head_id, head_block_num, head_block_time, chain_snapshot_header::current_version, pending_path.generic_string()});
}
CATCH_AND_CALL(next);
}
}
}// namespace eosio::chain
+21
View File
@@ -0,0 +1,21 @@
#include <eosio/chain/symbol.hpp>
#include <boost/algorithm/string.hpp>
namespace eosio::chain {
symbol symbol::from_string(const string& from)
{
try {
string s = boost::algorithm::trim_copy(from);
EOS_ASSERT(!s.empty(), symbol_type_exception, "creating symbol from empty string");
auto comma_pos = s.find(',');
EOS_ASSERT(comma_pos != string::npos, symbol_type_exception, "missing comma in symbol");
auto prec_part = s.substr(0, comma_pos);
uint8_t p = fc::to_int64(prec_part);
string name_part = s.substr(comma_pos + 1);
EOS_ASSERT( p <= max_precision, symbol_type_exception, "precision ${p} should be <= 18", ("p", p));
return symbol(string_to_symbol(p, name_part.c_str()));
} FC_CAPTURE_LOG_AND_RETHROW((from));
}
} // namespace eosio::chain
-36
View File
@@ -1,36 +0,0 @@
#include <eosio/chain/thread_utils.hpp>
#include <fc/log/logger_config.hpp>
namespace eosio { namespace chain {
//
// named_thread_pool
//
named_thread_pool::named_thread_pool( std::string name_prefix, size_t num_threads )
: _thread_pool( num_threads )
, _ioc( num_threads )
{
_ioc_work.emplace( boost::asio::make_work_guard( _ioc ) );
for( size_t i = 0; i < num_threads; ++i ) {
boost::asio::post( _thread_pool, [&ioc = _ioc, name_prefix, i]() {
std::string tn = name_prefix + "-" + std::to_string( i );
fc::set_os_thread_name( tn );
ioc.run();
} );
}
}
named_thread_pool::~named_thread_pool() {
stop();
}
void named_thread_pool::stop() {
_ioc_work.reset();
_ioc.stop();
_thread_pool.join();
_thread_pool.stop();
}
} } // eosio::chain
+12 -9
View File
@@ -62,16 +62,19 @@ fc::microseconds transaction::get_signature_keys( const vector<signature_type>&
{ try {
auto start = fc::time_point::now();
recovered_pub_keys.clear();
const digest_type digest = sig_digest(chain_id, cfd);
for(const signature_type& sig : signatures) {
auto now = fc::time_point::now();
EOS_ASSERT( now < deadline, tx_cpu_usage_exceeded, "transaction signature verification executed for too long ${time}us",
("time", now - start)("now", now)("deadline", deadline)("start", start) );
auto[ itr, successful_insertion ] = recovered_pub_keys.emplace( sig, digest );
EOS_ASSERT( allow_duplicate_keys || successful_insertion, tx_duplicate_sig,
"transaction includes more than one signature signed using the same key associated with public key: ${key}",
("key", *itr ) );
if ( !signatures.empty() ) {
const digest_type digest = sig_digest(chain_id, cfd);
for(const signature_type& sig : signatures) {
auto now = fc::time_point::now();
EOS_ASSERT( now < deadline, tx_cpu_usage_exceeded, "transaction signature verification executed for too long ${time}us",
("time", now - start)("now", now)("deadline", deadline)("start", start) );
auto[ itr, successful_insertion ] = recovered_pub_keys.emplace( sig, digest );
EOS_ASSERT( allow_duplicate_keys || successful_insertion, tx_duplicate_sig,
"transaction includes more than one signature signed using the same key associated with public key: ${key}",
("key", *itr ) );
}
}
return fc::time_point::now() - start;

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