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

New landing page #1549

Merged
merged 35 commits into from
Aug 12, 2024
Merged

New landing page #1549

merged 35 commits into from
Aug 12, 2024

Conversation

fstoqnov-iohk
Copy link
Collaborator

@fstoqnov-iohk fstoqnov-iohk commented Aug 5, 2024

Landing page

  • features ✅
  • content abstraction ✅
  • animations ✅
  • dependencies ✅
  • header (kept the default docusaurus burger menu as it's unclear currently what content we'll be keeping for the header) ✅

Docs pages - ✅

Note - For consistency I have implemented TailwindCss (I noticed that it is already used in the repo in other places) - it's primarily used in styling the landing page and some parts of swizzled components that I had to update.
I have maintained the docusaurus styling method for all other components & pages

Copy link

github-actions bot commented Aug 5, 2024

Transaction costs

Sizes and execution budgets for Hydra protocol transactions. Note that unlisted parameters are currently using arbitrary values and results are not fully deterministic and comparable to previous runs.

Metadata
Generated at 2024-08-12 13:41:27.324834471 UTC
Max. memory units 14000000
Max. CPU units 10000000000
Max. tx size (kB) 16384

Script summary

Name Hash Size (Bytes)
νInitial 2fac819a1f4f14e29639d1414220d2a18b6abd6b8e444d88d0dda8ff 3799
νCommit 2043a9f1a685bcf491413a5f139ee42e335157c8c6bc8d9e4018669d 1743
νHead bd9fad235c871fb7f837c767593018a84be3083ff80f9dab5f1c55f9 10194
μHead c8038945816586c4d38926ee63bba67821eb863794220ebbd0bf79ee* 4607
  • The minting policy hash is only usable for comparison. As the script is parameterized, the actual script is unique per head.

Init transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 5188 5.98 2.37 0.44
2 5389 7.21 2.85 0.47
3 5591 8.41 3.32 0.49
5 5993 11.32 4.48 0.54
10 7000 18.21 7.20 0.66
56 16246 81.71 32.33 1.76

Commit transaction costs

This uses ada-only outputs for better comparability.

UTxO Tx size % max Mem % max CPU Min fee ₳
1 557 10.52 4.15 0.29
2 749 13.86 5.65 0.34
3 937 17.33 7.20 0.38
5 1307 24.65 10.44 0.48
10 2243 45.22 19.36 0.75
20 4126 95.99 40.76 1.40

CollectCom transaction costs

Parties UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
1 58 550 21.46 8.41 0.41
2 113 659 33.03 13.08 0.54
3 170 769 46.12 18.44 0.69
4 226 879 62.39 25.10 0.87
5 282 989 76.71 31.14 1.04
6 338 1100 98.36 40.03 1.28

Cost of Decrement Transaction

Parties Tx size % max Mem % max CPU Min fee ₳
1 614 17.93 7.87 0.38
2 804 19.93 9.37 0.41
3 928 20.76 10.36 0.43
5 1223 23.52 12.90 0.49
10 2083 33.54 20.40 0.66
49 7725 94.46 72.58 1.78

Close transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 638 20.94 9.38 0.42
2 735 22.03 10.46 0.44
3 924 23.88 12.20 0.47
5 1171 26.90 15.02 0.53
10 1893 34.20 22.19 0.67
50 7909 99.80 83.83 1.91

Contest transaction costs

Parties Tx size % max Mem % max CPU Min fee ₳
1 686 27.18 11.68 0.48
2 804 28.94 13.18 0.51
3 951 30.63 14.66 0.55
5 1255 34.53 18.00 0.61
10 2122 44.50 26.57 0.79
37 6345 97.05 71.76 1.73

Abort transaction costs

There is some variation due to the random mixture of initial and already committed outputs.

Parties Tx size % max Mem % max CPU Min fee ₳
1 4978 13.91 5.81 0.52
2 5148 25.02 10.83 0.66
3 5244 37.68 16.46 0.80
4 5464 57.75 25.63 1.04
5 5633 74.27 32.98 1.24
6 5592 89.03 39.42 1.40

FanOut transaction costs

Involves spending head output and burning head tokens. Uses ada-only UTxO for better comparability.

Parties UTxO UTxO (bytes) Tx size % max Mem % max CPU Min fee ₳
5 0 0 5022 7.95 3.36 0.46
5 1 57 5056 8.69 3.91 0.47
5 5 284 5192 13.41 6.84 0.54
5 10 568 5360 19.06 10.39 0.62
5 20 1139 5702 30.38 17.51 0.77
5 30 1708 6042 41.70 24.63 0.93
5 40 2276 6380 53.23 31.84 1.09
5 50 2845 6720 64.56 38.97 1.25
5 81 4607 7768 99.53 61.01 1.74

End-to-end benchmark results

This page is intended to collect the latest end-to-end benchmark results produced by Hydra's continuous integration (CI) system from the latest master code.

Please note that these results are approximate as they are currently produced from limited cloud VMs and not controlled hardware. Rather than focusing on the absolute results, the emphasis should be on relative results, such as how the timings for a scenario evolve as the code changes.

