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

parachainify! macro #199

Merged
merged 17 commits into from
Apr 12, 2024
Merged

parachainify! macro #199

merged 17 commits into from
Apr 12, 2024

Conversation

JoshOrndorff
Copy link
Contributor

@JoshOrndorff JoshOrndorff commented Apr 2, 2024

This PR cleans up some hacks that were left when I first added parachain support. In particular it strives to solve #146.

There were several incidental changes as well, all of which I consider good:

  • Persist block number in storage under new dedicated key.
  • Remove generic block parameter from Executive. It is now just Executive<V, C>.
  • Create and use some type aliases like Header and Block<V, C> in core.
  • Reduce definitions in parachain runtime, instead re-using more stuff from the original template.

@JoshOrndorff

This comment was marked as outdated.

@JoshOrndorff JoshOrndorff marked this pull request as ready for review April 11, 2024 20:25
Copy link

Coverage after merging joshy-cleanup-parachain-macros into main will be

60.70%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
tuxedo-core/aggregator/src
   lib.rs99.14%100%100%99.11%201, 22, 84
tuxedo-core/no_bound/src
   clone_no_bound.rs36.63%100%30%37.36%24, 32–39, 56, 59–72, 74–87, 89, 91–95, 98–99
   debug_no_bound.rs32.73%100%30%33%101–105, 108–109, 24, 32–42, 58, 60–78, 80–95, 97–99
   default_no_bound.rs19.11%100%16.67%19.31%100–122, 124–131, 133, 136–147, 151–157, 32–39, 51, 54–80, 83–88, 91–99
   lib.rs100%100%100%100%
tuxedo-core/src
   constraint_checker.rs45.16%100%40%46.15%118–126, 132–137, 139–148, 150, 169, 198–202, 205–210, 213–214
   dynamic_typing.rs92.11%100%75%95.31%56
   executive.rs91.49%100%91.49%91.49%101, 130, 156, 196, 228, 253, 268, 316, 347, 382–387, 389, 399–400, 405–406, 408, 411–412, 415, 417–418, 421–422, 424, 428–449, 451, 455–456, 458–462, 464, 467–484, 58
   genesis.rs46.15%100%50%45.92%102–103, 106, 161–163, 172, 36–49, 60, 62–65, 67–68, 70–72, 75–79, 81–83, 85–96, 98–99
   inherents.rs15.94%100%23.53%14.88%122–124, 135, 151–158, 165–179, 185–203, 205–235, 56–58, 65–70, 72–80, 83, 85
   types.rs61.78%100%31.03%68.75%100, 102–105, 107–113, 156, 170, 172, 174, 207, 214–219, 26, 49, 96–99
   utxo_set.rs90.91%100%100%88.89%39–40
   verifier.rs51.52%100%35.29%57.14%106–108, 43–44, 46, 48–49, 54, 71, 78–80, 82–84, 92
tuxedo-core/src/verifier
   htlc.rs88.93%100%56.25%93%107, 109, 115, 40, 55, 74–78, 91
   multi_signature.rs92.79%100%79.17%94.44%100–105, 21, 45, 71
   simple_signature.rs83.78%100%61.11%88.17%32, 65, 78–82
tuxedo-parachain-core/parachainify/src
   lib.rs61.16%100%100%60.17%100–110, 14, 16, 39–42, 56, 66, 72–99
tuxedo-parachain-core/src
   collation_api.rs0%100%0%0%18–39
   lib.rs34.48%100%33.33%35%141, 86–91, 95–97
   relay_state_snapshot.rs0%100%0%0%128–140, 147–155, 157, 173–188, 193–202, 204–211, 223, 225, 227–233, 235–240, 242, 245–250, 252–257, 259–271, 274–286, 292–298, 303–310, 316–323, 330–337, 346–354, 362–370, 378–383, 389–394, 41, 54
   tests.rs100%100%100%100%
tuxedo-parachain-runtime/src
   genesis.rs0%100%0%0%20–51
   lib.rs0%100%0%0%101–192, 51–56, 62, 68, 77–98
tuxedo-template-runtime/src
   genesis.rs84.42%100%85.71%84.35%23–45
   lib.rs3.53%100%10.91%2.11%111, 115, 120–122, 126–128, 138, 141, 143, 145, 147, 149, 151, 153, 155, 158, 160, 165, 174–195, 198–225, 228–339, 58–63, 94–99
wallet/src
   amoeba.rs0%100%0%0%100–117, 120–121, 123–129, 131–138, 20–22, 24, 26, 28–59, 62–63, 65–99
   cli.rs0%100%0%0%104, 123, 129, 137, 148, 154, 20, 22, 31, 36, 41, 45, 69, 81
   keystore.rs0%100%0%0%30–33, 38–46, 49, 51–57, 63–71, 74–76, 78–80, 83–89, 91–92
   main.rs0%100%0%0%100–212, 215–222, 225–228, 230–232, 235–237, 239, 241, 244–250, 253–266, 269–272, 274–279, 28, 280–285, 287, 29–99
   money.rs0%100%0%0%100–101, 104–122, 126–132, 138–145, 147, 151–156, 160, 163, 165, 168–173, 175–176, 180–181, 183, 186, 189–194, 199–205, 207–211, 214–215, 219–224, 226–227, 23, 230–239, 24, 240–241, 243, 245, 25–29, 31, 33, 35–39, 41–56, 58–59, 63–76, 79–89, 91, 93, 95–99
   output_filter.rs100%100%100%100%
   parachain.rs0%100%0%0%16, 18–19, 25–32, 37–39
   rpc.rs0%100%0%0%15–20, 23–28, 30–38, 41–47, 49–52, 54–55
   sync.rs0%100%0%0%100–105, 107, 109, 114–119, 123–126, 133–134, 136, 139–142, 147–149, 152–153, 156–161, 163–165, 168, 170–171, 176–179, 182–183, 190–194, 196–202, 205–207, 209–210, 213–214, 219–222, 225, 227–228, 233–236, 239, 241–242, 245–251, 253–254, 257–258, 261–262, 265–266, 270–277, 280, 283–287, 290, 292, 295, 297, 301, 303–304, 307–308, 311–318, 320–321, 324–325, 327, 329–330, 334–336, 338–339, 341–342, 344–345, 348–350, 352–353, 355–356, 358–359, 363, 365, 368–369, 373, 375–380, 383–384, 387–389, 392, 395–398, 400, 403–406, 409, 412–413, 416–417, 422–427, 429, 431, 436–439, 442–443, 446–451, 453, 456–457, 461–462, 464, 466–468, 470–473, 476–477, 51–55, 61, 64–65, 68, 70–84,

@JoshOrndorff JoshOrndorff changed the title Clean up parachain macros parachainify! macro Apr 12, 2024
@JoshOrndorff JoshOrndorff merged commit c03a33d into main Apr 12, 2024
6 checks passed
@JoshOrndorff JoshOrndorff deleted the joshy-cleanup-parachain-macros branch April 12, 2024 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant