Commit Graph
51 Commits
Author SHA1 Message Date
zeekay 2bc16e3494 refactor(warp): Core -> Message — track warp v1.22.0
Rename across the evm warp backend and the warp precompile: warp.Core ->
warp.Message, NewCore -> NewMessage, ParseCore -> ParseMessage, the .Core field
-> .Message, and local core/msgCore/testCore vars -> msg/testMsg. deps: warp
v1.21.0 -> v1.22.0, precompile v0.11.0 -> v0.12.0.

geth's core/types and core/vm imports are untouched — the rename is scoped to
the warp message type, never the geth core package. ./warp/... and
./precompile/contracts/warp/... green, including TestWarpWrongNetworkID.
2026-06-27 00:48:35 -07:00
zeekay a6b22c9824 refactor(warp,precompile)!: decomplect ZAP types — warp v1.21.0, precompile v0.11.0
Track the upstream rename across the evm warp backend
(warp/{service,backend,verifier_backend}) and the warp precompile
(precompile/contracts/warp/{config,contract,contract_warp_handler},
precompileconfig): SignedCore->Core, WarpEnvelope->Envelope.

Identifiers only — the digest D, ZAP c14n bytes and BLS Beam / Corona Pulse /
ML-DSA signing domains are unchanged. ./warp/... and
./precompile/contracts/warp/... green, including the 10k-validator predicate
sign->aggregate->verify.
2026-06-26 22:25:27 -07:00
zeekay f9280978e3 feat(warp): migrate evm onto warp v1.20.0 SignedCore/WarpEnvelope ZAP (drop deleted UnsignedMessage RLP API)
Hard-fork the last evm warp consumers onto the canonical ZAP message format
(one and one way only). warp v1.20.0 deleted UnsignedMessage; the signed
subject is now warp.SignedCore (D = keccak256(coreDST ‖ zap_c14n)) and the
signed wrapper is warp.WarpEnvelope. The BLS Beam signs warp.BeamSigningBytes(D).

deps: warp v1.19.5 -> v1.20.0, precompile v0.5.59 -> v0.10.0.

- warp/{backend,verifier_backend,service}: UnsignedMessage -> SignedCore;
  NewMessage -> NewWarpEnvelope; sign/verify over BeamSigningBytes(core.ID()).
- precompile/contracts/warp: ParseMessage -> ParseWarpEnvelope; .UnsignedMessage
  -> .Core; .Signature.(*BitSetSignature) -> .Beam (concrete). VerifyPredicate
  verifies the Beam over D with exported primitives (Bits + bls +
  BeamSigningBytes) because the precompile quorum denominator must include
  keyless validators, which warp.VerifyEnvelope/GetCanonicalValidatorSet reject.
- precompileconfig.WarpMessageWriter.AddMessage(*SignedCore) (mirrors precompile v0.10.0).
- plugin/evm/vm.go: warpVerifierAdapter over *SignedCore; collapse the duplicate
  external-warp import alias (warptypes -> luxwarp).
- remove redundant warp/{aggregator,bls_adapter,signer_adapter}.go: provably-dead
  duplicates of warp.SignatureAggregator / warp.NewSigner (zero production refs).
- tests migrated to ZAP; fixed a pre-existing offchain message-key test bug;
  revived the predicate suite (validator state injected via Runtime, the
  production path, replacing the decoupled WithValidatorState key).

Verified: go build ./... green; go test ./warp/... ./precompile/contracts/warp/...
green (incl. 10k-validator TestWarpPredicate). grep UnsignedMessage = 0.
2026-06-26 21:27:25 -07:00
zeekay 0adfd3575f fix: apply gofmt formatting to all Go files
36 files had minor formatting issues detected by gofmt.
2026-02-13 17:07:27 -08:00
zeekay d5c9b2be62 feat: update to vm v1.0.23 with ZAP-based Serve function
Updates dependencies:
- github.com/luxfi/vm v1.0.22 → v1.0.23 (adds ZAP transport Serve)
- github.com/luxfi/log v1.3.0 → v1.4.1 (fixes module path declaration)
- github.com/luxfi/consensus v1.22.53 → v1.22.56
- github.com/luxfi/crypto v1.17.39 → v1.17.40
- github.com/luxfi/database v1.17.38 → v1.17.39
- github.com/luxfi/geth v1.16.69 → v1.16.73
- github.com/luxfi/p2p v1.18.7 → v1.18.8
- github.com/luxfi/warp v1.18.4 → v1.18.5

The vm package now provides a ZAP-based Serve function by default,
eliminating the need for the grpc build tag for VM plugins.

Also includes various improvements to validators, warp service,
and precompile interfaces.
2026-01-24 12:01:19 -08:00
zeekay 170c1ba5f8 refactor: remove warp aliases, use warp.Signer directly
- Remove luxWarp alias, use warp package directly
- Remove AppSender indirection, use p2p.Sender directly
- Update warptypes alias where local warp package conflicts
- Update node to v1.22.43, warp to v1.16.39
2025-12-22 04:12:50 -08:00
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 a716430871 Update generated files (gencodec, mocks)
- Run go generate to update all generated files
- Updates required after recent code changes
- Fixes CI build failures
2025-09-06 12:53:14 +00:00
zeekay e2b6c7f157 Fix plugin/evm build errors - update interfaces and warp imports 2025-08-18 01:19:05 +00:00
zeekay 0b1a6ba7ae Update precompile config settings 2025-08-16 01:11:27 +00:00
zeekay d2d705985e fix: Update dependencies for new consensus package 2025-08-15 22:12:26 +00:00
zeekay ff82f8284a Update to latest geth, so on 2025-08-04 02:23:56 -05:00
zeekay fea27b37de Update imports from snow to consensus structure 2025-08-04 04:43:22 +00:00
zeekay 477418aef8 Replace tyler-smith/go-bip39 with luxfi/go-bip39 2025-08-01 21:21:16 +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 30986b4f91 Clean up project 2025-07-24 00:41:34 -05:00
zeekay 9990441454 Adapt EVM to be new C-chain 2025-07-24 00:25:45 -05:00
zeekay 19fe8dc2c7 Replace ethereum/go-ethereum references with luxfi/geth
- Updated go:generate comments to use luxfi/geth instead of ethereum/go-ethereum
- Fixed GitHub issue/PR references to point to luxfi repositories
- Updated comments referencing the Lux geth fork
- Part of the migration to unified EVM architecture with Lux consensus
2025-07-23 17:34:24 -05:00
zeekay cd319cc04c Update imports for node v1.13.20 refactoring
- Update dependencies to node v1.13.20 and geth v0.15.43
- Fix imports: consensus/engine → consensus/engine/core
- Fix imports: consensus/engine/chain → consensus/engine/linear
- Fix imports: consensus/linear/chaintest → consensus/linear/lineartest
2025-07-22 03:53:35 -05: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 a8911dbe50 Update to use node v1.13.5 and fix snowman import paths
- Update node dependency to v1.13.5
- Replace snowman references with chain
- Update SnowmanAPI to ChainAPI
- Update snowman-api-enabled to chain-api-enabled
- Fix import paths for consensus refactoring
- Update netrunner to v1.6.0
2025-07-18 20:52:53 +00:00
zeekay 97896c8439 Updates and improvements 2025-07-18 06:47:51 +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 fc1662afd8 Fix import paths and add missing interface stubs for subnet-evm v0.7.5
- Update imports from luxdefi/node to luxfi/node
- Replace libevm interfaces with direct go-ethereum imports
- Add placeholder interface files for missing dependencies
- Update go.mod to use local luxfi/node path
- Fix merge conflicts in multiple files
- Create stub implementations for missing packages

