Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Fevm checkpoint #228

Merged
merged 37 commits into from
Jul 5, 2023
Merged

Fevm checkpoint #228

merged 37 commits into from
Jul 5, 2023

Conversation

cryptoAtwill
Copy link
Contributor

@cryptoAtwill cryptoAtwill commented Jun 15, 2023

Initial implementation of FEVM checkpoint.

Update 20230616: Add checkpoint skeleton.

@cryptoAtwill cryptoAtwill changed the base branch from main to create_join June 15, 2023 06:48
Copy link
Contributor

@adlrocha adlrocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM. But I am wondering if we can de-duplicate some code between the fevm and fvm checkpoint managers for bottom-up and top-down. I feel they both implement the same logic and what really changes is the underlying type of the subnet manager that interacts with the blockchian. WDYT?

.await
}

async fn presubmission_check(&self) -> anyhow::Result<bool> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the purpose of this function and why it is always true?

@cryptoAtwill cryptoAtwill changed the base branch from create_join to update_config June 19, 2023 06:42
@cryptoAtwill cryptoAtwill changed the title [WIP] Fevm checkpoint Fevm checkpoint Jun 19, 2023
cryptoAtwill and others added 2 commits June 19, 2023 10:43
* update evm config

* update no create subnet
* wip

* update new checkpoint

* initial bottom up impl

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Initial impl for top down (#233)

* initial impl for top down

* lint

* merge files

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>
@adlrocha adlrocha merged commit 2441228 into update_config Jul 5, 2023
@adlrocha adlrocha deleted the fevm_checkpoint branch July 5, 2023 17:06
adlrocha added a commit that referenced this pull request Jul 12, 2023
* update config to new format

* Update src/config/deserialize.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* create and join for evm

* update abi

* update ethers

* update params

* add debug log

* temp solution

* log more

* swap order

* add root

* update create subnet constructor

* use u128 for value over u64

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* update based on review

* update ipc crate

* update evm

* update route

* update subnet registry abi

* fix err

* fix err

* update route

* lint

* generalize checkpointing (#227)

* initial commit

* update subnet id contract

* initial commit

* add submit checkpoint placeholder:

* lint

* add checkpoint skeleton

* update get bottom up checkpoints

* update crates

* add list top down msgs

* wip

* update new checkpoint

* initial bottom up impl

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Initial impl for top down (#233)

* initial impl for top down

* lint

* merge files

* add initialization

* add logs

* update account checks

* update testing

* update testing

* update admin token in tests

* more logs

* logs for setup

* update init

* add more error messages

* update abi

* update method name

* Query validator set (#234)

* support eth query validator set

* fix lint

* Update src/manager/evm/manager.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* logging

* filter non managed validators

* update filter manager

* fix configuration number

* support fvm address in evm

* fvm worker equal addr

* add worker addr

* from address hash

* fix has submitted check

* more logs

* fix epoch 0

* fix epoch 0

* more error logs

* wrap call

* fix error

* fix error

* fix error

* Integrate new subnet registry implementation (#237)

* integrate new subnet registry impl

* evm manager fix addr

* Update bottom up checkpoint previous checkpoint hash  (#238)

* consistent prev hash

* update last executed epoch

* lint

* Fund and release implementation (#239)

* add fund

* add release

* integrate new contracts and integration

---------

Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
Co-authored-by: cryptoAtwill <willes.lau@protocol.ai>
Co-authored-by: cryptoAtwill <108330426+cryptoAtwill@users.noreply.github.com>

* fix get top down messages with nonce

* add more logs

* fix type conversion

* more logs in error

* more logs to conversion

* tmp fix bottom up ipc address

* diff address

* log error

* more logs

* fix value conversioin

* update types

* update tests

* update cargo

* update crate versions

* fix test

* Apply suggestions from code review

* fix fmt

* address review

* Fevm checkpoint (#228)

* create and join for evm

* update abi

* update ethers

* update params

* add debug log

* temp solution

* log more

* swap order

* add root

* update create subnet constructor

* use u128 for value over u64

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* Update src/manager/evm.rs

Co-authored-by: adlrocha <adlrocha@tutamail.com>

* update based on review

* update ipc crate

* update evm

* update route

* update subnet registry abi

* fix err

* fix err

* update route

* lint

* generalize checkpointing (#227)

* initial commit

* update subnet id contract

* initial commit

* add submit checkpoint placeholder:

* lint

* add checkpoint skeleton

* update get bottom up checkpoints

* update crates

* add list top down msgs

* Updates from Integration testing (#230)

* update evm config

* update no create subnet

* Fevm fvm checkpoint (#232)

* wip

* update new checkpoint

* initial bottom up impl

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Update src/manager/evm/conversion.rs

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Initial impl for top down (#233)

* initial impl for top down

* lint

* merge files

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

---------

Co-authored-by: adlrocha <adlrocha@tutamail.com>
Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* fix linting

* update test infra

* update tests

* increase timeout to support mainnet/calibration (#250)

* Add evm key store (#245)

* add evm key store

* add headers

* fix formatting

* relax trait bound

* update trait bound

* add features

* add features

* add more tests

* lint

* shift code location

* lint

* Integrate evm key store (#249)

* initial impl

* change address type

* integrate evm key store

* fix provider

* remove private key in config

* rename fvm_keystore to fvm_wallet

* Import evm wallet (#251)

* import evm wallet

* lint

* Fix keystore after integration testing (#252)

* fix evm key store filename

* fix evm key store filename

* hex encode evm private key

* add missing crate

* more logs

* log

* fix join subnet

* fix join subnet

* fix top down target subnet to parent

* fix top down target subnet to child

* fix itest

* fix create itest

* itest use agent from

* Update identity/src/evm/persistent.rs

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>

* Fix evm keystore comments (#253)

* increase timeout to support mainnet/calibration (#250)

* fix comments

* update comment

* update comment

* specify key type for fvm keys

* fix serde type

* lint

* lint

* fix import evm format

* increase timeout

* List subnet (#254)

* add subnet support

* update status mapping

* update gateway abi

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>
Co-authored-by: Alfonso de la Rocha <adlrocha@tutamail.com>

---------

Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>
Co-authored-by: Alfonso de la Rocha <adlrocha@tutamail.com>

* Import private key for evm (#255)

* import private key for evm

* handle 0x

* docs to deploy IPC Solidity in calibration (#246)

* docs to deploy IPC Solidity in calibration

* update with evm support

* Update docs/calibration-solidity.md

Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com>

---------

Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com>

---------

Signed-off-by: Alfonso de la Rocha <adlrocha@tutamail.com>
Co-authored-by: adlrocha <adlrocha@tutamail.com>
Co-authored-by: adlrocha <6717133+adlrocha@users.noreply.github.com>
Co-authored-by: Jorge Soares <547492+jsoares@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants