Commit Graph
35 Commits
Author SHA1 Message Date
zeekay 8bc9dd01a8 Fix CI: Go version and script permissions
- Change Go version from 1.24.6 to 1.22.8 (stable version)
- Ensure all build scripts have executable permissions
- Fix covdata issue by using stable Go version
- CI should now pass all checks
2025-09-19 05:56:47 +00:00
zeekay f981fefee0 Fix all build errors after upstream merge
- Update consensus imports from luxfi/node/consensus to luxfi/consensus
- Remove all snow package references
- Fix utils/logging to use luxfi/log
- Update EIP-4844 API changes (CalcBlobFee, CalcExcessBlobGas)
- Add tracing.CodeChangeReason to SetCode calls
- Fix validators.GetCurrentValidatorOutput to GetValidatorOutput
- Fix wallet API changes (IssueCreateSubnetTx to IssueCreateNetTx)
- Fix VM interface compatibility between node and consensus packages
- Fix extstate.StateDB references to use state.StateDB
- Fix trienode API to use NodeWithPrev
- Remove duplicate files and unused code
- Update all dependencies to use externalized luxfi packages
2025-09-19 02:13:19 +00:00
zeekay 53674e1197 fix: ensure 100% build and test success for all packages
- Fixed pqcrypto ML-KEM/ML-DSA API compatibility with latest crypto library
- Fixed selector collision in pqcrypto precompile (mlkem_encapsulate vs mlkem_decapsulate)
- Fixed warp signer interface adapter for EVM plugin
- All tests now pass successfully
- 100% build success across node, geth, and evm packages
2025-08-24 02:56:56 +00:00
zeekay b1979b4a02 Update EVM 2025-08-01 01:23:42 +00:00
zeekay 3ad3898e74 Fix more tests 2025-07-28 02:25:05 +00:00
zeekay 88c11d21de Use go-ethereum under hood for v1 2025-07-26 19:55:05 +00:00
zeekay 8a4d08e0ae Re-organize consensus 2025-07-21 22:01:01 -05:00
zeekay 7d8b52af3f Update copyrights properly 2025-07-21 21:10:03 -05:00
zeekay 2a19fe59a2 Update EVM module to remove local replace directives 2025-07-20 06:38:41 +00:00
zeekay 8da155c1b1 Update imports 2025-07-18 01:55:16 +00:00
zeekay 5bde5ae476 fix: resolve merge conflicts in test files
- Fixed merge conflicts in precompile_config_test.go
- Fixed merge conflicts in block_test.go
- Fixed merge conflicts in test_statedb.go
2025-07-17 16:44:45 -05:00
zeekay 4ac513dba4 Merge upstream subnet-evm v0.7.5
Merged latest upstream changes from ava-labs/subnet-evm v0.7.5 while preserving Lux customizations:
- Updated copyright headers to Lux Industries Inc 2025
- Kept Lux branding and network references
- Preserved custom Lux configurations
- Updated dependencies to latest versions
- Removed deprecated files (trie/, core/vm/, etc)
- Updated import paths to use go-ethereum libraries where applicable
2025-07-03 23:56:17 -04:00
zeekay 1d04d6d04f Update copyright headers to Lux Industries Inc 2025
Updated all copyright headers from "Lux Partners Limited" to "Lux Industries Inc" and updated the year to 2025 to reflect the new holding company structure.
2025-07-03 23:49:31 -04:00
Darioush JalaliandGitHub 513c6fa7ab libevm phase 2: Use libevm statedb from upstream (#1421)
Co-authored-by: Arran Schlosberg <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Michael Kaplan <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Richard Pringle <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
Co-authored-by: Meaghan FitzGerald <[email protected]>
Co-authored-by: Quentin McGaw <[email protected]>
Co-authored-by: mountcount <[email protected]>
Co-authored-by: chuangjinglu <[email protected]>
Co-authored-by: guqicun <[email protected]>
Co-authored-by: Dmytrol <[email protected]>
fix problematic const name and some typos in comment (#1400)
fix some function names in interface comment (#1397)
close database on shutdown (#1403)
fix some function names in comment (#1405)
Fix Typos in Documentation (#1404)
fix test generator (#724)
2025-01-13 07:45:49 -08:00
6a8e82fad4 Bump avalanchego to master (#1268)
* Bump avalanchego to master

* Update avalanchego x (#1275)

* remove test tags

* use avago default

* revert ws diffs

* remove ginkgo test tags

---------

Co-authored-by: Ceyhun Onur <[email protected]>
2024-08-12 15:59:42 +00:00
5fed36811e Update avago 1.11.10 rc0 (#1241)
* Update to latest p2p API (#594)

* sdk app errors

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nti

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nit

Signed-off-by: Joshua Kim <[email protected]>

* nti

Signed-off-by: Joshua Kim <[email protected]>

---------

Signed-off-by: Joshua Kim <[email protected]>

* update go mod

* Remove block.Status (#593)

* Remove block.Status

* nit

* nit

* nit

* update coreth indirect dep

* fix linter

* use rc.0 tag for e2e tests

* eupgrade: base definitions (#603)

* eupgrade: base definitions

* updates

* nit: consistently use EUpgrade for replace later

* update test configs

* refactor json genesis specs in vm_test.go

* Update params/config.go

Signed-off-by: Darioush Jalali <[email protected]>

---------

Signed-off-by: Darioush Jalali <[email protected]>

* Update avalanchego v1.11.10 prerelease (#607)

* update avago 668b452

* update avago

* update with test build tags

* update golangci

* update avalanchego

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>

* update to latest avago

* add test build tags to allowlist pkg

* add test tags

* add test tags to bind cmd

* add gingko test tags

* revert cosmetic changes

* fix test chain config timestamps

---------

Signed-off-by: Joshua Kim <[email protected]>
Signed-off-by: Darioush Jalali <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Joshua Kim <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-07-26 19:41:18 +03:00
6308c49540 rename DUpgrade to Durango (#1029)
* rename DUpgrade to Durango

* Update core/evm.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update x/warp/contract.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update precompile/contracts/nativeminter/contract.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update predicate/predicate_bytes.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update precompile/precompileconfig/config.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update x/warp/config.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update x/warp/contract.go

Signed-off-by: Darioush Jalali <[email protected]>

* Update x/warp/contract.go

Signed-off-by: Darioush Jalali <[email protected]>

---------

Signed-off-by: Darioush Jalali <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2024-01-04 16:41:57 -05:00
zeekay d561b4d550 Sync upstream 2024-01-03 09:52:28 +01:00
zeekay 65408996d7 Update import path 2024-01-03 09:50:41 +01:00
zeekay f8dd36a8be Update SubnetEVM 2024-01-03 09:44:09 +01:00
Dhruba BasuandGitHub 6f67474c21 Add TestSnowContext util (#1030) 2023-12-22 23:14:36 +03:00
a16a959e28 add event packing/unpacking to contract template (#949)
* add event packing/unpacking to contract template

* add pack event tests to template

* add event precompile bind tests

* nits

* separate event file

* Update accounts/abi/bind/precompilebind/precompile_bind.go

Co-authored-by: aaronbuchwald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* revert set changes

* change event comments

* add get event gas cost and tests

* nits

* add topics to GetLogData

* Update utils.go

Signed-off-by: Ceyhun Onur <[email protected]>

* add output names

* Update precompile/testutils/test_precompile.go

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* Update accounts/abi/bind/precompilebind/precompile_event_template.go

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* fix tests

* fix tests

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2023-12-18 18:14:43 +00:00
bcf1139b3c Replace old packers (#857)
* add equality tests

* regenerate abis

* add extra padding tests

* override network upgrades (#839)

* override network upgrades

* genesis network upgrades defaults

* fix conflicts

* Update plugin/evm/vm.go

* update native minter

* nativeminter nit test changes

* replace fee manager packers

* remove generated abis

* Update precompile/contracts/feemanager/contract.go

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* fix comments

* readd pack/unpack tests

* add signature tests

* remove skip len check vars

* add native minter equality tests

* add get fee config output fuzz tests

* add fee manager fuzz tests

* move tests to another test file

* move signatures to unpack test

* nits

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
2023-12-15 18:18:43 +00:00
fe4dd6e49f verify single predicate (#960)
* verify single predicate

* simplify returned error

* track indexes for predicates

* don't short cirtcuit predicate err

* Update predicate_check.go

Signed-off-by: Ceyhun Onur <[email protected]>

* nits for single-predicate-verify (#1012)

* Update x/warp/predicate_test.go

Co-authored-by: aaronbuchwald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* Update x/warp/predicate_test.go

Co-authored-by: aaronbuchwald <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>

* review fixes

* use bitset constructor

* change return type to err in verifypredicate

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: marun <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: aaronbuchwald <[email protected]>
2023-12-05 18:28:43 +03:00
Ceyhun OnurandGitHub 43434b5637 verify warp is not activated before dupgrade (#872)
* verify warp is not activated before dupgrade

* Update x/warp/config.go

Signed-off-by: Ceyhun Onur <[email protected]>
2023-09-26 18:26:16 -04:00
Ceyhun OnurandGitHub a1c23956ad Add manager allowlist role (#801)
* update npm package

* expand allowlist.configure

* add activation func to precompile functions

* move chainconfig to precompileconfig

* use chainconfig in verification

* trim unnecessary changes

* add manager role

* fix tests

* add verify test

* nits

* add mocks

* reviews

* fix linter

* fix benchmarks

* nits

* nits

* fix alow list bind tests & ensure they're being tested (#841)

* simplify can modify check

* fix vm tests

* Add manager allowlist role merge (#850)

* Warp stapling block context (#823)

* Add GetPredicateResults to BlockContext

* Serve predicate results from blockContext

* Allow extra data to extend past DynamicFeeWindow post DUpgrade

* Get vm warp unit tests working

* Bump ANR to intermediate version to fix incompatibility with AvalancheGo

* Add kc to EthKeyChain

* Bump avalanchego dep in scripts for CI

* Add block hash payload support

* Use gomocks for precompileconfig and predicater and re-write CheckPredicates with gomocks

* Use gomock for mock accessible state and block context

* Fix existing warp contract tests with mock block context

* Remove unused mockPredicater impl

* x/warp: add contract execution unit tests

* Update NewEVMBlockContext

* Add AppendExtra to syncervm to fix tests

* x/warp: add unit test for multiple predicate results

* core: add unit test for CheckPredicates insufficient gas

* Update receive warp message test to trace block and assert the expected result

* Fix lint

* Update warp solidity contracts

* Fix block context mocks for bench

* Update precompile/precompileconfig/config.go

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: aaronbuchwald <[email protected]>

* Cleanup

* precompile/results: Add predicate results tests + comments

* nits

* precompile/results: omit tx predicate results if empty

* core: add invariant comment to predicate check

* Address PR comments

* Fix unpackWarpMessage and add unit tests

* Rename OriginChainID -> SourceChainID to match ago warp message type

* nits

* x/warp: set public key in warp predicate unit tests

* Update payload format

* Clarify IWarpMessenger verified message return types

* core/state: improve statedb warp specific comments

* Update input param type to uint32 to avoid potential overflow on conversion

* Update GetPredicateStorageSlots arg type to uint32

* warp/payload: add README for payload serialization (#835)

* Fix merge

* x/warp: add unit test for PrimaryNetwork to Subnet predicate verification (#831)

* precompilebind: add ChainConfig with DUpgrade enabled to precompile chain config verify template
2023-09-13 09:56:57 -04:00
aaronbuchwaldandGitHub 523dcc272e Warp stapling block context (#823)
* Add GetPredicateResults to BlockContext

* Serve predicate results from blockContext

* Allow extra data to extend past DynamicFeeWindow post DUpgrade

* Get vm warp unit tests working

* Bump ANR to intermediate version to fix incompatibility with AvalancheGo

* Add kc to EthKeyChain

* Bump avalanchego dep in scripts for CI

* Add block hash payload support

* Use gomocks for precompileconfig and predicater and re-write CheckPredicates with gomocks

* Use gomock for mock accessible state and block context

* Fix existing warp contract tests with mock block context

* Remove unused mockPredicater impl

* x/warp: add contract execution unit tests

* Update NewEVMBlockContext

* Add AppendExtra to syncervm to fix tests

* x/warp: add unit test for multiple predicate results

* core: add unit test for CheckPredicates insufficient gas

* Update receive warp message test to trace block and assert the expected result

* Fix lint

* Update warp solidity contracts

* Fix block context mocks for bench

* Update precompile/precompileconfig/config.go

Co-authored-by: Darioush Jalali <[email protected]>
Signed-off-by: aaronbuchwald <[email protected]>

* Cleanup

* precompile/results: Add predicate results tests + comments

* nits

* precompile/results: omit tx predicate results if empty

* core: add invariant comment to predicate check

* Address PR comments

* Fix unpackWarpMessage and add unit tests

* Rename OriginChainID -> SourceChainID to match ago warp message type

* nits

* x/warp: set public key in warp predicate unit tests

* Update payload format

* Clarify IWarpMessenger verified message return types

* core/state: improve statedb warp specific comments

* Update input param type to uint32 to avoid potential overflow on conversion

* Update GetPredicateStorageSlots arg type to uint32

* warp/payload: add README for payload serialization (#835)

* Fix merge
2023-09-12 13:10:26 -04:00
aaronbuchwaldandGitHub a59c7b4a60 Align on a single predicate type (#813)
* Align on single predicate type

* Revert BlockContext comment change

* Update PredicateContext comment

* Address comments
2023-08-25 15:41:43 -04:00
aaronbuchwaldandGitHub ce59e115b5 add mocks for precompile tests (#812)
* add mocks for precompile tests

* Update compatibility

* Bump AvalancheGo dep to v1.10.9

* Bump ANR dep to be compatible with ago v1.10.9

* revert ConfigurationBlockContext changes
2023-08-25 12:58:05 -04:00
Ceyhun OnurandGitHub d57883fd11 Expand verify (#798)
* move chainconfig to precompileconfig

* use chainconfig in verification
2023-08-18 10:10:10 -04:00
aaronbuchwaldandGitHub cd07a1a54a Add support for predicate gas into IntrinsicGas (#713)
* Add support for predicate gas

* Address review

* Fix test and add test for PredicateGas

* Address comments
2023-07-07 13:37:51 -04:00
Ceyhun OnurandGitHub 0727fbfff1 Generate precompile tests (#565)
* add verify allow list tests

* use new verify allow list suite in precompiles

* add equal test suite

* nits

* add cnfig test template

* add contract unit test generation

* Remove abis

* nits

* fix testing input in template

* Update accounts/abi/bind/precompilebind/precompile_contract_test_template.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update accounts/abi/bind/precompilebind/precompile_contract_test_template.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update accounts/abi/bind/precompilebind/precompile_contract_test_template.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix non-allowlist tests
2023-05-01 11:30:07 -04:00
aaronbuchwaldandGitHub 50ba91df2e Bench precompile (#610)
* Add stateful precompile benchmarks

* Add GH Action for bench precompiles

* Remove coverage from benchmarks

* Rename bench workflow
2023-04-11 13:48:27 -04:00
Ceyhun OnurandGitHub 708b7d58f1 Config test suites (#557)
* add verify allow list tests

* use new verify allow list suite in precompiles

* add equal test suite

* nits

* nits
2023-04-04 11:00:22 -04:00
Ceyhun OnurandGitHub d8a3e64378 Stateful Precompile Improvements (#389)
* move inline string ABIs to separate files and embed them (#383)

* move inline string ABIs to separate files and embed them

* fix tests

* fix tests

* unexport function

* Update accounts/abi/bind/bind.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix func name

Co-authored-by: Darioush Jalali <[email protected]>

* replace getByKey with getByAddress (#395)

* rework on panics in precompiles (#418)

* rework on panics in precompiles

* Update precompile/allow_list.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix reviews

* wrap errors in ConfigurePrecompiles

* cleaner errors

* Update utils.go

* Update miner/worker.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update core/state_processor.go

Co-authored-by: aaronbuchwald <[email protected]>

Co-authored-by: aaronbuchwald <[email protected]>

* Precompile Specific Packages (#420)

* rework on panics in precompiles

* Update precompile/allow_list.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* Update precompile/fee_config_manager.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix reviews

* wrap errors in ConfigurePrecompiles

* cleaner errors

* move reward manager precompile to package (WIP)

* rename files

* fix abi path

* move typecheck

* move precompiles to their own packages

* refactor precompile template

* remove test file

* upate comments

* rm test files

* new allowlist package

* Update precompile/utils.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/utils.go

Co-authored-by: Darioush Jalali <[email protected]>

* Update precompile/nativeminter/contract_native_minter.go

Co-authored-by: Darioush Jalali <[email protected]>

* fix nits

Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>

* rename fee manager config struct (#427)

* rename struct

* rename fee config managers to fee managers

* fix comments

* Generalized upgrades rb (#434)

* introduce precompiles as registrable modules

* add precompile specific contract tests

* remove print debug

* add unmarshal tests

* remove unnecessary func

* fix initial disabled value

* register all modules in core/evm/contract_stateful

* more refactor & test fix

* sync template

* fix more tests

* rename file

* add comment

* rename

* fix linter

* use require error contains

* remove whitespace

* trim mock interface

* sort steps

* reviews

* Update precompile/stateful_precompile_module.go

* Update params/precompile_config.go

* Update params/precompile_config.go

* fix reviews

* add new module to configs and group module functions

* generalized-upgrades-rb review (#474)

* keep genesis disabled fix

* nits

* nits

* nit

* review fixes

* Update precompile/allowlist/allowlist.go

* use address in map

* fix linter for embedded keys

* update err messages

* more err update

* remove unnecessary function (#478)

* Start work on breaking cyclic dependency (#496)

* Update core/state_processor.go

* fix reviews

* Update precompile/contracts/txallowlist/contract_test.go

* Generalized upgrades rb nits0 (#512)

* Minor improvements

* restore readOnly

* more updates

* Add back readOnly to allow list tests

* Precompile improvements merge (#513)

Co-authored-by: aaronbuchwald <[email protected]>
Co-authored-by: Ceyhun Onur <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
Co-authored-by: Matthew Lam <[email protected]>
Co-authored-by: cam-schultz <[email protected]>
Co-authored-by: omahs <[email protected]>
Co-authored-by: Anusha <[email protected]>
Co-authored-by: Hagen Hübel <[email protected]>
Co-authored-by: minghinmatthewlam <[email protected]>
Fix: typos (#428)
fix allow list comments (#469)
fix CGO flags issue (#489)
fix lint job (#499)

* review fixes

* minor nits

* fix precompile generator

* fix fee manager config test

* remove debug files

* Update core/state_processor.go

Co-authored-by: aaronbuchwald <[email protected]>

* fix comments

* restore statedb ordering

* fix configure in reward manager

* precompiles: adds a regression test for the IsDisabled case in AvalancheRules (#515)

* Rename configs: alternative (#520)

* alternative renaming for precompile configs

* fixes

* update naming

* rename to AllowListConfig

* simplify

* move blackhole check to module registerer (#523)

* move blackhole check to module registerer

* check blackhole first

* add unit test

* Add test case for registering module outside of reserved range

---------

Co-authored-by: Aaron Buchwald <[email protected]>

* precompile: improve test structure (#517)

* refactor precompile tests

* minor improvements

* nit

* fix merge

* rename package

* pr comments

* rm file

* merge AllowListTests

* pr comments

* explicit BeforeHook

* wspace

* Mark TestTransactionIndices flaky

---------

Co-authored-by: Aaron Buchwald <[email protected]>

* nit improvements (#529)

* nit improvements

* move comments to README

* Update cmd/precompilegen/template-readme.md

* Rename new config (#528)

* rename configurator's new config to make config

* use new built-in to create new config instance

* precompile: just nits (#534)
2023-02-22 12:27:48 -08:00