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

sync latest changes from terence's eip rebase repo #12

Closed

Conversation

roberto-bayardo
Copy link
Collaborator

@roberto-bayardo roberto-bayardo commented Aug 17, 2022

pull latest changes from terence's eip4844 rebasing repo into the branch used by Inphi/eip4844-interop repo.

terencechain and others added 30 commits August 1, 2022 14:43
* Rename pow to execution

* Fix complain

* Fix complain
…", err) (prysmaticlabs#11143)

* Add analysis template with failing test

* Works for the most common use case

* Progress on tool and more test cases

* Improvements

* handle nil

* works for the most part

* Fix some TODOs in the tool

* Fix some TODOs in the tool
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* failing onBlock syncing

* passing merge check

* failing signature verification

* still failing block signature

* mock full bellatrix blocks

* working unit test

* return error from FCU if head fails to update

* move bellatrix block generator

* remove bellatrix signature function

* Add liveness unit tests

* revert removal of sync_aggregate.go

* gaz

* Terence's suggestion

Co-authored-by: terencechain <terence@prysmaticlabs.com>

* go fmt

* Nishant's suggestion

Co-authored-by: Nishant Das <nishdas93@gmail.com>

* Fix build

Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: Nishant Das <nishdas93@gmail.com>
* panic in SizeSSZ

* moving slowly

* adapt old code to new interfaces

* return interfaces from factory functions

* replace the rest of WrappedSignedBeaconBlock

* WrappedBeaconBlock

* WrappedBeaconBlockBody

* miscellaneous

* Test_BeaconBlockIsNil

* replace usages of BeaconBlockIsNil

* replace usages of mutator

* fix all build errors

* fix some more issues

* mutator changes

* relax assertions when initializing

* revert changes in object_mapping.go

* allow calling Proto on nil

* Revert "allow calling Proto on nil"

This reverts commit ecc84e4.

* modify Copy and Proto methods

* remove unused var

* fix block batch tests

* correct BUILD file

* Error when initializing nil objects

* one more error fix

* add missing comma

* rename alias to blocktest

* add logging

* error when SignedBeaconBlock is nil

* fix last test

* import fix

* broken

* working

* test fixes

* reduce complexity of processPendingBlocks

* simplified
* Add unit test for reboot behavior

* fix conflicts
* Native Blocks Ep. 3 - Remove old code

* rename back package

* fix errors
* Forkchoice: expose if no tip is viable

This PR changes the behavior on when the node is considered optimistic.
A call to `blockchain.IsOptimistic()` relies solely on forkchoice, if
all tips are invalid, then it's optimistic. If the current headroot is
not in forkchoice then it's optimistic.

A call to `blockchain.IsOptimisticForRoot()` will return true if the
requested root is headroot and it's not found in forkchoice

* update comment

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Wrap missing state for checkpoint error

* terence's review
* Remove unused proto import

* Update generated go files
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* Wallet edit CLI Manager migration

* TODO for code deduplication

* s/walletEdit/remoteWalletEdit/g

* s/walletEdit/remoteWalletEdit/g

* remove unused struct field

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
* Can recover from missing state summary in DB

* Tests

* fix tests

Co-authored-by: Potuz <potuz@prysmaticlabs.com>
* Revert --experimental-disable-boundary-checks

* add deprecation

* gaz

* spectests

* spectests fix

* fix previous justified checkpoint

* copy previous jcp

* Revert "copy previous jcp"

This reverts commit 6e2b865.

* update previous jcp on on_tick

Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* fix goodbye codes

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
…aticlabs#11171)

* Improve terminal difficulty has not been reached yet logging

* Update beacon-chain/execution/check_transition_config.go

Co-authored-by: mick <103775631+symbolpunk@users.noreply.github.com>

Co-authored-by: mick <103775631+symbolpunk@users.noreply.github.com>
…ysmaticlabs#11163)

* Use log.WithError static analysis from prysmaticlabs#11143 and fix all violations

* Fix another log violation after pulling from develop

* Update beacon-chain/sync/pending_blocks_queue.go

Co-authored-by: Potuz <potuz@prysmaticlabs.com>

* @potuz feedback

* Copy paste fail

* fix tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Potuz <potuz@prysmaticlabs.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
* save progress

* tidy

* Update go.yml

* make CI happy

* gosec

* revert back

* Update go.yml

* change go version

* remove fixed test case

* fix ci

* fix updates

* fix up

* fix race tests

* fix bad mock

* lock it

* fix it

* fix e2e builds

* use gotags

* Revert "use gotags"

This reverts commit 808863f.

* Revert "fix e2e builds"

This reverts commit eb351e7.

* Revert "fix it"

This reverts commit 9e99dac.

* Revert "lock it"

This reverts commit 1a3c60a.

* different approach

* better

Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
rauljordan and others added 13 commits August 19, 2022 09:26
* genesis tool

* done with tool

* delete old tool

* no fatal

* fix up

* Update cmd/prysmctl/testnet/generate_genesis.go

Co-authored-by: Radosław Kapka <rkapka@wp.pl>

* radek feedback

* more feedback

* required

* fix up

* gaz

* radek feedback

Co-authored-by: Radosław Kapka <rkapka@wp.pl>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* DoublyLinkedTree double locks

* fix updateCheckpoints

* add comment

Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
New spectests ensure that we call on_tick for every slot between the
last tick and the current one. This PR fixes that

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terencechain <terence@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
* setting gas limit as string in json and yaml

* adding more tests

* fixing unit test

* fixing string conversion
* Insert attestations from blocks to forkchoice

* do not insert twice

* use OnAttestation instead

* Revert "use OnAttestation instead"

This reverts commit 577c37b.

* unit test

* fix test

* Update beacon-chain/blockchain/receive_block_test.go

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: terencechain <terence@prysmaticlabs.com>
@roberto-bayardo roberto-bayardo marked this pull request as draft August 22, 2022 02:19
@roberto-bayardo
Copy link
Collaborator Author

The following commit is the first one where I notice the e2e test starts failing:

"Encapsulate sidecar within signed block interface"

The sidecar pointer is added at the top level and since the Block type has a non-pointer receiver, setting the sidecar is a no-op (it modifies only a temporary copy).

There's a good chance this is fixed in a later change as it seems later commits affect this particular code quite a bit, so not sure if this is going to end up relevant to the current issue.

@Inphi
Copy link
Owner

Inphi commented Aug 23, 2022

There's a good chance this is fixed in a later change as it seems later commits affect this particular code quite a bit, so not sure if this is going to end up relevant to the current issue.

Do you mean this bug could be fixed on the latest upstream? Prysm just put out a 3.0 merge release. Worth rebasing that since that should be stable enough.

@terencechain
Copy link

There's a good chance this is fixed in a later change as it seems later commits affect this particular code quite a bit, so not sure if this is going to end up relevant to the current issue.

Worth rebasing that since that should be stable enough.

I've rebased it here: terencechain#1

@roberto-bayardo roberto-bayardo force-pushed the roberto-bayardo/update-rebase branch from 75ae2ac to f0da81e Compare August 25, 2022 18:39
@roberto-bayardo
Copy link
Collaborator Author

I just rebased against the latest version of @terencechain 's eip repo to get the v3 changes in but chain is still not advancing. Will continue digging....

@roberto-bayardo
Copy link
Collaborator Author

Let me close this PR as it's become quite a mess. I'll re-open when I get things in a better state.

@terencechain
Copy link

terencechain commented Aug 28, 2022

clone https://github.com/Inphi/eip4844-interop and then "make devnet-up" to make sure it's working (you should see the beacon-node advancing properly....)

then cd into the prysm submodule and checkout my branch (roberto-bayardo/update-rebase) ... "make devnet-clean" followed by "make devnet-up" and then you should see the beacon-node failing to make progress.

make devnet-up failed #0 0.329 go: go.mod file not found in current directory or any parent directory; see 'go help modules'... Will look into this...

Resolved. Sorry for the noise. Fixing the flags now

@roberto-bayardo
Copy link
Collaborator Author

roberto-bayardo commented Aug 28, 2022 via email

@terencechain
Copy link

I've taken a closer look...
The first issue is it fails to propose a block at the start. Times out when broadcasting. --min-sync-peers=0 in docker-compose didn't work for me for some reason. I manually added it to run_beacon_node.sh, and that's been resolved
The second issue is post-Bellatrix, the node is always in optimistic mode. This is usually due to the execution layer client up and how ttd is configured. I haven't had a chance to look into this yet

@roberto-bayardo
Copy link
Collaborator Author

yeah I was seeing that too so just for grins I coded "isOptimistic" to always return false, but at that point I just see it re-proposing the fork block over and over again.

@Inphi
Copy link
Owner

Inphi commented Aug 28, 2022

The old clean-slate branch made a couple changes to optimistic sync and fork choice. We no longer need those changes with coupled blocks. Wanna make sure that those changes werent merged here.

@roberto-bayardo roberto-bayardo deleted the roberto-bayardo/update-rebase branch November 17, 2022 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.