Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: merge upstream #99

Merged
merged 75 commits into from
Feb 22, 2023
Merged

feat: merge upstream #99

merged 75 commits into from
Feb 22, 2023

Conversation

alexshliu
Copy link

No description provided.

protolambda and others added 30 commits December 13, 2022 13:31
This change adds a top-level go.work file containing all Go-based simulators
as well as the hive module. Joining the modules in a workspace makes it
possible to easily share code among simulators.

When simulators share code, the imported simulator modules need to be
made available in the docker build environment. To facilitate this, the docker
image build context can now be configured using a special file in the simulator
directory.

Co-authored-by: Felix Lange <fjl@twurst.com>
…thereum#662)

Hive can now authenticate to the registry when building images.
This allows users to run tests against private docker images in cases
where they may not want a pre-prod image to be exposed publicly.

Co-authored-by: Felix Lange <fjl@twurst.com>
simulators/ethereum/consensus: Add TTD to Merge config
…n rpc-compat failure (ethereum#661)


Signed-off-by: mark-terry <mark.terry@consensys.net>
Co-authored-by: Felix Lange <fjl@twurst.com>
* simulators/ethereum/engine: Withdrawals Sanity test

* simulators/ethereum/engine: CLMock changes

* simulators/ethereum/engine: Add timestamp global

* simulators/ethereum/engine: Withdrawals required changes

* simulators/ethereum/engine: Fix request payload

* simulators/ethereum/engine: Withdrawals tests

* simulators/ethereum/engine:  Withdrawals tests update

* simulators/ethereum/engine: Test spec interface

* simulators/ethereum/engine: Add withdrawals test cases

* simulators/ethereum/engine: Withdraw many accounts fix

* simulators/ethereum/engine: Withdrawals sync tests

* simulators/ethereum/engine: Withdrawals re-org

* simulators/ethereum/engine:  More withdrawals tests

* simulators/ethereum/engine: Variable timestamp increments on CLMock

* simulators/ethereum/engine: Withdrawals reorg changes

* simulators/ethereum/engine: withdrawals reorg tests

* simulators/ethereum/engine: Add LVH check

* simulators/ethereum/engine: Dynamic genesis

* simulators/ethereum/engine: Fix HTTP Transport usage

* simulators/ethereum/engine: Roundtrip change

* simulator/ethereum/engine: Add txs to withdrawal tests

* simulators/ethereum/engine: Decrease withdrawals count

* simulators/ethereum/engine: Withdrawals test change

* simulators/ethereum/engine: Withdrawals, comments

* simulators/ethereum/engine: fix lvh in withdrawals

* simulators/ethereum/engine: go mod tidy

* simulators/ethereum/engine: Fix lvh check on genesis

* simulators/ethereum/engine: Fix long sync test

* simulators/ethereum/engine: Fix sync tests take 2

* simulators/ethereum/engine: Add blockValue to getPayload

* simulators/ethereum/engine: withdrawals, wei to gwei

* simulators/ethereum/engine: fix genesis block

* simulators/ethereum/engine: implement error code expect check

* simulators/ethereum/engine: withdrawals, expect errors on invalid version

* simulators/ethereum/engine: Withdrawals readme

* simulators/ethereum/engine: update withdrawals readme

* simulators/ethereum/engine: update test parameter, description

* simulators/ethereum/engine: update branch

* simulators/ethereum/engine: Support querying txs from client

* simulators/ethereum/engine: Add eip 3860 invalid tx test

* simulators/ethereum/engine: fix gaslimit everywhere

Co-authored-by: marioevz <marioevz@gmail.com>
…ys (ethereum#674)

* Add bootnode check to avoid duplicated enode address

* Add shanghaiTime to mapper.jq

Co-authored-by: gfukushima <gabriel.fukushima@gmail.com>
…um#681)

This adds a simulator and tests for the Capella beacon chain fork (including withdrawals).

There are no client changes here. Some CL client definitions will not pass these tests in
their default branch and will require an explicit capella branch specification.

As part of factoring out the eth2 testnet setup code into a standalone library, this change
introduces a 'Go workspace' containing all eth2 simulator sub-modules. When hive builds
the simulator, it will now use ./simulators/eth2 as the base directory and will locate the
./simulators/eth2/common module via the go.work file. When building the simulators
outside of docker, the go tool locates the go.work file as well.

Co-authored-by: marioevz <marioevz@gmail.com>
…pected (ethereum#685)

This adds precise checking of EL balances after withdrawals have been processed.
There was an issue in the withdrawals calculations so that, when the chain
missed a slot, it aborted with error, but it's normal to miss a block in a slot.
Now the computing method allows to skip a slot, and the calculations are
still correct, the test passes for client combinations that might occasionally
miss a slot.
fjl and others added 24 commits February 8, 2023 20:55
This should fix issues with browser caching in the frontend. Ever since the
app was split up into multiple JS files, the page would occasionally fail
to load because the browser did not refresh some of the JS files when they
were modified.

In `hiveview -serve` mode, the new bundling system works like this:

- In deploy.go, we maintain a static list of 'bundle targets'. The targets
  correspond with the app's entry point JS/CSS files.

- Whenever one of the HTML files is requested, the server traverses the
  document and replaces references to bundle targets with a path to the built
  bundle. For example, <script src="/lib/app.js"> is replaced by
  <script src="/bundle/app.XXXX.js"> where XXXX is the bundle hash.

- Bundle outputs are stored in memory, and bundles are rebuilt whenever
  necessary, i.e. whenever one of their inputs has changed.

Making the JS code work with esbuild required some dependency re-structuring.
All external JS libraries were updated to the ES module version provided by
upstream. I had previously worked around the lack of ES module compatibility by
providing a small 'module wrapper' for each library, but this workaround broke
under esbuild.

However, upgrading everything to ES modules created another issue: most
libraries use named imports (`import "jquery"`), which can't be resolved
directly by the browser. Making the app load from un-bundled sources requires
an importmap. So, when use of the bundle is disabled by the -assets.nobundle
flag, hiveview writes an importmap into the document. The same importmap
definition is also used by esbuild to resolve named imports at build time.

All this means the app can no longer be served directly from assets/. If you
just pointed nginx at the assets/ directory and opened index.html, loading of
app.js would fail because the document doesn't have an importmap. And it
wouldn't use the bundle either. Serving the frontend with a server that isn't
`hiveview -serve`, like we do for production hive, now requires running
`hiveview -deploy <dir>` to install the fully-built app into a new directory.
In ethereum#708, I introduced a lot of logic to create CSS/JS bundles on demand. It turns out that
the way I implemented bundling was a bit misguided, because I was operating under the
basic assumption that esbuild will always create exactly one output file for every entrypoint.
This breaks when it tries to copy assets or performs code splitting. So, instead of doing
incremental builds ourself, just let esbuild do its thing and copy all of the files it produces
into the output FS.

As a bonus, enabling code splitting makes it possible to have one entry point for each page.
…fter client sync (ethereum#709)

Adds a test that verifies engine_getPayloadBodiesByRangeV1 and engine_getPayloadBodiesByHashV1
behavior after client syncs to a given canonical chain.
…on Client (ethereum#712)

* simulators/eth2/common: Add library to check expired endpoints based on timestamp

* simulators/eth2/withdrawals: verify V1 endpoints indeed deprecated by beacon clients at capella

* simulators/eth2/common: fix check on empty payload attributes
…#713)

- Test transactions are now sent in batch for the withdrawals re-org tests,
   which leads to faster execution times.
- Re-Org tests now have a higher timeout limit (EthereumJS was failing the
   tests only due to timeout).
…/ethereum/graphql (ethereum#718)

build(deps): bump golang.org/x/net in /simulators/ethereum/graphql

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/smoke/network (ethereum#719)

build(deps): bump golang.org/x/net in /simulators/smoke/network

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/ethereum/rpc (ethereum#720)

build(deps): bump golang.org/x/net in /simulators/ethereum/rpc

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/ethereum/consensus (ethereum#721)

build(deps): bump golang.org/x/net in /simulators/ethereum/consensus

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/smoke/clique (ethereum#725)

build(deps): bump golang.org/x/net in /simulators/smoke/clique

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/ethereum/engine (ethereum#726)

build(deps): bump golang.org/x/net in /simulators/ethereum/engine

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/ethereum/rpc-compat (ethereum#722)

build(deps): bump golang.org/x/net in /simulators/ethereum/rpc-compat

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/devp2p (ethereum#723)

build(deps): bump golang.org/x/net in /simulators/devp2p

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.5.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…18 (ethereum#716)

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.6 to 1.6.18.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](containerd/containerd@v1.6.6...v1.6.18)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/smoke/genesis (ethereum#727)

build(deps): bump golang.org/x/net in /simulators/smoke/genesis

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…/ethereum/sync (ethereum#728)

build(deps): bump golang.org/x/net in /simulators/ethereum/sync

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@alexshliu alexshliu self-assigned this Feb 22, 2023
@alexshliu alexshliu merged commit 91cc394 into taiko Feb 22, 2023
@alexshliu alexshliu deleted the feat/upstream branch February 22, 2023 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.