This allows the project structure to align with v0.7.5 requirements
but the build still needs additional work to be fully functional.
2025-07-04 00:03:10 -04: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
ce843d4cd1 P2p sdk handlers (#1031)
* rename tx handlers

* add p2p sdk handlers

* fix tests

* fix imports

* bump min go version

* downgrade golangci

* remove noop handler

* bump avago rc

* fix uint64

* bump avalanchego rc version

* fix linter

* revert txpool uint change

* bump subnet-evm version

* run simulator in a different step

* remove load test from precompile tests

* run simulator in a different step

* remove load test from precompile tests

* rename simulator to load test

* parallelize e2e steps

* use checkout

* split to different workflows

* move to same folder

* bump avago

* add time to codec

* fix load test (#1043)

* tweak global limit

* uncomment submit

* update consts

* update avalanchego version

* fix compilation err

* simpler fix

* remove mempool configs

* bump latest avago rc

* fix tests

* update avalanchego

* fix mockgen

* bump ANR

* remove unnecessary log levels

* Fix bloom reset (#1049)

* add UT for eth tx pool subscribe

* fix eth tx pool subscribtion

* don't use journal

* simplify test

* increase timeout

* Update plugin/evm/tx_gossip_test.go

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

---------

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

* Fix racey bloom access and replace time.Sleep with require.Eventually

---------

Signed-off-by: Ceyhun Onur <[email protected]>
Co-authored-by: Patrick O'Grady <[email protected]>
Co-authored-by: Darioush Jalali <[email protected]>
Co-authored-by: Stephen Buttolph <[email protected]>
2024-01-23 17:23:08 +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
aaronbuchwaldandGitHub 883c6e3bd0 Update Predicater interface comment (#1039) 2024-01-03 17:54:32 +00: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
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
Darioush JalaliandGitHub 7749deb9ac warp: add details to accepted message log (#984) 2023-11-06 12:33:31 -08: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 cd05febe4a precompile/precompileconfig: Add IsDUpgrade to precompileconfig ChainConfig interface (#825) 2023-08-30 09:56:41 -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
4721f3ebe2 Sync coreth v0.12.4 rc0 (#694)
* apply diff to rc0

* replace coreth with subnet-evm

* go mod tidy

* remove must commit

* remove apricots

* replace coreth with subnet-evm

* rename banff and cortina

* test memory db

* add dUpgrade

* fix errors

* sync with v0.12.4-rc0

* more diffs

* change templates

* readd preparePredicateSlots

* run goimports

* readd tx allow list check to txpool

* Fix tests

* readd subnet evm check for tests

* fix tests

* add gas limit & coinbase fakers

* Fix timestamp types

* check error from newblockchain

* fix gas limit in simulated genesis

* downgrade ci to go 1.19

* gofmt files

* rebump go to 1.20

* bump anr to latest

* bump anr to latest

* prepare predicate storage slots in Subnet-EVM

* uncomment tests

* change order of airdrop memory cleanup

* add utils import

* Coreth 0.12.4 x apply (#720)

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

* move instruction sets

* revert unpack changes

* reduce diffs

* move genesis verify to vm (#753)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

---------

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

* avoid adding/removing GasLimits in tests (#755)

* move genesis verify to vm

* fix comment

* set a correct default from genesis

* fix log

* revert change to vm.go

* avoid adding/removing GasLimits in tests

* nit

---------

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

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-07-26 09:45:17 -04:00
Darioush JalaliandGitHub 170ad2361b precompile accepter should take logIdx (#728)
* precompile accepter should take logIdx

* minimize mock

* copyright yr

* add comments
2023-07-17 20:53:17 -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
aaronbuchwaldandGitHub 783fbbd1be Warp preparation (#573)
* Add warp precompile preparation

* Update hash slice packing

* Remove unnecessary local var

* Add VM type assertion

* Enable Warp API by default
2023-03-16 15:15:26 -04:00
d628c176f0 Precompile pre post handling (#524)
* Re-apply warp precompile interface changes

* Address nits

* Separate predicate storage slot preparation into separate function in statedb

* fix lint

* improve miner enforcePredicates comment

* Add HashSliceToBytes test case for empty slice

* Address comments

* Address comments WIP

* Pre+post handling diff for shared mem precompile

* Separate proposer and general precompile predicates

* Update ShouldVerifyWithContext to return true iff proposer predicate is specified

* Add checkPredicates unit test

* Update .gitignore

* goimports

* update

* goimports config

* Address PR review comments and improve comments

* Fix typo

* Address PR comments

* Add rules into PrepareAccessList

* Only copy bytes in preparePredicates if predicate precompile is active

* Address PR comments

---------

Co-authored-by: Darioush Jalali <[email protected]>
2023-03-16 11:34:49 -04:00