diff --git a/.github/workflows/common/set-up-mdbook/action.yaml b/.github/workflows/common/set-up-mdbook/action.yaml index 73f01a7..badbd77 100644 --- a/.github/workflows/common/set-up-mdbook/action.yaml +++ b/.github/workflows/common/set-up-mdbook/action.yaml @@ -11,7 +11,7 @@ runs: uses: jontze/action-mdbook@6c0be56d14c4bf16861b00af61f50ff7400ce502 with: token: ${{ inputs.token }} - mdbook-version: "0.4.49" # Use a semver compatible string + mdbook-version: "0.4.51" # Use a semver compatible string - name: Show mdbook version shell: bash diff --git a/README.md b/README.md index bb32b20..1ab1416 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ or [Frequency on GitHub](https://github.com/frequency-chain/frequency) To build the generator locally, install [mdBook](https://github.com/rust-lang/mdBook.git). ```bash -cargo install mdbook@0.4.49 +cargo install mdbook@0.4.51 npm install ``` diff --git a/css/overrides.css b/css/overrides.css index d0557be..25db245 100644 --- a/css/overrides.css +++ b/css/overrides.css @@ -135,7 +135,7 @@ body#sidebar { #sidebar .sidebar-scrollbox { display: block; position: sticky; - top: 80px; + top: calc(var(--header-height) - 5px); box-sizing: padding-box; padding: 0; max-height: 100vh; @@ -309,6 +309,7 @@ mark { h1:target::before { display: none; + margin-inline-start: 0; } h2:target::before, @@ -318,6 +319,7 @@ h3:target::before { width: 50px; position: relative; color: var(--headers); + margin-inline-start: 0; } h4:target::before, @@ -328,6 +330,7 @@ h6:target::before { width: 40px; position: relative; color: var(--headers); + margin-inline-start: 0; } /* Override some colors */ @@ -339,6 +342,33 @@ h6:target::before { color: var(--headers); } +#mdbook-help-popup kbd { + color: var(--bg); + background-color: var(--fg); +} + +.warning { + padding-left: 30px; +} +.warning:before { + margin-inline-start: calc(-1.5rem - 30px); +} + +/* Table settings */ + +table thead { + background: var(--table-header-bg); + color: var(--table-header-fg); +} +table thead th { + border: 1px var(--table-header-fg) solid; +} +/* Alternate background colors for rows */ +table tbody tr:nth-child(2n) { + background: var(--table-alternate-bg); + color: var(--table-alternate-fg); +} + /* Replace Font-Awesome */ .fa.fa-github { diff --git a/pages/Governance/index.md b/pages/Governance/index.md index 7f782e7..1dc2c6f 100644 --- a/pages/Governance/index.md +++ b/pages/Governance/index.md @@ -1,6 +1,6 @@ # Governance -Frequency Governance currently uses [Polkadot Governance V1](https://wiki.polkadot.network/learn/archive/learn-governance/): a tricameral governance structure which includes coordinated governance by three institutions: the [Frequency Council](https://dotapps-io.ipns.dweb.link?rpc=wss%3A%2F%2F1.rpc.frequency.xyz#/council), analogous to the Council in Polkadot Governance V1, the [Technical Committee](https://dotapps-io.ipns.dweb.link?rpc=wss%3A%2F%2F1.rpc.frequency.xyz#/techcomm), analogous to the Technical Committee in Polkadot Governance V1, and token holder voting, analogous to the Public in Polkadot Governance V1. +Frequency Governance currently uses [Polkadot Governance V1](https://github.com/w3f/polkadot-wiki/blob/52440693c9db5d300fd843b16c95bd6edd0fe6fe/docs/learn/archive/learn-governance.md): a tricameral governance structure which includes coordinated governance by three institutions: the [Frequency Council](https://dotapps-io.ipns.dweb.link?rpc=wss%3A%2F%2F1.rpc.frequency.xyz#/council), analogous to the Council in Polkadot Governance V1, the [Technical Committee](https://dotapps-io.ipns.dweb.link?rpc=wss%3A%2F%2F1.rpc.frequency.xyz#/techcomm), analogous to the Technical Committee in Polkadot Governance V1, and token holder voting, analogous to the Public in Polkadot Governance V1. ## Governance Parameters diff --git a/pages/Tokenomics/CapacityStaking.md b/pages/Tokenomics/CapacityStaking.md index 6ba2b5c..2019c29 100644 --- a/pages/Tokenomics/CapacityStaking.md +++ b/pages/Tokenomics/CapacityStaking.md @@ -13,7 +13,7 @@ The second goal is minimizing spam in a system designed to minimize Message publ As the cost of Message publishing decreases, the viability of spam Messages increases proportionally. The design of Capacity attempts to balance these two goals while minimizing excessive churn of the native token itself. - +{{#svg-embed pages/images/CapacitySimple.svg Capacity Staking Diagram}} While all transaction fees on Frequency can be paid for with FRQCY, certain types of transaction fees can instead use an equivalent amount of Capacity, which strikes a balance between Message publishing and Stateful Storage cost on one hand, and spam prevention on the other, using three core mechanisms: staking, renewal, and unstaking. diff --git a/pages/Tokenomics/CollatorRewards.md b/pages/Tokenomics/CollatorRewards.md index 14357ee..2957b22 100644 --- a/pages/Tokenomics/CollatorRewards.md +++ b/pages/Tokenomics/CollatorRewards.md @@ -6,7 +6,7 @@ However, block formation is still a Frequency responsibility that must be perfor [Public Collators](../Glossary.md#public-collator) must stake to the network to participate. All Collators participating in block formation activities will eventually receive token rewards, though the details of this mechanism will be finalized as part of the process of launching Public Collators. - +{{#svg-embed pages/images/CollatorRewards.svg Collator Rewards Diagram}} Collators are analogous to validators in other proof of stake networks, but the work done by Collators is significantly lower, requiring less computational overhead and lower participation levels, given that consensus and finality occur at the Relay Chain level. Public Collators are currently a roadmap item, and Frequency currently uses [Invulnerable Collators](../Glossary.md#invulnerable-collator) that do not receive rewards for block formation. diff --git a/pages/Tokenomics/InflationLiquidity.md b/pages/Tokenomics/InflationLiquidity.md index 2e19fa5..c27bcee 100644 --- a/pages/Tokenomics/InflationLiquidity.md +++ b/pages/Tokenomics/InflationLiquidity.md @@ -30,7 +30,7 @@ However, governance deposits are not anticipated to generate significant reducti Decreases in circulating supply are triggered primarily by increased staking activity. Both Capacity Staking and Provider Boosting lower overall token circulation levels as the number of staked tokens increase. Given the utility that these staking mechanisms provide, relatively high global stake rates are assumed in both early and later stages of the network. -Staking levels don't decrease Providers’ ability to pay transactions fees for certain transaction types, however, given that both types of staking generate Capacity. +Staking levels don't decrease Providers’ ability to pay transaction fees for certain transaction types, however, given that both types of staking generate Capacity. Generally, staking models require derivatives like "liquid staking" or they risk decreasing network transactions due to a smaller circulating supply of tokens available to pay transaction fees, which can reduce the value of the network. Frequency is less susceptible to that correlation, since Capacity generated from staking can actually be spent on transaction fees. This means that a lower circulating supply of FRQCY does not necessarily result in a lower transaction volume on chain due to Capacity-related transactions. diff --git a/pages/Tokenomics/ProviderBoosting.md b/pages/Tokenomics/ProviderBoosting.md index 909e37f..7d14825 100644 --- a/pages/Tokenomics/ProviderBoosting.md +++ b/pages/Tokenomics/ProviderBoosting.md @@ -4,7 +4,7 @@ Frequency incorporates a second form of staking called Provider Boosting. While Capacity Staking solely produces Capacity and is designed to help Providers maximize economic utility for publishing Messages and managing Stateful Storage, Provider Boosting gives users a mechanism to provide support for, or withdraw support from, Providers by staking FRQCY. Provider Boosting also gives individual users a mechanism to receive FRQCY rewards directly and benefit from the value accrual potential of the broader cryptoeconomic system. - +{{#svg-embed pages/images/ProviderBoosting.svg Provider Boosting Diagram}} Like Capacity Staking, Provider Boosting also generates Capacity and therefore requires a Provider to be designated as part of the staking process. In this scenario, a different ratio of FRQCY to Capacity (the Provider Boosting Ratio) is used, which is always less token-efficient than the Capacity Staking Ratio in order to generate an equivalent amount of Capacity. @@ -15,7 +15,7 @@ The reward is distributed at the end of each Reward Epoch, a number of blocks se Users must maintain their full stake throughout the entirety of the Reward Epoch in order to qualify for a reward. Each Reward Epoch has a fixed number of tokens that can be minted to reward Provider Boosting participants, and those rewards are paid based on the ratio of the user's Provider Boosting stake to all user Provider Boosting stakes across all Providers. -Token for rewards are not minted during, or at the end of, the Reward Epoch. +Tokens for rewards are not minted during, or at the end of, the Reward Epoch. Instead, tokens are minted at the time they are claimed by the Token Account holder, sometime after the end of the applicable Reward Epoch. However, all rewards are capped at a maximum Annual Rewards Rate set by governance. Given that the reward is paid via new token minting, the reward for Provider Boosting contributes to FRQCY inflation. diff --git a/pages/Tokenomics/index.md b/pages/Tokenomics/index.md index ca43c8a..33aacc8 100644 --- a/pages/Tokenomics/index.md +++ b/pages/Tokenomics/index.md @@ -1,7 +1,7 @@ # Tokenomics Frequency's economic model has been designed to optimize for the scalability concerns associated with social networking activities at population scale, broadly defined as any interaction between two or more participants in the global network. -The design anticipates a mix of data focused transactions centered around writes, updates, and reads applied to a highly scaled corpus of data. +The design anticipates a mix of data-focused transactions centered around writes, updates, and reads applied to a highly scaled corpus of data. Key objectives of the design are to minimize price volatility and facilitate value capture over the long term. Like most blockchains, Frequency enables transaction fees to be paid in its native token: Mainnet utilizes a utility token called FRQCY, while on Testnet, the token is denoted as XRQCY. diff --git a/pages/images/CapacitySimple-Dark.svg b/pages/images/CapacitySimple-Dark.svg new file mode 100644 index 0000000..53160ab --- /dev/null +++ b/pages/images/CapacitySimple-Dark.svg @@ -0,0 +1,111 @@ + diff --git a/pages/images/CapacitySimple.svg b/pages/images/CapacitySimple.svg new file mode 100644 index 0000000..0e4a4fa --- /dev/null +++ b/pages/images/CapacitySimple.svg @@ -0,0 +1,111 @@ + diff --git a/pages/images/CollatorRewards-Dark.svg b/pages/images/CollatorRewards-Dark.svg new file mode 100644 index 0000000..92ee56d --- /dev/null +++ b/pages/images/CollatorRewards-Dark.svg @@ -0,0 +1,123 @@ + diff --git a/pages/images/CollatorRewards.svg b/pages/images/CollatorRewards.svg new file mode 100644 index 0000000..dbbe12d --- /dev/null +++ b/pages/images/CollatorRewards.svg @@ -0,0 +1,124 @@ + diff --git a/pages/images/ProviderBoosting-Dark.svg b/pages/images/ProviderBoosting-Dark.svg new file mode 100644 index 0000000..6518062 --- /dev/null +++ b/pages/images/ProviderBoosting-Dark.svg @@ -0,0 +1,127 @@ + diff --git a/pages/images/ProviderBoosting.svg b/pages/images/ProviderBoosting.svg new file mode 100644 index 0000000..e313ef9 --- /dev/null +++ b/pages/images/ProviderBoosting.svg @@ -0,0 +1,127 @@ + diff --git a/theme/book.js b/theme/book.js index 502fe32..7036ead 100644 --- a/theme/book.js +++ b/theme/book.js @@ -628,7 +628,7 @@ aria-label="Show hidden lines">'; (function chapterNavigation() { document.addEventListener("keydown", function (e) { - if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { + if (e.altKey || e.ctrlKey || e.metaKey) { return; } if (window.search && window.search.hasFocus()) { @@ -648,6 +648,53 @@ aria-label="Show hidden lines">'; window.location.href = previousButton.href; } } + function showHelp() { + const container = document.getElementById("mdbook-help-container"); + const overlay = document.getElementById("mdbook-help-popup"); + container.style.display = "flex"; + + // Clicking outside the popup will dismiss it. + const mouseHandler = (event) => { + if (overlay.contains(event.target)) { + return; + } + if (event.button !== 0) { + return; + } + event.preventDefault(); + event.stopPropagation(); + document.removeEventListener("mousedown", mouseHandler); + hideHelp(); + }; + + // Pressing esc will dismiss the popup. + const escapeKeyHandler = (event) => { + if (event.key === "Escape") { + event.preventDefault(); + event.stopPropagation(); + document.removeEventListener("keydown", escapeKeyHandler, true); + hideHelp(); + } + }; + document.addEventListener("keydown", escapeKeyHandler, true); + document.getElementById("mdbook-help-container").addEventListener("mousedown", mouseHandler); + } + function hideHelp() { + document.getElementById("mdbook-help-container").style.display = "none"; + } + + // Usually needs the Shift key to be pressed + switch (e.key) { + case "?": + e.preventDefault(); + showHelp(); + break; + } + + // Rest of the keys are only active when the Shift key is not pressed + if (e.shiftKey) { + return; + } switch (e.key) { case "ArrowRight": e.preventDefault(); diff --git a/theme/css/print.css b/theme/css/print.css index 1b73b56..8fdd9d8 100644 --- a/theme/css/print.css +++ b/theme/css/print.css @@ -8,7 +8,8 @@ --table-border-color: #000 !important; --table-header-bg: #fff !important; - --table-alternate-bg: #fff !important; + --table-header-fg: #000 !important; + --table-alternate-fg: #000 !important; --color-scheme: light !important; } diff --git a/theme/css/variables.css b/theme/css/variables.css index 8cfbc82..5d22cdd 100644 --- a/theme/css/variables.css +++ b/theme/css/variables.css @@ -55,8 +55,10 @@ --warning-border: var(--color-warning); --table-border-color: var(--color-gray1); - --table-header-bg: var(--sidebar-bg); - --table-alternate-bg: var(--sidebar-bg); + --table-header-bg: var(--color-gray1); + --table-header-fg: var(--color-cream); + --table-alternate-bg: var(--color-gray1); + --table-alternate-fg: var(--color-cream); --searchbar-border-color: #aaa; --searchbar-bg: var(--color-white); @@ -83,6 +85,8 @@ --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); --footnote-highlight: var(--links); + + --overlay-bg: rgba(33, 40, 48, 0.4); } .light, @@ -118,7 +122,9 @@ html:not(.js) { --warning-border: var(--color-warning); --table-border-color: var(--sidebar-bg); + --table-header-fg: var(--color-black); --table-header-bg: var(--color-gray2); + --table-alternate-fg: var(--color-black); --table-alternate-bg: var(--color-gray3); --searchbar-border-color: #aaa; @@ -146,6 +152,8 @@ html:not(.js) { --copy-button-filter-hover: invert(14%) sepia(93%) saturate(4250%) hue-rotate(243deg) brightness(99%) contrast(130%); --footnote-highlight: var(--links); + + --overlay-bg: rgba(200, 200, 205, 0.4); } @media (prefers-color-scheme: dark) { @@ -181,8 +189,10 @@ html:not(.js) { --warning-border: var(--color-warning); --table-border-color: var(--color-gray1); - --table-header-bg: var(--sidebar-bg); - --table-alternate-bg: var(--sidebar-bg); + --table-header-bg: var(--color-gray1); + --table-header-fg: var(--color-cream); + --table-alternate-bg: var(--color-gray1); + --table-alternate-fg: var(--color-cream); --searchbar-border-color: #aaa; --searchbar-bg: var(--color-white); @@ -209,5 +219,7 @@ html:not(.js) { --copy-button-filter-hover: invert(36%) sepia(70%) saturate(503%) hue-rotate(167deg) brightness(98%) contrast(89%); --footnote-highlight: var(--links); + + --overlay-bg: rgba(33, 40, 48, 0.4); } } diff --git a/theme/fonts/Newake-Font-Regular.eot b/theme/fonts/Newake-Font-Regular.eot deleted file mode 100644 index 4969133..0000000 Binary files a/theme/fonts/Newake-Font-Regular.eot and /dev/null differ diff --git a/theme/fonts/Newake-Font-Regular.otf b/theme/fonts/Newake-Font-Regular.otf deleted file mode 100644 index 24eb2a6..0000000 Binary files a/theme/fonts/Newake-Font-Regular.otf and /dev/null differ diff --git a/theme/fonts/Newake-Font-Regular.svg b/theme/fonts/Newake-Font-Regular.svg deleted file mode 100644 index d7764ae..0000000 --- a/theme/fonts/Newake-Font-Regular.svg +++ /dev/null @@ -1,5973 +0,0 @@ - - - diff --git a/theme/fonts/Newake-Font-Regular.ttf b/theme/fonts/Newake-Font-Regular.ttf deleted file mode 100644 index 54e8790..0000000 Binary files a/theme/fonts/Newake-Font-Regular.ttf and /dev/null differ diff --git a/theme/fonts/Newake-Font-Regular.woff b/theme/fonts/Newake-Font-Regular.woff deleted file mode 100644 index 164d042..0000000 Binary files a/theme/fonts/Newake-Font-Regular.woff and /dev/null differ diff --git a/theme/fonts/Newake-Font-Regular.woff2 b/theme/fonts/Newake-Font-Regular.woff2 deleted file mode 100644 index dfa10af..0000000 Binary files a/theme/fonts/Newake-Font-Regular.woff2 and /dev/null differ diff --git a/theme/fonts/NewakeFont-Regular-License.txt b/theme/fonts/NewakeFont-Regular-License.txt deleted file mode 100644 index 1efbb85..0000000 --- a/theme/fonts/NewakeFont-Regular-License.txt +++ /dev/null @@ -1,20 +0,0 @@ - -NEWAKE FONT -by Indieground Design © 2021. -V.2.1 - - -_____________________________________________________________________________ - - -This is a license for commercial use, sales, and distribution of designs and documents which are created using the font. This may include printed materials, logos, and rendered content like photographs, film, video and bitmap graphics. -If distributed, the design should not contain the original font, but can be converted to vector outlines, rasterized, or subsetted and embedded in an electronic document like a PDF or eBook. - -For any doubt or question contact us at info@indieground.net - -_____________________________________________________________________________ - - -info@indieground.net -https://indieground.net - diff --git a/theme/fonts/fonts.css b/theme/fonts/fonts.css index 279f548..7f9e1c3 100644 --- a/theme/fonts/fonts.css +++ b/theme/fonts/fonts.css @@ -6,15 +6,6 @@ src: url("../fonts/source-code-pro-v11-all-charsets-500.woff2") format("woff2"); } -@font-face { - font-family: "Newake"; - src: url("../fonts/Newake-Font-Regular.eot"); - src: - url("../fonts/Newake-Font-Regular.woff") format("woff"), - url("../fonts/Newake-Font-Regular.otf") format("opentype"), - url("../fonts/Newake-Font-Regular.svg#filename") format("svg"); -} - @font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.eot"); diff --git a/theme/index.hbs b/theme/index.hbs index 09f2148..70e2550 100644 --- a/theme/index.hbs +++ b/theme/index.hbs @@ -61,8 +61,6 @@
- -