Skip to content

Commit

Permalink
Merge branch 'main' into gas-estimation-update
Browse files Browse the repository at this point in the history
  • Loading branch information
jlwllmr authored Oct 3, 2024
2 parents 6d3277b + 05c9ea2 commit e441c5b
Show file tree
Hide file tree
Showing 12 changed files with 209 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Module limits
description: How module limits ensure the prover can generate proofs.
sidebar_position: 3
image: /img/socialCards/module-limits.jpg
---

Linea uses module limits to keep proof complexity manageable and ensure that the prover can
Expand Down
24 changes: 21 additions & 3 deletions docs/developers/guides/finalized-block.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ image: /img/socialCards/retrieve-finalized-l2-blocks.jpg

:::info

The `finalized` tag is only available on Linea Sepolia, and will be activated on Mainnet soon.
The `finalized` tag is only available on Linea Sepolia, and [will be fully activated on Mainnet
on October 9](../linea-version/index.mdx#alpha-v350).

`eth_getBlockByNumber` is the exception, and is already active on Linea Mainnet.

:::

Expand All @@ -30,10 +33,25 @@ curl https://rpc.linea.build \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["finalized",false],"id":1}'
```

### Supported methods

`eth_getBlockByNumber` is currently the only JSON-RPC API method that supports the `finalized` tag
on Linea. Support for the `finalized` tag will be added to other JSON-RPC API methods from October
9, 2024.

:::note

The `finalized` tag works with all JSON-RPC API methods on Linea Mainnet if you are using a node
running the Besu client.

:::

## Query the rollup contract

Query the [Linea L1 rollup contract](https://etherscan.io/address/0xd19d4b5d358258f05d7b411e21a1460d11b0876f#readProxyContract)
to retrieve the value of the current finalized L2 block number stored in the `currentL2BlockNumber` variable.
Using the `finalized` tag in JSON-RPC API calls is recommended. As an alternative, you can query
the [Linea L1 rollup contract](https://etherscan.io/address/0xd19d4b5d358258f05d7b411e21a1460d11b0876f#readProxyContract)
to retrieve the value of the current finalized L2 block number stored in the `currentL2BlockNumber`
variable.

### Prerequisites

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: linea_getTransactionExclusionStatusV1
description: Reference content for the linea_getTransactionExclusionStatusV1 method.
image: /img/socialCards/lineagettransactionexclusionstatusv1.jpg
---

import Tabs from '@theme/Tabs';
Expand Down
4 changes: 4 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const config = {
locales: ["en"],
},

scripts: [
{src: "/js/getfeedback.js", defer: true, async: true}
],

markdown: {
mermaid: true,
},
Expand Down
2 changes: 2 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ gcnodes
gcsize
gctime
genkey
getfeedback
getopts
gettransactionexclusionstatusv
gitgraph
Expand Down Expand Up @@ -895,6 +896,7 @@ upserts
upvotes
urdqt
urlset
usabilla
USDL
USDLR
usecase
Expand Down
11 changes: 11 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -914,3 +914,14 @@ html[data-theme="dark"] .navbar {
.footer__copyright {
color: var(--banner-text);
}

/* Necessary for enabling GetFeedback widgets to display */

.getfeedback-container {
margin-top: 50px;
margin-bottom: -2rem;
}

.getfeedback-hidden {
display: none !important;
}
36 changes: 36 additions & 0 deletions src/theme/DocItem/Layout/GetFeedback.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React, { useState, useEffect, useRef } from "react";
import { useColorMode } from "@docusaurus/theme-common";

const GetFeedback = (props) => {
const feedbackContRef = useRef();
const { colorMode } = useColorMode();
const [theme, setTheme] = useState();

useEffect(() => {
setTheme(colorMode);
}, [colorMode]);

useEffect(() => {
setTheme(window?.localStorage?.getItem("theme") || colorMode);
window.usabilla.load("w.usabilla.com", "a0e35f23333a");
}, []);

return (
<div className="getfeedback-container">
{/*Light*/}
<div
ub-in-page="66fd19777582bd0f0b3f8314"
className={theme === "dark" ? "getfeedback-hidden" : undefined}
ref={feedbackContRef}
/>
{/*Dark*/}
<div
ub-in-page="66fd1931467c23680b03167d"
className={theme === "light" ? "getfeedback-hidden" : undefined}
ref={feedbackContRef}
/>
</div>
);
};

export default GetFeedback;
59 changes: 59 additions & 0 deletions src/theme/DocItem/Layout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from 'react';
import clsx from 'clsx';
import {useWindowSize} from '@docusaurus/theme-common';
import {useDoc} from '@docusaurus/plugin-content-docs/client';
import DocItemPaginator from '@theme/DocItem/Paginator';
import DocVersionBanner from '@theme/DocVersionBanner';
import DocVersionBadge from '@theme/DocVersionBadge';
import DocItemFooter from '@theme/DocItem/Footer';
import DocItemTOCMobile from '@theme/DocItem/TOC/Mobile';
import DocItemTOCDesktop from '@theme/DocItem/TOC/Desktop';
import DocItemContent from '@theme/DocItem/Content';
import DocBreadcrumbs from '@theme/DocBreadcrumbs';
import ContentVisibility from '@theme/ContentVisibility';
import styles from './styles.module.css';
import GetFeedback from './GetFeedback';

/**
* Decide if the toc should be rendered, on mobile or desktop viewports
*/
function useDocTOC() {
const {frontMatter, toc} = useDoc();
const windowSize = useWindowSize();
const hidden = frontMatter.hide_table_of_contents;
const canRender = !hidden && toc.length > 0;
const mobile = canRender ? <DocItemTOCMobile /> : undefined;
const desktop =
canRender && (windowSize === 'desktop' || windowSize === 'ssr') ? (
<DocItemTOCDesktop />
) : undefined;
return {
hidden,
mobile,
desktop,
};
}
export default function DocItemLayout({children}) {
const docTOC = useDocTOC();
const {metadata} = useDoc();
return (
<div className="row">
<div className={clsx('col', !docTOC.hidden && styles.docItemCol)}>
<ContentVisibility metadata={metadata} />
<DocVersionBanner />
<div className={styles.docItemContainer}>
<article>
<DocBreadcrumbs />
<DocVersionBadge />
{docTOC.mobile}
<DocItemContent>{children}</DocItemContent>
<GetFeedback />
<DocItemFooter />
</article>
<DocItemPaginator />
</div>
</div>
{docTOC.desktop && <div className="col col--3">{docTOC.desktop}</div>}
</div>
);
}
10 changes: 10 additions & 0 deletions src/theme/DocItem/Layout/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.docItemContainer header + *,
.docItemContainer article > *:first-child {
margin-top: 0;
}

@media (width >= 997px) {
.docItemCol {
max-width: 75% !important;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/socialCards/module-limits.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions static/js/getfeedback.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/* eslint-disable */
window.usabilla ||
(function () {
var a = window,
d = a.document,
c = {},
f = d.createElement("div"),
h = !1,
a = (a.usabilla = function () {
(c.a = c.a || []).push(arguments);
});
a._ = c;
c.ids = {};
f.style.display = "none";
(function () {
if (!d.body) return setTimeout(arguments.callee, 100);
d.body.insertBefore(f, d.body.firstChild).id = "usabilla";
h = !0;
})();
a.load = function (a, g, k) {
if (!c.ids[g]) {
var e = (c.ids = {});
e.url = "//" + a + "/" + g + ".js?s1";
e.config = k;
setTimeout(function () {
if (!h) return setTimeout(arguments.callee, 100);
var b = d.createElement("iframe"),
a;
b.id = "usabilla-" + g;
/MSIE[ ]+6/.test(navigator.userAgent) && (b.src = "javascript:false");
f.appendChild(b);
try {
b.contentWindow.document.open();
} catch (c) {
(e.domain = d.domain),
(a =
"javascript:var d=document.open();d.domain='" +
e.domain +
"';"),
(b.src = a + "void(0);");
}
try {
var l = b.contentWindow.document;
l.write(
[
"<!DOCTYPE html><html><head></head><body onload=\"var d = document;d.getElementsByTagName('head')[0].appendChild(d.createElement('script')).src='",
e.url,
"'\"></body></html>",
].join("")
);
l.close();
} catch (m) {
b.src =
a +
'd.write("' +
loaderHtml().replace(/"/g, String.fromCharCode(92) + '"') +
'");d.close();';
}
b.contentWindow.config = k;
b.contentWindow.SCRIPT_ID = g;
}, 0);
}
};
})();

0 comments on commit e441c5b

Please sign in to comment.