Generated at 2024-08-12 13:44:07.357838491 UTC

Baseline Scenario

Number of nodes 1
Number of txs 3000
Avg. Confirmation Time (ms) 4.709241358
P99 11.07948150999995ms
P95 6.580493849999998ms
P50 4.381285999999999ms
Number of Invalid txs 0

Three local nodes

Number of nodes 3
Number of txs 9000
Avg. Confirmation Time (ms) 23.452212543
P99 65.24122118000118ms
P95 33.55512524999999ms
P50 21.187852ms
Number of Invalid txs 0

Copy link

github-actions bot commented Aug 5, 2024

Test Results

467 tests  ±0   460 ✅ ±0   16m 25s ⏱️ -43s
148 suites ±0     7 💤 ±0 
  5 files   ±0     0 ❌ ±0 

Results for commit 32552f0. ± Comparison against base commit 1ae6839.

♻️ This comment has been updated with latest results.

@ch1bo ch1bo changed the title Filip/feat/docs landing page New landing page Aug 6, 2024
@ch1bo ch1bo added the documentation 📖 Documentation changes label Aug 6, 2024
@ch1bo ch1bo added this to the 0.18.0 milestone Aug 6, 2024
@fstoqnov-iohk fstoqnov-iohk marked this pull request as draft August 6, 2024 08:08
docs/src/css/custom.css Show resolved Hide resolved
docs/docusaurus.config.js Show resolved Hide resolved
@fstoqnov-iohk fstoqnov-iohk marked this pull request as ready for review August 7, 2024 07:46
docs/docs/homepage/case-studies.ts Outdated Show resolved Hide resolved
docs/docusaurus.config.js Outdated Show resolved Hide resolved
@ffakenz
Copy link
Contributor

ffakenz commented Aug 7, 2024

From my point of view, when building the docs, I see there are a lot of unnecessary traces:

{
  disabled: false,
  shouldRender: false,
  toggle: [Function (anonymous)],
  shown: false
}

which i wonder if it is possible to get rid of.

@ffakenz
Copy link
Contributor

ffakenz commented Aug 7, 2024

Noticed all links are broken, do you think we can get them back?

@ffakenz
Copy link
Contributor

ffakenz commented Aug 7, 2024

🙏 Please, I beg you:

can we find better images for docs/static/img/case-studies.png and docs/static/img/case-studies-mobile.png?

I find them current ones completely misleading.

@ffakenz
Copy link
Contributor

ffakenz commented Aug 7, 2024

This new landing page looks sick!! 🔥🔥🔥

Great Job! 👏

@ianhanssoniohk
Copy link
Contributor

🙏 Please, I beg you:

can we find better images for docs/static/img/case-studies.png and docs/static/img/case-studies-mobile.png?

I find them current ones completely misleading.

I'll check with PM / Design.

@ianhanssoniohk
Copy link
Contributor

@leandroiohk We'll need to optimise the images and videos properly included here statically, will cover tomorrow.

Copy link
Collaborator

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

The file docs/static/hydra-docs-landing-graphic.png is wrong, see comment. Where are the sources for this to fix?

My second major point: I see MANY vendored components from the docusaurus theme. I can't imagine that all of them needed changing and maybe the whole theme was vendored and modified in some parts only? Which of those have been modified and how? My ask: can we keep the vendoring to a minimum?

docs/docusaurus.config.js Show resolved Hide resolved
docs/docusaurus.config.js Outdated Show resolved Hide resolved
docs/src/components/homepage/Carousel/Coursel.tsx Outdated Show resolved Hide resolved
docs/src/css/custom.css Show resolved Hide resolved
docs/static/hydra-docs-landing-graphic.png Outdated Show resolved Hide resolved
@ch1bo ch1bo force-pushed the filip/feat/docs-landing-page branch from 8615a1f to c6c2966 Compare August 8, 2024 12:42
Copy link
Collaborator

@ch1bo ch1bo left a comment

Choose a reason for hiding this comment

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

Another issue with the current site is that it does not yarn build: https://github.com/cardano-scaling/hydra/actions/runs/10303762271/job/28522603240?pr=1549

Judging from the error, it seems to trip over react component hooks in server side rendering.

@ianhanssoniohk
Copy link
Contributor

Another issue with the current site is that it does not yarn build: https://github.com/cardano-scaling/hydra/actions/runs/10303762271/job/28522603240?pr=1549

Judging from the error, it seems to trip over react component hooks in server side rendering.

Yeah we have a fix for this just working through some final amends and getting the build to play nice.

@ch1bo ch1bo force-pushed the filip/feat/docs-landing-page branch from b7d7a8d to 8228783 Compare August 8, 2024 16:03
docs/docusaurus.config.js Outdated Show resolved Hide resolved
docs/docs/homepage/features.tsx Outdated Show resolved Hide resolved
docs/src/pages/index.tsx Outdated Show resolved Hide resolved
docs/docs/homepage/how-it-works.ts Outdated Show resolved Hide resolved
@ch1bo ch1bo force-pushed the filip/feat/docs-landing-page branch from bc1a324 to 8af9b39 Compare August 8, 2024 16:35
@ch1bo ch1bo removed this from the 0.18.0 milestone Aug 9, 2024
@noonio
Copy link
Contributor

