0?d:["plain"],s=u):(d=O(d,u.type),u.alias&&(d=O(d,u.alias)),s=u.content),"string"==typeof s){var m=s.split(x),p=m.length;c.push({types:d,content:m[0]});for(var f=1;fo.createElement("span",(0,a.A)({key:t},i({token:e,key:t})))));return o.createElement("span",s,r?o.createElement(o.Fragment,null,o.createElement("span",{className:S.codeLineNumber}),o.createElement("span",{className:S.codeLineContent},d)):d,o.createElement("br",null))}var I=n(1312);function U(e){return o.createElement("svg",(0,a.A)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"}))}function D(e){return o.createElement("svg",(0,a.A)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}const R={copyButtonCopied:"copyButtonCopied_obH4",copyButtonIcons:"copyButtonIcons_eSgA",copyButtonIcon:"copyButtonIcon_y97N",copyButtonSuccessIcon:"copyButtonSuccessIcon_LjdS"};function V(e){let{code:t,className:n}=e;const[a,r]=(0,o.useState)(!1),c=(0,o.useRef)(void 0),i=(0,o.useCallback)((()=>{!function(e,t){let{target:n=document.body}=void 0===t?{}:t;if("string"!=typeof e)throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof e}\`.`);const a=document.createElement("textarea"),o=document.activeElement;a.value=e,a.setAttribute("readonly",""),a.style.contain="strict",a.style.position="absolute",a.style.left="-9999px",a.style.fontSize="12pt";const r=document.getSelection(),l=r.rangeCount>0&&r.getRangeAt(0);n.append(a),a.select(),a.selectionStart=0,a.selectionEnd=e.length;let c=!1;try{c=document.execCommand("copy")}catch{}a.remove(),l&&(r.removeAllRanges(),r.addRange(l)),o&&o.focus()}(t),r(!0),c.current=window.setTimeout((()=>{r(!1)}),1e3)}),[t]);return(0,o.useEffect)((()=>()=>window.clearTimeout(c.current)),[]),o.createElement("button",{type:"button","aria-label":a?(0,I.T)({id:"theme.CodeBlock.copied",message:"Copied",description:"The copied button label on code blocks"}):(0,I.T)({id:"theme.CodeBlock.copyButtonAriaLabel",message:"Copy code to clipboard",description:"The ARIA label for copy code blocks button"}),title:(0,I.T)({id:"theme.CodeBlock.copy",message:"Copy",description:"The copy button label on code blocks"}),className:(0,l.A)("clean-btn",n,R.copyButton,a&&R.copyButtonCopied),onClick:i},o.createElement("span",{className:R.copyButtonIcons,"aria-hidden":"true"},o.createElement(U,{className:R.copyButtonIcon}),o.createElement(D,{className:R.copyButtonSuccessIcon})))}function z(e){return o.createElement("svg",(0,a.A)({viewBox:"0 0 24 24"},e),o.createElement("path",{fill:"currentColor",d:"M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"}))}const W={wordWrapButtonIcon:"wordWrapButtonIcon_Bwma",wordWrapButtonEnabled:"wordWrapButtonEnabled_EoeP"};function $(e){let{className:t,onClick:n,isEnabled:a}=e;const r=(0,I.T)({id:"theme.CodeBlock.wordWrapToggle",message:"Toggle word wrap",description:"The title attribute for toggle word wrapping button of code block lines"});return o.createElement("button",{type:"button",onClick:n,className:(0,l.A)("clean-btn",t,a&&W.wordWrapButtonEnabled),"aria-label":r,title:r},o.createElement(z,{className:W.wordWrapButtonIcon,"aria-hidden":"true"}))}function G(e){let{children:t,className:n="",metastring:r,title:c,showLineNumbers:d,language:u}=e;const{prism:{defaultLanguage:m,magicComments:f}}=(0,i.p)(),h=u??function(e){const t=e.split(" ").find((e=>e.startsWith("language-")));return t?.replace(/language-/,"")}(n)??m,g=s(),v=function(){const[e,t]=(0,o.useState)(!1),[n,a]=(0,o.useState)(!1),r=(0,o.useRef)(null),l=(0,o.useCallback)((()=>{const n=r.current.querySelector("code");e?n.removeAttribute("style"):(n.style.whiteSpace="pre-wrap",n.style.overflowWrap="anywhere"),t((e=>!e))}),[r,e]),c=(0,o.useCallback)((()=>{const{scrollWidth:e,clientWidth:t}=r.current,n=e>t||r.current.querySelector("code").hasAttribute("style");a(n)}),[r]);return C(r,c),(0,o.useEffect)((()=>{c()}),[e,c]),(0,o.useEffect)((()=>(window.addEventListener("resize",c,{passive:!0}),()=>{window.removeEventListener("resize",c)})),[c]),{codeBlockRef:r,isEnabled:e,isCodeScrollable:n,toggle:l}}(),k=function(e){return e?.match(p)?.groups.title??""}(r)||c,{lineClassNames:N,code:A}=b(t,{metastring:r,language:h,magicComments:f}),L=d??function(e){return Boolean(e?.includes("showLineNumbers"))}(r);return o.createElement(E,{as:"div",className:(0,l.A)(n,h&&!n.includes(`language-${h}`)&&`language-${h}`)},k&&o.createElement("div",{className:y.codeBlockTitle},k),o.createElement("div",{className:y.codeBlockContent},o.createElement(M,(0,a.A)({},_,{theme:g,code:A,language:h??"text"}),(e=>{let{className:t,tokens:n,getLineProps:a,getTokenProps:r}=e;return o.createElement("pre",{tabIndex:0,ref:v.codeBlockRef,className:(0,l.A)(t,y.codeBlock,"thin-scrollbar")},o.createElement("code",{className:(0,l.A)(y.codeBlockLines,L&&y.codeBlockLinesWithNumbering)},n.map(((e,t)=>o.createElement(P,{key:t,line:e,getLineProps:a,getTokenProps:r,classNames:N[t],showLineNumbers:L})))))})),o.createElement("div",{className:y.buttonGroup},(v.isEnabled||v.isCodeScrollable)&&o.createElement($,{className:y.codeButton,onClick:()=>v.toggle(),isEnabled:v.isEnabled}),o.createElement(V,{className:y.codeButton,code:A}))))}function F(e){let{children:t,...n}=e;const l=(0,r.A)(),c=function(e){return o.Children.toArray(e).some((e=>(0,o.isValidElement)(e)))?e:Array.isArray(e)?e.join(""):e}(t),i="string"==typeof c?G:k;return o.createElement(i,(0,a.A)({key:String(l)},n),c)}},6140:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Xe});var a=n(6540),o=n(9024),r=n(9532);const l=a.createContext(null);function c(e){let{children:t,content:n}=e;const o=function(e){return(0,a.useMemo)((()=>({metadata:e.metadata,frontMatter:e.frontMatter,assets:e.assets,contentTitle:e.contentTitle,toc:e.toc})),[e])}(n);return a.createElement(l.Provider,{value:o},t)}function i(){const e=(0,a.useContext)(l);if(null===e)throw new r.dV("DocProvider");return e}function s(){const{metadata:e,frontMatter:t,assets:n}=i();return a.createElement(o.be,{title:e.title,description:e.description,keywords:t.keywords,image:n.image??t.image})}var d=n(53),u=n(4581),m=n(8168),p=n(1312),f=n(5489);function h(e){const{permalink:t,title:n,subLabel:o,isNext:r}=e;return a.createElement(f.A,{className:(0,d.A)("pagination-nav__link",r?"pagination-nav__link--next":"pagination-nav__link--prev"),to:t},o&&a.createElement("div",{className:"pagination-nav__sublabel"},o),a.createElement("div",{className:"pagination-nav__label"},n))}function g(e){const{previous:t,next:n}=e;return a.createElement("nav",{className:"pagination-nav docusaurus-mt-lg","aria-label":(0,p.T)({id:"theme.docs.paginator.navAriaLabel",message:"Docs pages",description:"The ARIA label for the docs pagination"})},t&&a.createElement(h,(0,m.A)({},t,{subLabel:a.createElement(p.A,{id:"theme.docs.paginator.previous",description:"The label used to navigate to the previous doc"},"Previous")})),n&&a.createElement(h,(0,m.A)({},n,{subLabel:a.createElement(p.A,{id:"theme.docs.paginator.next",description:"The label used to navigate to the next doc"},"Next"),isNext:!0})))}function b(){const{metadata:e}=i();return a.createElement(g,{previous:e.previous,next:e.next})}var v=n(4586),E=n(4070),y=n(7559),k=n(5597),N=n(2252);const A={unreleased:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(p.A,{id:"theme.docs.versions.unreleasedVersionLabel",description:"The label used to tell the user that he's browsing an unreleased doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is unreleased documentation for {siteTitle} {versionLabel} version.")},unmaintained:function(e){let{siteTitle:t,versionMetadata:n}=e;return a.createElement(p.A,{id:"theme.docs.versions.unmaintainedVersionLabel",description:"The label used to tell the user that he's browsing an unmaintained doc version",values:{siteTitle:t,versionLabel:a.createElement("b",null,n.label)}},"This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.")}};function C(e){const t=A[e.versionMetadata.banner];return a.createElement(t,e)}function L(e){let{versionLabel:t,to:n,onClick:o}=e;return a.createElement(p.A,{id:"theme.docs.versions.latestVersionSuggestionLabel",description:"The label used to tell the user to check the latest version",values:{versionLabel:t,latestVersionLink:a.createElement("b",null,a.createElement(f.A,{to:n,onClick:o},a.createElement(p.A,{id:"theme.docs.versions.latestVersionLinkLabel",description:"The label used for the latest version suggestion link label"},"latest version")))}},"For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).")}function _(e){let{className:t,versionMetadata:n}=e;const{siteConfig:{title:o}}=(0,v.A)(),{pluginId:r}=(0,E.vT)({failfast:!0}),{savePreferredVersionName:l}=(0,k.g1)(r),{latestDocSuggestion:c,latestVersionSuggestion:i}=(0,E.HW)(r),s=c??(u=i).docs.find((e=>e.id===u.mainDocId));var u;return a.createElement("div",{className:(0,d.A)(t,y.G.docs.docVersionBanner,"alert alert--warning margin-bottom--md"),role:"alert"},a.createElement("div",null,a.createElement(C,{siteTitle:o,versionMetadata:n})),a.createElement("div",{className:"margin-top--md"},a.createElement(L,{versionLabel:i.label,to:s.path,onClick:()=>l(i.name)})))}function T(e){let{className:t}=e;const n=(0,N.r)();return n.banner?a.createElement(_,{className:t,versionMetadata:n}):null}function w(e){let{className:t}=e;const n=(0,N.r)();return n.badge?a.createElement("span",{className:(0,d.A)(t,y.G.docs.docVersionBadge,"badge badge--secondary")},a.createElement(p.A,{id:"theme.docs.versionBadge.label",values:{versionLabel:n.label}},"Version: {versionLabel}")):null}function x(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n}=e;return a.createElement(p.A,{id:"theme.lastUpdated.atDate",description:"The words used to describe on which date a page has been last updated",values:{date:a.createElement("b",null,a.createElement("time",{dateTime:new Date(1e3*t).toISOString()},n))}}," on {date}")}function B(e){let{lastUpdatedBy:t}=e;return a.createElement(p.A,{id:"theme.lastUpdated.byUser",description:"The words used to describe by who the page has been last updated",values:{user:a.createElement("b",null,t)}}," by {user}")}function O(e){let{lastUpdatedAt:t,formattedLastUpdatedAt:n,lastUpdatedBy:o}=e;return a.createElement("span",{className:y.G.common.lastUpdated},a.createElement(p.A,{id:"theme.lastUpdated.lastUpdatedAtBy",description:"The sentence used to display when a page has been last updated, and by who",values:{atDate:t&&n?a.createElement(x,{lastUpdatedAt:t,formattedLastUpdatedAt:n}):"",byUser:o?a.createElement(B,{lastUpdatedBy:o}):""}},"Last updated{atDate}{byUser}"),!1)}const j={iconEdit:"iconEdit_Z9Sw"};function H(e){let{className:t,...n}=e;return a.createElement("svg",(0,m.A)({fill:"currentColor",height:"20",width:"20",viewBox:"0 0 40 40",className:(0,d.A)(j.iconEdit,t),"aria-hidden":"true"},n),a.createElement("g",null,a.createElement("path",{d:"m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"})))}function M(e){let{editUrl:t}=e;return a.createElement("a",{href:t,target:"_blank",rel:"noreferrer noopener",className:y.G.common.editThisPage},a.createElement(H,null),a.createElement(p.A,{id:"theme.common.editThisPage",description:"The link label to edit the current page"},"Edit this page"))}const S={tag:"tag_zVej",tagRegular:"tagRegular_sFm0",tagWithCount:"tagWithCount_h2kH"};function P(e){let{permalink:t,label:n,count:o}=e;return a.createElement(f.A,{href:t,className:(0,d.A)(S.tag,o?S.tagWithCount:S.tagRegular)},n,o&&a.createElement("span",null,o))}const I={tags:"tags_jXut",tag:"tag_QGVx"};function U(e){let{tags:t}=e;return a.createElement(a.Fragment,null,a.createElement("b",null,a.createElement(p.A,{id:"theme.tags.tagsListLabel",description:"The label alongside a tag list"},"Tags:")),a.createElement("ul",{className:(0,d.A)(I.tags,"padding--none","margin-left--sm")},t.map((e=>{let{label:t,permalink:n}=e;return a.createElement("li",{key:n,className:I.tag},a.createElement(P,{label:t,permalink:n}))}))))}const D={lastUpdated:"lastUpdated_vwxv"};function R(e){return a.createElement("div",{className:(0,d.A)(y.G.docs.docFooterTagsRow,"row margin-bottom--sm")},a.createElement("div",{className:"col"},a.createElement(U,e)))}function V(e){let{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:o,formattedLastUpdatedAt:r}=e;return a.createElement("div",{className:(0,d.A)(y.G.docs.docFooterEditMetaRow,"row")},a.createElement("div",{className:"col"},t&&a.createElement(M,{editUrl:t})),a.createElement("div",{className:(0,d.A)("col",D.lastUpdated)},(n||o)&&a.createElement(O,{lastUpdatedAt:n,formattedLastUpdatedAt:r,lastUpdatedBy:o})))}function z(){const{metadata:e}=i(),{editUrl:t,lastUpdatedAt:n,formattedLastUpdatedAt:o,lastUpdatedBy:r,tags:l}=e,c=l.length>0,s=!!(t||n||r);return c||s?a.createElement("footer",{className:(0,d.A)(y.G.docs.docFooter,"docusaurus-mt-lg")},c&&a.createElement(R,{tags:l}),s&&a.createElement(V,{editUrl:t,lastUpdatedAt:n,lastUpdatedBy:r,formattedLastUpdatedAt:o})):null}var W=n(1422),$=n(6342);function G(e){const t=e.map((e=>({...e,parentIndex:-1,children:[]}))),n=Array(7).fill(-1);t.forEach(((e,t)=>{const a=n.slice(2,e.level);e.parentIndex=Math.max(...a),n[e.level]=t}));const a=[];return t.forEach((e=>{const{parentIndex:n,...o}=e;n>=0?t[n].children.push(o):a.push(o)})),a}function F(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:a}=e;return t.flatMap((e=>{const t=F({toc:e.children,minHeadingLevel:n,maxHeadingLevel:a});return function(e){return e.level>=n&&e.level<=a}(e)?[{...e,children:t}]:t}))}function q(e){const t=e.getBoundingClientRect();return t.top===t.bottom?q(e.parentNode):t}function Y(e,t){let{anchorTopOffset:n}=t;const a=e.find((e=>q(e).top>=n));if(a){return function(e){return e.top>0&&e.bottom{e.current=t?0:document.querySelector(".navbar").clientHeight}),[t]),e}function Q(e){const t=(0,a.useRef)(void 0),n=Z();(0,a.useEffect)((()=>{if(!e)return()=>{};const{linkClassName:a,linkActiveClassName:o,minHeadingLevel:r,maxHeadingLevel:l}=e;function c(){const e=function(e){return Array.from(document.getElementsByClassName(e))}(a),c=function(e){let{minHeadingLevel:t,maxHeadingLevel:n}=e;const a=[];for(let o=t;o<=n;o+=1)a.push(`h${o}.anchor`);return Array.from(document.querySelectorAll(a.join()))}({minHeadingLevel:r,maxHeadingLevel:l}),i=Y(c,{anchorTopOffset:n.current}),s=e.find((e=>i&&i.id===function(e){return decodeURIComponent(e.href.substring(e.href.indexOf("#")+1))}(e)));e.forEach((e=>{!function(e,n){n?(t.current&&t.current!==e&&t.current.classList.remove(o),e.classList.add(o),t.current=e):e.classList.remove(o)}(e,e===s)}))}return document.addEventListener("scroll",c),document.addEventListener("resize",c),c(),()=>{document.removeEventListener("scroll",c),document.removeEventListener("resize",c)}}),[e,n])}function X(e){let{toc:t,className:n,linkClassName:o,isChild:r}=e;return t.length?a.createElement("ul",{className:r?void 0:n},t.map((e=>a.createElement("li",{key:e.id},a.createElement("a",{href:`#${e.id}`,className:o??void 0,dangerouslySetInnerHTML:{__html:e.value}}),a.createElement(X,{isChild:!0,toc:e.children,className:n,linkClassName:o}))))):null}const J=a.memo(X);function K(e){let{toc:t,className:n="table-of-contents table-of-contents__left-border",linkClassName:o="table-of-contents__link",linkActiveClassName:r,minHeadingLevel:l,maxHeadingLevel:c,...i}=e;const s=(0,$.p)(),d=l??s.tableOfContents.minHeadingLevel,u=c??s.tableOfContents.maxHeadingLevel,p=function(e){let{toc:t,minHeadingLevel:n,maxHeadingLevel:o}=e;return(0,a.useMemo)((()=>F({toc:G(t),minHeadingLevel:n,maxHeadingLevel:o})),[t,n,o])}({toc:t,minHeadingLevel:d,maxHeadingLevel:u});return Q((0,a.useMemo)((()=>{if(o&&r)return{linkClassName:o,linkActiveClassName:r,minHeadingLevel:d,maxHeadingLevel:u}}),[o,r,d,u])),a.createElement(J,(0,m.A)({toc:p,className:n,linkClassName:o},i))}const ee={tocCollapsibleButton:"tocCollapsibleButton_TO0P",tocCollapsibleButtonExpanded:"tocCollapsibleButtonExpanded_MG3E"};function te(e){let{collapsed:t,...n}=e;return a.createElement("button",(0,m.A)({type:"button"},n,{className:(0,d.A)("clean-btn",ee.tocCollapsibleButton,!t&&ee.tocCollapsibleButtonExpanded,n.className)}),a.createElement(p.A,{id:"theme.TOCCollapsible.toggleButtonLabel",description:"The label used by the button on the collapsible TOC component"},"On this page"))}const ne={tocCollapsible:"tocCollapsible_ETCw",tocCollapsibleContent:"tocCollapsibleContent_vkbj",tocCollapsibleExpanded:"tocCollapsibleExpanded_sAul"};function ae(e){let{toc:t,className:n,minHeadingLevel:o,maxHeadingLevel:r}=e;const{collapsed:l,toggleCollapsed:c}=(0,W.u)({initialState:!0});return a.createElement("div",{className:(0,d.A)(ne.tocCollapsible,!l&&ne.tocCollapsibleExpanded,n)},a.createElement(te,{collapsed:l,onClick:c}),a.createElement(W.N,{lazy:!0,className:ne.tocCollapsibleContent,collapsed:l},a.createElement(K,{toc:t,minHeadingLevel:o,maxHeadingLevel:r})))}const oe={tocMobile:"tocMobile_ITEo"};function re(){const{toc:e,frontMatter:t}=i();return a.createElement(ae,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:(0,d.A)(y.G.docs.docTocMobile,oe.tocMobile)})}const le={tableOfContents:"tableOfContents_bqdL",docItemContainer:"docItemContainer_F8PC"},ce="table-of-contents__link toc-highlight",ie="table-of-contents__link--active";function se(e){let{className:t,...n}=e;return a.createElement("div",{className:(0,d.A)(le.tableOfContents,"thin-scrollbar",t)},a.createElement(K,(0,m.A)({},n,{linkClassName:ce,linkActiveClassName:ie})))}function de(){const{toc:e,frontMatter:t}=i();return a.createElement(se,{toc:e,minHeadingLevel:t.toc_min_heading_level,maxHeadingLevel:t.toc_max_heading_level,className:y.G.docs.docTocDesktop})}const ue={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};function me(e){let{as:t,id:n,...o}=e;const{navbar:{hideOnScroll:r}}=(0,$.p)();if("h1"===t||!n)return a.createElement(t,(0,m.A)({},o,{id:void 0}));const l=(0,p.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof o.children?o.children:n});return a.createElement(t,(0,m.A)({},o,{className:(0,d.A)("anchor",r?ue.anchorWithHideOnScrollNavbar:ue.anchorWithStickyNavbar,o.className),id:n}),o.children,a.createElement(f.A,{className:"hash-link",to:`#${n}`,"aria-label":l,title:l},"\u200b"))}var pe=n(5680),fe=n(5260);var he=n(8059),ge=n.n(he);var be=n(2303);const ve={details:"details_lb9f",isBrowser:"isBrowser_bmU9",collapsibleContent:"collapsibleContent_i85q"};function Ee(e){return!!e&&("SUMMARY"===e.tagName||Ee(e.parentElement))}function ye(e,t){return!!e&&(e===t||ye(e.parentElement,t))}function ke(e){let{summary:t,children:n,...o}=e;const r=(0,be.A)(),l=(0,a.useRef)(null),{collapsed:c,setCollapsed:i}=(0,W.u)({initialState:!o.open}),[s,u]=(0,a.useState)(o.open),p=a.isValidElement(t)?t:a.createElement("summary",null,t??"Details");return a.createElement("details",(0,m.A)({},o,{ref:l,open:s,"data-collapsed":c,className:(0,d.A)(ve.details,r&&ve.isBrowser,o.className),onMouseDown:e=>{Ee(e.target)&&e.detail>1&&e.preventDefault()},onClick:e=>{e.stopPropagation();const t=e.target;Ee(t)&&ye(t,l.current)&&(e.preventDefault(),c?(i(!1),u(!0)):i(!0))}}),p,a.createElement(W.N,{lazy:!1,collapsed:c,disableSSRStyle:!0,onCollapseTransitionEnd:e=>{i(e),u(!e)}},a.createElement("div",{className:ve.collapsibleContent},n)))}const Ne={details:"details_b_Ee"},Ae="alert alert--info";function Ce(e){let{...t}=e;return a.createElement(ke,(0,m.A)({},t,{className:(0,d.A)(Ae,Ne.details,t.className)}))}function Le(e){return a.createElement(me,e)}const _e={containsTaskList:"containsTaskList_mC6p"};function Te(e){if(void 0!==e)return(0,d.A)(e,e?.includes("contains-task-list")&&_e.containsTaskList)}const we={img:"img_ev3q"};const xe="admonition_LlT9",Be="admonitionHeading_tbUL",Oe="admonitionIcon_kALy",je="admonitionContent_S0QG";const He={note:{infimaClassName:"secondary",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.3 5.69a.942.942 0 0 1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28 0 .52.09.7.28.18.19.28.42.28.7 0 .28-.09.52-.28.7a1 1 0 0 1-.7.3c-.28 0-.52-.11-.7-.3zM8 7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-.31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31.69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27 0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7 2.3c-3.14 0-5.7 2.54-5.7 5.68 0 3.14 2.56 5.7 5.7 5.7s5.7-2.55 5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7 .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"}))},label:a.createElement(p.A,{id:"theme.admonition.note",description:"The default label used for the Note admonition (:::note)"},"note")},tip:{infimaClassName:"success",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"}))},label:a.createElement(p.A,{id:"theme.admonition.tip",description:"The default label used for the Tip admonition (:::tip)"},"tip")},danger:{infimaClassName:"danger",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 12 16"},a.createElement("path",{fillRule:"evenodd",d:"M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"}))},label:a.createElement(p.A,{id:"theme.admonition.danger",description:"The default label used for the Danger admonition (:::danger)"},"danger")},info:{infimaClassName:"info",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 14 16"},a.createElement("path",{fillRule:"evenodd",d:"M7 2.3c3.14 0 5.7 2.56 5.7 5.7s-2.56 5.7-5.7 5.7A5.71 5.71 0 0 1 1.3 8c0-3.14 2.56-5.7 5.7-5.7zM7 1C3.14 1 0 4.14 0 8s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7zm1 3H6v5h2V4zm0 6H6v2h2v-2z"}))},label:a.createElement(p.A,{id:"theme.admonition.info",description:"The default label used for the Info admonition (:::info)"},"info")},caution:{infimaClassName:"warning",iconComponent:function(){return a.createElement("svg",{viewBox:"0 0 16 16"},a.createElement("path",{fillRule:"evenodd",d:"M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"}))},label:a.createElement(p.A,{id:"theme.admonition.caution",description:"The default label used for the Caution admonition (:::caution)"},"caution")}},Me={secondary:"note",important:"info",success:"tip",warning:"danger"};function Se(e){const{mdxAdmonitionTitle:t,rest:n}=function(e){const t=a.Children.toArray(e),n=t.find((e=>a.isValidElement(e)&&"mdxAdmonitionTitle"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return{mdxAdmonitionTitle:n,rest:o}}(e.children);return{...e,title:e.title??t,children:n}}const Pe={head:function(e){const t=a.Children.map(e.children,(e=>a.isValidElement(e)?function(e){if(e.props?.mdxType&&e.props.originalType){const{mdxType:t,originalType:n,...o}=e.props;return a.createElement(e.props.originalType,o)}return e}(e):e));return a.createElement(fe.A,e,t)},code:function(e){const t=["a","abbr","b","br","button","cite","code","del","dfn","em","i","img","input","ins","kbd","label","object","output","q","ruby","s","small","span","strong","sub","sup","time","u","var","wbr"];return a.Children.toArray(e.children).every((e=>"string"==typeof e&&!e.includes("\n")||(0,a.isValidElement)(e)&&t.includes(e.props?.mdxType)))?a.createElement("code",e):a.createElement(ge(),e)},a:function(e){return a.createElement(f.A,e)},pre:function(e){return a.createElement(ge(),(0,a.isValidElement)(e.children)&&"code"===e.children.props?.originalType?e.children.props:{...e})},details:function(e){const t=a.Children.toArray(e.children),n=t.find((e=>a.isValidElement(e)&&"summary"===e.props?.mdxType)),o=a.createElement(a.Fragment,null,t.filter((e=>e!==n)));return a.createElement(Ce,(0,m.A)({},e,{summary:n}),o)},ul:function(e){return a.createElement("ul",(0,m.A)({},e,{className:Te(e.className)}))},img:function(e){return a.createElement("img",(0,m.A)({loading:"lazy"},e,{className:(t=e.className,(0,d.A)(t,we.img))}));var t},h1:e=>a.createElement(Le,(0,m.A)({as:"h1"},e)),h2:e=>a.createElement(Le,(0,m.A)({as:"h2"},e)),h3:e=>a.createElement(Le,(0,m.A)({as:"h3"},e)),h4:e=>a.createElement(Le,(0,m.A)({as:"h4"},e)),h5:e=>a.createElement(Le,(0,m.A)({as:"h5"},e)),h6:e=>a.createElement(Le,(0,m.A)({as:"h6"},e)),admonition:function(e){const{children:t,type:n,title:o,icon:r}=Se(e),l=function(e){const t=Me[e]??e,n=He[t];return n||(console.warn(`No admonition config found for admonition type "${t}". Using Info as fallback.`),He.info)}(n),c=o??l.label,{iconComponent:i}=l,s=r??a.createElement(i,null);return a.createElement("div",{className:(0,d.A)(y.G.common.admonition,y.G.common.admonitionType(e.type),"alert",`alert--${l.infimaClassName}`,xe)},a.createElement("div",{className:Be},a.createElement("span",{className:Oe},s),c),a.createElement("div",{className:je},t))},mermaid:()=>null};function Ie(e){let{children:t}=e;return a.createElement(pe.xA,{components:Pe},t)}function Ue(e){let{children:t}=e;const n=function(){const{metadata:e,frontMatter:t,contentTitle:n}=i();return t.hide_title||void 0!==n?null:e.title}();return a.createElement("div",{className:(0,d.A)(y.G.docs.docMarkdown,"markdown")},n&&a.createElement("header",null,a.createElement(me,{as:"h1"},n)),a.createElement(Ie,null,t))}var De=n(1754),Re=n(9169),Ve=n(6025);function ze(e){return a.createElement("svg",(0,m.A)({viewBox:"0 0 24 24"},e),a.createElement("path",{d:"M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z",fill:"currentColor"}))}const We={breadcrumbHomeIcon:"breadcrumbHomeIcon_YNFT"};function $e(){const e=(0,Ve.A)("/");return a.createElement("li",{className:"breadcrumbs__item"},a.createElement(f.A,{"aria-label":(0,p.T)({id:"theme.docs.breadcrumbs.home",message:"Home page",description:"The ARIA label for the home page in the breadcrumbs"}),className:"breadcrumbs__link",href:e},a.createElement(ze,{className:We.breadcrumbHomeIcon})))}const Ge={breadcrumbsContainer:"breadcrumbsContainer_Z_bl"};function Fe(e){let{children:t,href:n,isLast:o}=e;const r="breadcrumbs__link";return o?a.createElement("span",{className:r,itemProp:"name"},t):n?a.createElement(f.A,{className:r,href:n,itemProp:"item"},a.createElement("span",{itemProp:"name"},t)):a.createElement("span",{className:r},t)}function qe(e){let{children:t,active:n,index:o,addMicrodata:r}=e;return a.createElement("li",(0,m.A)({},r&&{itemScope:!0,itemProp:"itemListElement",itemType:"https://schema.org/ListItem"},{className:(0,d.A)("breadcrumbs__item",{"breadcrumbs__item--active":n})}),t,a.createElement("meta",{itemProp:"position",content:String(o+1)}))}function Ye(){const e=(0,De.OF)(),t=(0,Re.Dt)();return e?a.createElement("nav",{className:(0,d.A)(y.G.docs.docBreadcrumbs,Ge.breadcrumbsContainer),"aria-label":(0,p.T)({id:"theme.docs.breadcrumbs.navAriaLabel",message:"Breadcrumbs",description:"The ARIA label for the breadcrumbs"})},a.createElement("ul",{className:"breadcrumbs",itemScope:!0,itemType:"https://schema.org/BreadcrumbList"},t&&a.createElement($e,null),e.map(((t,n)=>{const o=n===e.length-1;return a.createElement(qe,{key:n,active:o,index:n,addMicrodata:!!t.href},a.createElement(Fe,{href:t.href,isLast:o},t.label))})))):null}const Ze={docItemContainer:"docItemContainer_Djhp",docItemCol:"docItemCol_VOVn"};function Qe(e){let{children:t}=e;const n=function(){const{frontMatter:e,toc:t}=i(),n=(0,u.l)(),o=e.hide_table_of_contents,r=!o&&t.length>0;return{hidden:o,mobile:r?a.createElement(re,null):void 0,desktop:!r||"desktop"!==n&&"ssr"!==n?void 0:a.createElement(de,null)}}();return a.createElement("div",{className:"row"},a.createElement("div",{className:(0,d.A)("col",!n.hidden&&Ze.docItemCol)},a.createElement(T,null),a.createElement("div",{className:Ze.docItemContainer},a.createElement("article",null,a.createElement(Ye,null),a.createElement(w,null),n.mobile,a.createElement(Ue,null,t),a.createElement(z,null)),a.createElement(b,null))),n.desktop&&a.createElement("div",{className:"col col--3"},n.desktop))}function Xe(e){const t=`docs-doc-id-${e.content.metadata.unversionedId}`,n=e.content;return a.createElement(c,{content:e.content},a.createElement(o.e3,{className:t},a.createElement(s,null),a.createElement(Qe,null,a.createElement(n,null))))}},2252:(e,t,n)=>{"use strict";n.d(t,{n:()=>l,r:()=>c});var a=n(6540),o=n(9532);const r=a.createContext(null);function l(e){let{children:t,version:n}=e;return a.createElement(r.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(r);if(null===e)throw new o.dV("DocsVersionProvider");return e}},8426:(e,t)=>{function n(e){let t,n=[];for(let a of e.split(",").map((e=>e.trim())))if(/^-?\d+$/.test(a))n.push(parseInt(a,10));else if(t=a.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[e,a,o,r]=t;if(a&&r){a=parseInt(a),r=parseInt(r);const e=a{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,a,s,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(i(a=this._events[e]))return!1;if(r(a))switch(arguments.length){case 1:a.call(this);break;case 2:a.call(this,arguments[1]);break;case 3:a.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),a.apply(this,c)}else if(n(a))for(c=Array.prototype.slice.call(arguments,1),s=(o=a.slice()).length,u=0;u0&&this._events[e].length>s&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,a,s,c;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(s=(i=this._events[e]).length,a=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(c=s;c-- >0;)if(i[c]===t||i[c].listener&&i[c].listener===t){a=c;break}if(a<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(a,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},4103:(e,t,r)=>{"use strict";var n=r(6571),i=r(3371),a=r(7691);function s(e,t,r,i){return new n(e,t,r,i)}s.version=r(6938),s.AlgoliaSearchHelper=n,s.SearchParameters=i,s.SearchResults=a,e.exports=s},6732:(e,t,r)=>{"use strict";var n=r(2733);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(3014)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},1673:(e,t,r)=>{"use strict";var n=r(9110),i=r(317),a=r(1383),s={addRefinement:function(e,t,r){if(s.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],c={};return c[t]=a,n({},c,e)},removeRefinement:function(e,t,r){if(void 0===r)return s.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return s.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return s.isRefined(e,t,r)?s.removeRefinement(e,t,r):s.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,s=Object.keys(e).reduce((function(i,a){var s=e[a]||[],c=s.filter((function(e){return!t(e,a,r)}));return c.length!==s.length&&(n=!0),i[a]=c,i}),{});return n?s:e}},isRefined:function(e,t,r){var n=Boolean(e[t])&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=s},3371:(e,t,r)=>{"use strict";var n=r(9110),i=r(849),a=r(4843),s=r(4728),c=r(317),u=r(1383),o=r(7507),h=r(2208),f=r(1673);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return l(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"==typeof e?parseFloat(e):e})):"string"==typeof e?parseFloat(e):e}));r[t][e]=i}))})),t.numericRefinements=r}return s(e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&c(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):c(e.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=o(r);if(this.isNumericRefined(e,t,n))return this;var i=s({},this.numericRefinements);return i[e]=s({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&l(r.val,o(n))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return c(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return u(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var a=r[i],s={};return a=a||{},Object.keys(a).forEach((function(r){var n=a[r]||[],c=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||c.push(t)})),c.length!==n.length&&(t=!0),s[r]=c})),n[i]=s,n}),{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var a,s,c=o(r),u=void 0!==(a=this.numericRefinements[e][t],s=c,i(a,(function(e){return l(e,s)})));return n&&u},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0}))).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),a=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?u(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},6673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],o=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",h=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),l=e._getHierarchicalShowParentLevel(n),m=a(e._getHierarchicalFacetSortBy(n)),d=t.every((function(e){return e.exhaustive})),p=function(e,t,r,n,a){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var n=r(8965),i=r(9110),a=r(2909),s=r(849),c=r(3917),u=r(7577),o=r(4728),h=r(8601),f=a.escapeFacetValue,l=a.unescapeFacetValue,m=r(6673);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function p(e,t,r){t&&t[r]&&(e.stats=t[r])}function v(e,t,r){var a=t[0];this._rawResults=t;var u=this;Object.keys(a).forEach((function(e){u[e]=a[e]}));var h=o({persistHierarchicalRootCount:!1},r);Object.keys(h).forEach((function(e){u[e]=h[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),v=d(e.facets),g=d(e.disjunctiveFacets),y=1,R=a.facets||{};Object.keys(R).forEach((function(t){var r,n,i=R[t],o=(r=e.hierarchicalFacets,n=t,s(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(o){var h=o.attributes.indexOf(t),f=c(e.hierarchicalFacets,(function(e){return e.name===o.name}));u.hierarchicalFacets[f][h]={attribute:t,data:i,exhaustive:a.exhaustiveFacetsCount}}else{var l,m=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);m&&(l=g[t],u.disjunctiveFacets[l]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(u.disjunctiveFacets[l],a.facets_stats,t)),d&&(l=v[t],u.facets[l]={name:t,data:i,exhaustive:a.exhaustiveFacetsCount},p(u.facets[l],a.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],s=n&&n.facets?n.facets:{},h=e.getHierarchicalFacetByName(r);Object.keys(s).forEach((function(t){var r,f=s[t];if(h){r=c(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=c(u.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;u.hierarchicalFacets[r][m].data=o({},u.hierarchicalFacets[r][m].data,f)}else{r=g[t];var d=a.facets&&a.facets[t]||{};u.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:n.exhaustiveFacetsCount},p(u.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!u.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(l(n))>-1&&(u.disjunctiveFacets[r].data[n]=0)}))}})),y++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),s=e.getHierarchicalRefinement(r);0===s.length||s[0].split(a).length<2||t.slice(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var o=r[t],h=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(u.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(s.length>0&&!u.persistHierarchicalRootCount){var m=s[0].split(a)[0];l[m]=u.hierarchicalFacets[h][f].data[m]}u.hierarchicalFacets[h][f].data=i(l,o,u.hierarchicalFacets[h][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=v[t];u.facets[n]={name:t,data:R[t],exhaustive:a.exhaustiveFacetsCount},r.forEach((function(e){u.facets[n]=u.facets[n]||{name:t},u.facets[n].data=u.facets[n].data||{},u.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function g(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=s(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=s(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var a=s(e.hierarchicalFacets,r);if(!a)return a;var c=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(c),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(c.rootPath)&&(o=o.replace(c.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(a,h,0),a}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function R(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var a=t.data.map((function(t){return R(e,t,r,n+1)})),s=e(a,r[n]);return i({data:s},t)}function F(e,t){var r=s(e,(function(e){return e.name===t}));return r&&r.stats}function b(e,t,r,n,i){var a=s(i,(function(e){return e.name===r})),c=a&&a.data&&a.data[n]?a.data[n]:0,u=a&&a.exhaustive||!1;return{type:t,attributeName:r,name:n,count:c,exhaustive:u}}v.prototype.getFacetByName=function(e){function t(t){return t.name===e}return s(this.facets,t)||s(this.disjunctiveFacets,t)||s(this.hierarchicalFacets,t)},v.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],v.prototype.getFacetValues=function(e,t){var r=g(this,e);if(r){var n,a=i({},t,{sortBy:v.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;if(Array.isArray(r))n=[e];else n=s._state.getHierarchicalFacetByName(r.name).attributes;return R((function(e,t){if(a.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(s,t);if(r)return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,s=t.sortRemainingBy;return"hidden"===s?r:(a="alpha"===s?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(h(n,a[0],a[1])))}(e,r)}if(Array.isArray(a.sortBy)){var n=u(a.sortBy,v.DEFAULT_SORT);return h(e,n[0],n[1])}if("function"==typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),r,n)}},v.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},v.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(b(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(b(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(b(e,"disjunctive",n,i,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),a=e._getHierarchicalFacetSeparator(i),c=r.split(a),u=s(n,(function(e){return e.name===t})),o=c.reduce((function(e,t){var r=e&&s(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=v},6571:(e,t,r)=>{"use strict";var n=r(2733),i=r(6732),a=r(2909).escapeFacetValue,s=r(3014),c=r(4728),u=r(317),o=r(1383),h=r(9228),f=r(3371),l=r(7691),m=r(6938);function d(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.setClient(e);var i=r||{};i.index=t,this.state=f.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._searchResultsOptions=n}function p(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}s(d,n),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new l(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new l(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=c({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:o(h._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!=typeof this.client.initIndex)throw new Error(a);var s=this.client.initIndex(n.index);if("function"!=typeof s.findAnswers)throw new Error(a);return s.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,s="function"==typeof this.client.initIndex;if(!i&&!s&&"function"!=typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),o=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f,l=this;return i?f=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?f=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,f=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),f.then((function(t){return l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=a(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw l._currentNbQueries--,0===l._currentNbQueries&&l.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=p,d.prototype.setPage=p,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:f.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new f(e),this},d.prototype.hasRefinements=function(e){return!!u(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=v,d.prototype.getPage=v,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(c){this.emit("error",{error:c})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+m+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new i(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},8965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},9110:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},2909:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},849:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(849);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),a=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(a[0]),e[1].push(a[1]),e)}),[[],[]])}},3014:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},4843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},4728:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var a=n[i],s=e[i];void 0!==s&&void 0===a||(t(s)&&t(a)?e[i]=r(s,a):e[i]="object"==typeof(c=a)&&null!==c?r(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},1383:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},8601:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?a:"desc"===n[i]?-a:a}return e.index-r.index})),i.map((function(e){return e.value}))}},7507:e=>{"use strict";e.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},9228:(e,t,r)=>{"use strict";var n=r(4728);function i(e){return Object.keys(e).sort().reduce((function(t,r){return t[r]=e[r],t}),{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),s=t.getHierarchicalRefinement(n),c=t._getHierarchicalFacetSeparator(i);if(s.length>0&&s[0].split(c).length>1){var u=s[0].split(c).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(n,s){var c=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===s);function o(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!o(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||o(t)||e.push(t),e}),[]),f=u[s-1];c.facetFilters=s>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,r.push({indexName:e,params:c})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),s=a._getNumericFilters(e),c=a._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return r.length>0&&(u.facetFilters=r),s.length>0&&(u.numericFilters=s),i(n({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,r){var s=a._getFacetFilters(e,t,r),c=a._getNumericFilters(e,t),u=a._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?a._getDisjunctiveHierarchicalFacetAttribute(e,h,r):t,c.length>0&&(o.numericFilters=c),s.length>0&&(o.facetFilters=s),i(n({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var a=i[e]||[];t!==n&&a.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var a=e.facetsExcludes||{};Object.keys(a).sort().forEach((function(e){(a[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var s=e.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach((function(e){var r=s[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).sort().forEach((function(i){var a=(c[i]||[])[0];if(void 0!==a){var s,u,o=e.getHierarchicalFacetByName(i),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===i){if(-1===a.indexOf(h)||!f&&!0===r||f&&f.split(h).length===a.split(h).length)return;f?(u=f.split(h).length-1,a=f):(u=a.split(h).length-2,a=a.slice(0,a.lastIndexOf(h))),s=o.attributes[u]}else u=a.split(h).length-1,s=o.attributes[u];s&&n.push([s+":"+a])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,s=r.attributes.slice(0,a+1);return t.concat(s)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var s=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,r,s){var c=s.isDisjunctiveFacet(e)?s.clearRefinements(e):s,u={facetQuery:t,facetName:e};return"number"==typeof r&&(u.maxFacetHits=r),i(n({},a._getHitsSearchParams(c),u))}};e.exports=a},2208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},6938:e=>{"use strict";e.exports="3.16.3"},3643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function r(r){for(var n=1;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var s,c=e[Symbol.iterator]();!(n=(s=c.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==c.return||c.return()}finally{if(i)throw a}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function a(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){c();var t=JSON.stringify(e);return a()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],a=t[1];return Promise.all([n,a||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=a();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=a();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function c(e){var t=a(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return c({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return c({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return c({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return c({caches:t}).clear()}))}}}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},a=JSON.stringify(r);if(a in t)return Promise.resolve(e.serializable?JSON.parse(t[a]):t[a]);var s=n(),c=i&&i.miss||function(){return Promise.resolve()};return s.then((function(e){return c(e)})).then((function(){return s}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function o(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function h(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var d={Read:1,Write:2,Any:3},p=1,v=2,g=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function R(e){return"string"==typeof e?{protocol:"https",url:e,accept:d.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||d.Any}}var F="GET",b="POST";function P(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===p||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===g&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(a(r),a(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return R(e)})):t}}))}function _(e,t,n,i){var s=[],c=function(e,t){if(e.method!==F&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),u=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),o=n.method,h=n.method!==F?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),h),i.queryParameters),l=0,m=function t(r,a){var h=r.pop();if(void 0===h)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:O(s)};var m={data:c,headers:u,method:o,url:E(h,n.path,f),connectTimeout:a(l,e.timeouts.connect),responseTimeout:a(l,i.timeout)},d=function(e){var t={request:m,response:e,host:h,triesLeft:r.length};return s.push(t),t},p={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=d(n);return n.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",w(i)),e.hostsCache.set(h,y(h,n.isTimedOut?g:v))]).then((function(){return t(r,a)}))},onFail:function(e){throw d(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,O(s))}};return e.requester.send(m).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&!~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,p)}))};return P(e.hostsCache,t).then((function(e){return m(a(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function E(e,t,r){var n=x(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function x(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function O(e){return e.map((function(e){return w(e)}))}function w(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var A=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===l.WithinHeaders?n:{}},queryParameters:function(){return e===l.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:l.WithinHeaders,t,e.apiKey),a=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,a=e.requestsCache,s=e.responsesCache,c=e.timeouts,u=e.userAgent,o=e.hosts,h=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:a,responsesCache:s,timeouts:c,userAgent:u,headers:e.headers,queryParameters:h,hosts:o.map((function(e){return R(e)})),read:function(e,t){var r=m(t,f.timeouts.read),n=function(){return _(f,f.hosts.filter((function(e){return!!(e.accept&d.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var a={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(a,(function(){return f.requestsCache.get(a,(function(){return f.requestsCache.set(a,n()).then((function(e){return Promise.all([f.requestsCache.delete(a),e])}),(function(e){return Promise.all([f.requestsCache.delete(a),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(a,e)}})},write:function(e,t){return _(f,f.hosts.filter((function(e){return!!(e.accept&d.Write)})),e,m(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:d.Read},{url:"".concat(t,".algolia.net"),accept:d.Write}].concat(o([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return h({transporter:a,appId:t,addAlgoliaAgent:function(e,t){a.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([a.requestsCache.clear(),a.responsesCache.clear()]).then((function(){}))}},e.methods)},N=function(e){return function(t,r){return t.method===F?e.transporter.read(t,r):e.transporter.write(t,r)}},H=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},S=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:x(e.params||{})})}));return e.transporter.read({method:b,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},T=function(e){return function(t,i){return Promise.all(t.map((function(t){var a=t.params,s=a.facetName,c=a.facetQuery,u=n(a,["facetName","facetQuery"]);return H(e)(t.indexName,{methods:{searchForFacetValues:k}}).searchForFacetValues(s,c,r(r({},i),u))})))}},Q=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},C=function(e){return function(t,r){return e.transporter.read({method:b,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},k=function(e){return function(t,r,n){return e.transporter.read({method:b,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},D=1,I=2,q=3;function V(e,t,n){var i,a={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},a=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=q,{debug:function(e,t){return D>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return I>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:u(),requestsCache:u({serializable:!1}),hostsCache:c({caches:[s({key:"".concat("4.22.1","-").concat(e)}),u()]}),userAgent:j("4.22.1").add({segment:"Browser",version:"lite"}),authMode:l.WithinQueryParameters};return A(r(r(r({},a),n),{},{methods:{search:S,searchForFacetValues:T,multipleQueries:S,multipleSearchForFacetValues:T,customRequest:N,initIndex:function(e){return function(t){return H(e)(t,{methods:{search:C,searchForFacetValues:k,findAnswers:Q}})}}}}))}return V.version="4.22.1",V}()},9057:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(6540),i=r(53),a=r(4103),s=r.n(a),c=r(3643),u=r.n(c),o=r(8193),h=r(5260),f=r(5489),l=r(4070),m=r(4586);const d=["zero","one","two","few","many","other"];function p(e){return d.filter((t=>e.includes(t)))}const v={locale:"en",pluralForms:p(["one","other"]),select:e=>1===e?"one":"other"};function g(){const{i18n:{currentLocale:e}}=(0,m.A)();return(0,n.useMemo)((()=>{try{return function(e){const t=new Intl.PluralRules(e);return{locale:e,pluralForms:p(t.resolvedOptions().pluralCategories),select:e=>t.select(e)}}(e)}catch(t){return console.error(`Failed to use Intl.PluralRules for locale "${e}".\nDocusaurus will fallback to the default (English) implementation.\nError: ${t.message}\n`),v}}),[e])}function y(){const e=g();return{selectMessage:(t,r)=>function(e,t,r){const n=e.split("|");if(1===n.length)return n[0];n.length>r.pluralForms.length&&console.error(`For locale=${r.locale}, a maximum of ${r.pluralForms.length} plural forms are expected (${r.pluralForms.join(",")}), but the message contains ${n.length}: ${e}`);const i=r.select(t),a=r.pluralForms.indexOf(i);return n[Math.min(a,n.length-1)]}(r,t,e)}}var R=r(4255),F=r(9532),b=r(9024),P=r(481),_=r(1312),j=r(8126),E=r(1062),x=r(8511);const O={searchQueryInput:"searchQueryInput_u2C7",searchVersionInput:"searchVersionInput_m0Ui",searchResultsColumn:"searchResultsColumn_JPFH",algoliaLogo:"algoliaLogo_rT1R",algoliaLogoPathFill:"algoliaLogoPathFill_WdUC",searchResultItem:"searchResultItem_Tv2o",searchResultItemHeading:"searchResultItemHeading_KbCB",searchResultItemPath:"searchResultItemPath_lhe1",searchResultItemSummary:"searchResultItemSummary_AEaO",searchQueryColumn:"searchQueryColumn_RTkw",searchVersionColumn:"searchVersionColumn_ypXd",searchLogoColumn:"searchLogoColumn_rJIA",loadingSpinner:"loadingSpinner_XVxU","loading-spin":"loading-spin_vzvp",loader:"loader_vvXV"};function w(e){let{docsSearchVersionsHelpers:t}=e;const r=Object.entries(t.allDocsData).filter((e=>{let[,t]=e;return t.versions.length>1}));return n.createElement("div",{className:(0,i.A)("col","col--3","padding-left--none",O.searchVersionColumn)},r.map((e=>{let[i,a]=e;const s=r.length>1?`${i}: `:"";return n.createElement("select",{key:i,onChange:e=>t.setSearchVersion(i,e.target.value),defaultValue:t.searchVersions[i],className:O.searchVersionInput},a.versions.map(((e,t)=>n.createElement("option",{key:t,label:`${s}${e.label}`,value:e.name}))))})))}function A(){const{i18n:{currentLocale:e}}=(0,m.A)(),{algolia:{appId:t,apiKey:r,indexName:a}}=(0,j.c)(),c=(0,E.C)(),d=function(){const{selectMessage:e}=y();return t=>e(t,(0,_.T)({id:"theme.SearchPage.documentsFound.plurals",description:'Pluralized label for "{count} documents found". Use as much plural forms (separated by "|") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)',message:"One document found|{count} documents found"},{count:t}))}(),p=function(){const e=(0,l.Gy)(),[t,r]=(0,n.useState)((()=>Object.entries(e).reduce(((e,t)=>{let[r,n]=t;return{...e,[r]:n.versions[0].name}}),{}))),i=Object.values(e).some((e=>e.versions.length>1));return{allDocsData:e,versioningEnabled:i,searchVersions:t,setSearchVersion:(e,t)=>r((r=>({...r,[e]:t})))}}(),[v,g]=(0,R.b)(),b={items:[],query:null,totalResults:null,totalPages:null,lastPage:null,hasMore:null,loading:null},[A,N]=(0,n.useReducer)(((e,t)=>{switch(t.type){case"reset":return b;case"loading":return{...e,loading:!0};case"update":return v!==t.value.query?e:{...t.value,items:0===t.value.lastPage?t.value.items:e.items.concat(t.value.items)};case"advance":{const t=e.totalPages>e.lastPage+1;return{...e,lastPage:t?e.lastPage+1:e.lastPage,hasMore:t}}default:return e}}),b),H=u()(t,r),S=s()(H,a,{hitsPerPage:15,advancedSyntax:!0,disjunctiveFacets:["language","docusaurus_tag"]});S.on("result",(e=>{let{results:{query:t,hits:r,page:n,nbHits:i,nbPages:a}}=e;if(""===t||!Array.isArray(r))return void N({type:"reset"});const s=e=>e.replace(/algolia-docsearch-suggestion--highlight/g,"search-result-match"),u=r.map((e=>{let{url:t,_highlightResult:{hierarchy:r},_snippetResult:n={}}=e;const i=Object.keys(r).map((e=>s(r[e].value)));return{title:i.pop(),url:c(t),summary:n.content?`${s(n.content.value)}...`:"",breadcrumbs:i}}));N({type:"update",value:{items:u,query:t,totalResults:i,totalPages:a,lastPage:n,hasMore:a>n+1,loading:!1}})}));const[T,Q]=(0,n.useState)(null),C=(0,n.useRef)(0),k=(0,n.useRef)(o.A.canUseIntersectionObserver&&new IntersectionObserver((e=>{const{isIntersecting:t,boundingClientRect:{y:r}}=e[0];t&&C.current>r&&N({type:"advance"}),C.current=r}),{threshold:1})),D=()=>v?(0,_.T)({id:"theme.SearchPage.existingResultsTitle",message:'Search results for "{query}"',description:"The search page title for non-empty query"},{query:v}):(0,_.T)({id:"theme.SearchPage.emptyResultsTitle",message:"Search the documentation",description:"The search page title for empty query"}),I=(0,F._q)((function(t){void 0===t&&(t=0),S.addDisjunctiveFacetRefinement("docusaurus_tag","default"),S.addDisjunctiveFacetRefinement("language",e),Object.entries(p.searchVersions).forEach((e=>{let[t,r]=e;S.addDisjunctiveFacetRefinement("docusaurus_tag",`docs-${t}-${r}`)})),S.setQuery(v).setPage(t).search()}));return(0,n.useEffect)((()=>{if(!T)return;const e=k.current;return e?(e.observe(T),()=>e.unobserve(T)):()=>!0}),[T]),(0,n.useEffect)((()=>{N({type:"reset"}),v&&(N({type:"loading"}),setTimeout((()=>{I()}),300))}),[v,p.searchVersions,I]),(0,n.useEffect)((()=>{A.lastPage&&0!==A.lastPage&&I(A.lastPage)}),[I,A.lastPage]),n.createElement(x.A,null,n.createElement(h.A,null,n.createElement("title",null,(0,P.s)(D())),n.createElement("meta",{property:"robots",content:"noindex, follow"})),n.createElement("div",{className:"container margin-vert--lg"},n.createElement("h1",null,D()),n.createElement("form",{className:"row",onSubmit:e=>e.preventDefault()},n.createElement("div",{className:(0,i.A)("col",O.searchQueryColumn,{"col--9":p.versioningEnabled,"col--12":!p.versioningEnabled})},n.createElement("input",{type:"search",name:"q",className:O.searchQueryInput,placeholder:(0,_.T)({id:"theme.SearchPage.inputPlaceholder",message:"Type your search here",description:"The placeholder for search page input"}),"aria-label":(0,_.T)({id:"theme.SearchPage.inputLabel",message:"Search",description:"The ARIA label for search page input"}),onChange:e=>g(e.target.value),value:v,autoComplete:"off",autoFocus:!0})),p.versioningEnabled&&n.createElement(w,{docsSearchVersionsHelpers:p})),n.createElement("div",{className:"row"},n.createElement("div",{className:(0,i.A)("col","col--8",O.searchResultsColumn)},!!A.totalResults&&d(A.totalResults)),n.createElement("div",{className:(0,i.A)("col","col--4","text--right",O.searchLogoColumn)},n.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:"https://www.algolia.com/","aria-label":(0,_.T)({id:"theme.SearchPage.algoliaLabel",message:"Search by Algolia",description:"The ARIA label for Algolia mention"})},n.createElement("svg",{viewBox:"0 0 168 24",className:O.algoliaLogo},n.createElement("g",{fill:"none"},n.createElement("path",{className:O.algoliaLogoPathFill,d:"M120.925 18.804c-4.386.02-4.386-3.54-4.386-4.106l-.007-13.336 2.675-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-10.846-2.18c.821 0 1.43-.047 1.855-.129v-2.719a6.334 6.334 0 0 0-1.574-.199 5.7 5.7 0 0 0-.897.069 2.699 2.699 0 0 0-.814.24c-.24.116-.439.28-.582.491-.15.212-.219.335-.219.656 0 .628.219.991.616 1.23s.938.362 1.615.362zm-.233-9.7c.883 0 1.629.109 2.231.328.602.218 1.088.525 1.444.915.363.396.609.922.76 1.483.157.56.232 1.175.232 1.85v6.874a32.5 32.5 0 0 1-1.868.314c-.834.123-1.772.185-2.813.185-.69 0-1.327-.069-1.895-.198a4.001 4.001 0 0 1-1.471-.636 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.803 0-.656.13-1.073.384-1.525a3.24 3.24 0 0 1 1.047-1.106c.445-.287.95-.492 1.532-.615a8.8 8.8 0 0 1 1.82-.185 8.404 8.404 0 0 1 1.972.24v-.438c0-.307-.035-.6-.11-.874a1.88 1.88 0 0 0-.384-.73 1.784 1.784 0 0 0-.724-.493 3.164 3.164 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.735 7.735 0 0 0-1.26.307l-.321-2.192c.335-.117.834-.233 1.478-.349a10.98 10.98 0 0 1 2.073-.178zm52.842 9.626c.822 0 1.43-.048 1.854-.13V13.7a6.347 6.347 0 0 0-1.574-.199c-.294 0-.595.021-.896.069a2.7 2.7 0 0 0-.814.24 1.46 1.46 0 0 0-.582.491c-.15.212-.218.335-.218.656 0 .628.218.991.615 1.23.404.245.938.362 1.615.362zm-.226-9.694c.883 0 1.629.108 2.231.327.602.219 1.088.526 1.444.915.355.39.609.923.759 1.483a6.8 6.8 0 0 1 .233 1.852v6.873c-.41.088-1.034.19-1.868.314-.834.123-1.772.184-2.813.184-.69 0-1.327-.068-1.895-.198a4.001 4.001 0 0 1-1.471-.635 3.085 3.085 0 0 1-.951-1.134c-.226-.465-.343-1.12-.343-1.804 0-.656.13-1.073.384-1.524.26-.45.608-.82 1.047-1.107.445-.286.95-.491 1.532-.614a8.803 8.803 0 0 1 2.751-.13c.329.034.671.096 1.04.185v-.437a3.3 3.3 0 0 0-.109-.875 1.873 1.873 0 0 0-.384-.731 1.784 1.784 0 0 0-.724-.492 3.165 3.165 0 0 0-1.143-.205c-.616 0-1.177.075-1.69.164a7.75 7.75 0 0 0-1.26.307l-.321-2.193c.335-.116.834-.232 1.478-.348a11.633 11.633 0 0 1 2.073-.177zm-8.034-1.271a1.626 1.626 0 0 1-1.628-1.62c0-.895.725-1.62 1.628-1.62.904 0 1.63.725 1.63 1.62 0 .895-.733 1.62-1.63 1.62zm1.348 13.22h-2.689V7.27l2.69-.423v11.956zm-4.714 0c-4.386.02-4.386-3.54-4.386-4.107l-.008-13.336 2.676-.424v13.254c0 .322 0 2.358 1.718 2.364v2.248zm-8.698-5.903c0-1.156-.253-2.119-.746-2.788-.493-.677-1.183-1.01-2.067-1.01-.882 0-1.574.333-2.065 1.01-.493.676-.733 1.632-.733 2.788 0 1.168.246 1.953.74 2.63.492.683 1.183 1.018 2.066 1.018.882 0 1.574-.342 2.067-1.019.492-.683.738-1.46.738-2.63zm2.737-.007c0 .902-.13 1.584-.397 2.33a5.52 5.52 0 0 1-1.128 1.906 4.986 4.986 0 0 1-1.752 1.223c-.685.286-1.739.45-2.265.45-.528-.006-1.574-.157-2.252-.45a5.096 5.096 0 0 1-1.744-1.223c-.487-.527-.863-1.162-1.137-1.906a6.345 6.345 0 0 1-.41-2.33c0-.902.123-1.77.397-2.508a5.554 5.554 0 0 1 1.15-1.892 5.133 5.133 0 0 1 1.75-1.216c.679-.287 1.425-.423 2.232-.423.808 0 1.553.142 2.237.423a4.88 4.88 0 0 1 1.753 1.216 5.644 5.644 0 0 1 1.135 1.892c.287.738.431 1.606.431 2.508zm-20.138 0c0 1.12.246 2.363.738 2.882.493.52 1.13.78 1.91.78.424 0 .828-.062 1.204-.178.377-.116.677-.253.917-.417V9.33a10.476 10.476 0 0 0-1.766-.226c-.971-.028-1.71.37-2.23 1.004-.513.636-.773 1.75-.773 2.788zm7.438 5.274c0 1.824-.466 3.156-1.404 4.004-.936.846-2.367 1.27-4.296 1.27-.705 0-2.17-.137-3.34-.396l.431-2.118c.98.205 2.272.26 2.95.26 1.074 0 1.84-.219 2.299-.656.459-.437.684-1.086.684-1.948v-.437a8.07 8.07 0 0 1-1.047.397c-.43.13-.93.198-1.492.198-.739 0-1.41-.116-2.018-.349a4.206 4.206 0 0 1-1.567-1.025c-.431-.45-.774-1.017-1.013-1.694-.24-.677-.363-1.885-.363-2.773 0-.834.13-1.88.384-2.577.26-.696.629-1.298 1.129-1.796.493-.498 1.095-.881 1.8-1.162a6.605 6.605 0 0 1 2.428-.457c.87 0 1.67.109 2.45.24.78.129 1.444.265 1.985.415V18.17zM6.972 6.677v1.627c-.712-.446-1.52-.67-2.425-.67-.585 0-1.045.13-1.38.391a1.24 1.24 0 0 0-.502 1.03c0 .425.164.765.494 1.02.33.256.835.532 1.516.83.447.192.795.356 1.045.495.25.138.537.332.862.582.324.25.563.548.718.894.154.345.23.741.23 1.188 0 .947-.334 1.691-1.004 2.234-.67.542-1.537.814-2.601.814-1.18 0-2.16-.229-2.936-.686v-1.708c.84.628 1.814.942 2.92.942.585 0 1.048-.136 1.388-.407.34-.271.51-.646.51-1.125 0-.287-.1-.55-.302-.79-.203-.24-.42-.42-.655-.542-.234-.123-.585-.29-1.053-.503a61.27 61.27 0 0 1-.582-.271 13.67 13.67 0 0 1-.55-.287 4.275 4.275 0 0 1-.567-.351 6.92 6.92 0 0 1-.455-.4c-.18-.17-.31-.34-.39-.51-.08-.17-.155-.37-.224-.598a2.553 2.553 0 0 1-.104-.742c0-.915.333-1.638.998-2.17.664-.532 1.523-.798 2.576-.798.968 0 1.793.17 2.473.51zm7.468 5.696v-.287c-.022-.607-.187-1.088-.495-1.444-.309-.357-.75-.535-1.324-.535-.532 0-.99.194-1.373.583-.382.388-.622.949-.717 1.683h3.909zm1.005 2.792v1.404c-.596.34-1.383.51-2.362.51-1.255 0-2.255-.377-3-1.132-.744-.755-1.116-1.744-1.116-2.968 0-1.297.34-2.316 1.021-3.055.68-.74 1.548-1.11 2.6-1.11 1.033 0 1.852.323 2.458.966.606.644.91 1.572.91 2.784 0 .33-.033.676-.096 1.038h-5.314c.107.702.405 1.239.894 1.611.49.372 1.106.558 1.85.558.862 0 1.58-.202 2.155-.606zm6.605-1.77h-1.212c-.596 0-1.045.116-1.349.35-.303.234-.454.532-.454.894 0 .372.117.664.35.877.235.213.575.32 1.022.32.51 0 .912-.142 1.204-.424.293-.281.44-.651.44-1.108v-.91zm-4.068-2.554V9.325c.627-.361 1.457-.542 2.489-.542 2.116 0 3.175 1.026 3.175 3.08V17h-1.548v-.957c-.415.68-1.143 1.02-2.186 1.02-.766 0-1.38-.22-1.843-.661-.462-.442-.694-1.003-.694-1.684 0-.776.293-1.38.878-1.81.585-.431 1.404-.647 2.457-.647h1.34V11.8c0-.554-.133-.971-.399-1.253-.266-.282-.707-.423-1.324-.423a4.07 4.07 0 0 0-2.345.718zm9.333-1.93v1.42c.394-1 1.101-1.5 2.123-1.5.148 0 .313.016.494.048v1.531a1.885 1.885 0 0 0-.75-.143c-.542 0-.989.24-1.34.718-.351.479-.527 1.048-.527 1.707V17h-1.563V8.91h1.563zm5.01 4.084c.022.82.272 1.492.75 2.019.479.526 1.15.79 2.01.79.639 0 1.235-.176 1.788-.527v1.404c-.521.319-1.186.479-1.995.479-1.265 0-2.276-.4-3.031-1.197-.755-.798-1.133-1.792-1.133-2.984 0-1.16.38-2.151 1.14-2.975.761-.825 1.79-1.237 3.088-1.237.702 0 1.346.149 1.93.447v1.436a3.242 3.242 0 0 0-1.77-.495c-.84 0-1.513.266-2.019.798-.505.532-.758 1.213-.758 2.042zM40.24 5.72v4.579c.458-1 1.293-1.5 2.505-1.5.787 0 1.42.245 1.899.734.479.49.718 1.17.718 2.042V17h-1.564v-5.106c0-.553-.14-.98-.422-1.284-.282-.303-.652-.455-1.11-.455-.531 0-1.002.202-1.411.606-.41.405-.615 1.022-.615 1.851V17h-1.563V5.72h1.563zm14.966 10.02c.596 0 1.096-.253 1.5-.758.404-.506.606-1.157.606-1.955 0-.915-.202-1.62-.606-2.114-.404-.495-.92-.742-1.548-.742-.553 0-1.05.224-1.491.67-.442.447-.662 1.133-.662 2.058 0 .958.212 1.67.638 2.138.425.469.946.703 1.563.703zM53.004 5.72v4.42c.574-.894 1.388-1.341 2.44-1.341 1.022 0 1.857.383 2.506 1.149.649.766.973 1.781.973 3.047 0 1.138-.309 2.109-.925 2.912-.617.803-1.463 1.205-2.537 1.205-1.075 0-1.894-.447-2.457-1.34V17h-1.58V5.72h1.58zm9.908 11.104l-3.223-7.913h1.739l1.005 2.632 1.26 3.415c.096-.32.48-1.458 1.15-3.415l.909-2.632h1.66l-2.92 7.866c-.777 2.074-1.963 3.11-3.559 3.11a2.92 2.92 0 0 1-.734-.079v-1.34c.17.042.351.064.543.064 1.032 0 1.755-.57 2.17-1.708z"}),n.createElement("path",{fill:"#5468FF",d:"M78.988.938h16.594a2.968 2.968 0 0 1 2.966 2.966V20.5a2.967 2.967 0 0 1-2.966 2.964H78.988a2.967 2.967 0 0 1-2.966-2.964V3.897A2.961 2.961 0 0 1 78.988.938z"}),n.createElement("path",{fill:"white",d:"M89.632 5.967v-.772a.978.978 0 0 0-.978-.977h-2.28a.978.978 0 0 0-.978.977v.793c0 .088.082.15.171.13a7.127 7.127 0 0 1 1.984-.28c.65 0 1.295.088 1.917.259.082.02.164-.04.164-.13m-6.248 1.01l-.39-.389a.977.977 0 0 0-1.382 0l-.465.465a.973.973 0 0 0 0 1.38l.383.383c.062.061.15.047.205-.014.226-.307.472-.601.746-.874.281-.28.568-.526.883-.751.068-.042.075-.137.02-.2m4.16 2.453v3.341c0 .096.104.165.192.117l2.97-1.537c.068-.034.089-.117.055-.184a3.695 3.695 0 0 0-3.08-1.866c-.068 0-.136.054-.136.13m0 8.048a4.489 4.489 0 0 1-4.49-4.482 4.488 4.488 0 0 1 4.49-4.482 4.488 4.488 0 0 1 4.489 4.482 4.484 4.484 0 0 1-4.49 4.482m0-10.85a6.363 6.363 0 1 0 0 12.729 6.37 6.37 0 0 0 6.372-6.368 6.358 6.358 0 0 0-6.371-6.36"})))))),A.items.length>0?n.createElement("main",null,A.items.map(((e,t)=>{let{title:r,url:a,summary:s,breadcrumbs:c}=e;return n.createElement("article",{key:t,className:O.searchResultItem},n.createElement("h2",{className:O.searchResultItemHeading},n.createElement(f.A,{to:a,dangerouslySetInnerHTML:{__html:r}})),c.length>0&&n.createElement("nav",{"aria-label":"breadcrumbs"},n.createElement("ul",{className:(0,i.A)("breadcrumbs",O.searchResultItemPath)},c.map(((e,t)=>n.createElement("li",{key:t,className:"breadcrumbs__item",dangerouslySetInnerHTML:{__html:e}}))))),s&&n.createElement("p",{className:O.searchResultItemSummary,dangerouslySetInnerHTML:{__html:s}}))}))):[v&&!A.loading&&n.createElement("p",{key:"no-results"},n.createElement(_.A,{id:"theme.SearchPage.noResultsText",description:"The paragraph for empty search result"},"No results were found")),!!A.loading&&n.createElement("div",{key:"spinner",className:O.loadingSpinner})],A.hasMore&&n.createElement("div",{className:O.loader,ref:Q},n.createElement(_.A,{id:"theme.SearchPage.fetchingNewResults",description:"The paragraph for fetching new search results"},"Fetching new results..."))))}function N(){return n.createElement(b.e3,{className:"search-page-wrapper"},n.createElement(A,null))}}}]);
\ No newline at end of file
diff --git a/assets/js/1a4e3797.08548001.js.LICENSE.txt b/assets/js/1a4e3797.08548001.js.LICENSE.txt
new file mode 100644
index 00000000000..9caab8b19c2
--- /dev/null
+++ b/assets/js/1a4e3797.08548001.js.LICENSE.txt
@@ -0,0 +1 @@
+/*! algoliasearch-lite.umd.js | 4.22.1 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
diff --git a/assets/js/1be78505.78a5a7fc.js b/assets/js/1be78505.78a5a7fc.js
new file mode 100644
index 00000000000..85c9090a780
--- /dev/null
+++ b/assets/js/1be78505.78a5a7fc.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[8714,1774],{10:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ge});var a=n(6540),o=n(53),l=n(9024),r=n(7559),c=n(2967),i=n(1754),s=n(2252),d=n(6588),m=n(8511),u=n(1312),b=n(3104),p=n(5062);const h={backToTopButton:"backToTopButton_sjWU",backToTopButtonShow:"backToTopButtonShow_xfvO"};function E(){const{shown:e,scrollToTop:t}=function(e){let{threshold:t}=e;const[n,o]=(0,a.useState)(!1),l=(0,a.useRef)(!1),{startScroll:r,cancelScroll:c}=(0,b.gk)();return(0,b.Mq)(((e,n)=>{let{scrollY:a}=e;const r=n?.scrollY;r&&(l.current?l.current=!1:a>=r?(c(),o(!1)):a{e.location.hash&&(l.current=!0,o(!1))})),{shown:n,scrollToTop:()=>r(0)}}({threshold:300});return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.BackToTopButton.buttonAriaLabel",message:"Scroll back to top",description:"The ARIA label for the back to top button"}),className:(0,o.A)("clean-btn",r.G.common.backToTopButton,h.backToTopButton,e&&h.backToTopButtonShow),type:"button",onClick:t})}var f=n(3109),g=n(6347),v=n(4581),_=n(6342),A=n(3465),C=n(8168);function k(e){return a.createElement("svg",(0,C.A)({width:"20",height:"20","aria-hidden":"true"},e),a.createElement("g",{fill:"#7a7a7a"},a.createElement("path",{d:"M9.992 10.023c0 .2-.062.399-.172.547l-4.996 7.492a.982.982 0 01-.828.454H1c-.55 0-1-.453-1-1 0-.2.059-.403.168-.551l4.629-6.942L.168 3.078A.939.939 0 010 2.528c0-.548.45-.997 1-.997h2.996c.352 0 .649.18.828.45L9.82 9.472c.11.148.172.347.172.55zm0 0"}),a.createElement("path",{d:"M19.98 10.023c0 .2-.058.399-.168.547l-4.996 7.492a.987.987 0 01-.828.454h-3c-.547 0-.996-.453-.996-1 0-.2.059-.403.168-.551l4.625-6.942-4.625-6.945a.939.939 0 01-.168-.55 1 1 0 01.996-.997h3c.348 0 .649.18.828.45l4.996 7.492c.11.148.168.347.168.55zm0 0"})))}const S={collapseSidebarButton:"collapseSidebarButton_PEFL",collapseSidebarButtonIcon:"collapseSidebarButtonIcon_kv0_"};function N(e){let{onClick:t}=e;return a.createElement("button",{type:"button",title:(0,u.T)({id:"theme.docs.sidebar.collapseButtonTitle",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.collapseButtonAriaLabel",message:"Collapse sidebar",description:"The title attribute for collapse button of doc sidebar"}),className:(0,o.A)("button button--secondary button--outline",S.collapseSidebarButton),onClick:t},a.createElement(k,{className:S.collapseSidebarButtonIcon}))}var T=n(5041),I=n(9532);const x=Symbol("EmptyContext"),B=a.createContext(x);function w(e){let{children:t}=e;const[n,o]=(0,a.useState)(null),l=(0,a.useMemo)((()=>({expandedItem:n,setExpandedItem:o})),[n]);return a.createElement(B.Provider,{value:l},t)}var y=n(1422),L=n(9169),M=n(5489),H=n(2303);function P(e){let{categoryLabel:t,onClick:n}=e;return a.createElement("button",{"aria-label":(0,u.T)({id:"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel",message:"Toggle the collapsible sidebar category '{label}'",description:"The ARIA label to toggle the collapsible sidebar category"},{label:t}),type:"button",className:"clean-btn menu__caret",onClick:n})}function G(e){let{item:t,onItemClick:n,activePath:l,level:c,index:s,...d}=e;const{items:m,label:u,collapsible:b,className:p,href:h}=t,{docs:{sidebar:{autoCollapseCategories:E}}}=(0,_.p)(),f=function(e){const t=(0,H.A)();return(0,a.useMemo)((()=>e.href?e.href:!t&&e.collapsible?(0,i._o)(e):void 0),[e,t])}(t),g=(0,i.w8)(t,l),v=(0,L.ys)(h,l),{collapsed:A,setCollapsed:k}=(0,y.u)({initialState:()=>!!b&&(!g&&t.collapsed)}),{expandedItem:S,setExpandedItem:N}=function(){const e=(0,a.useContext)(B);if(e===x)throw new I.dV("DocSidebarItemsExpandedStateProvider");return e}(),T=function(e){void 0===e&&(e=!A),N(e?null:s),k(e)};return function(e){let{isActive:t,collapsed:n,updateCollapsed:o}=e;const l=(0,I.ZC)(t);(0,a.useEffect)((()=>{t&&!l&&n&&o(!1)}),[t,l,n,o])}({isActive:g,collapsed:A,updateCollapsed:T}),(0,a.useEffect)((()=>{b&&null!=S&&S!==s&&E&&k(!0)}),[b,S,s,k,E]),a.createElement("li",{className:(0,o.A)(r.G.docs.docSidebarItemCategory,r.G.docs.docSidebarItemCategoryLevel(c),"menu__list-item",{"menu__list-item--collapsed":A},p)},a.createElement("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":v})},a.createElement(M.A,(0,C.A)({className:(0,o.A)("menu__link",{"menu__link--sublist":b,"menu__link--sublist-caret":!h&&b,"menu__link--active":g}),onClick:b?e=>{n?.(t),h?T(!1):(e.preventDefault(),T())}:()=>{n?.(t)},"aria-current":v?"page":void 0,"aria-expanded":b?!A:void 0,href:b?f??"#":f},d),u),h&&b&&a.createElement(P,{categoryLabel:u,onClick:e=>{e.preventDefault(),T()}})),a.createElement(y.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:A},a.createElement(K,{items:m,tabIndex:A?-1:0,onItemClick:n,activePath:l,level:c+1})))}var F=n(6654),W=n(3186);const D={menuExternalLink:"menuExternalLink_NmtK"};function V(e){let{item:t,onItemClick:n,activePath:l,level:c,index:s,...d}=e;const{href:m,label:u,className:b,autoAddBaseUrl:p}=t,h=(0,i.w8)(t,l),E=(0,F.A)(m);return a.createElement("li",{className:(0,o.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(c),"menu__list-item",b),key:u},a.createElement(M.A,(0,C.A)({className:(0,o.A)("menu__link",!E&&D.menuExternalLink,{"menu__link--active":h}),autoAddBaseUrl:p,"aria-current":h?"page":void 0,to:m},E&&{onClick:n?()=>n(t):void 0},d),u,!E&&a.createElement(W.A,null)))}const U={menuHtmlItem:"menuHtmlItem_M9Kj"};function z(e){let{item:t,level:n,index:l}=e;const{value:c,defaultStyle:i,className:s}=t;return a.createElement("li",{className:(0,o.A)(r.G.docs.docSidebarItemLink,r.G.docs.docSidebarItemLinkLevel(n),i&&[U.menuHtmlItem,"menu__list-item"],s),key:l,dangerouslySetInnerHTML:{__html:c}})}function R(e){let{item:t,...n}=e;switch(t.type){case"category":return a.createElement(G,(0,C.A)({item:t},n));case"html":return a.createElement(z,(0,C.A)({item:t},n));default:return a.createElement(V,(0,C.A)({item:t},n))}}function j(e){let{items:t,...n}=e;return a.createElement(w,null,t.map(((e,t)=>a.createElement(R,(0,C.A)({key:t,item:e,index:t},n)))))}const K=(0,a.memo)(j),q={menu:"menu_SIkG",menuWithAnnouncementBar:"menuWithAnnouncementBar_GW3s"};function O(e){let{path:t,sidebar:n,className:l}=e;const c=function(){const{isActive:e}=(0,T.Mj)(),[t,n]=(0,a.useState)(e);return(0,b.Mq)((t=>{let{scrollY:a}=t;e&&n(0===a)}),[e]),e&&t}();return a.createElement("nav",{"aria-label":(0,u.T)({id:"theme.docs.sidebar.navAriaLabel",message:"Docs sidebar",description:"The ARIA label for the sidebar navigation"}),className:(0,o.A)("menu thin-scrollbar",q.menu,c&&q.menuWithAnnouncementBar,l)},a.createElement("ul",{className:(0,o.A)(r.G.docs.docSidebarMenu,"menu__list")},a.createElement(K,{items:n,activePath:t,level:1})))}const X="sidebar_njMd",Y="sidebarWithHideableNavbar_wUlq",Z="sidebarHidden_VK0M",$="sidebarLogo_isFc";function J(e){let{path:t,sidebar:n,onCollapse:l,isHidden:r}=e;const{navbar:{hideOnScroll:c},docs:{sidebar:{hideable:i}}}=(0,_.p)();return a.createElement("div",{className:(0,o.A)(X,c&&Y,r&&Z)},c&&a.createElement(A.A,{tabIndex:-1,className:$}),a.createElement(O,{path:t,sidebar:n}),i&&a.createElement(N,{onClick:l}))}const Q=a.memo(J);var ee=n(5600),te=n(2069);const ne=e=>{let{sidebar:t,path:n}=e;const l=(0,te.M)();return a.createElement("ul",{className:(0,o.A)(r.G.docs.docSidebarMenu,"menu__list")},a.createElement(K,{items:t,activePath:n,onItemClick:e=>{"category"===e.type&&e.href&&l.toggle(),"link"===e.type&&l.toggle()},level:1}))};function ae(e){return a.createElement(ee.GX,{component:ne,props:e})}const oe=a.memo(ae);function le(e){const t=(0,v.l)(),n="desktop"===t||"ssr"===t,o="mobile"===t;return a.createElement(a.Fragment,null,n&&a.createElement(Q,e),o&&a.createElement(oe,e))}const re={expandButton:"expandButton_m80_",expandButtonIcon:"expandButtonIcon_BlDH"};function ce(e){let{toggleSidebar:t}=e;return a.createElement("div",{className:re.expandButton,title:(0,u.T)({id:"theme.docs.sidebar.expandButtonTitle",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),"aria-label":(0,u.T)({id:"theme.docs.sidebar.expandButtonAriaLabel",message:"Expand sidebar",description:"The ARIA label and title attribute for expand button of doc sidebar"}),tabIndex:0,role:"button",onKeyDown:t,onClick:t},a.createElement(k,{className:re.expandButtonIcon}))}const ie={docSidebarContainer:"docSidebarContainer_b6E3",docSidebarContainerHidden:"docSidebarContainerHidden_b3ry",sidebarViewport:"sidebarViewport_Xe31"};function se(e){let{children:t}=e;const n=(0,d.t)();return a.createElement(a.Fragment,{key:n?.name??"noSidebar"},t)}function de(e){let{sidebar:t,hiddenSidebarContainer:n,setHiddenSidebarContainer:l}=e;const{pathname:c}=(0,g.zy)(),[i,s]=(0,a.useState)(!1),d=(0,a.useCallback)((()=>{i&&s(!1),!i&&(0,f.O)()&&s(!0),l((e=>!e))}),[l,i]);return a.createElement("aside",{className:(0,o.A)(r.G.docs.docSidebarContainer,ie.docSidebarContainer,n&&ie.docSidebarContainerHidden),onTransitionEnd:e=>{e.currentTarget.classList.contains(ie.docSidebarContainer)&&n&&s(!0)}},a.createElement(se,null,a.createElement("div",{className:(0,o.A)(ie.sidebarViewport,i&&ie.sidebarViewportHidden)},a.createElement(le,{sidebar:t,path:c,onCollapse:d,isHidden:i}),i&&a.createElement(ce,{toggleSidebar:d}))))}const me={docMainContainer:"docMainContainer_gTbr",docMainContainerEnhanced:"docMainContainerEnhanced_Uz_u",docItemWrapperEnhanced:"docItemWrapperEnhanced_czyv"};function ue(e){let{hiddenSidebarContainer:t,children:n}=e;const l=(0,d.t)();return a.createElement("main",{className:(0,o.A)(me.docMainContainer,(t||!l)&&me.docMainContainerEnhanced)},a.createElement("div",{className:(0,o.A)("container padding-top--md padding-bottom--lg",me.docItemWrapper,t&&me.docItemWrapperEnhanced)},n))}const be={docPage:"docPage__5DB",docsWrapper:"docsWrapper_BCFX","themedComponent--light":"themedComponent--light_NU7w"};function pe(e){let{children:t}=e;const n=(0,d.t)(),[o,l]=(0,a.useState)(!1);return a.createElement(m.A,{wrapperClassName:be.docsWrapper},a.createElement(E,null),a.createElement("div",{className:be.docPage},n&&a.createElement(de,{sidebar:n.items,hiddenSidebarContainer:o,setHiddenSidebarContainer:l}),a.createElement(ue,{hiddenSidebarContainer:o},t)))}var he=n(1774),Ee=n(1463);function fe(e){const{versionMetadata:t}=e;return a.createElement(a.Fragment,null,a.createElement(Ee.A,{version:t.version,tag:(0,c.tU)(t.pluginId,t.version)}),a.createElement(l.be,null,t.noIndex&&a.createElement("meta",{name:"robots",content:"noindex, nofollow"})))}function ge(e){const{versionMetadata:t}=e,n=(0,i.mz)(e);if(!n)return a.createElement(he.default,null);const{docElement:c,sidebarName:m,sidebarItems:u}=n;return a.createElement(a.Fragment,null,a.createElement(fe,e),a.createElement(l.e3,{className:(0,o.A)(r.G.wrapper.docsPages,r.G.page.docsDocPage,e.versionMetadata.className)},a.createElement(s.n,{version:t},a.createElement(d.V,{name:m,items:u},a.createElement(pe,null,c)))))}},1774:(e,t,n)=>{n.r(t),n.d(t,{default:()=>c});var a=n(6540),o=n(1312),l=n(9024),r=n(8511);function c(){return a.createElement(a.Fragment,null,a.createElement(l.be,{title:(0,o.T)({id:"theme.NotFound.title",message:"Page Not Found"})}),a.createElement(r.A,null,a.createElement("main",{className:"container margin-vert--xl"},a.createElement("div",{className:"row"},a.createElement("div",{className:"col col--6 col--offset-3"},a.createElement("h1",{className:"hero__title"},a.createElement(o.A,{id:"theme.NotFound.title",description:"The title of the 404 page"},"Page Not Found")),a.createElement("p",null,a.createElement(o.A,{id:"theme.NotFound.p1",description:"The first paragraph of the 404 page"},"We could not find what you were looking for.")),a.createElement("p",null,a.createElement(o.A,{id:"theme.NotFound.p2",description:"The 2nd paragraph of the 404 page"},"Please contact the owner of the site that linked you to the original URL and let them know their link is broken.")))))))}},2252:(e,t,n)=>{n.d(t,{n:()=>r,r:()=>c});var a=n(6540),o=n(9532);const l=a.createContext(null);function r(e){let{children:t,version:n}=e;return a.createElement(l.Provider,{value:n},t)}function c(){const e=(0,a.useContext)(l);if(null===e)throw new o.dV("DocsVersionProvider");return e}}}]);
\ No newline at end of file
diff --git a/assets/js/1ca1b9c8.c508c078.js b/assets/js/1ca1b9c8.c508c078.js
new file mode 100644
index 00000000000..a1b6a217bf5
--- /dev/null
+++ b/assets/js/1ca1b9c8.c508c078.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[3819],{1966:s=>{s.exports=JSON.parse('{"name":"docusaurus-plugin-content-docs","id":"default"}')}}]);
\ No newline at end of file
diff --git a/assets/js/1d1274f9.f7a3c9c5.js b/assets/js/1d1274f9.f7a3c9c5.js
new file mode 100644
index 00000000000..38b485e76ce
--- /dev/null
+++ b/assets/js/1d1274f9.f7a3c9c5.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[739],{5680:(e,a,t)=>{t.d(a,{xA:()=>u,yg:()=>h});var o=t(6540);function n(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function i(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function s(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var l=o.createContext({}),p=function(e){var a=o.useContext(l),t=a;return e&&(t="function"==typeof e?e(a):s(s({},a),e)),t},u=function(e){var a=p(e.components);return o.createElement(l.Provider,{value:a},e.children)},m="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return o.createElement(o.Fragment,{},a)}},d=o.forwardRef((function(e,a){var t=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,u=r(e,["components","mdxType","originalType","parentName"]),m=p(t),d=n,h=m["".concat(l,".").concat(d)]||m[d]||g[d]||i;return t?o.createElement(h,s(s({ref:a},u),{},{components:t})):o.createElement(h,s({ref:a},u))}));function h(e,a){var t=arguments,n=a&&a.mdxType;if("string"==typeof e||n){var i=t.length,s=new Array(i);s[0]=d;var r={};for(var l in a)hasOwnProperty.call(a,l)&&(r[l]=a[l]);r.originalType=e,r[m]="string"==typeof e?e:n,s[1]=r;for(var p=2;p{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>s,default:()=>g,frontMatter:()=>i,metadata:()=>r,toc:()=>p});var o=t(8168),n=(t(6540),t(5680));const i={title:"Submitting a Proposal",order:5},s=void 0,r={unversionedId:"governance/submitting",id:"version-v19.1.0/governance/submitting",title:"Submitting a Proposal",description:"If you have a final draft of your proposal ready to submit, you may want to push your proposal live on the testnet first. These are the three primary steps to getting your proposal live on-chain.",source:"@site/versioned_docs/version-v19.1.0/governance/submitting.md",sourceDirName:"governance",slug:"/governance/submitting",permalink:"/v19.1.0/governance/submitting",draft:!1,tags:[],version:"v19.1.0",frontMatter:{title:"Submitting a Proposal",order:5},sidebar:"tutorialSidebar",previous:{title:"On-Chain Proposal Process",permalink:"/v19.1.0/governance/process"},next:{title:"Interchain Security",permalink:"/v19.1.0/interchain-security/"}},l={},p=[{value:"Hosting supplementary materials",id:"hosting-supplementary-materials",level:2},{value:"Formatting the JSON file for the governance proposal",id:"formatting-the-json-file-for-the-governance-proposal",level:2},{value:"Sending the transaction that submits your governance proposal",id:"sending-the-transaction-that-submits-your-governance-proposal",level:2},{value:"Proposal types",id:"proposal-types",level:3},{value:"Legacy proposals (cosmos-sdk < v0.47)",id:"legacy-proposals-cosmos-sdk--v047",level:4},{value:"Proposals (cosmos-sdk >= v0.47)",id:"proposals-cosmos-sdk--v047",level:4},{value:"Minimal Deposit amount",id:"minimal-deposit-amount",level:4},{value:"Walkthrough example (changing x/staking params)",id:"walkthrough-example-changing-xstaking-params",level:3},{value:"Verifying your transaction",id:"verifying-your-transaction",level:3},{value:"Troubleshooting a failed transaction",id:"troubleshooting-a-failed-transaction",level:3},{value:"Depositing funds after a proposal has been submitted",id:"depositing-funds-after-a-proposal-has-been-submitted",level:3},{value:"Submitting your proposal to the testnet",id:"submitting-your-proposal-to-the-testnet",level:3}],u={toc:p},m="wrapper";function g(e){let{components:a,...t}=e;return(0,n.yg)(m,(0,o.A)({},u,t,{components:a,mdxType:"MDXLayout"}),(0,n.yg)("p",null,"If you have a final draft of your proposal ready to submit, you may want to push your proposal live on the testnet first. These are the three primary steps to getting your proposal live on-chain."),(0,n.yg)("p",null,"Interacting with the Cosmos Hub via the command line in order to run queries or submit proposals has several prerequisites:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"You will need to compile ",(0,n.yg)("a",{parentName:"li",href:"../getting-started/installation"},(0,n.yg)("inlineCode",{parentName:"a"},"gaiad"))," from source into a binary file executable by your operating system eg. MacOS, Windows, Linux"),(0,n.yg)("li",{parentName:"ul"},"You will need to indicate which chain you are querying, and currently this is ",(0,n.yg)("inlineCode",{parentName:"li"},"--chain-id cosmoshub-4")),(0,n.yg)("li",{parentName:"ul"},"You will need to connect to a full node. You can find a list of available Cosmos Hub endpoints under the ",(0,n.yg)("a",{parentName:"li",href:"https://github.com/cosmos/chain-registry/blob/master/cosmoshub/chain.json"},"API section")," in the ",(0,n.yg)("a",{parentName:"li",href:"https://github.com/cosmos/chain-registry"},"Chain Registry"),"."),(0,n.yg)("li",{parentName:"ul"},"More info is in the Walkthrough Example section.")),(0,n.yg)("p",null,"Running a full node can be difficult for those not technically-inclined, so you may choose to use a third-party's full node. In this case, the primary security risk is that of censorship: it's the single place where you have a single gateway to the network, and any messages submitted through an untrusted node could be censored."),(0,n.yg)("h2",{id:"hosting-supplementary-materials"},"Hosting supplementary materials"),(0,n.yg)("p",null,"In general we try to minimize the amount of data pushed to the blockchain. Hence, detailed documentation about a proposal is usually hosted on a separate censorship resistant data-hosting platform, like IPFS."),(0,n.yg)("p",null,"Once you have drafted your proposal, ideally as a Markdown file, you\ncan upload it to the IPFS network:"),(0,n.yg)("ol",null,(0,n.yg)("li",{parentName:"ol"},"By ",(0,n.yg)("a",{parentName:"li",href:"https://ipfs.io"},"running an IPFS node and the IPFS software"),", or"),(0,n.yg)("li",{parentName:"ol"},"By using a service such as ",(0,n.yg)("a",{parentName:"li",href:"https://pinata.cloud"},"https://pinata.cloud"))),(0,n.yg)("p",null,'Ensure that you "pin" the file so that it continues to be available on the network. You should get a URL like this: ',(0,n.yg)("a",{parentName:"p",href:"https://ipfs.io/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD"},"https://ipfs.io/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD")),(0,n.yg)("p",null,"The value ",(0,n.yg)("inlineCode",{parentName:"p"},"QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD")," is called the ",(0,n.yg)("inlineCode",{parentName:"p"},"CID")," of your file - it is effectively the file's hash."),(0,n.yg)("p",null,"If you uploaded a markdown file, you can use the IPFS markdown viewer to render the document for better viewing. Links for the markdown viewer look like ",(0,n.yg)("inlineCode",{parentName:"p"},"https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/example#/ipfs/"),", where ",(0,n.yg)("inlineCode",{parentName:"p"},"")," is your CID. For instance the link above would be: ",(0,n.yg)("a",{parentName:"p",href:"https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/example#/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD"},"https://ipfs.io/ipfs/QmTkzDwWqPbnAh5YiV5VwcTLnGdwSNsNTn2aDxdXBFca7D/example#/ipfs/QmbkQNtCAdR1CNbFE8ujub2jcpwUcmSRpSCg8gVWrTHSWD")),(0,n.yg)("p",null,"Share the URL with others and verify that your file is publicly accessible."),(0,n.yg)("p",null,"The reason we use IPFS is that it is a decentralized means of storage, making it resistant to censorship or single points of failure. This increases the likelihood that the file will remain available in the future."),(0,n.yg)("h2",{id:"formatting-the-json-file-for-the-governance-proposal"},"Formatting the JSON file for the governance proposal"),(0,n.yg)("p",null,"Prior to sending the transaction that submits your proposal on-chain, you must create a JSON file. This file will contain the information that will be stored on-chain as the governance proposal. Begin by creating a new text (.txt) file to enter this information. Use ",(0,n.yg)("a",{parentName:"p",href:"/v19.1.0/governance/best-practices"},"these best practices")," as a guide for the contents of your proposal. When you're done, save the file as a .json file. "),(0,n.yg)("p",null,"Each proposal type is unique in how the JSON should be formatted.\nSee the relevant section for the type of proposal you are drafting:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"/v19.1.0/governance/formatting#text"},"Text Proposals")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"/v19.1.0/governance/formatting#community-pool-spend"},"Community Pool Spend Proposals")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("a",{parentName:"li",href:"/v19.1.0/governance/formatting#parameter-change"},"Parameter Change Proposals"))),(0,n.yg)("p",null,"Once on-chain, most people will rely upon block explorers to interpret this information with a graphical user interface (GUI)."),(0,n.yg)("h2",{id:"sending-the-transaction-that-submits-your-governance-proposal"},"Sending the transaction that submits your governance proposal"),(0,n.yg)("p",null,"For information on how to use gaiad (the command line interface) to submit an on-chain proposal through the governance module, please refer to the ",(0,n.yg)("a",{parentName:"p",href:"../hub-tutorials/gaiad"},"gaiad CLI tutorials")," for the Cosmos Hub documentation."),(0,n.yg)("h3",{id:"proposal-types"},"Proposal types"),(0,n.yg)("p",null,"There are 2 proposal types that can be submitted to the CosmosHub governance module."),(0,n.yg)("h4",{id:"legacy-proposals-cosmos-sdk--v047"},"Legacy proposals (cosmos-sdk < v0.47)"),(0,n.yg)("p",null,"These proposals can be submitted using ",(0,n.yg)("inlineCode",{parentName:"p"},"gaiad tx gov submit-legacy-proposal"),"."),(0,n.yg)("p",null,"Available proposals that can be submitted using this Tx are:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},"cancel-software-upgrade"),(0,n.yg)("li",{parentName:"ul"},"change-reward-denoms"),(0,n.yg)("li",{parentName:"ul"},"consumer-addition"),(0,n.yg)("li",{parentName:"ul"},"consumer-removal"),(0,n.yg)("li",{parentName:"ul"},"ibc-upgrade"),(0,n.yg)("li",{parentName:"ul"},"param-change (does not work for standard cosmos-sdk modules, works on IBC and ICS modules)"),(0,n.yg)("li",{parentName:"ul"},"software-upgrade"),(0,n.yg)("li",{parentName:"ul"},"update-client")),(0,n.yg)("p",null,"You can read more about submitting a legacy proposal in the ",(0,n.yg)("a",{parentName:"p",href:"https://docs.cosmos.network/v0.47/build/modules/gov#submit-legacy-proposal"},"cosmos-sdk docs")),(0,n.yg)("h4",{id:"proposals-cosmos-sdk--v047"},"Proposals (cosmos-sdk >= v0.47)"),(0,n.yg)("p",null,"These proposals can are submitted using ",(0,n.yg)("inlineCode",{parentName:"p"},"gaiad tx gov submit-proposal"),"."),(0,n.yg)("p",null,"Using ",(0,n.yg)("inlineCode",{parentName:"p"},"gaiad tx gov draft-proposal")," can help prepare a proposal. The tool will create a file containing the specified proposal message and it also helps with populating all the required proposal fields.\nYou can always edit the file after you create it using ",(0,n.yg)("inlineCode",{parentName:"p"},"draft-proposal")),(0,n.yg)("p",null,"Most cosmos-sdk modules allow changing their governance gated parameters using a ",(0,n.yg)("inlineCode",{parentName:"p"},"MsgUpdateParams")," which is a new way of updating governance parameters. It is important to note that ",(0,n.yg)("inlineCode",{parentName:"p"},"MsgUpdateParams")," requires ",(0,n.yg)("strong",{parentName:"p"},"all paramaters to be specified")," in the proposal message."),(0,n.yg)("p",null,"You can read more about submitting a proposal in the ",(0,n.yg)("a",{parentName:"p",href:"https://docs.cosmos.network/v0.47/build/modules/gov#submit-proposal"},"cosmos-sdk docs")),(0,n.yg)("h4",{id:"minimal-deposit-amount"},"Minimal Deposit amount"),(0,n.yg)("admonition",{type:"tip"},(0,n.yg)("p",{parentName:"admonition"},"Please note that cosmoshub-4 uses a minimum initial deposit amount.")),(0,n.yg)("p",null,"Proposals cannot be submitted successfully without providing a minimum initial deposit. In practice, this means that the ",(0,n.yg)("inlineCode",{parentName:"p"},"deposit")," field in your proposal has to meet the ",(0,n.yg)("inlineCode",{parentName:"p"},"min_initial_deposit")," governance paramter.\nThe minimum deposit is equal to ",(0,n.yg)("inlineCode",{parentName:"p"},"min_deposit * min_initial_deposit_ratio"),". Only ",(0,n.yg)("inlineCode",{parentName:"p"},"uatom")," is supported as deposit denom."),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-shell"},'// checking the min_initial_deposit\ngaiad q gov params -o json\n{\n ...\n "params": {\n ...\n "min_deposit": [\n {\n "denom": "stake",\n "amount": "10000000"\n }\n ],\n "min_initial_deposit_ratio": "0.000000000000000000"\n}\n')),(0,n.yg)("h3",{id:"walkthrough-example-changing-xstaking-params"},"Walkthrough example (changing x/staking params)"),(0,n.yg)("p",null,"Let's illustrate how to change the ",(0,n.yg)("inlineCode",{parentName:"p"},"x/staking")," parameters."),(0,n.yg)("p",null,"The module has the following parameters (values don't reflect actual on-chain values):"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-shell"},'gaiad q staking params -o json\n{\n "unbonding_time": "86400s",\n "max_validators": 100,\n "max_entries": 7,\n "historical_entries": 10000,\n "bond_denom": "stake",\n "min_commission_rate": "0.000000000000000000",\n "validator_bond_factor": "-1.000000000000000000",\n "global_liquid_staking_cap": "1.000000000000000000",\n "validator_liquid_staking_cap": "1.000000000000000000"\n}\n')),(0,n.yg)("p",null,"We will use ",(0,n.yg)("inlineCode",{parentName:"p"},"draft-proposal")," to help us create a proposal file that we will later submit."),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-shell"},"gaiad tx gov draft-proposal\n// running the command will start a terminal applet allowing you to choose the proposal type\n\n// 1st screen\nUse the arrow keys to navigate: \u2193 \u2191 \u2192 \u2190\n? Select proposal type:\n text\n community-pool-spend\n software-upgrade\n cancel-software-upgrade\n \u25b8 other // choose this\n\n// 2nd screen\n\u2714 other\nUse the arrow keys to navigate: \u2193 \u2191 \u2192 \u2190\n? Select proposal message type::\n\u2191 /cosmos.staking.v1beta1.MsgUndelegate\n \u25b8 /cosmos.staking.v1beta1.MsgUpdateParams // choose this option\n /cosmos.staking.v1beta1.MsgValidatorBond\n /cosmos.upgrade.v1beta1.MsgCancelUpgrade\n\u2193 /cosmos.upgrade.v1beta1.MsgSoftwareUpgrade\n")),(0,n.yg)("p",null,"After choosing the ",(0,n.yg)("inlineCode",{parentName:"p"},"/cosmos.staking.v1beta1.MsgUpdateParams")," message, the applet will allow you to set the message fields and some other proposal details.\nUpon completion, the proposal will be available in the directory where you called the ",(0,n.yg)("inlineCode",{parentName:"p"},"gaiad")," command inside the ",(0,n.yg)("inlineCode",{parentName:"p"},"draft_proposal.json")," file."),(0,n.yg)("p",null,"Here is an example of the ",(0,n.yg)("inlineCode",{parentName:"p"},"draft_proposal.json")," file:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-JSON"},'{\n "messages": [\n {\n "@type": "/cosmos.staking.v1beta1.MsgUpdateParams",\n "authority": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn",\n "params": {\n "unbonding_time": "86400s",\n "max_validators": 100,\n "max_entries": 7,\n "historical_entries": 10000,\n "bond_denom": "uatom",\n "min_commission_rate": "0.050000000000000000", // we are changing this from 0.000000000000000000\n "validator_bond_factor": "-1.000000000000000000",\n "global_liquid_staking_cap": "1.000000000000000000",\n "validator_liquid_staking_cap": "1.000000000000000000"\n }\n }\n ],\n "metadata": "ipfs://CID",\n "deposit": "1000000uatom",\n "title": "Updating the staking params (min_comission_rate)",\n "summary": "This proposal will attempt to update the min_commission_rate staking parameter. During proposal creation and submission **all** proposal fields must be specified. Pay attention that you don\'t unintentionally specify different values for fields that you did not intend to change."\n}\n')),(0,n.yg)("p",null,"Finally, we submit the proposal:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"gaiad tx gov submit-proposal \n --from \\\n --chain-id cosmoshub-4 \\\n --gas \\\n --fees \\\n --node \\\n")),(0,n.yg)("p",null,"Use ",(0,n.yg)("inlineCode",{parentName:"p"},"gaiad tx gov --help")," to get more info about the CLI options, we will explain some options below:"),(0,n.yg)("ol",null,(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("inlineCode",{parentName:"li"},"--from")," is the account key that pays the transaction fee and deposit amount. This account key must be already saved in the keyring on your device and it must be an address you control (e.g. ",(0,n.yg)("inlineCode",{parentName:"li"},"--from hypha-dev-wallet"),")."),(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("inlineCode",{parentName:"li"},"--gas")," is the maximum amount of gas permitted to be used to process the transaction (e.g. ",(0,n.yg)("inlineCode",{parentName:"li"},"--gas 500000"),").",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},"The more content there is in the description of your proposal, the more gas your transaction will consume"),(0,n.yg)("li",{parentName:"ul"},"If this number isn't high enough and there isn't enough gas to process your transaction, the transaction will fail."),(0,n.yg)("li",{parentName:"ul"},"The transaction will only use the amount of gas needed to process the transaction."))),(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("inlineCode",{parentName:"li"},"--fees")," is a flat-rate incentive for a validator to process your transaction.",(0,n.yg)("ul",{parentName:"li"},(0,n.yg)("li",{parentName:"ul"},"Many nodes use a minimum fee to disincentivize transaction spamming."),(0,n.yg)("li",{parentName:"ul"},"7500uatom is equal to 0.0075 ATOM."))),(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("inlineCode",{parentName:"li"},"--node")," is using an established node to send the transaction to the Cosmos Hub 4 network. For available nodes, please look at the ",(0,n.yg)("a",{parentName:"li",href:"https://github.com/cosmos/chain-registry/blob/master/cosmoshub/chain.json"},"Chain Registry"),".")),(0,n.yg)("p",null,(0,n.yg)("strong",{parentName:"p"},"Note"),": be careful what you use for ",(0,n.yg)("inlineCode",{parentName:"p"},"--fees"),". A mistake here could result in spending hundreds or thousands of ATOMs accidentally, which cannot be recovered."),(0,n.yg)("h3",{id:"verifying-your-transaction"},"Verifying your transaction"),(0,n.yg)("p",null,"After posting your transaction, your command line interface (gaiad) will provide you with the transaction's hash, which you can either query using gaiad or by searching the transaction hash using ",(0,n.yg)("a",{parentName:"p",href:"https://www.mintscan.io/cosmos/txs/0506447AE8C7495DE970736474451CF23536DF8EA837FAF1CF6286565589AB57"},"Mintscan"),". The hash should look something like this: ",(0,n.yg)("inlineCode",{parentName:"p"},"0506447AE8C7495DE970736474451CF23536DF8EA837FAF1CF6286565589AB57"),"."),(0,n.yg)("p",null,"Alternatively, you can check your Tx status and information using:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-shell"},"gaiad q tx \n")),(0,n.yg)("h3",{id:"troubleshooting-a-failed-transaction"},"Troubleshooting a failed transaction"),(0,n.yg)("p",null,"There are a number of reasons why a transaction may fail. Here are two examples:"),(0,n.yg)("ol",null,(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Running out of gas")," - The more data there is in a transaction, the more gas it will need to be processed. If you don't specify enough gas, the transaction will fail.")),(0,n.yg)("li",{parentName:"ol"},(0,n.yg)("p",{parentName:"li"},(0,n.yg)("strong",{parentName:"p"},"Incorrect denomination")," - You may have specified an amount in 'utom' or 'atom' instead of 'uatom', causing the transaction to fail."))),(0,n.yg)("p",null,"If you encounter a problem, try to troubleshoot it first, and then ask for help on the Cosmos Hub forum: ",(0,n.yg)("a",{parentName:"p",href:"https://forum.cosmos.network"},"https://forum.cosmos.network"),". We can learn from failed attempts and use them to improve upon this guide."),(0,n.yg)("h3",{id:"depositing-funds-after-a-proposal-has-been-submitted"},"Depositing funds after a proposal has been submitted"),(0,n.yg)("p",null,"Sometimes a proposal is submitted without having the minimum token amount deposited yet. In these cases you would want to be able to deposit more tokens to get the proposal into the voting stage. In order to deposit tokens, you'll need to know what your proposal ID is after you've submitted your proposal. You can query all proposals by the following command:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"gaiad q gov proposals\n")),(0,n.yg)("p",null,"If there are a lot of proposals on the chain already, you can also filter by your own address. For the proposal above, that would be:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"gaiad q gov proposals --depositor cosmos1hxv7mpztvln45eghez6evw2ypcw4vjmsmr8cdx\n")),(0,n.yg)("p",null,"Once you have the proposal ID, this is the command to deposit extra tokens:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"gaiad tx gov deposit --from \n")),(0,n.yg)("p",null,"The amount per deposit is equal to ",(0,n.yg)("inlineCode",{parentName:"p"},"min_deposit * min_deposit_ratio"),". Only ",(0,n.yg)("inlineCode",{parentName:"p"},"uatom")," is supported as deposit denom. Transactions where ",(0,n.yg)("inlineCode",{parentName:"p"},"deposit_amount < (min_deposit * min_deposit_ratio)")," will be rejected."),(0,n.yg)("h3",{id:"submitting-your-proposal-to-the-testnet"},"Submitting your proposal to the testnet"),(0,n.yg)("p",null,"Submitting to the testnet is identical to mainnet submissions aside from a few changes:"),(0,n.yg)("ol",null,(0,n.yg)("li",{parentName:"ol"},"The chain-id is ",(0,n.yg)("inlineCode",{parentName:"li"},"theta-testnet-001"),"."),(0,n.yg)("li",{parentName:"ol"},"The list of usable endpoints can be found ",(0,n.yg)("a",{parentName:"li",href:"https://github.com/cosmos/testnets/tree/master/public#readme"},"here"),"."),(0,n.yg)("li",{parentName:"ol"},"You will need testnet tokens, not ATOM. There is a faucet available in the Developer ",(0,n.yg)("a",{parentName:"li",href:"https://discord.com/invite/cosmosnetwork"},"Discord"),".")),(0,n.yg)("p",null,"You may want to submit your proposal to the testnet chain before the mainnet for a number of reasons:"),(0,n.yg)("ol",null,(0,n.yg)("li",{parentName:"ol"},"To see what the proposal description will look like."),(0,n.yg)("li",{parentName:"ol"},"To signal that your proposal is about to go live on the mainnet."),(0,n.yg)("li",{parentName:"ol"},"To share what the proposal will look like in advance with stakeholders."),(0,n.yg)("li",{parentName:"ol"},"To test the functionality of the governance features.")))}g.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/205a4e7a.8bcc3541.js b/assets/js/205a4e7a.8bcc3541.js
new file mode 100644
index 00000000000..3e819297be5
--- /dev/null
+++ b/assets/js/205a4e7a.8bcc3541.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[3942],{5680:(e,t,r)=>{r.d(t,{xA:()=>s,yg:()=>m});var n=r(6540);function o(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=n.createContext({}),u=function(e){var t=n.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):i(i({},t),e)),r},s=function(e){var t=u(e.components);return n.createElement(c.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},f=n.forwardRef((function(e,t){var r=e.components,o=e.mdxType,a=e.originalType,c=e.parentName,s=l(e,["components","mdxType","originalType","parentName"]),p=u(r),f=o,m=p["".concat(c,".").concat(f)]||p[f]||d[f]||a;return r?n.createElement(m,i(i({ref:t},s),{},{components:r})):n.createElement(m,i({ref:t},s))}));function m(e,t){var r=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var a=r.length,i=new Array(a);i[0]=f;var l={};for(var c in t)hasOwnProperty.call(t,c)&&(l[c]=t[c]);l.originalType=e,l[p]="string"==typeof e?e:o,i[1]=l;for(var u=2;u{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>a,metadata:()=>l,toc:()=>u});var n=r(8168),o=(r(6540),r(5680));const a={title:"Gaia Modules",order:1},i=void 0,l={unversionedId:"modules/README",id:"version-v19.1.0/modules/README",title:"Gaia Modules",description:"Here you can find an overview of the modules included on the Cosmos Hub (Gaia) blockchain with relevant info and",source:"@site/versioned_docs/version-v19.1.0/modules/README.md",sourceDirName:"modules",slug:"/modules/",permalink:"/v19.1.0/modules/",draft:!1,tags:[],version:"v19.1.0",frontMatter:{title:"Gaia Modules",order:1},sidebar:"tutorialSidebar",previous:{title:"ADR Creation Process",permalink:"/v19.1.0/architecture/PROCESS"},next:{title:"Globalfee",permalink:"/v19.1.0/modules/globalfee"}},c={},u=[{value:"Module List",id:"module-list",level:2}],s={toc:u},p="wrapper";function d(e){let{components:t,...r}=e;return(0,o.yg)(p,(0,n.A)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,o.yg)("p",null,"Here you can find an overview of the modules included on the Cosmos Hub (Gaia) blockchain with relevant info and\nlinks for each one."),(0,o.yg)("h2",{id:"module-list"},"Module List"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"/v19.1.0/modules/metaprotocols"},"Metaprotocols"))))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/210b9b50.11092f46.js b/assets/js/210b9b50.11092f46.js
new file mode 100644
index 00000000000..3f5e1f93e64
--- /dev/null
+++ b/assets/js/210b9b50.11092f46.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[5364],{5680:(e,a,t)=>{t.d(a,{xA:()=>h,yg:()=>m});var o=t(6540);function i(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}function n(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function r(e){for(var a=1;a=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var l=o.createContext({}),d=function(e){var a=o.useContext(l),t=a;return e&&(t="function"==typeof e?e(a):r(r({},a),e)),t},h=function(e){var a=d(e.components);return o.createElement(l.Provider,{value:a},e.children)},c="mdxType",g={inlineCode:"code",wrapper:function(e){var a=e.children;return o.createElement(o.Fragment,{},a)}},u=o.forwardRef((function(e,a){var t=e.components,i=e.mdxType,n=e.originalType,l=e.parentName,h=s(e,["components","mdxType","originalType","parentName"]),c=d(t),u=i,m=c["".concat(l,".").concat(u)]||c[u]||g[u]||n;return t?o.createElement(m,r(r({ref:a},h),{},{components:t})):o.createElement(m,r({ref:a},h))}));function m(e,a){var t=arguments,i=a&&a.mdxType;if("string"==typeof e||i){var n=t.length,r=new Array(n);r[0]=u;var s={};for(var l in a)hasOwnProperty.call(a,l)&&(s[l]=a[l]);s.originalType=e,s[c]="string"==typeof e?e:i,r[1]=s;for(var d=2;d{t.r(a),t.d(a,{assets:()=>l,contentTitle:()=>r,default:()=>g,frontMatter:()=>n,metadata:()=>s,toc:()=>d});var o=t(8168),i=(t(6540),t(5680));const n={title:"Validator FAQ",order:3},r=void 0,s={unversionedId:"validators/validator-faq",id:"version-v19.1.0/validators/validator-faq",title:"Validator FAQ",description:"Disclaimer",source:"@site/versioned_docs/version-v19.1.0/validators/validator-faq.md",sourceDirName:"validators",slug:"/validators/validator-faq",permalink:"/v19.1.0/validators/validator-faq",draft:!1,tags:[],version:"v19.1.0",frontMatter:{title:"Validator FAQ",order:3},sidebar:"tutorialSidebar",previous:{title:"Validator Security",permalink:"/v19.1.0/validators/security"},next:{title:"Running a Validator",permalink:"/v19.1.0/validators/validator-setup"}},l={},d=[{value:"General Concepts",id:"general-concepts",level:2},{value:"What is a Cosmos validator?",id:"what-is-a-cosmos-validator",level:3},{value:"What is staking?",id:"what-is-staking",level:3},{value:"What is a full node?",id:"what-is-a-full-node",level:3},{value:"What is a delegator?",id:"what-is-a-delegator",level:3},{value:"Becoming a Validator",id:"becoming-a-validator",level:2},{value:"How to become a validator?",id:"how-to-become-a-validator",level:3},{value:"Testnet",id:"testnet",level:2},{value:"How can I join the testnet?",id:"how-can-i-join-the-testnet",level:3},{value:"Additional Concepts",id:"additional-concepts",level:2},{value:"What are the different types of keys?",id:"what-are-the-different-types-of-keys",level:3},{value:"What are the different states a validator can be in?",id:"what-are-the-different-states-a-validator-can-be-in",level:3},{value:"What is self-delegation? How can I increase my self-delegation?",id:"what-is-self-delegation-how-can-i-increase-my-self-delegation",level:3},{value:"What is validator bond? How can I increase my validator bond?",id:"what-is-validator-bond-how-can-i-increase-my-validator-bond",level:3},{value:"Is there a minimum amount of ATOM that must be delegated to be an active (bonded) validator?",id:"is-there-a-minimum-amount-of-atom-that-must-be-delegated-to-be-an-active-bonded-validator",level:3},{value:"How do delegators choose their validators?",id:"how-do-delegators-choose-their-validators",level:3},{value:"Responsibilities",id:"responsibilities",level:2},{value:"Do validators need to be publicly identified?",id:"do-validators-need-to-be-publicly-identified",level:3},{value:"What are the responsibilities of a validator?",id:"what-are-the-responsibilities-of-a-validator",level:3},{value:"What does 'participate in governance' entail?",id:"what-does-participate-in-governance-entail",level:3},{value:"What does staking imply?",id:"what-does-staking-imply",level:3},{value:"Can a validator run away with their delegators' ATOM?",id:"can-a-validator-run-away-with-their-delegators-atom",level:3},{value:"How often is a validator chosen to propose the next block? Does frequency increase with the quantity of bonded ATOM?",id:"how-often-is-a-validator-chosen-to-propose-the-next-block-does-frequency-increase-with-the-quantity-of-bonded-atom",level:3},{value:"Are validators of the Cosmos Hub required to validate other zones in the Cosmos ecosystem?",id:"are-validators-of-the-cosmos-hub-required-to-validate-other-zones-in-the-cosmos-ecosystem",level:3},{value:"How can a validator safely quit validating on the Cosmos Hub?",id:"how-can-a-validator-safely-quit-validating-on-the-cosmos-hub",level:3},{value:"Incentives",id:"incentives",level:2},{value:"What is the incentive to stake?",id:"what-is-the-incentive-to-stake",level:3},{value:"What is a validator commission?",id:"what-is-a-validator-commission",level:3},{value:"What is the incentive to run a validator?",id:"what-is-the-incentive-to-run-a-validator",level:3},{value:"How are block rewards distributed?",id:"how-are-block-rewards-distributed",level:3},{value:"How are fees distributed?",id:"how-are-fees-distributed",level:3},{value:"What are the slashing conditions?",id:"what-are-the-slashing-conditions",level:3},{value:"Are validators required to self-delegate ATOM?",id:"are-validators-required-to-self-delegate-atom",level:3},{value:"How to prevent concentration of stake in the hands of a few top validators?",id:"how-to-prevent-concentration-of-stake-in-the-hands-of-a-few-top-validators",level:3},{value:"Liquid Staking Module",id:"liquid-staking-module",level:2},{value:"What is the liquid staking module?",id:"what-is-the-liquid-staking-module",level:3},{value:"Who can validator bond?",id:"who-can-validator-bond",level:3},{value:"How can I validator bond?",id:"how-can-i-validator-bond",level:3},{value:"How does a delegator or validator mark their delegation as a validator bond?",id:"how-does-a-delegator-or-validator-mark-their-delegation-as-a-validator-bond",level:3},{value:"Are validator bonds subject to additional slashing conditions?",id:"are-validator-bonds-subject-to-additional-slashing-conditions",level:3},{value:"Can I unbond my validator bond?",id:"can-i-unbond-my-validator-bond",level:3},{value:"Can I validator bond some of my tokens and delegate the remaining portion normally?",id:"can-i-validator-bond-some-of-my-tokens-and-delegate-the-remaining-portion-normally",level:3},{value:"Technical Requirements",id:"technical-requirements",level:2},{value:"What are hardware requirements?",id:"what-are-hardware-requirements",level:3},{value:"What are software requirements?",id:"what-are-software-requirements",level:3},{value:"What are bandwidth requirements?",id:"what-are-bandwidth-requirements",level:3},{value:"How to handle key management?",id:"how-to-handle-key-management",level:3},{value:"What can validators expect in terms of operations?",id:"what-can-validators-expect-in-terms-of-operations",level:3},{value:"What are the maintenance requirements?",id:"what-are-the-maintenance-requirements",level:3},{value:"How can validators protect themselves from denial-of-service attacks?",id:"how-can-validators-protect-themselves-from-denial-of-service-attacks",level:3}],h={toc:d},c="wrapper";function g(e){let{components:a,...t}=e;return(0,i.yg)(c,(0,o.A)({},h,t,{components:a,mdxType:"MDXLayout"}),(0,i.yg)("admonition",{type:"warning"},(0,i.yg)("h3",{parentName:"admonition",id:"disclaimer"},"Disclaimer"),(0,i.yg)("p",{parentName:"admonition"},"This is work in progress. Mechanisms and values are susceptible to change.")),(0,i.yg)("h2",{id:"general-concepts"},"General Concepts"),(0,i.yg)("h3",{id:"what-is-a-cosmos-validator"},"What is a Cosmos validator?"),(0,i.yg)("p",null,"The Cosmos Hub is based on ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cometbft.com/v0.37/introduction/what-is-cometbft"},"CometBFT")," that relies on a set of validators to secure the network. The role of validators is to run a full node and participate in consensus by broadcasting votes that contain cryptographic signatures signed by the validator's private key. Validators commit new blocks in the blockchain and receive revenue in exchange for their work. Validators must also participate in governance by voting on proposals. Validators are weighted according to their total stake."),(0,i.yg)("h3",{id:"what-is-staking"},"What is staking?"),(0,i.yg)("p",null,"The Cosmos Hub is a public Proof-Of-Stake (PoS) blockchain, meaning that the weight of validators is determined by the amount of staking tokens (ATOM) bonded as collateral. These ATOM tokens can be self-delegated directly by the validator or delegated to the validator by other ATOM holders."),(0,i.yg)("p",null,"Any user in the system can declare their intention to become a validator by sending a ",(0,i.yg)("inlineCode",{parentName:"p"},"create-validator")," transaction to become validator candidates."),(0,i.yg)("p",null,"The weight (i.e. voting power) of a validator determines whether they are an active validator. The active validator set is limited to ",(0,i.yg)("a",{parentName:"p",href:"https://www.mintscan.io/cosmos/validators"},"an amount")," that changes over time."),(0,i.yg)("h3",{id:"what-is-a-full-node"},"What is a full node?"),(0,i.yg)("p",null,"A full node is a server running a chain's ",(0,i.yg)("em",{parentName:"p"},"binary")," (its software) that fully validates transactions and blocks of a blockchain and keeps a full record of all historic activity. A full node is distinct from a pruned node that processes only block headers and a small subset of transactions. Running a full node requires more resources than a pruned node. Validators can decide to run either a full node or a pruned node, but they need to make sure they retain enough blocks to be able to validate new blocks."),(0,i.yg)("p",null,"Of course, it is possible and encouraged for users to run full nodes even if they do not plan to be validators."),(0,i.yg)("p",null,"You can find more details about the requirements in the ",(0,i.yg)("a",{parentName:"p",href:"/v19.1.0/hub-tutorials/join-mainnet"},"Joining Mainnet Tutorial"),"."),(0,i.yg)("h3",{id:"what-is-a-delegator"},"What is a delegator?"),(0,i.yg)("p",null,"Delegators are ATOM holders who cannot, or do not want to, run a validator themselves. ATOM holders can delegate ATOM to a validator and obtain a part of their revenue in exchange. For details on how revenue is distributed, see ",(0,i.yg)("a",{parentName:"p",href:"/validators/validator-faq#what-is-the-incentive-to-stake"},"What is the incentive to stake?")," and ",(0,i.yg)("a",{parentName:"p",href:"/validators/validator-faq#what-is-a-validator-commission"},"What are validators commission?")," in this document."),(0,i.yg)("p",null,"Because delegators share revenue with their validators, they also share risks. If a validator misbehaves, each of their delegators are partially slashed in proportion to their delegated stake. This penalty is one of the reasons why delegators must perform due diligence on validators before delegating. Spreading their stake over multiple validators is another layer of protection."),(0,i.yg)("p",null,"Delegators play a critical role in the system, as they are responsible for choosing validators. Being a delegator is not a passive role. Delegators must actively monitor the actions of their validators and participate in governance. For details on being a delegator, read the ",(0,i.yg)("a",{parentName:"p",href:"https://hub.cosmos.network/delegators/delegator-faq"},"Delegator FAQ"),"."),(0,i.yg)("h2",{id:"becoming-a-validator"},"Becoming a Validator"),(0,i.yg)("h3",{id:"how-to-become-a-validator"},"How to become a validator?"),(0,i.yg)("p",null,"Any participant in the network can signal that they want to become a validator by sending a ",(0,i.yg)("inlineCode",{parentName:"p"},"create-validator")," transaction, where they must fill out the following parameters:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Validator's ",(0,i.yg)("inlineCode",{parentName:"strong"},"PubKey"),":")," The private key associated with this Tendermint/CometBFT ",(0,i.yg)("inlineCode",{parentName:"li"},"PubKey")," is used to sign ",(0,i.yg)("em",{parentName:"li"},"prevotes")," and ",(0,i.yg)("em",{parentName:"li"},"precommits"),"."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Validator's Address:")," Application level address that is used to publicly identify your validator. The private key associated with this address is used to delegate, unbond, claim rewards, and participate in governance."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Validator's name (moniker)")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Validator's website (Optional)")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Validator's description (Optional)")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Initial commission rate"),": The commission rate on block rewards and fees charged to delegators."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Maximum commission:")," The maximum commission rate that this validator can charge. This parameter is fixed and cannot be changed after the ",(0,i.yg)("inlineCode",{parentName:"li"},"create-validator")," transaction is processed."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Commission max change rate:")," The maximum daily increase of the validator commission. This parameter is fixed cannot be changed after the ",(0,i.yg)("inlineCode",{parentName:"li"},"create-validator")," transaction is processed.")),(0,i.yg)("p",null,"After a validator is created, ATOM holders can delegate ATOM to them, effectively adding stake to the validator's pool. The total stake of an address is the combination of ATOM bonded by delegators and ATOM self-bonded by the validator."),(0,i.yg)("p",null,"From all validator candidates that signaled themselves, the 180 validators with the most total stake are the designated ",(0,i.yg)("strong",{parentName:"p"},"validators"),". If a validator's total stake falls below the top 180, then that validator loses its validator privileges. The validator cannot participate in consensus or generate rewards until the stake is high enough to be in the top 180. Over time, the maximum number of validators may be increased via on-chain governance proposal."),(0,i.yg)("h2",{id:"testnet"},"Testnet"),(0,i.yg)("h3",{id:"how-can-i-join-the-testnet"},"How can I join the testnet?"),(0,i.yg)("p",null,"The testnet is a great environment to test your validator setup before launch."),(0,i.yg)("p",null,"Testnet participation is a great way to signal to the community that you are ready and able to operate a validator. For details, see ",(0,i.yg)("a",{parentName:"p",href:"/v19.1.0/hub-tutorials/join-testnet"},"Join the Public Testnet")," documentation."),(0,i.yg)("h2",{id:"additional-concepts"},"Additional Concepts"),(0,i.yg)("h3",{id:"what-are-the-different-types-of-keys"},"What are the different types of keys?"),(0,i.yg)("p",null,"There are two types of keys:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Tendermint/CometBFT key"),": A unique key that is used to sign consensus votes.",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"It is associated with a public key ",(0,i.yg)("inlineCode",{parentName:"li"},"cosmosvalconspub")," (To get this value, run ",(0,i.yg)("inlineCode",{parentName:"li"},"gaiad tendermint show-validator"),")"),(0,i.yg)("li",{parentName:"ul"},"It is generated when the node is created with ",(0,i.yg)("inlineCode",{parentName:"li"},"gaiad init"),"."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Application key"),": This key is created from the ",(0,i.yg)("inlineCode",{parentName:"li"},"gaiad")," binary and is used to sign transactions. Application keys are associated with a public key that is prefixed by ",(0,i.yg)("inlineCode",{parentName:"li"},"cosmospub")," and an address that is prefixed by ",(0,i.yg)("inlineCode",{parentName:"li"},"cosmos"),".")),(0,i.yg)("p",null,"The Tendermint/CometBFT key and the application key are derived from account keys that are generated by the ",(0,i.yg)("inlineCode",{parentName:"p"},"gaiad keys add")," command."),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},"Note:")," A validator's operator key is directly tied to an application key and uses the ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmosvaloper")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmosvaloperpub")," prefixes that are reserved solely for this purpose."),(0,i.yg)("h3",{id:"what-are-the-different-states-a-validator-can-be-in"},"What are the different states a validator can be in?"),(0,i.yg)("p",null,"After a validator is created with a ",(0,i.yg)("inlineCode",{parentName:"p"},"create-validator")," transaction, the validator is in one of three states:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"in validator set"),": Validator is in the active set and participates in consensus. The validator is earning rewards and can be slashed for misbehavior.")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"jailed"),": Validator misbehaved and is in jail, i.e. outside of the validator set."),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"If the jailing is due to being offline for too long (i.e. having missed more than ",(0,i.yg)("inlineCode",{parentName:"li"},"95%")," out of the last ",(0,i.yg)("inlineCode",{parentName:"li"},"10,000")," blocks), the validator can send an ",(0,i.yg)("inlineCode",{parentName:"li"},"unjail")," transaction in order to re-enter the validator set."),(0,i.yg)("li",{parentName:"ul"},"If the jailing is due to double signing, the validator cannot unjail."))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("inlineCode",{parentName:"p"},"unbonded"),": Validator is not in the active set, and therefore not signing blocks. The validator cannot be slashed and does not earn any reward. It is still possible to delegate ATOM to an unbonded validator. Undelegating from an ",(0,i.yg)("inlineCode",{parentName:"p"},"unbonded")," validator is immediate, meaning that the tokens are not subject to the unbonding period."))),(0,i.yg)("h3",{id:"what-is-self-delegation-how-can-i-increase-my-self-delegation"},"What is self-delegation? How can I increase my self-delegation?"),(0,i.yg)("p",null,"Self-delegation is a delegation of ATOM from a validator to themselves. The delegated amount can be increased by sending a ",(0,i.yg)("inlineCode",{parentName:"p"},"delegate")," transaction from your validator's ",(0,i.yg)("inlineCode",{parentName:"p"},"application")," application key."),(0,i.yg)("h3",{id:"what-is-validator-bond-how-can-i-increase-my-validator-bond"},"What is validator bond? How can I increase my validator bond?"),(0,i.yg)("p",null,"Validator bond is a delegation of ATOM from a delegator to a validator. Validator operators can validator bond to themselves. The validator bond amount can be increased by sending a ",(0,i.yg)("inlineCode",{parentName:"p"},"ValidatorBond")," transaction from any account delegated to your validator. Validator bond is required before a validator can accept delegations from liquid staking providers. As such it forces validators to put \u201cskin in the game\u201d in order to be entrusted with delegations from liquid staking providers. This disincentivizes malicious behavior and enables the validator to negotiate its relationship with liquid staking providers."),(0,i.yg)("h3",{id:"is-there-a-minimum-amount-of-atom-that-must-be-delegated-to-be-an-active-bonded-validator"},"Is there a minimum amount of ATOM that must be delegated to be an active (bonded) validator?"),(0,i.yg)("p",null,"The minimum is 1 ATOM. But the network is currently secured by much higher values. You can check the minimum required ATOM to become part of the active validator set on the ",(0,i.yg)("a",{parentName:"p",href:"https://www.mintscan.io/cosmos/validators"},"Mintscan validator page"),"."),(0,i.yg)("h3",{id:"how-do-delegators-choose-their-validators"},"How do delegators choose their validators?"),(0,i.yg)("p",null,"Delegators are free to choose validators according to their own subjective criteria. Selection criteria includes:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Amount of validator-bonded ATOM:")," Number of ATOM a validator validator-bonded to themselves. A validator with a higher amount of self-delegated ATOM indicates that the validator is sharing the risk and consequences for their actions, or has enough goodwill from the community so that others post validator bond on the validator's behalf."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Amount of delegated ATOM:")," Total number of ATOM delegated to a validator. A high voting power shows that the community trusts this validator. Larger validators also decrease the decentralization of the network, so delegators are suggested to consider delegating to smaller validators."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Commission rate:")," Commission applied on revenue by validators before the revenue is distributed to their delegators."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Track record:")," Delegators review the track record of the validators they plan to delegate to. This track record includes past votes on proposals and historical average uptime."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Community contributions:")," Another (more subjective) criteria is the work that validators have contributed to the community, such as educational content, participation in the community channels, contributions to open source software, etc.")),(0,i.yg)("p",null,"Apart from these criteria, validators send a ",(0,i.yg)("inlineCode",{parentName:"p"},"create-validator")," transaction to signal a website address to complete their resume. Validators must build reputation one way or another to attract delegators. For example, a good practice for validators is to have a third party audit their setup. Note though, that the CometBFT team does not approve or conduct any audits themselves. For more information on due diligence, see the ",(0,i.yg)("a",{parentName:"p",href:"https://medium.com/@interchain_io/3d0faf10ce6f"},"A Delegator\u2019s Guide to Staking")," blog post."),(0,i.yg)("h2",{id:"responsibilities"},"Responsibilities"),(0,i.yg)("h3",{id:"do-validators-need-to-be-publicly-identified"},"Do validators need to be publicly identified?"),(0,i.yg)("p",null,"No, they do not. Each delegator can value validators based on their own criteria. Validators are able to register a website address when they nominate themselves so that they can advertise their operation as they see fit. Some delegators prefer a website that clearly displays the team operating the validator and their resume, while other validators might prefer to be anonymous validators with positive track records."),(0,i.yg)("h3",{id:"what-are-the-responsibilities-of-a-validator"},"What are the responsibilities of a validator?"),(0,i.yg)("p",null,"Validators have two main responsibilities:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("strong",{parentName:"p"},"Be able to constantly run a correct version of the software:")," Validators must ensure that their servers are always online and their private keys are not compromised.")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("p",{parentName:"li"},(0,i.yg)("strong",{parentName:"p"},"Actively participate in governance:")," Validators are required to vote on every proposal."))),(0,i.yg)("p",null,"Additionally, validators are expected to be active members of the community. Validators must always be up-to-date with the current state of the ecosystem so that they can easily adapt to any change."),(0,i.yg)("h3",{id:"what-does-participate-in-governance-entail"},"What does 'participate in governance' entail?"),(0,i.yg)("p",null,"Validators and delegators on the Cosmos Hub can vote on proposals to change operational parameters (such as the block gas limit), coordinate upgrades, or make a decision on any given matter."),(0,i.yg)("p",null,"Validators play a special role in the governance system. As pillars of the system, validators are required to vote on every proposal. It is especially important since delegators who do not vote inherit the vote of their validator."),(0,i.yg)("h3",{id:"what-does-staking-imply"},"What does staking imply?"),(0,i.yg)("p",null,"Staking ATOM can be thought of as a safety deposit on validation activities. When a validator or a delegator wants to retrieve part or all of their deposit, they send an ",(0,i.yg)("inlineCode",{parentName:"p"},"unbonding")," transaction. Then, ATOM undergoes a ",(0,i.yg)("strong",{parentName:"p"},"3-week unbonding period")," during which they are liable to being slashed for potential misbehaviors committed by the validator before the unbonding process started."),(0,i.yg)("p",null,"Validators, and by association delegators, receive block rewards, fees, and have the right to participate in governance. If a validator misbehaves, a certain portion of their total stake is slashed. This means that every delegator that bonded ATOM to this validator gets penalized in proportion to their bonded stake. Delegators are therefore incentivized to delegate to validators that they anticipate will function safely."),(0,i.yg)("h3",{id:"can-a-validator-run-away-with-their-delegators-atom"},"Can a validator run away with their delegators' ATOM?"),(0,i.yg)("p",null,"By delegating to a validator, a user delegates voting power. The more voting power a validator have, the more weight they have in the consensus and governance processes. This does not mean that the validator has custody of their delegators' ATOM. ",(0,i.yg)("strong",{parentName:"p"},"A validator cannot run away with its delegator's funds"),"."),(0,i.yg)("p",null,"Even though delegated funds cannot be stolen by their validators, delegators' tokens can still be slashed by a small percentage if their validator suffers a ",(0,i.yg)("a",{parentName:"p",href:"#what-are-the-slashing-conditions"},"slashing event"),", which is why we encourage due diligence when ",(0,i.yg)("a",{parentName:"p",href:"#how-do-delegators-choose-their-validators"},"selecting a validator"),"."),(0,i.yg)("h3",{id:"how-often-is-a-validator-chosen-to-propose-the-next-block-does-frequency-increase-with-the-quantity-of-bonded-atom"},"How often is a validator chosen to propose the next block? Does frequency increase with the quantity of bonded ATOM?"),(0,i.yg)("p",null,"The validator that is selected to propose the next block is called the proposer. Each proposer is selected deterministically. The frequency of being chosen is proportional to the voting power (i.e. amount of bonded ATOM) of the validator. For example, if the total bonded stake across all validators is 100 ATOM and a validator's total stake is 10 ATOM, then this validator is the proposer ~10% of the blocks."),(0,i.yg)("h3",{id:"are-validators-of-the-cosmos-hub-required-to-validate-other-zones-in-the-cosmos-ecosystem"},"Are validators of the Cosmos Hub required to validate other zones in the Cosmos ecosystem?"),(0,i.yg)("p",null,"This depends, currently no validators are required to validate other blockchains. But when the first version of ",(0,i.yg)("a",{parentName:"p",href:"https://blog.cosmos.network/interchain-security-is-coming-to-the-cosmos-hub-f144c45fb035"},"Interchain Security")," is launched on the Cosmos Hub, delegators can vote to have certain blockchains secured via Interchain Security. In those cases, validators are required to validate on these chains as well."),(0,i.yg)("h3",{id:"how-can-a-validator-safely-quit-validating-on-the-cosmos-hub"},"How can a validator safely quit validating on the Cosmos Hub?"),(0,i.yg)("p",null,"If a validator simply shuts down their node, this would result in the validator and their delegators getting slashed for being offline. The only way to safely exit a validator node running on the Cosmos Hub is by unbonding the validator with the ",(0,i.yg)("inlineCode",{parentName:"p"},"UnbondValidator")," message. As a result, the validator gets jailed and kicked out of the active set of validators, without getting slashed. They can then proceed to shut down their node without risking their tokens."),(0,i.yg)("p",null,"It's highly advised to inform your delegators when doing this, as they will still be bonded to your validator after it got jailed. They will need to manually unbond and they might not have been made aware of this via their preferred wallet application."),(0,i.yg)("h2",{id:"incentives"},"Incentives"),(0,i.yg)("h3",{id:"what-is-the-incentive-to-stake"},"What is the incentive to stake?"),(0,i.yg)("p",null,"Each member of a validator's staking pool earns different types of revenue:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Block rewards:")," Native tokens of applications (e.g. ATOM on the Cosmos Hub) run by validators are inflated to produce block provisions. These provisions exist to incentivize ATOM holders to bond their stake. Non-bonded ATOM are diluted over time."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Transaction fees:")," The Cosmos Hub maintains an allow list of tokens that are accepted as fee payment. The initial fee token is the ",(0,i.yg)("inlineCode",{parentName:"li"},"atom"),".")),(0,i.yg)("p",null,"This total revenue is divided among validators' staking pools according to each validator's weight. Then, within each validator's staking pool the revenue is divided among delegators in proportion to each delegator's stake. A commission on delegators' revenue is applied by the validator before it is distributed."),(0,i.yg)("h3",{id:"what-is-a-validator-commission"},"What is a validator commission?"),(0,i.yg)("p",null,"Revenue received by a validator's pool is split between the validator and their delegators. The validator can apply a commission on the part of the revenue that goes to their delegators. This commission is set as a percentage. Each validator is free to set their initial commission, maximum daily commission change rate, and maximum commission. The Cosmos Hub enforces the parameter that each validator sets. The maximum commission rate is fixed and cannot be changed. However, the commission rate itself can be changed after the validator is created as long as it does not exceed the maximum commission."),(0,i.yg)("h3",{id:"what-is-the-incentive-to-run-a-validator"},"What is the incentive to run a validator?"),(0,i.yg)("p",null,"Validators earn proportionally more revenue than their delegators because of the commission they take on the staking rewards from their delegators."),(0,i.yg)("p",null,"Validators also play a major role in governance. If a delegator does not vote, they inherit the vote from their validator. This voting inheritance gives validators a major responsibility in the ecosystem."),(0,i.yg)("h3",{id:"how-are-block-rewards-distributed"},"How are block rewards distributed?"),(0,i.yg)("p",null,"Block rewards are distributed proportionally to all validators relative to their voting power. This means that even though each validator gains ATOM with each reward, all validators maintain equal weight over time."),(0,i.yg)("p",null,"For example, 10 validators have equal voting power and a commission rate of 1%. For this example, the reward for a block is 1000 ATOM and each validator has 20% of self-bonded ATOM. These tokens do not go directly to the proposer. Instead, the tokens are evenly spread among validators. So now each validator's pool has 100 ATOM. These 100 ATOM are distributed according to each participant's stake:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Commission: ",(0,i.yg)("inlineCode",{parentName:"li"},"100*80%*1% = 0.8 ATOM")),(0,i.yg)("li",{parentName:"ul"},"Validator gets: ",(0,i.yg)("inlineCode",{parentName:"li"},"100\\*20% + Commission = 20.8 ATOM")),(0,i.yg)("li",{parentName:"ul"},"All delegators get: ",(0,i.yg)("inlineCode",{parentName:"li"},"100\\*80% - Commission = 79.2 ATOM"))),(0,i.yg)("p",null,"Then, each delegator can claim their part of the 79.2 ATOM in proportion to their stake in the validator's staking pool."),(0,i.yg)("h3",{id:"how-are-fees-distributed"},"How are fees distributed?"),(0,i.yg)("p",null,"Fees are similarly distributed with the exception that the block proposer can get a bonus on the fees of the block they propose if the proposer includes more than the strict minimum of required precommits."),(0,i.yg)("p",null,"When a validator is selected to propose the next block, the validator must include at least 2/3 precommits of the previous block. However, an incentive to include more than 2/3 precommits is a bonus. The bonus is linear: it ranges from 1% if the proposer includes 2/3rd precommits (minimum for the block to be valid) to 5% if the proposer includes 100% precommits. Of course the proposer must not wait too long or other validators may timeout and move on to the next proposer. As such, validators have to find a balance between wait-time to get the most signatures and risk of losing out on proposing the next block. This mechanism aims to incentivize non-empty block proposals, better networking between validators, and mitigates censorship."),(0,i.yg)("p",null,"For a concrete example to illustrate the aforementioned concept, there are 10 validators with equal stake. Each validator applies a 1% commission rate and has 20% of self-delegated ATOM. Now comes a successful block that collects a total of 1025.51020408 ATOM in fees."),(0,i.yg)("p",null,"First, a 2% tax is applied. The corresponding ATOM go to the reserve pool. The reserve pool's funds can be allocated through governance to fund bounties and upgrades."),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("inlineCode",{parentName:"li"},"2% * 1025.51020408 = 20.51020408")," ATOM go to the reserve pool.")),(0,i.yg)("p",null,"1005 ATOM now remain. For this example, the proposer included 100% of the signatures in its block so the proposer obtains the full bonus of 5%."),(0,i.yg)("p",null,"To solve this simple equation to find the reward R for each validator:"),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"9*R + R + R*5% = 1005 \u21d4 R = 1005/10.05 = 100")),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"For the proposer validator:",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"The pool obtains ",(0,i.yg)("inlineCode",{parentName:"li"},"R + R * 5%"),": 105 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Commission: ",(0,i.yg)("inlineCode",{parentName:"li"},"105 * 80% * 1%")," = 0.84 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Validator's reward: ",(0,i.yg)("inlineCode",{parentName:"li"},"105 * 20% + Commission")," = 21.84 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Delegators' rewards: ",(0,i.yg)("inlineCode",{parentName:"li"},"105 * 80% - Commission")," = 83.16 ATOM (each delegator is able to claim its portion of these rewards in proportion to their stake)"))),(0,i.yg)("li",{parentName:"ul"},"For each non-proposer validator:",(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},"The pool obtains R: 100 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Commission: ",(0,i.yg)("inlineCode",{parentName:"li"},"100 * 80% * 1%")," = 0.8 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Validator's reward: ",(0,i.yg)("inlineCode",{parentName:"li"},"100 * 20% + Commission")," = 20.8 ATOM"),(0,i.yg)("li",{parentName:"ul"},"Delegators' rewards: ",(0,i.yg)("inlineCode",{parentName:"li"},"100 * 80% - Commission")," = 79.2 ATOM (each delegator is able to claim their portion of these rewards in proportion to their stake)")))),(0,i.yg)("h3",{id:"what-are-the-slashing-conditions"},"What are the slashing conditions?"),(0,i.yg)("p",null,"If a validator misbehaves, their delegated stake is partially slashed. Two faults can result in slashing of funds for a validator and their delegators:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Double signing:")," If someone reports on chain A that a validator signed two blocks at the same height on chain A and chain B, and if chain A and chain B share a common ancestor, then this validator gets slashed by 5% on chain A."),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("strong",{parentName:"li"},"Downtime:")," If a validator misses more than ",(0,i.yg)("inlineCode",{parentName:"li"},"95%")," of the last ",(0,i.yg)("inlineCode",{parentName:"li"},"10,000")," blocks (roughly ~19 hours), they are slashed by 0.01%.")),(0,i.yg)("h3",{id:"are-validators-required-to-self-delegate-atom"},"Are validators required to self-delegate ATOM?"),(0,i.yg)("p",null,"No, they do not need to self-delegate. Even though there is no obligation for validators to self-delegate, delegators may want their validator to have self-delegated ATOM in their staking pool. In other words, validators share the risk."),(0,i.yg)("p",null,"Note however that it's possible that some validators decide to self-delegate via a different address for security reasons."),(0,i.yg)("h3",{id:"how-to-prevent-concentration-of-stake-in-the-hands-of-a-few-top-validators"},"How to prevent concentration of stake in the hands of a few top validators?"),(0,i.yg)("p",null,"The community is expected to behave in a smart and self-preserving way. When a mining pool in Bitcoin gets too much mining power the community usually stops contributing to that pool. The Cosmos Hub relies on the same effect. Additionally, when delegators switch to another validator, they are not subject to the unbonding period, which removes any barrier to quickly redelegating tokens in service of improving decentralization."),(0,i.yg)("h2",{id:"liquid-staking-module"},"Liquid Staking Module"),(0,i.yg)("h3",{id:"what-is-the-liquid-staking-module"},"What is the liquid staking module?"),(0,i.yg)("p",null,"The Liquid Staking Module is a set of safety features that mitigate liquid staking risks by: "),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"limiting the total amount of tokens that can be liquid staked to X% of all staked tokens."),(0,i.yg)("li",{parentName:"ul"},"introducing a requirement that validators validator-bond tokens to be eligible for delegations from liquid staking providers."),(0,i.yg)("li",{parentName:"ul"},"limiting the portion of validators's shares that can be liquid staked to X% of their total shares.")),(0,i.yg)("p",null,"The Liquid Staking Module also improves liquid staking UX by making delegations transferable under limited scenarios, to allow delegators to convert their delegations into liquid staking positions without having to wait the unbonding period."),(0,i.yg)("p",null,"For a detailed and technical description, please see ADR-061 in the Cosmos SDK or the Liquid Staking Module Cosmos Hub ",(0,i.yg)("a",{parentName:"p",href:"https://forum.cosmos.network/t/signaling-proposal-draft-add-liquid-staking-module-to-the-cosmos-hub/10368"},"forum post"),"."),(0,i.yg)("h3",{id:"who-can-validator-bond"},"Who can validator bond?"),(0,i.yg)("p",null,"The validator themselves, but also any other address delegated to the validator."),(0,i.yg)("h3",{id:"how-can-i-validator-bond"},"How can I validator bond?"),(0,i.yg)("p",null,"Once delegated to a validator, a delegator (or validator operator) can convert their delegation to a validator into Validator Bond by signing a ValidatorBond message. "),(0,i.yg)("p",null,"The ValidatorBond message is exposed by the staking module and can be executed as follows:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"gaiad tx staking validator-bond cosmosvaloper13h5xdxhsdaugwdrkusf8lkgu406h8t62jkqv3h --from mykey \n")),(0,i.yg)("p",null,"There are no partial Validator Bonds: when a delegator or validator converts their shares to a particular validator into Validator Bond, their entire delegation to that validator is converted to Validator Bond. If a validator or delegator wishes to convert only some of their delegation to Validator Bond, they should transfer those funds to a separate address and Validator Bond from that address, or redelegate the funds that they do not wish to validator bond to another validator before converting their delegation to validator bond."),(0,i.yg)("p",null,"To convert Validator Bond back into a standard delegation, simply unbond the shares."),(0,i.yg)("h3",{id:"how-does-a-delegator-or-validator-mark-their-delegation-as-a-validator-bond"},"How does a delegator or validator mark their delegation as a validator bond?"),(0,i.yg)("p",null,"Once delegated to a validator, sign a ",(0,i.yg)("inlineCode",{parentName:"p"},"ValidatorBond")," message. "),(0,i.yg)("h3",{id:"are-validator-bonds-subject-to-additional-slashing-conditions"},"Are validator bonds subject to additional slashing conditions?"),(0,i.yg)("p",null,"No, in the event of a slash, a validator bond is slashed at the same rate as a regular bond."),(0,i.yg)("h3",{id:"can-i-unbond-my-validator-bond"},"Can I unbond my validator bond?"),(0,i.yg)("p",null,"If all the liquid staking capacity made available by a validator\u2019s validator bond is utilized, validator bond delegated to that validator cannot be unbonded. If new capacity becomes available (either by redemption of liquid staking tokens or addition or new validator bond), then existing validator bond can be undelegated."),(0,i.yg)("p",null,"Example: Suppose the validator bond factor is 250 and Validator V bonds 2 ATOM, then liquid staking providers delegate 500 ATOM to Validator V. Now Validator V cannot remove any of their validator bond because the full liquid staking capacity made available by Validator V\u2019s validator bond is consumed."),(0,i.yg)("p",null,"If liquid staking providers undelegate 250 ATOM from Validator V, Validator V can now remove 1 ATOM of validator bond."),(0,i.yg)("p",null,"If, instead, the ICF or a community member validator bonds 1 additional ATOM to Validator V, Validator V can now remove 1 ATOM of validator bond."),(0,i.yg)("h3",{id:"can-i-validator-bond-some-of-my-tokens-and-delegate-the-remaining-portion-normally"},"Can I validator bond some of my tokens and delegate the remaining portion normally?"),(0,i.yg)("p",null,"The ",(0,i.yg)("inlineCode",{parentName:"p"},"ValidatorBond")," message converts the full balance delegated to a validator into validator bond. To validator bond some tokens and delegate the remaining portion normally, use two addresses: the first will delegate + ValidatorBond, and the second will just delegate."),(0,i.yg)("h2",{id:"technical-requirements"},"Technical Requirements"),(0,i.yg)("h3",{id:"what-are-hardware-requirements"},"What are hardware requirements?"),(0,i.yg)("p",null,"A modest level of hardware specifications is initially required and rises as network use increases. Participating in the testnet is the best way to learn more. You can find the current hardware recommendations in the ",(0,i.yg)("a",{parentName:"p",href:"/v19.1.0/hub-tutorials/join-mainnet"},"Joining Mainnet documentation"),"."),(0,i.yg)("p",null,"Validators are recommended to set up ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cometbft.com/v0.37/core/validators"},"sentry nodes")," to protect your validator node from DDoS attacks."),(0,i.yg)("h3",{id:"what-are-software-requirements"},"What are software requirements?"),(0,i.yg)("p",null,"In addition to running a Cosmos Hub node, validators are expected to implement monitoring, alerting, and management solutions. There are ",(0,i.yg)("a",{parentName:"p",href:"https://medium.com/solar-labs-team/cosmos-how-to-monitoring-your-validator-892a46298722"},"several tools")," that you can use."),(0,i.yg)("h3",{id:"what-are-bandwidth-requirements"},"What are bandwidth requirements?"),(0,i.yg)("p",null,"The Cosmos network has the capacity for very high throughput relative to chains like Ethereum or Bitcoin."),(0,i.yg)("p",null,"We recommend that the data center nodes connect only to trusted full nodes in the cloud or other validators that know each other socially. This connection strategy relieves the data center node from the burden of mitigating denial-of-service attacks."),(0,i.yg)("p",null,"Ultimately, as the network becomes more heavily used, multigigabyte per day bandwidth is very realistic."),(0,i.yg)("h3",{id:"how-to-handle-key-management"},"How to handle key management?"),(0,i.yg)("p",null,"Validators are expected to run an HSM that supports ed25519 keys. Here are potential options:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"YubiHSM 2"),(0,i.yg)("li",{parentName:"ul"},"Ledger Nano S"),(0,i.yg)("li",{parentName:"ul"},"Ledger BOLOS SGX enclave"),(0,i.yg)("li",{parentName:"ul"},"Thales nShield support")),(0,i.yg)("p",null,"The Interchain Foundation does not recommend one solution above the other. The community is encouraged to bolster the effort to improve HSMs and the security of key management."),(0,i.yg)("h3",{id:"what-can-validators-expect-in-terms-of-operations"},"What can validators expect in terms of operations?"),(0,i.yg)("p",null,"Running an effective operation is key to avoiding unexpected unbonding or slashing. Operations must be able to respond to attacks and outages, as well as maintain security and isolation in the data center."),(0,i.yg)("h3",{id:"what-are-the-maintenance-requirements"},"What are the maintenance requirements?"),(0,i.yg)("p",null,"Validators are expected to perform regular software updates to accommodate chain upgrades and bug fixes. It is suggested to consider using ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cosmos.network/v0.45/run-node/cosmovisor.html"},"Cosmovisor")," to partially automate this process."),(0,i.yg)("p",null,"During an chain upgrade, progress is discussed in a private channel in the ",(0,i.yg)("a",{parentName:"p",href:"https://discord.gg/cosmosnetwork"},"Interchain Discord"),". If your validator is in the active set we encourage you to request access to that channel by contacting a moderator."),(0,i.yg)("h3",{id:"how-can-validators-protect-themselves-from-denial-of-service-attacks"},"How can validators protect themselves from denial-of-service attacks?"),(0,i.yg)("p",null,"Denial-of-service attacks occur when an attacker sends a flood of internet traffic to an IP address to prevent the server at the IP address from connecting to the internet."),(0,i.yg)("p",null,"An attacker scans the network, tries to learn the IP address of various validator nodes, and disconnects them from communication by flooding them with traffic."),(0,i.yg)("p",null,"One recommended way to mitigate these risks is for validators to carefully structure their network topology using a sentry node architecture."),(0,i.yg)("p",null,"Validator nodes are expected to connect only to full nodes they trust because they operate the full nodes themselves or the trust full nodes are run by other validators they know socially. A validator node is typically run in a data center. Most data centers provide direct links to the networks of major cloud providers. The validator can use those links to connect to sentry nodes in the cloud. This mitigation shifts the burden of denial-of-service from the validator's node directly to its sentry nodes, and can require that new sentry nodes are spun up or activated to mitigate attacks on existing ones."),(0,i.yg)("p",null,"Sentry nodes can be quickly spun up or change their IP addresses. Because the links to the sentry nodes are in private IP space, an internet-based attack cannot disturb them directly. This strategy ensures that validator block proposals and votes have a much higher chance to make it to the rest of the network."),(0,i.yg)("p",null,"For more sentry node details, see the ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cometbft.com/v0.37/core/validators"},"CometBFT Documentation")," or the ",(0,i.yg)("a",{parentName:"p",href:"https://forum.cosmos.network/t/sentry-node-architecture-overview/454"},"Sentry Node Architecture Overview")," on the forum."))}g.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/2222b3a9.4211f90b.js b/assets/js/2222b3a9.4211f90b.js
new file mode 100644
index 00000000000..f20c17988e1
--- /dev/null
+++ b/assets/js/2222b3a9.4211f90b.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[1424],{5680:(e,t,r)=>{r.d(t,{xA:()=>d,yg:()=>b});var a=r(6540);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function l(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s=a.createContext({}),c=function(e){var t=a.useContext(s),r=t;return e&&(r="function"==typeof e?e(t):l(l({},t),e)),r},d=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},m=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,s=e.parentName,d=o(e,["components","mdxType","originalType","parentName"]),u=c(r),m=n,b=u["".concat(s,".").concat(m)]||u[m]||p[m]||i;return r?a.createElement(b,l(l({ref:t},d),{},{components:r})):a.createElement(b,l({ref:t},d))}));function b(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,l=new Array(i);l[0]=m;var o={};for(var s in t)hasOwnProperty.call(t,s)&&(o[s]=t[s]);o.originalType=e,o[u]="string"==typeof e?e:n,l[1]=o;for(var c=2;c{r.r(t),r.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var a=r(8168),n=(r(6540),r(5680));const i={title:"Building Gaia Deterministically",order:5},l=void 0,o={unversionedId:"resources/reproducible-builds",id:"resources/reproducible-builds",title:"Building Gaia Deterministically",description:"The Tendermint rbuilder Docker image provides a deterministic build environment that is used to build Cosmos SDK applications. It provides a way to be reasonably sure that the executables are really built from the git source. It also makes sure that the same, tested dependencies are used and statically built into the executable.",source:"@site/docs/resources/reproducible-builds.md",sourceDirName:"resources",slug:"/resources/reproducible-builds",permalink:"/main/resources/reproducible-builds",draft:!1,tags:[],version:"current",frontMatter:{title:"Building Gaia Deterministically",order:5},sidebar:"tutorialSidebar",previous:{title:"Ledger Nano Support",permalink:"/main/resources/ledger"},next:{title:"Service Providers",permalink:"/main/resources/service-providers"}},s={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Build",id:"build",level:2}],d={toc:c},u="wrapper";function p(e){let{components:t,...r}=e;return(0,n.yg)(u,(0,a.A)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,n.yg)("p",null,"The ",(0,n.yg)("a",{parentName:"p",href:"https://github.com/tendermint/images/tree/master/rbuilder"},"Tendermint rbuilder Docker image")," provides a deterministic build environment that is used to build Cosmos SDK applications. It provides a way to be reasonably sure that the executables are really built from the git source. It also makes sure that the same, tested dependencies are used and statically built into the executable."),(0,n.yg)("h2",{id:"prerequisites"},"Prerequisites"),(0,n.yg)("p",null,"Make sure you have ",(0,n.yg)("a",{parentName:"p",href:"https://docs.docker.com/get-docker/"},"Docker installed on your system"),"."),(0,n.yg)("p",null,"All the following instructions have been tested on ",(0,n.yg)("em",{parentName:"p"},"Ubuntu 18.04.2 LTS")," with ",(0,n.yg)("em",{parentName:"p"},"docker 20.10.2"),"."),(0,n.yg)("h2",{id:"build"},"Build"),(0,n.yg)("p",null,"Clone ",(0,n.yg)("inlineCode",{parentName:"p"},"gaia"),":"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"git clone https://github.com/cosmos/gaia.git\n")),(0,n.yg)("p",null,"Checkout the commit, branch, or release tag you want to build:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"cd gaia/\ngit checkout v4.2.1\n")),(0,n.yg)("p",null,"The buildsystem supports and produces binaries for the following architectures:"),(0,n.yg)("ul",null,(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"darwin/amd64")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"linux/amd64")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"linux/arm64")),(0,n.yg)("li",{parentName:"ul"},(0,n.yg)("strong",{parentName:"li"},"windows/amd64"))),(0,n.yg)("p",null,"Run the following command to launch a build for all supported architectures:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"make distclean build-reproducible\n")),(0,n.yg)("p",null,"The build system generates both the binaries and deterministic build report in the ",(0,n.yg)("inlineCode",{parentName:"p"},"artifacts")," directory.\nThe ",(0,n.yg)("inlineCode",{parentName:"p"},"artifacts/build_report")," file contains the list of the build artifacts and their respective checksums, and can be used to verify\nbuild sanity. An example of its contents follows:"),(0,n.yg)("pre",null,(0,n.yg)("code",{parentName:"pre",className:"language-sh"},"App: gaiad\nVersion: v4.2.1\nCommit: dbd8a6fb522c571debf958837f9113c56d418f6b\nFiles:\n 29d219b0b120b3188bd7cd7249fc96b9 gaiad-v4.2.1-darwin-amd64\n 80338d9f0e55ea8f6c93f2ec7d4e18d6 gaiad-v4.2.1-linux-amd64\n 9bc77a512acca673ca1769ae67b4d6c7 gaiad-v4.2.1-linux-arm64\n c84387860f52178e2bffee08897564bb gaiad-v4.2.1-windows-amd64.exe\n c25cca8ccceec06a6fabae90f671fab1 gaiad-v4.2.1.tar.gz\nChecksums-Sha256:\n 05e5b9064bac4e71f0162c4c3c3bff55def22ca016d34205a5520fef89fd2776 gaiad-v4.2.1-darwin-amd64\n ccda422cbda29c723aaf27653bcf0f6412e138eec33fba2b49de131f9ffbe2d2 gaiad-v4.2.1-linux-amd64\n 95f89e8213cb758d12e1b0b631285938de822d04d2e25f399e99c0b798173cfd gaiad-v4.2.1-linux-arm64\n 7ef98f0041f1573f0a8601abad4a14b1c163f47481c7ba1954fd81ed423a6408 gaiad-v4.2.1-windows-amd64.exe\n 422883ba43c96a6ea5ef9512d39321dd1356633c6a9505517b9c651788df4a7f gaiad-v4.2.1.tar.gz\n")))}p.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/2250a6c1.d2ac65ba.js b/assets/js/2250a6c1.d2ac65ba.js
new file mode 100644
index 00000000000..65bb48db324
--- /dev/null
+++ b/assets/js/2250a6c1.d2ac65ba.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[7501],{5680:(e,t,r)=>{r.d(t,{xA:()=>d,yg:()=>g});var n=r(6540);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),s=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},d=function(e){var t=s(e.components);return n.createElement(l.Provider,{value:t},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,d=c(e,["components","mdxType","originalType","parentName"]),u=s(r),h=a,g=u["".concat(l,".").concat(h)]||u[h]||p[h]||i;return r?n.createElement(g,o(o({ref:t},d),{},{components:r})):n.createElement(g,o({ref:t},d))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=h;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[u]="string"==typeof e?e:a,o[1]=c;for(var s=2;s{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>s});var n=r(8168),a=(r(6540),r(5680));const i={},o=void 0,c={unversionedId:"architecture/adr/README",id:"version-v19.1.0/architecture/adr/README",title:"README",description:"\x3c!--",source:"@site/versioned_docs/version-v19.1.0/architecture/adr/README.md",sourceDirName:"architecture/adr",slug:"/architecture/adr/",permalink:"/v19.1.0/architecture/adr/",draft:!1,tags:[],version:"v19.1.0",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ADR Creation Process",permalink:"/v19.1.0/architecture/adr/PROCESS"},next:{title:"adr-001-interchain-accounts",permalink:"/v19.1.0/architecture/adr/adr-001-interchain-accounts"}},l={},s=[{value:"Rationale",id:"rationale",level:2},{value:"Creating new ADR",id:"creating-new-adr",level:2},{value:"Use RFC 2119 Keywords",id:"use-rfc-2119-keywords",level:3},{value:"ADR Table of Contents",id:"adr-table-of-contents",level:2},{value:"Accepted",id:"accepted",level:3},{value:"Proposed",id:"proposed",level:3},{value:"Draft",id:"draft",level:3},{value:"Rejected",id:"rejected",level:3},{value:"Deprecated",id:"deprecated",level:3}],d={toc:s},u="wrapper";function p(e){let{components:t,...r}=e;return(0,a.yg)(u,(0,n.A)({},d,r,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"architecture-decision-records-adr"},"Architecture Decision Records (ADR)"),(0,a.yg)("p",null,"This is a location to record all high-level architecture decisions for new feature and module proposals in the Cosmos Hub."),(0,a.yg)("p",null,"An Architectural Decision (",(0,a.yg)("strong",{parentName:"p"},"AD"),") is a software design choice that addresses a functional or non-functional requirement that is architecturally significant.\nAn Architecturally Significant Requirement (",(0,a.yg)("strong",{parentName:"p"},"ASR"),") is a requirement that has a measurable effect on a software system\u2019s architecture and quality.\nAn Architectural Decision Record (",(0,a.yg)("strong",{parentName:"p"},"ADR"),") captures a single AD, such as often done when writing personal notes or meeting minutes; the collection of ADRs created and maintained in a project constitute its decision log. All these are within the topic of Architectural Knowledge Management (AKM)."),(0,a.yg)("p",null,"You can read more about the ADR concept ",(0,a.yg)("a",{parentName:"p",href:"https://adr.github.io/"},"here"),"."),(0,a.yg)("h2",{id:"rationale"},"Rationale"),(0,a.yg)("p",null,"ADRs are intended to be the primary mechanism for proposing new feature designs and new processes, for collecting community input on an issue, and for documenting the design decisions.\nAn ADR should provide:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"Context on the relevant goals and the current state"),(0,a.yg)("li",{parentName:"ul"},"Proposed changes to achieve the goals"),(0,a.yg)("li",{parentName:"ul"},"Summary of pros and cons"),(0,a.yg)("li",{parentName:"ul"},"Discarded solution spaces and why they were discarded"),(0,a.yg)("li",{parentName:"ul"},"References"),(0,a.yg)("li",{parentName:"ul"},"Changelog")),(0,a.yg)("p",null,"Note the distinction between an ADR and a spec. The ADR provides the context, intuition, reasoning, and\njustification for a change in architecture, or for the architecture of something\nnew. The spec is much more compressed and streamlined summary of everything as\nit stands today."),(0,a.yg)("p",null,"If recorded decisions turn out to be lacking, convene a discussion, record the new decisions here, and then modify the code to match."),(0,a.yg)("h2",{id:"creating-new-adr"},"Creating new ADR"),(0,a.yg)("p",null,"Read about the ",(0,a.yg)("a",{parentName:"p",href:"/v19.1.0/architecture/adr/PROCESS"},"PROCESS"),"."),(0,a.yg)("h3",{id:"use-rfc-2119-keywords"},"Use RFC 2119 Keywords"),(0,a.yg)("p",null,'When writing ADRs, follow the same best practices for writing RFCs.\nWhen writing RFCs, key words are used to signify the requirements in the specification.\nThese words are often capitalized: "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL.\nThey are to be interpreted as described in ',(0,a.yg)("a",{parentName:"p",href:"https://datatracker.ietf.org/doc/html/rfc2119"},"RFC 2119"),"."),(0,a.yg)("h2",{id:"adr-table-of-contents"},"ADR Table of Contents"),(0,a.yg)("h3",{id:"accepted"},"Accepted"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"n/a")),(0,a.yg)("h3",{id:"proposed"},"Proposed"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("a",{parentName:"li",href:"/v19.1.0/architecture/adr/adr-003-ica-controller"},"ADR 003: Interchain Accounts Controller Module"))),(0,a.yg)("h3",{id:"draft"},"Draft"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"n/a")),(0,a.yg)("h3",{id:"rejected"},"Rejected"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("a",{parentName:"li",href:"/v19.1.0/architecture/adr/adr-001-interchain-accounts"},"ADR 001: Interchain Accounts"))),(0,a.yg)("h3",{id:"deprecated"},"Deprecated"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},(0,a.yg)("a",{parentName:"li",href:"/v19.1.0/architecture/adr/adr-002-globalfee"},"ADR 002: Globalfee Module"))))}p.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/25a82047.5d9ae725.js b/assets/js/25a82047.5d9ae725.js
new file mode 100644
index 00000000000..07f3c3194f3
--- /dev/null
+++ b/assets/js/25a82047.5d9ae725.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[5098],{5680:(e,t,n)=>{n.d(t,{xA:()=>u,yg:()=>h});var r=n(6540);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),c=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):l(l({},t),e)),n},u=function(e){var t=c(e.components);return r.createElement(s.Provider,{value:t},e.children)},p="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,o=e.originalType,s=e.parentName,u=i(e,["components","mdxType","originalType","parentName"]),p=c(n),g=a,h=p["".concat(s,".").concat(g)]||p[g]||d[g]||o;return n?r.createElement(h,l(l({ref:t},u),{},{components:n})):r.createElement(h,l({ref:t},u))}));function h(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=n.length,l=new Array(o);l[0]=g;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:a,l[1]=i;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>l,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var r=n(8168),a=(n(6540),n(5680));const o={},l=void 0,i={unversionedId:"architecture/templates/adr-template",id:"architecture/templates/adr-template",title:"adr-template",description:"\x3c!--",source:"@site/docs/architecture/templates/adr-template.md",sourceDirName:"architecture/templates",slug:"/architecture/templates/adr-template",permalink:"/main/architecture/templates/adr-template",draft:!1,tags:[],version:"current",frontMatter:{},sidebar:"tutorialSidebar",previous:{title:"ADR 003: Interchain Accounts Controller Module",permalink:"/main/architecture/adr/adr-003-ica-controller"},next:{title:"ADR Creation Process",permalink:"/main/architecture/PROCESS"}},s={},c=[{value:"Changelog",id:"changelog",level:2},{value:"Status",id:"status",level:2},{value:"Abstract",id:"abstract",level:2},{value:"Context",id:"context",level:2},{value:"Decision",id:"decision",level:2},{value:"Consequences",id:"consequences",level:2},{value:"Positive",id:"positive",level:3},{value:"Negative",id:"negative",level:3},{value:"Neutral",id:"neutral",level:3},{value:"References",id:"references",level:2}],u={toc:c},p="wrapper";function d(e){let{components:t,...n}=e;return(0,a.yg)(p,(0,r.A)({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("h1",{id:"adr-adr-number-title"},"ADR {ADR-NUMBER}: {TITLE}"),(0,a.yg)("h2",{id:"changelog"},"Changelog"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"{date}: {changelog}")),(0,a.yg)("h2",{id:"status"},"Status"),(0,a.yg)("p",null,"{DRAFT | PROPOSED} Not Implemented"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"Please have a look at the ",(0,a.yg)("a",{parentName:"p",href:"../adr/PROCESS#adr-status"},"PROCESS")," page.\nUse DRAFT if the ADR is in a draft stage (draft PR) or PROPOSED if it's in review.")),(0,a.yg)("h2",{id:"abstract"},"Abstract"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"\"If you can't explain it simply, you don't understand it well enough.\" Provide\na simplified and layman-accessible explanation of the ADR.\nA short (~200 word) description of the issue being addressed.")),(0,a.yg)("h2",{id:"context"},"Context"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"This section contains all the context one needs to understand the current state, and why there is a problem.\nIt should be as succinct as possible and introduce the high level idea behind the solution.\nThe language in this section is value-neutral. It is simply describing facts.")),(0,a.yg)("h2",{id:"decision"},"Decision"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"This section explains all of the details of the proposed solution, including implementation details.\nIt should also describe affects / corollary items that may need to be changed as a part of this.\nIf the proposed change will be large, please also indicate a way to do the change to maximize ease of review.\n(e.g. the optimal split of things to do between separate PR's)")),(0,a.yg)("h2",{id:"consequences"},"Consequences"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},'This section describes the consequences, after applying the decision.\nAll consequences should be summarized here, not just the "positive" ones.')),(0,a.yg)("h3",{id:"positive"},"Positive"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"{positive consequences}")),(0,a.yg)("h3",{id:"negative"},"Negative"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"{negative consequences}")),(0,a.yg)("h3",{id:"neutral"},"Neutral"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"{neutral consequences}")),(0,a.yg)("h2",{id:"references"},"References"),(0,a.yg)("blockquote",null,(0,a.yg)("p",{parentName:"blockquote"},"Are there any relevant PR comments, issues that led up to this, or articles referrenced for why we made the given design choice? If so link them here!")),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"{reference link}")))}d.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/2929d917.e958fb3e.js b/assets/js/2929d917.e958fb3e.js
new file mode 100644
index 00000000000..f29d8fa5783
--- /dev/null
+++ b/assets/js/2929d917.e958fb3e.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[6654],{5680:(e,n,a)=>{a.d(n,{xA:()=>g,yg:()=>y});var t=a(6540);function i(e,n,a){return n in e?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,e}function r(e,n){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),a.push.apply(a,t)}return a}function o(e){for(var n=1;n=0||(i[a]=e[a]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(i[a]=e[a])}return i}var s=t.createContext({}),p=function(e){var n=t.useContext(s),a=n;return e&&(a="function"==typeof e?e(n):o(o({},n),e)),a},g=function(e){var n=p(e.components);return t.createElement(s.Provider,{value:n},e.children)},d="mdxType",m={inlineCode:"code",wrapper:function(e){var n=e.children;return t.createElement(t.Fragment,{},n)}},u=t.forwardRef((function(e,n){var a=e.components,i=e.mdxType,r=e.originalType,s=e.parentName,g=l(e,["components","mdxType","originalType","parentName"]),d=p(a),u=i,y=d["".concat(s,".").concat(u)]||d[u]||m[u]||r;return a?t.createElement(y,o(o({ref:n},g),{},{components:a})):t.createElement(y,o({ref:n},g))}));function y(e,n){var a=arguments,i=n&&n.mdxType;if("string"==typeof e||i){var r=a.length,o=new Array(r);o[0]=u;var l={};for(var s in n)hasOwnProperty.call(n,s)&&(l[s]=n[s]);l.originalType=e,l[d]="string"==typeof e?e:i,o[1]=l;for(var p=2;p{a.r(n),a.d(n,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>r,metadata:()=>l,toc:()=>p});var t=a(8168),i=(a(6540),a(5680));const r={title:"Joining Mainnet",order:2},o="Join the Cosmos Hub Mainnet",l={unversionedId:"hub-tutorials/join-mainnet",id:"version-v19.1.0/hub-tutorials/join-mainnet",title:"Joining Mainnet",description:"The chain-id of Cosmos Hub mainnet is cosmoshub-4.",source:"@site/versioned_docs/version-v19.1.0/hub-tutorials/join-mainnet.md",sourceDirName:"hub-tutorials",slug:"/hub-tutorials/join-mainnet",permalink:"/v19.1.0/hub-tutorials/join-mainnet",draft:!1,tags:[],version:"v19.1.0",frontMatter:{title:"Joining Mainnet",order:2},sidebar:"tutorialSidebar",previous:{title:"Interacting with Gaiad (CLI)",permalink:"/v19.1.0/hub-tutorials/gaiad"},next:{title:"Joining Testnet",permalink:"/v19.1.0/hub-tutorials/join-testnet"}},s={},p=[{value:"Release History",id:"release-history",level:2},{value:"Overview",id:"overview",level:3},{value:"Explorers",id:"explorers",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Hardware",id:"hardware",level:2},{value:"General Configuration",id:"general-configuration",level:2},{value:"Initialize Chain",id:"initialize-chain",level:3},{value:"Genesis File",id:"genesis-file",level:3},{value:"Seeds & Peers",id:"seeds--peers",level:3},{value:"Gas & Fees",id:"gas--fees",level:3},{value:"Pruning of State",id:"pruning-of-state",level:3},{value:"REST API",id:"rest-api",level:3},{value:"GRPC",id:"grpc",level:3},{value:"Sync Options",id:"sync-options",level:2},{value:"Blocksync",id:"blocksync",level:3},{value:"Getting Started",id:"getting-started-1",level:5},{value:"State Sync",id:"state-sync",level:3},{value:"Quicksync",id:"quicksync",level:3},{value:"Snapshots",id:"snapshots",level:2},{value:"Cosmovisor",id:"cosmovisor",level:2},{value:"Running via Background Process",id:"running-via-background-process",level:2},{value:"Exporting State",id:"exporting-state",level:2},{value:"Verify Mainnet",id:"verify-mainnet",level:2}],g={toc:p},d="wrapper";function m(e){let{components:n,...a}=e;return(0,i.yg)(d,(0,t.A)({},g,a,{components:n,mdxType:"MDXLayout"}),(0,i.yg)("h1",{id:"join-the-cosmos-hub-mainnet"},"Join the Cosmos Hub Mainnet"),(0,i.yg)("admonition",{type:"info"},(0,i.yg)("p",{parentName:"admonition"},"The chain-id of Cosmos Hub mainnet is ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmoshub-4"),".")),(0,i.yg)("h2",{id:"release-history"},"Release History"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v5.0.x")," (Delta) for queries of state between height ",(0,i.yg)("inlineCode",{parentName:"li"},"6,910,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"8,695,000")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v6.0.x")," (Vega) between ",(0,i.yg)("inlineCode",{parentName:"li"},"8,695,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"10,085,397")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v7.0.x")," (Theta) between ",(0,i.yg)("inlineCode",{parentName:"li"},"10,085,397")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"14,099,412")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v8.0.x")," (Rho) between ",(0,i.yg)("inlineCode",{parentName:"li"},"14,099,412")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"14,470,501")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v9.0.x")," (Lambda) between ",(0,i.yg)("inlineCode",{parentName:"li"},"14,470,501")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"15,213,800")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v9.1.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"15,213,800")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"15,816,200")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v10.0.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"15,816,200")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"16,596,000")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v11.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"16,596,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"16,985,500")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v12.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"16,985,500")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"17,380,000")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v13.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"17,380,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"18,262,000")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v14.1.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"18,262,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"19,639,600")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v15.1.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"19,639,600")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"19,939,000")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v15.2.x")," between ",(0,i.yg)("inlineCode",{parentName:"li"},"19,939,000")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"20,440,500")," "),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v16.x")," from ",(0,i.yg)("inlineCode",{parentName:"li"},"20,440,500")," and ",(0,i.yg)("inlineCode",{parentName:"li"},"20,739,800")),(0,i.yg)("li",{parentName:"ul"},"use ",(0,i.yg)("inlineCode",{parentName:"li"},"gaia v17.1.x")," from ",(0,i.yg)("inlineCode",{parentName:"li"},"20,739,800"))),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},"This guide includes full instructions for joining the mainnet either as an archive/full node or a pruned node.")),(0,i.yg)("p",null,"For instructions to bootstrap a node via Quicksync or State Sync, see the ",(0,i.yg)("a",{parentName:"p",href:"../getting-started/quickstart.mdx"},"Quickstart Guide")),(0,i.yg)("p",null,"For instructions to join as a validator, please also see the ",(0,i.yg)("a",{parentName:"p",href:"../validators/overview.mdx"},"Validator Guide"),"."),(0,i.yg)("h3",{id:"overview"},"Overview"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#join-the-cosmos-hub-mainnet"},"Join the Cosmos Hub Mainnet"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#release-history"},"Release History")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#overview"},"Overview")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#background"},"Background")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#explorers"},"Explorers")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#getting-started"},"Getting Started")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#hardware"},"Hardware")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#general-configuration"},"General Configuration"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#initialize-chain"},"Initialize Chain")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#genesis-file"},"Genesis File")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#seeds--peers"},"Seeds \\& Peers")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#gas--fees"},"Gas \\& Fees")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#pruning-of-state"},"Pruning of State")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#rest-api"},"REST API")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#grpc"},"GRPC")))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#sync-options"},"Sync Options"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#blocksync"},"Blocksync"),(0,i.yg)("ul",{parentName:"li"},(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#getting-started-1"},"Getting Started")))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#state-sync"},"State Sync")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#quicksync"},"Quicksync")))),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#snapshots"},"Snapshots")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#releases--upgrades"},"Releases \\& Upgrades")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#cosmovisor"},"Cosmovisor")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#running-via-background-process"},"Running via Background Process")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#exporting-state"},"Exporting State")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"#verify-mainnet"},"Verify Mainnet"))))),(0,i.yg)("h2",{id:"explorers"},"Explorers"),(0,i.yg)("p",null,"There are many explorers for the Cosmos Hub. For reference while setting up a node, here are a few recommendations:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://www.mintscan.io/cosmos"},"Mintscan"))),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://www.datalenses.zone/chain/cosmos"},"Numia")),(0,i.yg)("li",{parentName:"ul"},(0,i.yg)("a",{parentName:"li",href:"https://ping.pub/cosmos"},"Ping.Pub"))),(0,i.yg)("h2",{id:"getting-started"},"Getting Started"),(0,i.yg)("p",null,"Make sure the following prerequisites are completed:"),(0,i.yg)("ul",null,(0,i.yg)("li",{parentName:"ul"},"Choose the proper hardware/server configuration. See the ",(0,i.yg)("a",{parentName:"li",href:"#hardware"},"hardware guide"),"."),(0,i.yg)("li",{parentName:"ul"},"Ensure Gaia is properly installed. See the ",(0,i.yg)("a",{parentName:"li",href:"../getting-started/installation"},"installation guide")," for a walk-through."),(0,i.yg)("li",{parentName:"ul"},"Follow the ",(0,i.yg)("a",{parentName:"li",href:"../hub-tutorials/join-mainnet#general-configuration"},"configuration guide")," to initialize and prepare the node to sync with the network.")),(0,i.yg)("h2",{id:"hardware"},"Hardware"),(0,i.yg)("p",null,"Running a full archive node can be resource intensive as the full current ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmoshub-4")," state is over ",(0,i.yg)("inlineCode",{parentName:"p"},"1.4TB"),". For those who wish to run state sync or use quicksync, the following hardware configuration is recommended:"),(0,i.yg)("table",null,(0,i.yg)("thead",{parentName:"table"},(0,i.yg)("tr",{parentName:"thead"},(0,i.yg)("th",{parentName:"tr",align:null},"Node Type"),(0,i.yg)("th",{parentName:"tr",align:null},"RAM"),(0,i.yg)("th",{parentName:"tr",align:null},"Storage"))),(0,i.yg)("tbody",{parentName:"table"},(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Validator"),(0,i.yg)("td",{parentName:"tr",align:null},"32GB"),(0,i.yg)("td",{parentName:"tr",align:null},"500GB-2TB*")),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Full"),(0,i.yg)("td",{parentName:"tr",align:null},"16GB"),(0,i.yg)("td",{parentName:"tr",align:null},"2TB")),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Default"),(0,i.yg)("td",{parentName:"tr",align:null},"16GB"),(0,i.yg)("td",{parentName:"tr",align:null},"1TB")))),(0,i.yg)("p",null,"*"," Storage size for validators will depend on level of pruning."),(0,i.yg)("h2",{id:"general-configuration"},"General Configuration"),(0,i.yg)("p",null,"Make sure to walk through the basic setup and configuration. Operators will need to initialize ",(0,i.yg)("inlineCode",{parentName:"p"},"gaiad"),", download the genesis file for ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmoshub-4"),", and set persistent peers and/or seeds for startup."),(0,i.yg)("h3",{id:"initialize-chain"},"Initialize Chain"),(0,i.yg)("p",null,"Choose a custom moniker for the node and initialize. By default, the ",(0,i.yg)("inlineCode",{parentName:"p"},"init")," command creates the ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia")," directory with subfolders ",(0,i.yg)("inlineCode",{parentName:"p"},"config")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"data"),". In the ",(0,i.yg)("inlineCode",{parentName:"p"},"/config")," directory, the most important files for configuration are ",(0,i.yg)("inlineCode",{parentName:"p"},"app.toml")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"config.toml"),"."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad init \n")),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": Monikers can contain only ASCII characters. Using Unicode characters is not supported and renders the node unreachable.")),(0,i.yg)("p",null,"The ",(0,i.yg)("inlineCode",{parentName:"p"},"moniker")," can be edited in the ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/config.toml")," file:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'# A custom human readable name for this node\nmoniker = ""\n')),(0,i.yg)("h3",{id:"genesis-file"},"Genesis File"),(0,i.yg)("p",null,"Once the node is initialized, download the genesis file and move to the ",(0,i.yg)("inlineCode",{parentName:"p"},"/config")," directory of the Gaia home directory."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"wget https://raw.githubusercontent.com/cosmos/mainnet/master/genesis/genesis.cosmoshub-4.json.gz\ngzip -d genesis.cosmoshub-4.json.gz\nmv genesis.cosmoshub-4.json ~/.gaia/config/genesis.json\n")),(0,i.yg)("h3",{id:"seeds--peers"},"Seeds & Peers"),(0,i.yg)("p",null,"Upon startup the node will need to connect to peers. If there are specific nodes a node operator is interested in setting as seeds or as persistent peers, this can be configured in ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/config.toml")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-sh"},'# Comma separated list of seed nodes to connect to\nseeds = "@:26656,@:26656"\n\n# Comma separated list of nodes to keep persistent connections to\npersistent_peers = "@:26656,@:26656"\n')),(0,i.yg)("p",null,"Node operators can optionally download the ",(0,i.yg)("a",{parentName:"p",href:"https://quicksync.io/addrbook.cosmos.json"},"Quicksync address book"),". Make sure to move this to ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/addrbook.json"),"."),(0,i.yg)("h3",{id:"gas--fees"},"Gas & Fees"),(0,i.yg)("p",null,"On Cosmos Hub mainnet, the accepted denom is ",(0,i.yg)("inlineCode",{parentName:"p"},"uatom"),", where ",(0,i.yg)("inlineCode",{parentName:"p"},"1atom = 1.000.000uatom")),(0,i.yg)("p",null,"Transactions on the Cosmos Hub network need to include a transaction fee in order to be processed. This fee pays for the gas required to run the transaction. The formula is the following:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},"fees = ceil(gas * gasPrices)\n")),(0,i.yg)("p",null,(0,i.yg)("inlineCode",{parentName:"p"},"Gas")," is the smallest unit or pricing value required to perform a transaction. Different transactions require different amounts of ",(0,i.yg)("inlineCode",{parentName:"p"},"gas"),". The ",(0,i.yg)("inlineCode",{parentName:"p"},"gas")," amount for a transaction is calculated as it is being processed, but it can be estimated beforehand by using the ",(0,i.yg)("inlineCode",{parentName:"p"},"auto")," value for the ",(0,i.yg)("inlineCode",{parentName:"p"},"gas")," flag. The gas estimate can be adjusted with the flag ",(0,i.yg)("inlineCode",{parentName:"p"},"--gas-adjustment")," (default ",(0,i.yg)("inlineCode",{parentName:"p"},"1.0"),") to ensure enough ",(0,i.yg)("inlineCode",{parentName:"p"},"gas")," is provided for the transaction."),(0,i.yg)("p",null,"The ",(0,i.yg)("inlineCode",{parentName:"p"},"gasPrice")," is the price of each unit of ",(0,i.yg)("inlineCode",{parentName:"p"},"gas"),". Each validator sets a ",(0,i.yg)("inlineCode",{parentName:"p"},"min-gas-price")," value, and will only include transactions that have a ",(0,i.yg)("inlineCode",{parentName:"p"},"gasPrice")," greater than their ",(0,i.yg)("inlineCode",{parentName:"p"},"min-gas-price"),"."),(0,i.yg)("p",null,"The transaction ",(0,i.yg)("inlineCode",{parentName:"p"},"fees")," are the product of ",(0,i.yg)("inlineCode",{parentName:"p"},"gas")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"gasPrice"),". The higher the ",(0,i.yg)("inlineCode",{parentName:"p"},"gasPrice"),"/",(0,i.yg)("inlineCode",{parentName:"p"},"fees"),", the higher the chance that a transaction will get included in a block."),(0,i.yg)("p",null,(0,i.yg)("strong",{parentName:"p"},"For mainnet, the recommended ",(0,i.yg)("inlineCode",{parentName:"strong"},"gas-prices")," is ",(0,i.yg)("inlineCode",{parentName:"strong"},"0.0025uatom"),".")),(0,i.yg)("p",null,"A full-node keeps unconfirmed transactions in its mempool. In order to protect it from spam, it is better to set a ",(0,i.yg)("inlineCode",{parentName:"p"},"minimum-gas-prices")," that the transaction must meet in order to be accepted in the node's mempool. This parameter can be set in ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml"),"."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'# The minimum gas prices a validator is willing to accept for processing a\n# transaction. A transaction\'s fees must meet the minimum of any denomination\n# specified in this config (e.g. 0.25token1;0.0001token2).\nminimum-gas-prices = "0.0025uatom"\n')),(0,i.yg)("p",null,"The initial recommended ",(0,i.yg)("inlineCode",{parentName:"p"},"min-gas-prices")," is ",(0,i.yg)("inlineCode",{parentName:"p"},"0.0025uatom"),", but this can be changed later."),(0,i.yg)("h3",{id:"pruning-of-state"},"Pruning of State"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": This is an optional configuration.")),(0,i.yg)("p",null,"There are four strategies for pruning state. These strategies apply only to state and do not apply to block storage. A node operator may want to consider custom pruning if node storage is a concern or there is an interest in running an archive node."),(0,i.yg)("p",null,"To set pruning, adjust the ",(0,i.yg)("inlineCode",{parentName:"p"},"pruning")," parameter in the ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml")," file.\nThe following pruning state settings are available:"),(0,i.yg)("ol",null,(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("inlineCode",{parentName:"li"},"everything"),": Prune all saved states other than the current state."),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("inlineCode",{parentName:"li"},"nothing"),": Save all states and delete nothing."),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("inlineCode",{parentName:"li"},"default"),": Save the last 100 states and the state of every 10,000th block."),(0,i.yg)("li",{parentName:"ol"},(0,i.yg)("inlineCode",{parentName:"li"},"custom"),": Specify pruning settings with the ",(0,i.yg)("inlineCode",{parentName:"li"},"pruning-keep-recent"),", ",(0,i.yg)("inlineCode",{parentName:"li"},"pruning-keep-every"),", and ",(0,i.yg)("inlineCode",{parentName:"li"},"pruning-interval")," parameters.")),(0,i.yg)("p",null,"By default, every node is in ",(0,i.yg)("inlineCode",{parentName:"p"},"default")," mode which is the recommended setting for most environments.\nIf a node operator wants to change their node's pruning strategy then this ",(0,i.yg)("strong",{parentName:"p"},"must")," be done before the node is initialized."),(0,i.yg)("p",null,"In ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre"},'# default: the last 100 states are kept in addition to every 500th state; pruning at 10 block intervals\n# nothing: all historic states will be saved, nothing will be deleted (i.e. archiving node)\n# everything: all saved states will be deleted, storing only the current state; pruning at 10 block intervals\n# custom: allow pruning options to be manually specified through \'pruning-keep-recent\', \'pruning-keep-every\', and \'pruning-interval\'\npruning = "custom"\n\n# These are applied if and only if the pruning strategy is custom.\npruning-keep-recent = "10"\npruning-keep-every = "1000"\npruning-interval = "10"\n')),(0,i.yg)("p",null,"Passing a flag when starting ",(0,i.yg)("inlineCode",{parentName:"p"},"gaia")," will always override settings in the ",(0,i.yg)("inlineCode",{parentName:"p"},"app.toml")," file. To change the node's pruning setting to ",(0,i.yg)("inlineCode",{parentName:"p"},"everything")," mode then pass the ",(0,i.yg)("inlineCode",{parentName:"p"},"---pruning everything")," flag when running ",(0,i.yg)("inlineCode",{parentName:"p"},"gaiad start"),"."),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": If running the node with pruned state, it will not be possible to query the heights that are not in the node's store.")),(0,i.yg)("h3",{id:"rest-api"},"REST API"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": This is an optional configuration.")),(0,i.yg)("p",null,"By default, the REST API is disabled. To enable the REST API, edit the ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml")," file, and set ",(0,i.yg)("inlineCode",{parentName:"p"},"enable")," to ",(0,i.yg)("inlineCode",{parentName:"p"},"true")," in the ",(0,i.yg)("inlineCode",{parentName:"p"},"[api]")," section."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-toml"},'###############################################################################\n### API Configuration ###\n###############################################################################\n[api]\n# Enable defines if the API server should be enabled.\nenable = true\n# Swagger defines if swagger documentation should automatically be registered.\nswagger = false\n# Address defines the API server to listen on.\naddress = "tcp://0.0.0.0:1317"\n')),(0,i.yg)("p",null,"Optionally activate swagger by setting ",(0,i.yg)("inlineCode",{parentName:"p"},"swagger")," to ",(0,i.yg)("inlineCode",{parentName:"p"},"true")," or change the port of the REST API in the parameter ",(0,i.yg)("inlineCode",{parentName:"p"},"address"),".\nAfter restarting the application, access the REST API on ",(0,i.yg)("inlineCode",{parentName:"p"},":1317"),"."),(0,i.yg)("h3",{id:"grpc"},"GRPC"),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": This is an optional configuration.")),(0,i.yg)("p",null,"By default, gRPC is enabled on port ",(0,i.yg)("inlineCode",{parentName:"p"},"9090"),". The ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml")," file is where changes can be made in the gRPC section. To disable the gRPC endpoint, set ",(0,i.yg)("inlineCode",{parentName:"p"},"enable")," to ",(0,i.yg)("inlineCode",{parentName:"p"},"false"),". To change the port, use the ",(0,i.yg)("inlineCode",{parentName:"p"},"address")," parameter."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-toml"},'###############################################################################\n### gRPC Configuration ###\n###############################################################################\n[grpc]\n# Enable defines if the gRPC server should be enabled.\nenable = true\n# Address defines the gRPC server address to bind to.\naddress = "0.0.0.0:9090"\n')),(0,i.yg)("h2",{id:"sync-options"},"Sync Options"),(0,i.yg)("p",null,"There are three main ways to sync a node on the Cosmos Hub; Blocksync, State Sync, and Quicksync. See the matrix below for the Hub's recommended setup configuration. This guide will focus on syncing two types of common nodes; full and pruned. For further information on syncing to run a validator node, see the section on ",(0,i.yg)("a",{parentName:"p",href:"../validators/overview.mdx"},"Validators"),"."),(0,i.yg)("p",null,"There are two types of concerns when deciding which sync option is right. ",(0,i.yg)("em",{parentName:"p"},"Data integrity")," refers to how reliable the data provided by a subset of network participants is. ",(0,i.yg)("em",{parentName:"p"},"Historical data")," refers to how robust and inclusive the chain\u2019s history is."),(0,i.yg)("table",null,(0,i.yg)("thead",{parentName:"table"},(0,i.yg)("tr",{parentName:"thead"},(0,i.yg)("th",{parentName:"tr",align:null}),(0,i.yg)("th",{parentName:"tr",align:null},"Low Data Integrity"),(0,i.yg)("th",{parentName:"tr",align:null},"High Data Integrity"))),(0,i.yg)("tbody",{parentName:"table"},(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Minimal Historical Data"),(0,i.yg)("td",{parentName:"tr",align:null},"Quicksync - Pruned"),(0,i.yg)("td",{parentName:"tr",align:null},"State Sync")),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Moderate Historical Data"),(0,i.yg)("td",{parentName:"tr",align:null},"Quicksync - Default"),(0,i.yg)("td",{parentName:"tr",align:null})),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},"Full Historical Data"),(0,i.yg)("td",{parentName:"tr",align:null},"Quicksync - Archive"),(0,i.yg)("td",{parentName:"tr",align:null},"Blocksync")))),(0,i.yg)("p",null,"If a node operator wishes to run a full node, it is possible to start from scratch but will take a significant amount of time to catch up. Node operators not concerned with rebuilding original state from the beginning of ",(0,i.yg)("inlineCode",{parentName:"p"},"cosmoshub-4")," can also leverage ",(0,i.yg)("a",{parentName:"p",href:"#quicksync"},"Quicksync"),"'s available archive history."),(0,i.yg)("p",null,"For operators interested in bootstrapping a pruned node, either ",(0,i.yg)("a",{parentName:"p",href:"#quicksync"},"Quicksync")," or ",(0,i.yg)("a",{parentName:"p",href:"#state-sync"},"State Sync")," would be sufficient."),(0,i.yg)("p",null,"Make sure to consult the ",(0,i.yg)("a",{parentName:"p",href:"#hardware"},"hardware")," section for guidance on the best configuration for the type of node operating."),(0,i.yg)("h3",{id:"blocksync"},"Blocksync"),(0,i.yg)("p",null,"Blocksync is faster than traditional consensus and syncs the chain from genesis by downloading blocks and verifying against the merkle tree of validators. For more information see ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cometbft.com/v0.37/core/block-sync"},"CometBFT's Blocksync Docs")),(0,i.yg)("p",null,"When syncing via Blocksync, node operators will either need to manually upgrade the chain or set up ",(0,i.yg)("a",{parentName:"p",href:"#cosmovisor"},"Cosmovisor")," to upgrade automatically."),(0,i.yg)("p",null,"For more information on performing the manual upgrades, see ",(0,i.yg)("a",{parentName:"p",href:"#releases--upgrades"},"Releases & Upgrades"),"."),(0,i.yg)("p",null,"It is possible to sync from previous versions of the Cosmos Hub. See the matrix below for the correct ",(0,i.yg)("inlineCode",{parentName:"p"},"gaia")," version. See the ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/cosmos/mainnet"},"mainnet archive")," for historical genesis files."),(0,i.yg)("table",null,(0,i.yg)("thead",{parentName:"table"},(0,i.yg)("tr",{parentName:"thead"},(0,i.yg)("th",{parentName:"tr",align:null},"Chain Id"),(0,i.yg)("th",{parentName:"tr",align:null},"Gaia Version"))),(0,i.yg)("tbody",{parentName:"table"},(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"cosmoshub-4")),(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"v4.2.1"))),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"cosmoshub-3")),(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"v2.0.x"))),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"cosmoshub-2")),(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"v1.0.x"))),(0,i.yg)("tr",{parentName:"tbody"},(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"cosmoshub-1")),(0,i.yg)("td",{parentName:"tr",align:null},(0,i.yg)("inlineCode",{parentName:"td"},"v0.0.x"))))),(0,i.yg)("h5",{id:"getting-started-1"},"Getting Started"),(0,i.yg)("p",null,"Start Gaia to begin syncing with the ",(0,i.yg)("inlineCode",{parentName:"p"},"skip-invariants")," flag. For more information on this see ",(0,i.yg)("a",{parentName:"p",href:"#verify-mainnet"},"Verify Mainnet"),"."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad start --x-crisis-skip-assert-invariants\n\n")),(0,i.yg)("p",null,"The node will begin rebuilding state until it hits the first upgrade height at block ",(0,i.yg)("inlineCode",{parentName:"p"},"6910000"),". If Cosmovisor is set up then there's nothing else to do besides wait, otherwise the node operator will need to perform the manual upgrade twice."),(0,i.yg)("h3",{id:"state-sync"},"State Sync"),(0,i.yg)("p",null,"State Sync is an efficient and fast way to bootstrap a new node, and it works by replaying larger chunks of application state directly rather than replaying individual blocks or consensus rounds. For more information, see ",(0,i.yg)("a",{parentName:"p",href:"https://docs.cometbft.com/v0.37/core/state-sync"},"CometBFT's State Sync docs"),"."),(0,i.yg)("p",null,"To enable state sync, visit an explorer to get a recent block height and corresponding hash. A node operator can choose any height/hash in the current bonding period, but as the recommended snapshot period is ",(0,i.yg)("inlineCode",{parentName:"p"},"1000")," blocks, it is advised to choose something close to ",(0,i.yg)("inlineCode",{parentName:"p"},"current height - 1000"),"."),(0,i.yg)("p",null,"With the block height and hash selected, update the configuration in ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/config.toml")," to set ",(0,i.yg)("inlineCode",{parentName:"p"},"enable = true"),", and populate the ",(0,i.yg)("inlineCode",{parentName:"p"},"trust_height")," and ",(0,i.yg)("inlineCode",{parentName:"p"},"trust_hash"),". Node operators can configure the rpc servers to a preferred provider, but there must be at least two entries. It is important that these are two rpc servers the node operator trusts to verify component parts of the chain state. While not recommended, uniqueness is not currently enforced, so it is possible to duplicate the same server in the list and still sync successfully."),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": In the future, the RPC server requirement will be deprecated as state sync is ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/tendermint/tendermint/issues/6491"},"moved to the p2p layer in Tendermint 0.38"),".")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-toml"},'#######################################################\n### State Sync Configuration Options ###\n#######################################################\n[statesync]\n# State sync rapidly bootstraps a new node by discovering, fetching, and restoring a state machine\n# snapshot from peers instead of fetching and replaying historical blocks. Requires some peers in\n# the network to take and serve state machine snapshots. State sync is not attempted if the node\n# has any local state (LastBlockHeight > 0). The node will have a truncated block history,\n# starting from the height of the snapshot.\nenable = true\n\n# RPC servers (comma-separated) for light client verification of the synced state machine and\n# retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding\n# header hash obtained from a trusted source, and a period during which validators can be trusted.\n#\n# For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2\n# weeks) during which they can be financially punished (slashed) for misbehavior.\nrpc_servers = "https://cosmos-rpc.polkachu.com:443,https://rpc-cosmoshub-ia.cosmosia.notional.ventures:443"\ntrust_height = 8959784\ntrust_hash = "3D8F12EA302AEDA66E80939F7FC785206692F8B6EE6F727F1655F1AFB6A873A5"\ntrust_period = "168h0m0s"\n')),(0,i.yg)("p",null,"Start Gaia to begin state sync. It may take some time for the node to acquire a snapshot, but the command and output should look similar to the following:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},'$ gaiad start --x-crisis-skip-assert-invariants\n\n...\n\n> INF Discovered new snapshot format=1 hash="0x000..." height=8967000 module=statesync\n\n...\n\n> INF Fetching snapshot chunk chunk=4 format=1 height=8967000 module=statesync total=45\n> INF Applied snapshot chunk to ABCI app chunk=0 format=1 height=8967000 module=statesync total=45\n')),(0,i.yg)("p",null,"Once state sync successfully completes, the node will begin to process blocks normally. If state sync fails and the node operator encounters the following error: ",(0,i.yg)("inlineCode",{parentName:"p"},'State sync failed err="state sync aborted"'),", either try restarting ",(0,i.yg)("inlineCode",{parentName:"p"},"gaiad")," or running ",(0,i.yg)("inlineCode",{parentName:"p"},"gaiad unsafe-reset-all")," (make sure to backup any configuration and history before doing this)."),(0,i.yg)("h3",{id:"quicksync"},"Quicksync"),(0,i.yg)("p",null,"Quicksync.io offers several daily snapshots of the Cosmos Hub with varying levels of pruning (",(0,i.yg)("inlineCode",{parentName:"p"},"archive")," 1.4TB, ",(0,i.yg)("inlineCode",{parentName:"p"},"default")," 540GB, and ",(0,i.yg)("inlineCode",{parentName:"p"},"pruned")," 265GB). For downloads and installation instructions, visit the ",(0,i.yg)("a",{parentName:"p",href:"https://quicksync.io/networks/cosmos.html"},"Cosmos Quicksync guide"),"."),(0,i.yg)("h2",{id:"snapshots"},"Snapshots"),(0,i.yg)("p",null,"Saving and serving snapshots helps nodes rapidly join the network. Snapshots are now enabled by default effective ",(0,i.yg)("inlineCode",{parentName:"p"},"1/20/21"),"."),(0,i.yg)("p",null,"While not advised, if a node operator needs to customize this feature, it can be configured in ",(0,i.yg)("inlineCode",{parentName:"p"},"~/.gaia/config/app.toml"),". The Cosmos Hub recommends setting this value to match ",(0,i.yg)("inlineCode",{parentName:"p"},"pruning-keep-every")," in ",(0,i.yg)("inlineCode",{parentName:"p"},"config.toml"),"."),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": It is highly recommended that node operators use the same value for snapshot-interval in order to aid snapshot discovery. Discovery is easier when more nodes are serving the same snapshots.")),(0,i.yg)("p",null,"In ",(0,i.yg)("inlineCode",{parentName:"p"},"app.toml")),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-toml"},"###############################################################################\n### State Sync Configuration ###\n###############################################################################\n\n# State sync snapshots allow other nodes to rapidly join the network without replaying historical\n# blocks, instead downloading and applying a snapshot of the application state at a given height.\n[state-sync]\n\n# snapshot-interval specifies the block interval at which local state sync snapshots are\n# taken (0 to disable). Must be a multiple of pruning-keep-every.\nsnapshot-interval = 1000\n\n# snapshot-keep-recent specifies the number of recent snapshots to keep and serve (0 to keep all).\nsnapshot-keep-recent = 10\n")),(0,i.yg)("h2",{id:"cosmovisor"},"Cosmovisor"),(0,i.yg)("p",null,"Cosmovisor is a process manager developed to relieve node operators of having to manually intervene every time there is an upgrade. Cosmovisor monitors the governance module for upgrade proposals; it will take care of downloading the new binary, stopping the old one, switching to the new one, and restarting."),(0,i.yg)("p",null,"For more information on how to run a node via Cosmovisor, check out the ",(0,i.yg)("a",{parentName:"p",href:"https://github.com/cosmos/cosmos-sdk/tree/main/tools/cosmovisor"},"docs"),"."),(0,i.yg)("h2",{id:"running-via-background-process"},"Running via Background Process"),(0,i.yg)("p",null,"To run the node in a background process with automatic restarts, it's recommended to use a service manager like ",(0,i.yg)("inlineCode",{parentName:"p"},"systemd"),". To set this up run the following:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"sudo tee /etc/systemd/system/.service > /dev/null <\n")),(0,i.yg)("p",null,"Then start the process and confirm that it's running."),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"sudo -S systemctl start \n\nsudo service status\n")),(0,i.yg)("h2",{id:"exporting-state"},"Exporting State"),(0,i.yg)("p",null,"Gaia can dump the entire application state into a JSON file. This application state dump is useful for manual analysis and can also be used as the genesis file of a new network."),(0,i.yg)("blockquote",null,(0,i.yg)("p",{parentName:"blockquote"},(0,i.yg)("strong",{parentName:"p"},"Note"),": The node can't be running while exporting state, otherwise the operator can expect a ",(0,i.yg)("inlineCode",{parentName:"p"},"resource temporarily unavailable")," error.")),(0,i.yg)("p",null,"Export state with:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad export > [filename].json\n")),(0,i.yg)("p",null,"It is also possible to export state from a particular height (at the end of processing the block of that height):"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad export --height [height] > [filename].json\n")),(0,i.yg)("p",null,"If planning to start a new network from the exported state, export with the ",(0,i.yg)("inlineCode",{parentName:"p"},"--for-zero-height")," flag:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad export --height [height] --for-zero-height > [filename].json\n")),(0,i.yg)("h2",{id:"verify-mainnet"},"Verify Mainnet"),(0,i.yg)("p",null,"Help to prevent a catastrophe by running invariants on each block on your full\nnode. In essence, by running invariants the node operator ensures that the state of mainnet is the correct expected state. One vital invariant check is that no atoms are being created or destroyed outside of expected protocol, however there are many other invariant checks each unique to their respective module. Because invariant checks are computationally expensive, they are not enabled by default. To run a node with these checks start your node with the --x-crisis-skip-assert-invariants flag:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad start --x-crisis-skip-assert-invariants\n")),(0,i.yg)("p",null,"If an invariant is broken on the node, it will panic and prompt the operator to send a transaction which will halt mainnet. For example the provided message may look like:"),(0,i.yg)("pre",null,(0,i.yg)("code",{parentName:"pre",className:"language-bash"},"invariant broken:\n loose token invariance:\n pool.NotBondedTokens: 100\n sum of account tokens: 101\n CRITICAL please submit the following transaction:\n gaiad tx crisis invariant-broken staking supply\n\n")))}m.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/2d8dbdf9.a6290c53.js b/assets/js/2d8dbdf9.a6290c53.js
new file mode 100644
index 00000000000..1ae286d5fac
--- /dev/null
+++ b/assets/js/2d8dbdf9.a6290c53.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[1236],{5680:(e,t,n)=>{n.d(t,{xA:()=>m,yg:()=>c});var r=n(6540);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),u=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},m=function(e){var t=u(e.components);return r.createElement(s.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},g=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,m=l(e,["components","mdxType","originalType","parentName"]),d=u(n),g=a,c=d["".concat(s,".").concat(g)]||d[g]||p[g]||i;return n?r.createElement(c,o(o({ref:t},m),{},{components:n})):r.createElement(c,o({ref:t},m))}));function c(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=g;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:a,o[1]=l;for(var u=2;u{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var r=n(8168),a=(n(6540),n(5680));const i={title:"KMS - Key Management System",order:5},o=void 0,l={unversionedId:"validators/kms/kms",id:"validators/kms/kms",title:"KMS - Key Management System",description:"Tendermint KMS is a key management service that allows separating key management from Tendermint nodes. In addition it provides other advantages such as:",source:"@site/docs/validators/kms/kms.md",sourceDirName:"validators/kms",slug:"/validators/kms/",permalink:"/main/validators/kms/",draft:!1,tags:[],version:"current",frontMatter:{title:"KMS - Key Management System",order:5},sidebar:"tutorialSidebar",previous:{title:"Validators",permalink:"/main/validators/"},next:{title:"Setting up Tendermint KMS + Ledger",permalink:"/main/validators/kms/kms_ledger"}},s={},u=[{value:"Building",id:"building",level:2},{value:"Configuration",id:"configuration",level:2},{value:"Using a YubiHSM",id:"using-a-yubihsm",level:3},{value:"Using a Ledger device running the Tendermint app",id:"using-a-ledger-device-running-the-tendermint-app",level:3}],m={toc:u},d="wrapper";function p(e){let{components:t,...n}=e;return(0,a.yg)(d,(0,r.A)({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.yg)("p",null,(0,a.yg)("a",{parentName:"p",href:"https://github.com/iqlusioninc/tmkms"},"Tendermint KMS")," is a key management service that allows separating key management from Tendermint nodes. In addition it provides other advantages such as:"),(0,a.yg)("ul",null,(0,a.yg)("li",{parentName:"ul"},"Improved security and risk management policies"),(0,a.yg)("li",{parentName:"ul"},"Unified API and support for various HSM (hardware security modules)"),(0,a.yg)("li",{parentName:"ul"},"Double signing protection (software or hardware based)")),(0,a.yg)("p",null,"It is recommended that the KMS service runs in a separate physical hosts."),(0,a.yg)("h2",{id:"building"},"Building"),(0,a.yg)("p",null,"Detailed build instructions can be found ",(0,a.yg)("a",{parentName:"p",href:"https://github.com/iqlusioninc/tmkms#installation"},"here"),"."),(0,a.yg)("admonition",{type:"tip"},(0,a.yg)("p",{parentName:"admonition"},"When compiling the KMS, ensure you have enabled the applicable features:")),(0,a.yg)("table",null,(0,a.yg)("thead",{parentName:"table"},(0,a.yg)("tr",{parentName:"thead"},(0,a.yg)("th",{parentName:"tr",align:null},"Backend"),(0,a.yg)("th",{parentName:"tr",align:null},"Recommended Command line"))),(0,a.yg)("tbody",{parentName:"table"},(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"YubiHSM"),(0,a.yg)("td",{parentName:"tr",align:null},(0,a.yg)("inlineCode",{parentName:"td"},"cargo build --features yubihsm"))),(0,a.yg)("tr",{parentName:"tbody"},(0,a.yg)("td",{parentName:"tr",align:null},"Ledger+Tendermint App"),(0,a.yg)("td",{parentName:"tr",align:null},(0,a.yg)("inlineCode",{parentName:"td"},"cargo build --features ledgertm"))))),(0,a.yg)("h2",{id:"configuration"},"Configuration"),(0,a.yg)("p",null,"A KMS can be configured in various ways:"),(0,a.yg)("h3",{id:"using-a-yubihsm"},"Using a YubiHSM"),(0,a.yg)("p",null," Detailed information on how to setup a KMS with YubiHSM2 can be found ",(0,a.yg)("a",{parentName:"p",href:"https://github.com/iqlusioninc/tmkms/blob/master/README.yubihsm.md"},"here")),(0,a.yg)("h3",{id:"using-a-ledger-device-running-the-tendermint-app"},"Using a Ledger device running the Tendermint app"),(0,a.yg)("p",null," Detailed information on how to setup a KMS with Ledger Tendermint App can be found ",(0,a.yg)("a",{parentName:"p",href:"/main/validators/kms/kms_ledger"},"here")))}p.isMDXComponent=!0}}]);
\ No newline at end of file
diff --git a/assets/js/2dd09b7f.cbaaf380.js b/assets/js/2dd09b7f.cbaaf380.js
new file mode 100644
index 00000000000..708d9024aba
--- /dev/null
+++ b/assets/js/2dd09b7f.cbaaf380.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunkcosmos_hub_docs_site=self.webpackChunkcosmos_hub_docs_site||[]).push([[4731],{5680:(e,a,n)=>{n.d(a,{xA:()=>d,yg:()=>c});var t=n(6540);function o(e,a,n){return a in e?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,e}function i(e,a){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);a&&(t=t.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),n.push.apply(n,t)}return n}function r(e){for(var a=1;a=0||(o[n]=e[n]);return o}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=t.createContext({}),g=function(e){var a=t.useContext(s),n=a;return e&&(n="function"==typeof e?e(a):r(r({},a),e)),n},d=function(e){var a=g(e.components);return t.createElement(s.Provider,{value:a},e.children)},u="mdxType",p={inlineCode:"code",wrapper:function(e){var a=e.children;return t.createElement(t.Fragment,{},a)}},y=t.forwardRef((function(e,a){var n=e.components,o=e.mdxType,i=e.originalType,s=e.parentName,d=l(e,["components","mdxType","originalType","parentName"]),u=g(n),y=o,c=u["".concat(s,".").concat(y)]||u[y]||p[y]||i;return n?t.createElement(c,r(r({ref:a},d),{},{components:n})):t.createElement(c,r({ref:a},d))}));function c(e,a){var n=arguments,o=a&&a.mdxType;if("string"==typeof e||o){var i=n.length,r=new Array(i);r[0]=y;var l={};for(var s in a)hasOwnProperty.call(a,s)&&(l[s]=a[s]);l.originalType=e,l[u]="string"==typeof e?e:o,r[1]=l;for(var g=2;g{n.r(a),n.d(a,{assets:()=>s,contentTitle:()=>r,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>g});var t=n(8168),o=(n(6540),n(5680));const i={title:"Interacting with Gaiad (CLI)",order:5},r=void 0,l={unversionedId:"hub-tutorials/gaiad",id:"hub-tutorials/gaiad",title:"Interacting with Gaiad (CLI)",description:"Gaia Daemon",source:"@site/docs/hub-tutorials/gaiad.md",sourceDirName:"hub-tutorials",slug:"/hub-tutorials/gaiad",permalink:"/main/hub-tutorials/gaiad",draft:!1,tags:[],version:"current",frontMatter:{title:"Interacting with Gaiad (CLI)",order:5},sidebar:"tutorialSidebar",previous:{title:"Gaia Tutorials",permalink:"/main/hub-tutorials/"},next:{title:"Joining Mainnet",permalink:"/main/hub-tutorials/join-mainnet"}},s={},g=[{value:"Gaia Daemon",id:"gaia-daemon",level:2},{value:"Setting up gaiad",id:"setting-up-gaiad",level:3},{value:"Keys",id:"keys",level:3},{value:"Keyring",id:"keyring",level:4},{value:"Key Types",id:"key-types",level:4},{value:"Migrate Keys From Legacy On-Disk Keybase To OS Built-in Secret Store",id:"migrate-keys-from-legacy-on-disk-keybase-to-os-built-in-secret-store",level:4},{value:"Generate Keys",id:"generate-keys",level:4},{value:"Generate Multisig Public Keys",id:"generate-multisig-public-keys",level:4},{value:"Tx Broadcasting",id:"tx-broadcasting",level:3},{value:"Fees & Gas",id:"fees--gas",level:3},{value:"Account",id:"account",level:3},{value:"Get Tokens",id:"get-tokens",level:4},{value:"Query Account Balance",id:"query-account-balance",level:4},{value:"Send Tokens",id:"send-tokens",level:3},{value:"Query Transactions",id:"query-transactions",level:3},{value:"Matching a Set of Events",id:"matching-a-set-of-events",level:4},{value:"Matching a Transaction's Hash",id:"matching-a-transactions-hash",level:4},{value:"Slashing",id:"slashing",level:3},{value:"Unjailing",id:"unjailing",level:4},{value:"Signing Info",id:"signing-info",level:4},{value:"Query Parameters",id:"query-parameters",level:4},{value:"Minting",id:"minting",level:3},{value:"Staking",id:"staking",level:3},{value:"Set up a Validator",id:"set-up-a-validator",level:4},{value:"Delegate to a Validator",id:"delegate-to-a-validator",level:4},{value:"Query Validators",id:"query-validators",level:5},{value:"Bond Tokens",id:"bond-tokens",level:4},{value:"Query Delegations",id:"query-delegations",level:5},{value:"Unbond Tokens",id:"unbond-tokens",level:4},{value:"Query Unbonding-Delegations",id:"query-unbonding-delegations",level:5},{value:"Redelegate Tokens",id:"redelegate-tokens",level:4},{value:"Query Redelegations",id:"query-redelegations",level:5},{value:"Query Parameters",id:"query-parameters-1",level:4},{value:"Query Pool",id:"query-pool",level:4},{value:"Query Delegations To Validator",id:"query-delegations-to-validator",level:5},{value:"Governance",id:"governance",level:3},{value:"Create a Governance Proposal",id:"create-a-governance-proposal",level:4},{value:"Query Proposals",id:"query-proposals",level:5},{value:"Increase Deposit",id:"increase-deposit",level:4},{value:"Query Deposits",id:"query-deposits",level:5},{value:"Vote on a Proposal",id:"vote-on-a-proposal",level:4},{value:"Query Votes",id:"query-votes",level:5},{value:"Query proposal tally results",id:"query-proposal-tally-results",level:4},{value:"Query Governance Parameters",id:"query-governance-parameters",level:4},{value:"Fee Distribution",id:"fee-distribution",level:3},{value:"Query Distribution Parameters",id:"query-distribution-parameters",level:4},{value:"Query distribution Community Pool",id:"query-distribution-community-pool",level:4},{value:"Query outstanding rewards",id:"query-outstanding-rewards",level:4},{value:"Query Validator Commission",id:"query-validator-commission",level:4},{value:"Query Validator Slashes",id:"query-validator-slashes",level:4},{value:"Query Delegator Rewards",id:"query-delegator-rewards",level:4},{value:"Query All Delegator Rewards",id:"query-all-delegator-rewards",level:4},{value:"Multisig Transactions",id:"multisig-transactions",level:3},{value:"Shells Completion Scripts",id:"shells-completion-scripts",level:2}],d={toc:g},u="wrapper";function p(e){let{components:a,...n}=e;return(0,o.yg)(u,(0,t.A)({},d,n,{components:a,mdxType:"MDXLayout"}),(0,o.yg)("h2",{id:"gaia-daemon"},"Gaia Daemon"),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"gaiad")," is the tool that enables you to interact with the node that runs on the Cosmos Hub network, whether you run it yourself or not. Let us set it up properly. In order to install it, follow the ",(0,o.yg)("a",{parentName:"p",href:"../getting-started/installation"},"installation procedure"),"."),(0,o.yg)("h3",{id:"setting-up-gaiad"},"Setting up gaiad"),(0,o.yg)("p",null,"The main command used to set up ",(0,o.yg)("inlineCode",{parentName:"p"},"gaiad")," is the following:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad config \n")),(0,o.yg)("p",null,"It allows you to set a default value for each given flag."),(0,o.yg)("p",null,"First, set up the address of the full-node you want to connect to:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad config node :\n\n# example: gaiad config node https://77.87.106.33:26657\n")),(0,o.yg)("p",null,"If you run your own full-node, just use ",(0,o.yg)("inlineCode",{parentName:"p"},"tcp://localhost:26657")," as the address."),(0,o.yg)("p",null,"Finally, let us set the ",(0,o.yg)("inlineCode",{parentName:"p"},"chain-id")," of the blockchain we want to interact with:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad config chain-id cosmoshub-2\n")),(0,o.yg)("h3",{id:"keys"},"Keys"),(0,o.yg)("h4",{id:"keyring"},"Keyring"),(0,o.yg)("p",null,'The keyring holds the private/public keypairs used to interact with a node. For instance, a validator key needs to be set up before running the blockchain node, so that blocks can be correctly signed. The private key can be stored in different locations, called "backends", such as a file or the operating system\'s own key storage.'),(0,o.yg)("p",null,"Headless environments are recommended to use either the ",(0,o.yg)("inlineCode",{parentName:"p"},"file")," or ",(0,o.yg)("inlineCode",{parentName:"p"},"pass")," backends. More information is available at the ",(0,o.yg)("a",{parentName:"p",href:"https://docs.cosmos.network/v0.47/user/run-node/keyring"},"SDK documentation page"),"."),(0,o.yg)("h4",{id:"key-types"},"Key Types"),(0,o.yg)("p",null,"There are three types of key representations that are used:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},(0,o.yg)("inlineCode",{parentName:"p"},"cosmos")),(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},"Derived from account keys generated by ",(0,o.yg)("inlineCode",{parentName:"li"},"gaiad keys add")),(0,o.yg)("li",{parentName:"ul"},"Used to receive funds"),(0,o.yg)("li",{parentName:"ul"},"e.g. ",(0,o.yg)("inlineCode",{parentName:"li"},"cosmos15h6vd5f0wqps26zjlwrc6chah08ryu4hzzdwhc")))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},(0,o.yg)("inlineCode",{parentName:"p"},"cosmosvaloper")),(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},"Used to associate a validator to its operator"),(0,o.yg)("li",{parentName:"ul"},"Used to invoke staking commands"),(0,o.yg)("li",{parentName:"ul"},"e.g. ",(0,o.yg)("inlineCode",{parentName:"li"},"cosmosvaloper1carzvgq3e6y3z5kz5y6gxp3wpy3qdrv928vyah")))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},(0,o.yg)("inlineCode",{parentName:"p"},"cosmospub")),(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},"Derived from account keys generated by ",(0,o.yg)("inlineCode",{parentName:"li"},"gaiad keys add")),(0,o.yg)("li",{parentName:"ul"},"e.g. ",(0,o.yg)("inlineCode",{parentName:"li"},"cosmospub1zcjduc3q7fu03jnlu2xpl75s2nkt7krm6grh4cc5aqth73v0zwmea25wj2hsqhlqzm")))),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("p",{parentName:"li"},(0,o.yg)("inlineCode",{parentName:"p"},"cosmosvalconspub")),(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},"Generated when the node is created with ",(0,o.yg)("inlineCode",{parentName:"li"},"gaiad init"),"."),(0,o.yg)("li",{parentName:"ul"},"Get this value with ",(0,o.yg)("inlineCode",{parentName:"li"},"gaiad tendermint show-validator")),(0,o.yg)("li",{parentName:"ul"},"e.g. ",(0,o.yg)("inlineCode",{parentName:"li"},"cosmosvalconspub1zcjduepq0ms2738680y72v44tfyqm3c9ppduku8fs6sr73fx7m666sjztznqzp2emf"))))),(0,o.yg)("h4",{id:"migrate-keys-from-legacy-on-disk-keybase-to-os-built-in-secret-store"},"Migrate Keys From Legacy On-Disk Keybase To OS Built-in Secret Store"),(0,o.yg)("p",null,"Older versions of ",(0,o.yg)("inlineCode",{parentName:"p"},"gaiad")," used store keys in the user's home directory. If you are migrating\nfrom an old version of ",(0,o.yg)("inlineCode",{parentName:"p"},"gaiad")," you will need to migrate your old keys into your operating system's\ncredentials storage by running the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys migrate\n")),(0,o.yg)("p",null,"The command will prompt for every passphrase. If a passphrase is incorrect, it will skip the\nrespective key."),(0,o.yg)("h4",{id:"generate-keys"},"Generate Keys"),(0,o.yg)("p",null,"You'll need an account private and public key pair ","(","a.k.a. ",(0,o.yg)("inlineCode",{parentName:"p"},"sk, pk")," respectively",")"," to be able to receive funds, send txs, bond tx, etc."),(0,o.yg)("p",null,"To generate a new ",(0,o.yg)("em",{parentName:"p"},"secp256k1")," key:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys add \n")),(0,o.yg)("p",null,"The output of the above command will contain a ",(0,o.yg)("em",{parentName:"p"},"seed phrase"),". It is recommended to save the ",(0,o.yg)("em",{parentName:"p"},"seed\nphrase")," in a safe place so that in case you forget the password of the operating system's\ncredentials store, you could eventually regenerate the key from the seed phrase with the\nfollowing command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys add --recover\n")),(0,o.yg)("p",null,"If you check your private keys, you'll now see ",(0,o.yg)("inlineCode",{parentName:"p"},""),":"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys show \n")),(0,o.yg)("p",null,"View the validator operator's address via:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys show --bech=val\n")),(0,o.yg)("p",null,"You can see all your available keys by typing:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys list\n")),(0,o.yg)("p",null,"View the validator pubkey for your node by typing:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tendermint show-validator\n")),(0,o.yg)("p",null,"Note that this is the Tendermint signing key, ",(0,o.yg)("em",{parentName:"p"},"not")," the operator key you will use in delegation transactions."),(0,o.yg)("div",{class:"theme-doc-version-banner alert alert--warning margin-bottom--md",role:"alert"},"We strongly recommend _NOT_ using the same passphrase for multiple keys. The CometBFT team and the Interchain Foundation will not be responsible for the loss of funds."),(0,o.yg)("h4",{id:"generate-multisig-public-keys"},"Generate Multisig Public Keys"),(0,o.yg)("p",null,"You can generate and print a multisig public key by typing:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys add --multisig=name1,name2,name3[...] --multisig-threshold=K new_key_name\n")),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"K")," is the minimum number of private keys that must have signed the\ntransactions that carry the public key's address as signer."),(0,o.yg)("p",null,"The ",(0,o.yg)("inlineCode",{parentName:"p"},"--multisig")," flag must contain the name of public keys that will be combined into a\npublic key that will be generated and stored as ",(0,o.yg)("inlineCode",{parentName:"p"},"new_key_name")," in the local database.\nAll names supplied through ",(0,o.yg)("inlineCode",{parentName:"p"},"--multisig")," must already exist in the local database. Unless\nthe flag ",(0,o.yg)("inlineCode",{parentName:"p"},"--nosort")," is set, the order in which the keys are supplied on the command line\ndoes not matter, i.e. the following commands generate two identical keys:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys add --multisig=foo,bar,baz --multisig-threshold=2 multisig_address\ngaiad keys add --multisig=baz,foo,bar --multisig-threshold=2 multisig_address\n")),(0,o.yg)("p",null,"Multisig addresses can also be generated on-the-fly and printed through the which command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys show --multisig-threshold K name1 name2 name3 [...]\n")),(0,o.yg)("p",null,"For more information regarding how to generate, sign and broadcast transactions with a\nmulti signature account see ",(0,o.yg)("a",{parentName:"p",href:"#multisig-transactions"},"Multisig Transactions"),"."),(0,o.yg)("h3",{id:"tx-broadcasting"},"Tx Broadcasting"),(0,o.yg)("p",null,"When broadcasting transactions, ",(0,o.yg)("inlineCode",{parentName:"p"},"gaiad")," accepts a ",(0,o.yg)("inlineCode",{parentName:"p"},"--broadcast-mode")," flag. This\nflag can have a value of ",(0,o.yg)("inlineCode",{parentName:"p"},"sync")," (default), ",(0,o.yg)("inlineCode",{parentName:"p"},"async"),", or ",(0,o.yg)("inlineCode",{parentName:"p"},"block"),", where ",(0,o.yg)("inlineCode",{parentName:"p"},"sync")," makes\nthe client return a CheckTx response, ",(0,o.yg)("inlineCode",{parentName:"p"},"async")," makes the client return immediately,\nand ",(0,o.yg)("inlineCode",{parentName:"p"},"block")," makes the client wait for the tx to be committed (or timing out)."),(0,o.yg)("p",null,"It is important to note that the ",(0,o.yg)("inlineCode",{parentName:"p"},"block")," mode should ",(0,o.yg)("strong",{parentName:"p"},"not")," be used in most\ncircumstances. This is because broadcasting can timeout but the tx may still be\nincluded in a block. This can result in many undesirable situations. Therefore, it\nis best to use ",(0,o.yg)("inlineCode",{parentName:"p"},"sync")," or ",(0,o.yg)("inlineCode",{parentName:"p"},"async")," and query by tx hash to determine when the tx\nis included in a block."),(0,o.yg)("h3",{id:"fees--gas"},"Fees & Gas"),(0,o.yg)("p",null,"The Cosmos Hub uses the ",(0,o.yg)("inlineCode",{parentName:"p"},"x/feemarket")," module to\ndynamically vary the gas price based on demand."),(0,o.yg)("p",null,"You need to specify a sufficient gas price or total fees\nto ensure that your transaction is included in a block,\ne.g."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx bank send ... --fees=50000uatom\n")),(0,o.yg)("p",null,"or"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx bank send ... --gas-prices=0.0025uatom\n")),(0,o.yg)("p",null,"To find out more about the current minimal gas price, you can query the feemarket module:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad q feemarket gas-prices\n")),(0,o.yg)("p",null,"or"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad q feemarket gas-prices uatom\n")),(0,o.yg)("p",null,"which will output the current gas price similar to this:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'price: \n amount: "0.005" \n denom: uatom \n')),(0,o.yg)("p",null,"For more information, check out how to query the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/skip-mev/feemarket/blob/main/docs/SPEC.md#gas-price"},"feemarket"),",\nor check out the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/skip-mev/feemarket/blob/main/docs/INTEGRATIONS.md"},"feemarket integration guide"),"."),(0,o.yg)("h3",{id:"account"},"Account"),(0,o.yg)("h4",{id:"get-tokens"},"Get Tokens"),(0,o.yg)("p",null,"On a testnet, getting tokens is usually done via a faucet."),(0,o.yg)("h4",{id:"query-account-balance"},"Query Account Balance"),(0,o.yg)("p",null,"After receiving tokens to your address, you can view your account's balance by typing:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query account account_cosmos\n")),(0,o.yg)("admonition",{title:"Note",type:"warning"},(0,o.yg)("p",{parentName:"admonition"},"When you query an account balance with zero tokens, you will get this error: ",(0,o.yg)("inlineCode",{parentName:"p"},"No account with address was found in the state.")," This can also happen if you fund the account before your node has fully synced with the chain. These are both normal.")),(0,o.yg)("h3",{id:"send-tokens"},"Send Tokens"),(0,o.yg)("p",null,"The following command could be used to send coins from one account to another:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx bank send sender_key_name_or_address recipient_address 10faucetToken \\\n --chain-id=chain_id\n")),(0,o.yg)("div",{class:"theme-doc-version-banner alert alert--warning margin-bottom--md",role:"alert"},"The `amount` argument accepts the format `value|coin_name`."),(0,o.yg)("div",{class:"theme-doc-version-banner info alert--warning margin-bottom--md",role:"info"},"You may want to cap the maximum gas that can be consumed by the transaction via the `--gas` flag. If you pass `--gas=auto`, the gas supply will be automatically estimated before executing the transaction. Gas estimate might be inaccurate as state changes could occur in between the end of the simulation and the actual execution of a transaction, thus an adjustment is applied on top of the original estimate in order to ensure the transaction is broadcasted successfully. The adjustment can be controlled via the `--gas-adjustment` flag, whose default value is 1.0."),(0,o.yg)("p",null,"Now, view the updated balances of the origin and destination accounts:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query account account_cosmos\ngaiad query account destination_cosmos\n")),(0,o.yg)("p",null,"You can also check your balance at a given block by using the ",(0,o.yg)("inlineCode",{parentName:"p"},"--block")," flag:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query account account_cosmos --block=\n")),(0,o.yg)("p",null,"You can simulate a transaction without actually broadcasting it by appending the\n",(0,o.yg)("inlineCode",{parentName:"p"},"--dry-run")," flag to the command line:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx bank send 10faucetToken \\\n --chain-id= \\\n --dry-run\n")),(0,o.yg)("p",null,"Furthermore, you can build a transaction and print its JSON format to STDOUT by\nappending ",(0,o.yg)("inlineCode",{parentName:"p"},"--generate-only")," to the list of the command line arguments:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx bank send 10faucetToken \\\n --chain-id= \\\n --generate-only > unsignedSendTx.json\n")),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx sign \\\n --chain-id= \\\n --from= \\\n unsignedSendTx.json > signedSendTx.json\n")),(0,o.yg)("div",{class:"theme-doc-version-banner info alert--warning margin-bottom--md",role:"info"},"The `--generate-only` flag prevents `gaiad` from accessing the local keybase. Thus when such flag is supplied `sender_key_name_or_address` must be an address."),(0,o.yg)("p",null,"You can validate the transaction's signatures by typing the following:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx sign --validate-signatures signedSendTx.json\n")),(0,o.yg)("p",null,"You can broadcast the signed transaction to a node by providing the JSON file to the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx broadcast --node= signedSendTx.json\n")),(0,o.yg)("h3",{id:"query-transactions"},"Query Transactions"),(0,o.yg)("h4",{id:"matching-a-set-of-events"},"Matching a Set of Events"),(0,o.yg)("p",null,"You can use the transaction search command to query for transactions that match a\nspecific set of ",(0,o.yg)("inlineCode",{parentName:"p"},"events"),", which are added on every transaction."),(0,o.yg)("p",null,"Each event is composed by a key-value pair in the form of ",(0,o.yg)("inlineCode",{parentName:"p"},"{eventType}.{eventAttribute}={value}"),".\nEvents can also be combined to query for a more specific result using the ",(0,o.yg)("inlineCode",{parentName:"p"},"&")," symbol."),(0,o.yg)("p",null,"You can query transactions by ",(0,o.yg)("inlineCode",{parentName:"p"},"events")," as follows:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query txs --events='message.sender=cosmos1...'\n")),(0,o.yg)("p",null,"And for using multiple ",(0,o.yg)("inlineCode",{parentName:"p"},"events"),":"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query txs --events='message.sender=cosmos1...&message.action=withdraw_delegator_reward'\n")),(0,o.yg)("p",null,"The pagination is supported as well via ",(0,o.yg)("inlineCode",{parentName:"p"},"page")," and ",(0,o.yg)("inlineCode",{parentName:"p"},"limit"),":"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query txs --events='message.sender=cosmos1...' --page=1 --limit=20\n")),(0,o.yg)("div",{class:"theme-doc-version-banner info alert--warning margin-bottom--md",role:"info"},"The action tag always equals the message type returned by the `Type()` function of the relevant message."),(0,o.yg)("p",null,"You can find a list of available ",(0,o.yg)("inlineCode",{parentName:"p"},"events")," on each of the SDK modules:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/staking#events"},"Staking events")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/gov#events"},"Governance events")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/slashing#events"},"Slashing events")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/distribution#events"},"Distribution events")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("a",{parentName:"li",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/bank#events"},"Bank events"))),(0,o.yg)("h4",{id:"matching-a-transactions-hash"},"Matching a Transaction's Hash"),(0,o.yg)("p",null,"You can also query a single transaction by its hash using the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query tx [hash]\n")),(0,o.yg)("h3",{id:"slashing"},"Slashing"),(0,o.yg)("h4",{id:"unjailing"},"Unjailing"),(0,o.yg)("p",null,"To unjail your jailed validator"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx slashing unjail --from \n")),(0,o.yg)("h4",{id:"signing-info"},"Signing Info"),(0,o.yg)("p",null,"To retrieve a validator's signing info:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query slashing signing-info \n")),(0,o.yg)("h4",{id:"query-parameters"},"Query Parameters"),(0,o.yg)("p",null,"You can get the current slashing parameters via:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query slashing params\n")),(0,o.yg)("h3",{id:"minting"},"Minting"),(0,o.yg)("p",null,"You can query for the minting/inflation parameters via:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query mint params\n")),(0,o.yg)("p",null,"To query for the current inflation value:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query mint inflation\n")),(0,o.yg)("p",null,"To query for the current annual provisions value:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query mint annual-provisions\n")),(0,o.yg)("h3",{id:"staking"},"Staking"),(0,o.yg)("h4",{id:"set-up-a-validator"},"Set up a Validator"),(0,o.yg)("p",null,"Please refer to the ",(0,o.yg)("a",{parentName:"p",href:"/main/validators/validator-setup"},"Validator Setup")," section for a more complete guide on how to set up a validator-candidate."),(0,o.yg)("h4",{id:"delegate-to-a-validator"},"Delegate to a Validator"),(0,o.yg)("p",null,"On the upcoming mainnet, you can delegate ",(0,o.yg)("inlineCode",{parentName:"p"},"atom")," to a validator. These ",(0,o.yg)("a",{parentName:"p",href:"/main/delegators/delegator-faq"},"delegators")," can receive part of the validator's fee revenue. Read more about the ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/cosmos/cosmos/raw/master/Cosmos_Token_Model.pdf"},"Cosmos Token Model"),"."),(0,o.yg)("h5",{id:"query-validators"},"Query Validators"),(0,o.yg)("p",null,"You can query the list of all validators of a specific chain:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking validators\n")),(0,o.yg)("p",null,"If you want to get the information of a single validator you can check it with:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking validator \n")),(0,o.yg)("h4",{id:"bond-tokens"},"Bond Tokens"),(0,o.yg)("p",null,"On the Cosmos Hub mainnet, we delegate ",(0,o.yg)("inlineCode",{parentName:"p"},"uatom"),", where ",(0,o.yg)("inlineCode",{parentName:"p"},"1atom = 1000000uatom"),". Here's how you can bond tokens to a testnet validator (",(0,o.yg)("em",{parentName:"p"},"i.e.")," delegate):"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx staking delegate \\\n --amount=10000000uatom \\\n --validator= \\\n --from= \\\n --chain-id=\n")),(0,o.yg)("p",null,(0,o.yg)("inlineCode",{parentName:"p"},"")," is the operator address of the validator to which you intend to delegate. If you are running a local testnet, you can find this with:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad keys show [name] --bech val\n")),(0,o.yg)("p",null,"where ",(0,o.yg)("inlineCode",{parentName:"p"},"[name]")," is the name of the key you specified when you initialized ",(0,o.yg)("inlineCode",{parentName:"p"},"gaiad"),"."),(0,o.yg)("p",null,"While tokens are bonded, they are pooled with all the other bonded tokens in the network. Validators and delegators obtain a percentage of shares that equal their stake in this pool."),(0,o.yg)("h5",{id:"query-delegations"},"Query Delegations"),(0,o.yg)("p",null,"Once submitted a delegation to a validator, you can see its information by using the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking delegation \n")),(0,o.yg)("p",null,"Or if you want to check all your current delegations with distinct validators:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking delegations \n")),(0,o.yg)("h4",{id:"unbond-tokens"},"Unbond Tokens"),(0,o.yg)("p",null,"If for any reason the validator misbehaves, or you just want to unbond a certain\namount of tokens, use the following command."),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx staking unbond \\\n \\\n 10atom \\\n --from= \\\n --chain-id=\n")),(0,o.yg)("p",null,"The unbonding will be automatically completed when the unbonding period has passed."),(0,o.yg)("h5",{id:"query-unbonding-delegations"},"Query Unbonding-Delegations"),(0,o.yg)("p",null,"Once you begin an unbonding-delegation, you can see it's information by using the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking unbonding-delegation \n")),(0,o.yg)("p",null,"Or if you want to check all your current unbonding-delegations with distinct validators:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking unbonding-delegations \n")),(0,o.yg)("p",null,"Additionally, as you can get all the unbonding-delegations from a particular validator:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking unbonding-delegations-from \n")),(0,o.yg)("h4",{id:"redelegate-tokens"},"Redelegate Tokens"),(0,o.yg)("p",null,"A redelegation is a type delegation that allows you to bond illiquid tokens from one validator to another:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx staking redelegate \\\n \\\n \\\n 10atom \\\n --from= \\\n --chain-id=\n")),(0,o.yg)("p",null,"Here you can also redelegate a specific ",(0,o.yg)("inlineCode",{parentName:"p"},"shares-amount")," or a ",(0,o.yg)("inlineCode",{parentName:"p"},"shares-fraction")," with the corresponding flags."),(0,o.yg)("p",null,"The redelegation will be automatically completed when the unbonding period has passed."),(0,o.yg)("h5",{id:"query-redelegations"},"Query Redelegations"),(0,o.yg)("p",null,"Once you begin a redelegation, you can see its information by using the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking redelegation \n")),(0,o.yg)("p",null,"Or if you want to check all your current unbonding-delegations with distinct validators:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking redelegations \n")),(0,o.yg)("p",null,"Additionally, as you can get all the outgoing redelegations from a particular validator:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"}," gaiad query staking redelegations-from \n")),(0,o.yg)("h4",{id:"query-parameters-1"},"Query Parameters"),(0,o.yg)("p",null,"Parameters define high level settings for staking. You can get the current values by using:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking params\n")),(0,o.yg)("p",null,"With the above command you will get the values for:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Unbonding time"),(0,o.yg)("li",{parentName:"ul"},"Maximum numbers of validators"),(0,o.yg)("li",{parentName:"ul"},"Coin denomination for staking")),(0,o.yg)("p",null,"All these values will be subject to updates through a ",(0,o.yg)("inlineCode",{parentName:"p"},"governance")," process by ",(0,o.yg)("inlineCode",{parentName:"p"},"ParameterChange")," proposals."),(0,o.yg)("h4",{id:"query-pool"},"Query Pool"),(0,o.yg)("p",null,"A staking ",(0,o.yg)("inlineCode",{parentName:"p"},"Pool")," defines the dynamic parameters of the current state. You can query them with the following command:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query staking pool\n")),(0,o.yg)("p",null,"With the ",(0,o.yg)("inlineCode",{parentName:"p"},"pool")," command you will get the values for:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Not-bonded and bonded tokens"),(0,o.yg)("li",{parentName:"ul"},"Token supply"),(0,o.yg)("li",{parentName:"ul"},"Current annual inflation and the block in which the last inflation was processed"),(0,o.yg)("li",{parentName:"ul"},"Last recorded bonded shares")),(0,o.yg)("h5",{id:"query-delegations-to-validator"},"Query Delegations To Validator"),(0,o.yg)("p",null,"You can also query all of the delegations to a particular validator:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"}," gaiad query delegations-to \n")),(0,o.yg)("h3",{id:"governance"},"Governance"),(0,o.yg)("p",null,"Governance is the process from which users in the Cosmos Hub can come to consensus\non software upgrades, parameters of the mainnet or signaling mechanisms through\ntext proposals. This is done through voting on proposals, which will be submitted\nby ",(0,o.yg)("inlineCode",{parentName:"p"},"ATOM")," holders on the mainnet."),(0,o.yg)("p",null,"Some considerations about the voting process:"),(0,o.yg)("ul",null,(0,o.yg)("li",{parentName:"ul"},"Voting is done by bonded ",(0,o.yg)("inlineCode",{parentName:"li"},"ATOM")," holders on a 1 bonded ",(0,o.yg)("inlineCode",{parentName:"li"},"ATOM")," 1 vote basis"),(0,o.yg)("li",{parentName:"ul"},"Delegators inherit the vote of their validator if they don't vote"),(0,o.yg)("li",{parentName:"ul"},"Votes are tallied at the end of the voting period (2 weeks on mainnet) where\neach address can vote multiple times to update its ",(0,o.yg)("inlineCode",{parentName:"li"},"Option")," value (paying the transaction fee each time),\nonly the most recently cast vote will count as valid"),(0,o.yg)("li",{parentName:"ul"},"Voters can choose between options ",(0,o.yg)("inlineCode",{parentName:"li"},"Yes"),", ",(0,o.yg)("inlineCode",{parentName:"li"},"No"),", ",(0,o.yg)("inlineCode",{parentName:"li"},"NoWithVeto")," and ",(0,o.yg)("inlineCode",{parentName:"li"},"Abstain")),(0,o.yg)("li",{parentName:"ul"},"At the end of the voting period, a proposal is accepted iff:",(0,o.yg)("ul",{parentName:"li"},(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("inlineCode",{parentName:"li"},"(YesVotes / (YesVotes+NoVotes+NoWithVetoVotes)) > 1/2")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("inlineCode",{parentName:"li"},"(NoWithVetoVotes / (YesVotes+NoVotes+NoWithVetoVotes)) < 1/3")),(0,o.yg)("li",{parentName:"ul"},(0,o.yg)("inlineCode",{parentName:"li"},"((YesVotes+NoVotes+NoWithVetoVotes) / totalBondedStake) >= quorum"))))),(0,o.yg)("p",null,"For more information about the governance process and how it works, please check\nout the Governance module ",(0,o.yg)("a",{parentName:"p",href:"https://github.com/cosmos/cosmos-sdk/tree/main/x/gov#xgov"},"specification"),"."),(0,o.yg)("h4",{id:"create-a-governance-proposal"},"Create a Governance Proposal"),(0,o.yg)("p",null,"In order to create a governance proposal, you must submit an initial deposit\nalong with a title and description. Various modules outside of governance may\nimplement their own proposal types and handlers (eg. parameter changes), where\nthe governance module itself supports ",(0,o.yg)("inlineCode",{parentName:"p"},"Text")," proposals. Any module\noutside of governance has its command mounted on top of ",(0,o.yg)("inlineCode",{parentName:"p"},"submit-proposal"),"."),(0,o.yg)("p",null,"To submit a ",(0,o.yg)("inlineCode",{parentName:"p"},"Text")," proposal:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'gaiad tx gov submit-proposal \\\n --title= \\\n --description= \\\n --type="Text" \\\n --deposit="1000000uatom" \\\n --from= \\\n --chain-id=\n')),(0,o.yg)("p",null,"You may also provide the proposal directly through the ",(0,o.yg)("inlineCode",{parentName:"p"},"--proposal")," flag which\npoints to a JSON file containing the proposal."),(0,o.yg)("p",null,"To submit a parameter change proposal, you must provide a proposal file as its\ncontents are less friendly to CLI input:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx gov submit-proposal param-change \\\n --from= \\\n --chain-id=\n")),(0,o.yg)("p",null,"Where ",(0,o.yg)("inlineCode",{parentName:"p"},"proposal.json")," contains the following:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-json"},'{\n "title": "Param Change",\n "description": "Update max validators",\n "changes": [\n {\n "subspace": "staking",\n "key": "MaxValidators",\n "value": 105\n }\n ],\n "deposit": [\n {\n "denom": "stake",\n "amount": "10000000"\n }\n ]\n}\n')),(0,o.yg)("div",{class:"theme-doc-version-banner info alert--warning margin-bottom--md",role:"info"},"Currently parameter changes are _evaluated_ but not _validated_, so it is very important that any `value` change is valid (ie. correct type and within bounds) for its respective parameter, eg. `MaxValidators` should be an integer and not a decimal.",(0,o.yg)("p",null,"Proper vetting of a parameter change proposal should prevent this from happening\n(no deposits should occur during the governance process), but it should be noted\nregardless.")),(0,o.yg)("div",{class:"theme-doc-version-banner info alert--warning margin-bottom--md",role:"info"},"The `SoftwareUpgrade` is currently not supported as it's not implemented and currently does not differ from the semantics of a `Text` proposal."),(0,o.yg)("h5",{id:"query-proposals"},"Query Proposals"),(0,o.yg)("p",null,"Once created, you can now query information of the proposal:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query gov proposal \n")),(0,o.yg)("p",null,"Or query all available proposals:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query gov proposals\n")),(0,o.yg)("p",null,"You can also query proposals filtered by ",(0,o.yg)("inlineCode",{parentName:"p"},"voter")," or ",(0,o.yg)("inlineCode",{parentName:"p"},"depositor")," by using the corresponding flags."),(0,o.yg)("p",null,"To query for the proposer of a given governance proposal:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query gov proposer \n")),(0,o.yg)("h4",{id:"increase-deposit"},"Increase Deposit"),(0,o.yg)("p",null,"In order for a proposal to be broadcasted to the network, the amount deposited must be above a ",(0,o.yg)("inlineCode",{parentName:"p"},"minDeposit")," value (initial value: ",(0,o.yg)("inlineCode",{parentName:"p"},"512000000uatom"),"). If the proposal you previously created didn't meet this requirement, you can still increase the total amount deposited to activate it. Once the minimum deposit is reached, the proposal enters voting period:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},'gaiad tx gov deposit "10000000uatom" \\\n --from= \\\n --chain-id=\n')),(0,o.yg)("p",null,(0,o.yg)("em",{parentName:"p"},"NOTE"),": Proposals that don't meet this requirement will be deleted after ",(0,o.yg)("inlineCode",{parentName:"p"},"MaxDepositPeriod")," is reached."),(0,o.yg)("h5",{id:"query-deposits"},"Query Deposits"),(0,o.yg)("p",null,"Once a new proposal is created, you can query all the deposits submitted to it:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query gov deposits \n")),(0,o.yg)("p",null,"You can also query a deposit submitted by a specific address:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad query gov deposit \n")),(0,o.yg)("h4",{id:"vote-on-a-proposal"},"Vote on a Proposal"),(0,o.yg)("p",null,"After a proposal's deposit reaches the ",(0,o.yg)("inlineCode",{parentName:"p"},"MinDeposit")," value, the voting period opens. Bonded ",(0,o.yg)("inlineCode",{parentName:"p"},"Atom")," holders can then cast vote on it:"),(0,o.yg)("pre",null,(0,o.yg)("code",{parentName:"pre",className:"language-bash"},"gaiad tx gov vote \\\n --from= \\\n --chain-id=