Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core-backend): Remove host proc macro #3342

Merged
merged 40 commits into from
Oct 22, 2023
Merged

Conversation

ark0f
Copy link
Member

@ark0f ark0f commented Sep 22, 2023

Resolves #3037
Resolves #3320

Note: sys-call signature is strict now. Which means if signature is something like fn(u32, u64) it only accepts 2 arguments and no more (like it was before)

@ark0f ark0f added A1-inprogress Issue is in progress or PR draft is not ready to be reviewed D1-core Gear Core labels Sep 22, 2023
@ark0f ark0f force-pushed the al-no-host-proc-macro branch from 6a418e5 to abb9871 Compare September 22, 2023 22:41
@ark0f ark0f added A0-pleasereview PR is ready to be reviewed by the team and removed A1-inprogress Issue is in progress or PR draft is not ready to be reviewed labels Sep 24, 2023
@ark0f ark0f force-pushed the al-no-host-proc-macro branch from a453aee to 0a79188 Compare September 25, 2023 17:50
Base automatically changed from al-backend-post-removal-refactoring to master September 26, 2023 12:53
@ark0f ark0f force-pushed the al-no-host-proc-macro branch from 0a79188 to cbe6963 Compare September 26, 2023 13:09
Copy link
Member

@breathx breathx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general there are still a lot of possibilities to simplify it without traits, using maybe common struct-based builder pattern, atm lgtm anyway, please resolve applied comments

core-backend/src/runtime.rs Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
core-backend/src/funcs.rs Show resolved Hide resolved
core-backend/src/funcs.rs Outdated Show resolved Hide resolved
@breathx breathx added A3-gotissues PR occurred to have issues after the review and removed A0-pleasereview PR is ready to be reviewed by the team labels Oct 15, 2023
@ark0f ark0f force-pushed the al-no-host-proc-macro branch from 498c77f to b1631d1 Compare October 18, 2023 20:28
@ark0f ark0f added A0-pleasereview PR is ready to be reviewed by the team and removed A3-gotissues PR occurred to have issues after the review labels Oct 19, 2023
@ark0f
Copy link
Member Author

ark0f commented Oct 19, 2023

@gshep

Comparison table for Vara runtime for HostFn
name master-ff7f6d4 al/no-host-proc-macro diff
alloc 7799797 8644340 +9.77%
alloc_per_page 389614 446104 +12.66%
free 787350 790229 +0.36%
gr_reserve_gas 2524407 2455098 -2.82%
gr_unreserve_gas 2153377 1988741 -8.28%
gr_system_reserve_gas 1197281 1189680 -0.64%
gr_gas_available 1129475 1055794 -6.98%
gr_message_id 1099040 1063101 -3.38%
gr_pay_program_rent 22295 22624 +1.45%
gr_program_id 1061949 1057856 -0.39%
gr_source 1070597 1055149 -1.46%
gr_value 1068769 1061756 -0.66%
gr_value_available 1059328 1067666 +0.78%
gr_size 1056778 1052000 -0.45%
gr_read 1758945 1782830 +1.34%
gr_read_per_byte 161 157 -2.55%
gr_block_height 1084883 1072194 -1.18%
gr_block_timestamp 1112529 1053044 -5.65%
gr_random 2182552 2050250 -6.45%
gr_reply_deposit 6464794 7293692 +11.36%
gr_send 3333315 3210045 -3.84%
gr_send_per_byte 260 264 +1.52%
gr_send_wgas 3326038 3217373 -3.38%
gr_send_wgas_per_byte 260 262 +0.76%
gr_send_init 1227474 1154925 -6.28%
gr_send_push 2037921 2022494 -0.76%
gr_send_push_per_byte 380 362 -4.97%
gr_send_commit 2822205 2735414 -3.17%
gr_send_commit_wgas 2948732 2727981 -8.09%
gr_reservation_send 3505292 3306466 -6.01%
gr_reservation_send_per_byte 263 261 -0.77%
gr_reservation_send_commit 3117539 2904234 -7.34%
gr_reply_commit 18180584 19212196 +5.37%
gr_reply_commit_wgas 20742928 15023834 -38.07%
gr_reservation_reply 12801500 9703778 -31.92%
gr_reservation_reply_per_byte 428786 428562 -0.05%
gr_reservation_reply_commit 5340718 5074988 -5.24%
gr_reply_push 1902031 1796061 -5.90%
gr_reply 21623874 19110284 -13.15%
gr_reply_per_byte 426 416 -2.40%
gr_reply_wgas 18339856 17006966 -7.84%
gr_reply_wgas_per_byte 422 425 +0.71%
gr_reply_push_per_byte 662 612 -8.17%
gr_reply_to 1101528 1067474 -3.19%
gr_signal_code 1042314 1048008 +0.54%
gr_signal_from 1075628 1064984 -1.00%
gr_reply_input 22929588 33387832 +31.32%
gr_reply_input_wgas 17273758 14393456 -20.01%
gr_reply_push_input 1349622 1317324 -2.45%
gr_reply_push_input_per_byte 157 109 -44.04%
gr_send_input 3544611 3475512 -1.99%
gr_send_input_wgas 3646569 3440237 -6.00%
gr_send_push_input 1589937 1586746 -0.20%
gr_send_push_input_per_byte 166 151 -9.93%
gr_debug 1427899 1330561 -7.32%
gr_debug_per_byte 315 297 -6.06%
gr_reply_code 1038450 1026831 -1.13%
gr_exit 541182376 542593472 +0.26%
gr_leave 536063286 536744664 +0.13%
gr_wait 519142196 538493700 +3.59%
gr_wait_for 547275968 542127954 -0.95%
gr_wait_up_to 553575546 538459650 -2.81%
gr_wake 1934140 1910538 -1.24%
gr_create_program 4482061 4199784 -6.72%
gr_create_program_payload_per_byte 94 99 +5.05%
gr_create_program_salt_per_byte 2145 2081 -3.08%
gr_create_program_wgas 4582400 4276315 -7.16%
gr_create_program_wgas_payload_per_byte 87 97 +10.31%
gr_create_program_wgas_salt_per_byte 2137 2077 -2.89%

@ark0f ark0f requested a review from breathx October 19, 2023 13:57
@breathx breathx added A2-mergeoncegreen PR is ready to merge after CI passes and removed A0-pleasereview PR is ready to be reviewed by the team labels Oct 22, 2023
@ark0f ark0f merged commit 0aed940 into master Oct 22, 2023
10 checks passed
@ark0f ark0f deleted the al-no-host-proc-macro branch October 22, 2023 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A2-mergeoncegreen PR is ready to merge after CI passes D1-core Gear Core
Projects
None yet
5 participants