Godwoken 以太坊账户 lock(eth-account-lock)约束Godwoken Ethereum account lock (eth-account-lock) Constraints
来源:godwokenrises/godwoken @c2b1f85 / gwos/contracts/eth-account-lock/src/entry.rs + eth_signature.rs · 部署:godwoken-info @8ce6390 mainnet_v1 / testnet_v1_1Source: godwokenrises/godwoken @c2b1f85 / gwos/contracts/eth-account-lock/src/entry.rs + eth_signature.rs · deployments: godwoken-info @8ce6390 mainnet_v1 / testnet_v1_1
Godwoken
- 官网Websitegodwoken.com
- 文档Docsdocs.godwoken.io
- GitHubGitHubgithub.com/godwokenrises
- XXx.com/godwokenrises
来源:Source: godwoken repo homepage + README; website and X from the godwokenrises GitHub org profile
1 → 0取消挑战时验证 L2 签名Verify an L2 signature when cancelling a challenge
Inputs 输入Inputs
input[i] 签名 cellinput[i] signature cellCell{
capacity: any,
lock: { ETH_ACCOUNT_LOCK, args: rollup_script_hash 32B ‖ eth_address 20B },
type: any,
data: owner_lock_hash 32B ‖ signing_type 1B ‖ message 32B
}
input[j] 一次性 owner cellinput[j] one-time owner cellCell{
capacity: any,
lock: lock hash == data.owner_lock_hash,
type: any,
data: any
}
➜
Outputs 输出Outputs
outputsoutputsany (the challenge-cancel tx)
witnesses(WitnessArgs)witnesses (WitnessArgs)
witnesses[组首输入]witnesses[first group input]{ lock: 65B secp256k1 recoverable signature }
args(52B)args (52B)
rollup_script_hash32B
eth_address20B
- rollup_script_hash 32B rollup type hashrollup type hash 长度恰 52exactly 52 long (5)
- eth_address 20B 以太坊地址Ethereum address (41)
args0x40d7…(32B)f39fd6e51aad88f6f4ce6ab8827279cfffb92266
data(65B)data (65B)
owner_lock_hash32B
signing_type1B
message32B
- owner_lock_hash 32B 一次性 owner cell 的 lock hashlock hash of the one-time owner cell (8)
- signing_type 1B 0 Raw / 1 WithPrefix(加以太坊个人签名前缀)0 Raw / 1 WithPrefix (Ethereum personal-sign prefix) 0 或 10 or 1 (4)
- message 32B 被签名的消息message that was signed (41)
data0x…(32B)01…(32B)
限制Constraints
- args:: 长度 = 52length = 52 (5)
- data:: 长度 = 65,signing_type ∈ {0,1}length = 65, signing_type ∈ {0,1} (4)
- owner:: 有输入 lock hash = data.owner_lock_hashan input with lock hash = data.owner_lock_hash (8)
- 签名signature:: witness.lock = 65B 且恢复出 eth_addresswitness.lock is 65B and recovers eth_address (41)
部署与来源Deployments & source 未核验unverified
源码source godwokenrises/godwoken@c2b1f850 · gwos/contracts/eth-account-lock/src · gwos/contracts/gw-utils/src/error.rs (exact commit read (default-branch HEAD, 2024-01-12). Deployment constants from godwokenrises/godwoken-info @8ce6390133ddfffe9d40d51b7be191418b54958c (mainnet_v1, testnet_v1_1 scripts-deploy-result.json).)
二进制核验binary check 未核验unverified no binary or checksum at the recorded commit matched the deployed data hash (reproducible build not attempted)
| 网络network | code_hash | cell_dep | type_id args | 数据哈希data hash | 部署交易deploy tx |
|---|---|---|---|---|---|
| mainnet | 0x096df264f38fff07f3acd318995abc2c71ae0e504036fe32bc38d5b6037364d4 type | 0xf0cfb02fb4…2f76a7f9:0 code | 0x9fa95a4ca1…065075b2 | 0x685ae74d35…28199235 | 0xf0cfb02fb4…2f76a7f9 #7469232 |
| testnet | 0x07521d0aa8e66ef441ebc31204d86bb23fc83e9edc58c19dbb1b0ebe64336ec0 type | 0x21da20f275…ae57c6ed:0 code | 0x66056785e4…e459ccfa | 0x685ae74d35…28199235 | 0x21da20f275…ae57c6ed #5292883 |
链上数据核对于 on-chain data checked 2026-10-21
⚠ 状态:官方已宣布 Godwoken 退役(2025-06-01 起,Nervos Talk “Sunset of Force Bridge and Godwoken”);冻结期限延至 2026-01-01 23:59:59 UTC,之后网络冻结、桥前端下线,v0/v1 RPC 节点已关闭。本页仅作历史 / 审计参考。⚠ Status: Godwoken was officially sunset (from 2025-06-01, Nervos Talk “Sunset of Force Bridge and Godwoken”); the freeze deadline was extended to 2026-01-01 23:59:59 UTC, after which the network froze, the bridge UI went offline and v0/v1 RPC nodes were shut down. This page is for historical / audit reference.
这是 L2 账户 lock:在 L2 交易里由 Godwoken 节点验证;在 L1 上只在取消挑战时运行。未找到 L1 交易,tests.json 为空。This is an L2 account lock: verified by Godwoken nodes inside L2 txs; on L1 it only runs when cancelling a challenge. No L1 tx found; tests.json is empty.
错误码(gw-utils/src/error.rs):1 IndexOutOfBound,2 ItemMissing,3 LengthNotEnough,4 Encoding,5 InvalidArgs,6 InvalidSince,7 InvalidOutput,8 OwnerCellNotFound,9 RollupCellNotFound,10 RollupConfigNotFound,11 ProofNotFound,13 MerkleProof,14 AmountOverflow,15 InsufficientAmount,16/17 Insufficient{Input,Output}FinalizedAssets,18 SMTKeyMissing,19 InvalidStateCheckpoint,20 InvalidBlock,21 InvalidStatus,22 InvalidStakeCellUnlock,23 InvalidPostGlobalState,24 InvalidChallengeCell,25 InvalidStakeCell,26 InvalidDepositCell,27 InvalidWithdrawalCell,28 InvalidCustodianCell,29 InvalidRevertedBlocks,30 InvalidChallengeReward,32 InvalidChallengeTarget,33 InvalidWithdrawalRequest,34 UnknownEOAScript,39 InvalidTypeID,41 WrongSignature,43 RegistryAddressNotFound,45 NotFinalized。Error codes (gw-utils/src/error.rs): 1 IndexOutOfBound, 2 ItemMissing, 3 LengthNotEnough, 4 Encoding, 5 InvalidArgs, 6 InvalidSince, 7 InvalidOutput, 8 OwnerCellNotFound, 9 RollupCellNotFound, 10 RollupConfigNotFound, 11 ProofNotFound, 13 MerkleProof, 14 AmountOverflow, 15 InsufficientAmount, 16/17 Insufficient{Input,Output}FinalizedAssets, 18 SMTKeyMissing, 19 InvalidStateCheckpoint, 20 InvalidBlock, 21 InvalidStatus, 22 InvalidStakeCellUnlock, 23 InvalidPostGlobalState, 24 InvalidChallengeCell, 25 InvalidStakeCell, 26 InvalidDepositCell, 27 InvalidWithdrawalCell, 28 InvalidCustodianCell, 29 InvalidRevertedBlocks, 30 InvalidChallengeReward, 32 InvalidChallengeTarget, 33 InvalidWithdrawalRequest, 34 UnknownEOAScript, 39 InvalidTypeID, 41 WrongSignature, 43 RegistryAddressNotFound, 45 NotFinalized.
这是 L2 账户 lock:在 L2 交易里由 Godwoken 节点验证;在 L1 上只在取消挑战时运行。未找到 L1 交易,tests.json 为空。This is an L2 account lock: verified by Godwoken nodes inside L2 txs; on L1 it only runs when cancelling a challenge. No L1 tx found; tests.json is empty.
错误码(gw-utils/src/error.rs):1 IndexOutOfBound,2 ItemMissing,3 LengthNotEnough,4 Encoding,5 InvalidArgs,6 InvalidSince,7 InvalidOutput,8 OwnerCellNotFound,9 RollupCellNotFound,10 RollupConfigNotFound,11 ProofNotFound,13 MerkleProof,14 AmountOverflow,15 InsufficientAmount,16/17 Insufficient{Input,Output}FinalizedAssets,18 SMTKeyMissing,19 InvalidStateCheckpoint,20 InvalidBlock,21 InvalidStatus,22 InvalidStakeCellUnlock,23 InvalidPostGlobalState,24 InvalidChallengeCell,25 InvalidStakeCell,26 InvalidDepositCell,27 InvalidWithdrawalCell,28 InvalidCustodianCell,29 InvalidRevertedBlocks,30 InvalidChallengeReward,32 InvalidChallengeTarget,33 InvalidWithdrawalRequest,34 UnknownEOAScript,39 InvalidTypeID,41 WrongSignature,43 RegistryAddressNotFound,45 NotFinalized。Error codes (gw-utils/src/error.rs): 1 IndexOutOfBound, 2 ItemMissing, 3 LengthNotEnough, 4 Encoding, 5 InvalidArgs, 6 InvalidSince, 7 InvalidOutput, 8 OwnerCellNotFound, 9 RollupCellNotFound, 10 RollupConfigNotFound, 11 ProofNotFound, 13 MerkleProof, 14 AmountOverflow, 15 InsufficientAmount, 16/17 Insufficient{Input,Output}FinalizedAssets, 18 SMTKeyMissing, 19 InvalidStateCheckpoint, 20 InvalidBlock, 21 InvalidStatus, 22 InvalidStakeCellUnlock, 23 InvalidPostGlobalState, 24 InvalidChallengeCell, 25 InvalidStakeCell, 26 InvalidDepositCell, 27 InvalidWithdrawalCell, 28 InvalidCustodianCell, 29 InvalidRevertedBlocks, 30 InvalidChallengeReward, 32 InvalidChallengeTarget, 33 InvalidWithdrawalRequest, 34 UnknownEOAScript, 39 InvalidTypeID, 41 WrongSignature, 43 RegistryAddressNotFound, 45 NotFinalized.