noonio commented Aug 9, 2024

Another issue with the current site is that it does not yarn build: https://github.com/cardano-scaling/hydra/actions/runs/10303762271/job/28522603240?pr=1549
Judging from the error, it seems to trip over react component hooks in server side rendering.

Yeah we have a fix for this just working through some final amends and getting the build to play nice.

following this, it would be great to update the readme for the docs with build instructions, as I don't know if you've fixed this and i also get errors with both yarn build and npm i

yarn

...
[INFO] [en] Creating an optimized production build...
[ERROR] Unable to build website for locale en.
[ERROR] Error: Cannot find module 'tailwindcss'
Require stack:
- /home/noon/dev/w/hydra/docs/docusaurus.config.js
- /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/server/config.js
- /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/server/index.js
- /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/commands/build.js
- /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.configurePostCss (/home/noon/dev/w/hydra/docs/docusaurus.config.js:71:39)
    at overridePostCssOptions (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/webpack/utils.js:151:44)
    at /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/webpack/utils.js:159:36
    at Array.forEach (<anonymous>)
    at overridePostCssOptions (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/webpack/utils.js:159:18)
    at /home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/webpack/utils.js:162:45
[INFO] Docusaurus version: 2.4.1
Node version: v18.17.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

-- edit:

you need to run yarn alone, and then yarn build, apparently. 🙄 ; so this one works, but npm still not. (should it?!)

-- double edit

i still get a yarn build failure; but a different one now

[ERROR] Unable to build website for locale en.
[ERROR] Error: Docusaurus found broken links!

Please check the pages of your site in the list below, and make sure you don't reference any path that does not exist.
Note: it's possible to ignore broken links with the 'onBrokenLinks' Docusaurus configuration, and let the build pass.

Exhaustive list of all broken links found:

- On source page path = /head-protocol/benchmarks/profiling:
   -> linking to /head-protocol/haddock/hydra-plutus/Hydra-Contract-Commit.html
   -> linking to /head-protocol/haddock/hydra-plutus/Hydra-Contract-Head.html
   -> linking to /head-protocol/haddock/hydra-node/Hydra-Ledger-Cardano-Evaluate.html#v:prepareTxScripts (resolved as: /head-protocol/haddock/hydra-node/Hydra-Ledger-Cardano-Evaluate.html)

- On source page path = /head-protocol/audit-guidelines:
   -> linking to /head-protocol/haddock/hydra-node/tests/Hydra-Chain-Direct-Contract-Mutation.html

    at throwError (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/logger/lib/index.js:76:11)
    at handleBrokenLinks (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/server/brokenLinks.js:153:47)
    at async buildLocale (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/commands/build.js:186:5)
    at async tryToBuildLocale (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/commands/build.js:41:20)
    at async mapAsyncSequential (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/utils/lib/jsUtils.js:34:24)
    at async Command.build (/home/noon/dev/w/hydra/docs/node_modules/@docusaurus/core/lib/commands/build.js:76:21)

npm

02:36 pm φ docs (filip/feat/docs-landing-page +) npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"^18.3.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.8.4 || ^17.0.0" from @docusaurus/[email protected]
npm ERR! node_modules/@docusaurus/core
npm ERR!   @docusaurus/core@"^2.4.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /home/noon/.npm/_logs/2024-08-09T13_36_20_573Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /home/noon/.npm/_logs/2024-08-09T13_36_20_573Z-debug-0.log

@noonio
Copy link
Contributor

noonio commented Aug 9, 2024

Thanks for the work on this :)

Can we keep this in Draft mode until it's ready for review? Or, alternatively, have a list of items that need to be checked off so we know when it's ready to look at? Thanks ! :)

@ianhanssoniohk
Copy link
Contributor

noonio

The broken links failing on a static build locally I believe would be due to other dependencies which in the pipeline are pulled in through other actions. To my knowledge this isn't something changed in this PR.

leandroiohk and others added 22 commits August 12, 2024 11:09
These components have been "swizzled", but were not modified to the
upstream sources. Confirmed by running

for f in $(find src/theme/ -type d); do
  yarn swizzle @docusaurus/theme-classic -e --danger "${f#src/theme/}"
done

And then looking at components which were not semantically modified.
@ch1bo ch1bo force-pushed the filip/feat/docs-landing-page branch from 3d0542b to 9f820ef Compare August 12, 2024 09:09
@ch1bo ch1bo marked this pull request as ready for review August 12, 2024 09:09
@ch1bo ch1bo force-pushed the filip/feat/docs-landing-page branch from 32552f0 to fc0985b Compare August 12, 2024 13:38
@ch1bo ch1bo enabled auto-merge August 12, 2024 13:42
@ch1bo ch1bo merged commit 729216b into master Aug 12, 2024
20 checks passed
@ch1bo ch1bo deleted the filip/feat/docs-landing-page branch August 12, 2024 13:47
@ch1bo ch1bo mentioned this pull request Aug 12, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 Documentation changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants