Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fast-actors-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/l2geth': patch
---

Fix `eth_getBlockRange`
5 changes: 5 additions & 0 deletions .changeset/gorgeous-squids-speak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/l2geth': patch
---

Add system addresses for nightly goerli
5 changes: 5 additions & 0 deletions .changeset/seven-poets-search.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/contracts': patch
---

Add Teleportr mainnet deployment
5 changes: 5 additions & 0 deletions .changeset/tasty-adults-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/core-utils': patch
---

Add a `calldataCost` function that computes the cost of calldata
5 changes: 5 additions & 0 deletions .changeset/twelve-suits-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/integration-tests': patch
---

Fix various actor tests
5 changes: 5 additions & 0 deletions .changeset/warm-points-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/core-utils': patch
---

Adds a one-liner for getting chain ID from provider
8 changes: 5 additions & 3 deletions integration-tests/actor-tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ actor('Value sender', () => {

setupRun(async () => {
const wallet = Wallet.createRandom()
await env.l2Wallet.sendTransaction({
const tx = await env.l2Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('0.01'),
})
await tx.wait()
return {
wallet: wallet.connect(env.l2Wallet.provider),
}
Expand All @@ -61,10 +62,11 @@ actor('Value sender', () => {
run(async (b, ctx: Context) => {
const randWallet = Wallet.createRandom().connect(env.l2Wallet.provider)
await b.bench('send funds', async () => {
await ctx.wallet.sendTransaction({
const tx = await ctx.wallet.sendTransaction({
to: randWallet.address,
value: 0x42,
})
await tx.wait()
})
expect(await randWallet.getBalance()).to.deep.equal(BigNumber.from(0x42))
})
Expand Down Expand Up @@ -163,4 +165,4 @@ actor_successful_actor_runs_total{actor_name="value_sender"} 40

# HELP actor_failed_actor_runs_total Count of total failed actor runs.
# TYPE actor_failed_actor_runs_total counter
```
```
11 changes: 7 additions & 4 deletions integration-tests/actor-tests/deposits.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ actor('Funds depositor', () => {

setupRun(async () => {
const wallet = Wallet.createRandom()
await env.l1Wallet.sendTransaction({
const tx = await env.l1Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('0.01'),
})
await tx.wait()
return {
l1Wallet: wallet.connect(env.l1Wallet.provider),
l2Wallet: wallet.connect(env.l2Wallet.provider),
Expand All @@ -36,16 +37,18 @@ actor('Funds depositor', () => {
const balBefore = await l2Wallet.getBalance()
await b.bench('deposit', async () => {
await env.waitForXDomainTransaction(
env.l1Bridge
env.messenger.contracts.l1.L1StandardBridge
.connect(l1Wallet)
.depositETH(DEFAULT_TEST_GAS_L2, '0xFFFF', {
value: 0x42,
gasLimit: DEFAULT_TEST_GAS_L1,
})
)
})
expect((await l2Wallet.getBalance()).sub(balBefore)).to.deep.equal(
BigNumber.from(0x42)
// Converting BigNumber to hex string prevents chai from incorrectly considering inherited properties
// for strict equality - https://github.com/chaijs/chai/issues/948
expect((await l2Wallet.getBalance()).sub(balBefore).toString()).to.deep.equal(
BigNumber.from(0x42).toString()
)
})
})
3 changes: 2 additions & 1 deletion integration-tests/actor-tests/nft.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ actor('NFT claimer', () => {

setupRun(async () => {
const wallet = Wallet.createRandom().connect(env.l2Wallet.provider)
await env.l2Wallet.sendTransaction({
const tx = await env.l2Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('0.01'),
})
await tx.wait()
return {
wallet,
contract: contract.connect(wallet),
Expand Down
6 changes: 4 additions & 2 deletions integration-tests/actor-tests/sends.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ actor('Value sender', () => {

setupRun(async () => {
const wallet = Wallet.createRandom()
await env.l2Wallet.sendTransaction({
const tx = await env.l2Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('0.01'),
})
await tx.wait()
return {
wallet: wallet.connect(env.l2Wallet.provider),
}
Expand All @@ -29,10 +30,11 @@ actor('Value sender', () => {
run(async (b, ctx: Context) => {
const randWallet = Wallet.createRandom().connect(env.l2Wallet.provider)
await b.bench('send funds', async () => {
await ctx.wallet.sendTransaction({
const tx = await ctx.wallet.sendTransaction({
to: randWallet.address,
value: 0x42,
})
await tx.wait()
})
expect((await randWallet.getBalance()).toString()).to.deep.equal('66')
})
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/actor-tests/state-dos.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ actor('Trie DoS accounts', () => {

setupRun(async () => {
const wallet = Wallet.createRandom()
await env.l2Wallet.sendTransaction({
const tx = await env.l2Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('1'),
})
await tx.wait()
return {
wallet: wallet.connect(env.l2Wallet.provider),
}
Expand Down
3 changes: 2 additions & 1 deletion integration-tests/actor-tests/uniswap.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ actor('Uniswap swapper', () => {
setupRun(async () => {
const wallet = Wallet.createRandom().connect(env.l2Provider)

await env.l2Wallet.sendTransaction({
const sendTx = await env.l2Wallet.sendTransaction({
to: wallet.address,
value: utils.parseEther('0.1'),
})
await sendTx.wait()

for (const token of tokens) {
let tx = await token.transfer(wallet.address, 1000000)
Expand Down
10 changes: 7 additions & 3 deletions l2geth/internal/ethapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ import (
)

var (
errNoSequencerURL = errors.New("sequencer transaction forwarding not configured")
errStillSyncing = errors.New("sequencer still syncing, cannot accept transactions")
errNoSequencerURL = errors.New("sequencer transaction forwarding not configured")
errStillSyncing = errors.New("sequencer still syncing, cannot accept transactions")
errBlockNotIndexed = errors.New("block in range not indexed, this should never happen")
)

const (
Expand Down Expand Up @@ -780,9 +781,12 @@ func (s *PublicBlockChainAPI) GetBlockRange(ctx context.Context, startNumber rpc
// For each block in range, get block and append to array.
for number := startNumber; number <= endNumber; number++ {
block, err := s.GetBlockByNumber(ctx, number, fullTx)
if block == nil || err != nil {
if err != nil {
return nil, err
}
if block == nil {
return nil, errBlockNotIndexed
}
blocks = append(blocks, block)
}
return blocks, nil
Expand Down
6 changes: 6 additions & 0 deletions l2geth/rollup/rcfg/system_address.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ var SystemAddressDeployers = map[uint64]SystemAddressDeployer{
common.HexToAddress("0xc30276833798867c1dbc5c468bf51ca900b44e4c"),
common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"),
},

// Goerli nightly
421: {
common.HexToAddress("0xc30276833798867c1dbc5c468bf51ca900b44e4c"),
common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"),
},
}

var envSystemAddressDeployer SystemAddressDeployer
Expand Down
5 changes: 5 additions & 0 deletions l2geth/rollup/rcfg/system_address_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ func TestSystemAddressFor(t *testing.T) {
common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"),
420,
},
{
common.HexToAddress("0xc30276833798867c1dbc5c468bf51ca900b44e4c"),
common.HexToAddress("0x5c679a57e018f5f146838138d3e032ef4913d551"),
421,
},
}
for _, tt := range tests {
chainID := big.NewInt(tt.chainId)
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"ops/docker/js-builder"
],
"nohoist": [
"examples/*",
"**/typechain",
"**/@typechain/*"
]
Expand Down
Loading