@d20dao/vrf-sdk 0.3.4 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +29 -19
- package/API.md +574 -223
- package/BUILD-MANIFEST.json +40 -26
- package/CHANGELOG.md +97 -0
- package/PROTOCOL-PROVENANCE.json +17 -10
- package/README.md +174 -113
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/abi/D20BeaconVerifier.json +165 -0
- package/abi/EpochEntropy.json +605 -26
- package/dist/abi.d.ts +593 -22
- package/dist/abi.js +2 -1
- package/dist/beacon.d.ts +28 -0
- package/dist/beacon.js +133 -0
- package/dist/epoch.d.ts +50 -78
- package/dist/epoch.js +184 -29
- package/dist/index.d.ts +8 -4
- package/dist/index.js +4 -2
- package/dist/sources.d.ts +11 -0
- package/dist/sources.js +74 -0
- package/dist/templates.d.ts +22 -0
- package/dist/templates.js +220 -0
- package/examples/DiceConsumer.sol +37 -29
- package/examples/LootDropConsumer.sol +60 -0
- package/examples/RaffleConsumer.sol +71 -0
- package/notices/BLS-BN254-LICENSE +21 -0
- package/notices/PROVENANCE.md +12 -0
- package/package.json +31 -4
- package/contracts/examples/MiningRandomnessConsumer.sol +0 -59
package/BUILD-MANIFEST.json
CHANGED
|
@@ -2,31 +2,38 @@
|
|
|
2
2
|
"compiler": "0.8.28+commit.7893614a.Emscripten.clang",
|
|
3
3
|
"protocol": {
|
|
4
4
|
"sourceRepository": "https://github.com/d20dao/keeper",
|
|
5
|
-
"sourceCommit": "
|
|
6
|
-
"note": "
|
|
5
|
+
"sourceCommit": "98e537fb249dd0d3365b8d78e6040a9323a65a88",
|
|
6
|
+
"note": "Protocol copied byte-for-byte from the committed Git blobs of the keeper source at sourceCommit, which is ahead of the latest release of the public repository named in sourceRepository. Operator backends, keys, test fixtures and proof generation are excluded from the package.",
|
|
7
7
|
"files": {
|
|
8
8
|
"LICENSE": "bfdc94eef4cfbec12a9ed47bb406c8125cf4c306facf7b8d92db58f133b1a703",
|
|
9
9
|
"contracts/D20VRFConsumer.sol": "9200fcd8825756ba6978e42d94b52e82e6dea9b1ba35dc506652490194e16162",
|
|
10
|
-
"contracts/D20VRFCoordinator.sol": "
|
|
11
|
-
"contracts/examples/MiningRandomnessConsumer.sol": "2f5c19d05e66bea313fff65269650fe1e3bea70bd6aa80fa3e3de8bee8c24649",
|
|
10
|
+
"contracts/D20VRFCoordinator.sol": "fa3ea7d7995c5dd8f6a9cd50140f0cb8d35e441a6ecda513f6e82fbbacea9eaf",
|
|
12
11
|
"contracts/interfaces/ID20VRF.sol": "0361aee07644cbf7c2bcde8ffd9188825d5be633c4a1520169a7702a38c1bdbc",
|
|
13
12
|
"contracts/libraries/D20VRFRequests.sol": "f87e66f7eb0350d9b8740f120b97085957793b826b81a0c7c80d58a3fcd92b76",
|
|
14
13
|
"contracts/libraries/RandomnessMapping.sol": "00bce68c1a6d89903d72d1c3f9ee5e1a56392188ed29b6aa32ab7451ef180c91",
|
|
15
14
|
"contracts/vendor/CHAINLINK-LICENSE": "25a502f8fd39602de8a98cc4835a4bf81851b095d6f2c5c130bf0863afac6c99",
|
|
16
|
-
"contracts/vendor/PROVENANCE.md": "
|
|
15
|
+
"contracts/vendor/PROVENANCE.md": "56d0e087c3e3fffca95aa8a371979c32239c97a066ca02bb36ae2f0d2af46ffe",
|
|
17
16
|
"contracts/vendor/VRF.sol": "98e0345fd2dd42178cad4ad16dd8b18621112078d63d0c64839c8bd01c539350",
|
|
18
17
|
"src/evidence.ts": "81b6a1446b9700ec545e794b08d356411608aa655e6030cdfabd1dfa531ef457",
|
|
19
|
-
"src/index.ts": "
|
|
18
|
+
"src/index.ts": "a120030d296f518925159422873b796614ab83aef53fbe2acd89ea517d10f7d9",
|
|
20
19
|
"src/mapping.ts": "76aa6093d55831052b56e177fc394ef6ef14183a8ab8ca6fcc2c9382efb6b83f",
|
|
21
20
|
"src/replay.ts": "c97a5081e785e6a7f27987e2d4c4d9861fe8fa8cbc775b0152e337141d3d48d7",
|
|
22
|
-
"src/sources.ts": "
|
|
21
|
+
"src/sources.ts": "93dad72dd9b5e54a7781b642a0715317bdd8d23d107d53ce64a7e62ea960bdde",
|
|
23
22
|
"src/verification.ts": "754e39554c0c432cf1404741503f66b4199b84f39003d8e42f300a7256ffaa6a",
|
|
24
|
-
"src/epoch.ts": "
|
|
25
|
-
"contracts/EpochEntropy.sol": "
|
|
26
|
-
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286"
|
|
23
|
+
"src/epoch.ts": "226f0c12f138fa4b45c0d073a5aceac4344882ecbdf9593053535ecd4e9a772a",
|
|
24
|
+
"contracts/EpochEntropy.sol": "100785392042af99e710af2e13855fd44d9c1018e33220d2601f75a3cb72f441",
|
|
25
|
+
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286",
|
|
26
|
+
"contracts/libraries/DataTemplate.sol": "f0d93c2ec3bcb8cfb625001506fe24f938e6e2cfbae85632f2980d23595ed961",
|
|
27
|
+
"src/templates.ts": "7f74968e746461e168a863769736399d74bdab29041ab8dd1cdc0d197b927e61",
|
|
28
|
+
"contracts/D20BeaconVerifier.sol": "f2eb0917c2d996f4c3e4969d37e32366163532605cb9ae8e7e97e86935c7b068",
|
|
29
|
+
"contracts/interfaces/IBeaconVerifier.sol": "75782d629af93a368e216272cd1ab25191907ab65e79510294e8679a0f7c6f74",
|
|
30
|
+
"contracts/vendor/bls-bn254/BLS.sol": "887fd94553b9d6d0a247900bdb05523d3b9ef3b8ca049e2a0524a0b1a9d37e69",
|
|
31
|
+
"contracts/vendor/bls-bn254/ModExp.sol": "fd91ae9291511668914b05fece03fb9bf6e2b57f7784d2edddc82456af12b495",
|
|
32
|
+
"contracts/vendor/bls-bn254/LICENSE": "af36460fa628a7aca8c5b1f1b6b3615376f00212284fa0fd61a013ee982a3666",
|
|
33
|
+
"src/beacon.ts": "ab94d0702d7174405be085ac4ed4139a71c9d62929e05b93dc3f9e09f6d0a776"
|
|
27
34
|
}
|
|
28
35
|
},
|
|
29
|
-
"packageLockSha256": "
|
|
36
|
+
"packageLockSha256": "8bd5bd3d10790ea1466c5e4851d92330ea54034ef0c65622fd8ae4f3280fce06",
|
|
30
37
|
"buildDependencies": {
|
|
31
38
|
"@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol": "41a3040398d53999dea3251ff8906e11ec1a699362a1d8f4a55bfc7709cc00f3",
|
|
32
39
|
"@openzeppelin/contracts/utils/ReentrancyGuard.sol": "94e409e8f6e3184236651a6cc2b1a6a3ea0f0a25eb85b71e524ad5791bb2fbc8",
|
|
@@ -34,45 +41,52 @@
|
|
|
34
41
|
"@openzeppelin/contracts/proxy/utils/UUPSUpgradeable.sol": "b5af3bfd79a32c6da2d09b0be38d9b63dcd0d159a1a4a0198431fd00acc1fd52",
|
|
35
42
|
"@openzeppelin/contracts/utils/cryptography/ECDSA.sol": "ba7c2d314fcd61c9783e0b3f0c664d004b76b408fda6a84edc8267d17c5012d6",
|
|
36
43
|
"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol": "538a0d7c4f0ec5a8562f58561890f7b49d14580674ecf58bc5f505b45c73df65",
|
|
44
|
+
"@openzeppelin/contracts/utils/Strings.sol": "e318709bbe73a7831d64c1351e8bdc43780b245f25191234e361e6ab9b98c67b",
|
|
37
45
|
"@openzeppelin/contracts/proxy/Proxy.sol": "fa8aae37b2939371fcbce48b814c0d5c7e57e3e267f348459f29941937746c98",
|
|
38
46
|
"@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol": "a89ba2032ab25959c6fde1e508ebf8f966ff632703d3ef79684f578a8fa8033f",
|
|
39
47
|
"@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": "d20bb6bb32dd1fdb895914012ad08dc1e4bbd66df2e75a02c1ca97d884df70ed",
|
|
40
48
|
"@openzeppelin/contracts/proxy/utils/Initializable.sol": "f527a063813c2bf60c153fb08e38539578935402894fcc36fac42324ca325d3b",
|
|
41
49
|
"@openzeppelin/contracts/interfaces/draft-IERC1822.sol": "73653312bc2eda0ec231553a5295242eaef2d4f46a023532d45fe76cbd0f565f",
|
|
42
50
|
"@openzeppelin/contracts/utils/StorageSlot.sol": "75704538dcb223239280c6726d9a31cf769a7816718517c997fc7d63bdb70778",
|
|
43
|
-
"@openzeppelin/contracts/utils/Strings.sol": "e318709bbe73a7831d64c1351e8bdc43780b245f25191234e361e6ab9b98c67b",
|
|
44
|
-
"@openzeppelin/contracts/proxy/beacon/IBeacon.sol": "c1c9726bbb0ec4c540c7c98059dcded69a8586b46c168036672381033ee76239",
|
|
45
|
-
"@openzeppelin/contracts/interfaces/IERC1967.sol": "c4e901318ab6d4963582c62c62ce988a34c68dbae71846b67decacde79e9a317",
|
|
46
|
-
"@openzeppelin/contracts/utils/Address.sol": "73e54e15285455f0e01e136c3663732641537614723ae5dbd820eb3cb036b1fd",
|
|
47
|
-
"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": "caf06b4c93bbc1d54eb772e76e949bd4a2520c535cc591d07e57cbafaf90b2fd",
|
|
48
51
|
"@openzeppelin/contracts/utils/math/Math.sol": "bdfdbe133991c0c78042957ff5cd97167926fcaf6d15664f3835a076cb066457",
|
|
49
52
|
"@openzeppelin/contracts/utils/math/SafeCast.sol": "5779bc848bde39f1ad7bc02b4f708a0040888e0083b1a33f119cd94639350134",
|
|
50
53
|
"@openzeppelin/contracts/utils/math/SignedMath.sol": "1ed50b1056af886752f0fb48a0165d381e69bb4a4b18b893b066dc144a7e08d7",
|
|
51
54
|
"@openzeppelin/contracts/utils/Bytes.sol": "3ce9120a27934c75a074cb785d3a88868069ef6529dbe4dc6b845af0836f3c70",
|
|
55
|
+
"@openzeppelin/contracts/proxy/beacon/IBeacon.sol": "c1c9726bbb0ec4c540c7c98059dcded69a8586b46c168036672381033ee76239",
|
|
56
|
+
"@openzeppelin/contracts/interfaces/IERC1967.sol": "c4e901318ab6d4963582c62c62ce988a34c68dbae71846b67decacde79e9a317",
|
|
57
|
+
"@openzeppelin/contracts/utils/Address.sol": "73e54e15285455f0e01e136c3663732641537614723ae5dbd820eb3cb036b1fd",
|
|
58
|
+
"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": "caf06b4c93bbc1d54eb772e76e949bd4a2520c535cc591d07e57cbafaf90b2fd",
|
|
59
|
+
"@openzeppelin/contracts/utils/Panic.sol": "270fc8401c1a13fae6a7a4a2dd6e381b95d658896701e51f0d3e2688acab3dec",
|
|
52
60
|
"@openzeppelin/contracts/utils/Errors.sol": "0704b9d6c032cca8512a3bc3f30f49f86f1f03102d2896a3d23e794b82efea66",
|
|
53
|
-
"@openzeppelin/contracts/utils/LowLevelCall.sol": "e128cbe9c6c406d5a42c26e4079c0a95b369ce552f2d0c3dfd2fcb836c5708f2"
|
|
54
|
-
"@openzeppelin/contracts/utils/Panic.sol": "270fc8401c1a13fae6a7a4a2dd6e381b95d658896701e51f0d3e2688acab3dec"
|
|
61
|
+
"@openzeppelin/contracts/utils/LowLevelCall.sol": "e128cbe9c6c406d5a42c26e4079c0a95b369ce552f2d0c3dfd2fcb836c5708f2"
|
|
55
62
|
},
|
|
56
63
|
"sources": {
|
|
57
64
|
"LICENSE": "bfdc94eef4cfbec12a9ed47bb406c8125cf4c306facf7b8d92db58f133b1a703",
|
|
58
65
|
"contracts/D20VRFConsumer.sol": "9200fcd8825756ba6978e42d94b52e82e6dea9b1ba35dc506652490194e16162",
|
|
59
|
-
"contracts/D20VRFCoordinator.sol": "
|
|
60
|
-
"contracts/examples/MiningRandomnessConsumer.sol": "2f5c19d05e66bea313fff65269650fe1e3bea70bd6aa80fa3e3de8bee8c24649",
|
|
66
|
+
"contracts/D20VRFCoordinator.sol": "fa3ea7d7995c5dd8f6a9cd50140f0cb8d35e441a6ecda513f6e82fbbacea9eaf",
|
|
61
67
|
"contracts/interfaces/ID20VRF.sol": "0361aee07644cbf7c2bcde8ffd9188825d5be633c4a1520169a7702a38c1bdbc",
|
|
62
68
|
"contracts/libraries/D20VRFRequests.sol": "f87e66f7eb0350d9b8740f120b97085957793b826b81a0c7c80d58a3fcd92b76",
|
|
63
69
|
"contracts/libraries/RandomnessMapping.sol": "00bce68c1a6d89903d72d1c3f9ee5e1a56392188ed29b6aa32ab7451ef180c91",
|
|
64
70
|
"contracts/vendor/CHAINLINK-LICENSE": "25a502f8fd39602de8a98cc4835a4bf81851b095d6f2c5c130bf0863afac6c99",
|
|
65
|
-
"contracts/vendor/PROVENANCE.md": "
|
|
71
|
+
"contracts/vendor/PROVENANCE.md": "56d0e087c3e3fffca95aa8a371979c32239c97a066ca02bb36ae2f0d2af46ffe",
|
|
66
72
|
"contracts/vendor/VRF.sol": "98e0345fd2dd42178cad4ad16dd8b18621112078d63d0c64839c8bd01c539350",
|
|
67
73
|
"src/evidence.ts": "81b6a1446b9700ec545e794b08d356411608aa655e6030cdfabd1dfa531ef457",
|
|
68
|
-
"src/index.ts": "
|
|
74
|
+
"src/index.ts": "a120030d296f518925159422873b796614ab83aef53fbe2acd89ea517d10f7d9",
|
|
69
75
|
"src/mapping.ts": "76aa6093d55831052b56e177fc394ef6ef14183a8ab8ca6fcc2c9382efb6b83f",
|
|
70
76
|
"src/replay.ts": "c97a5081e785e6a7f27987e2d4c4d9861fe8fa8cbc775b0152e337141d3d48d7",
|
|
71
|
-
"src/sources.ts": "
|
|
77
|
+
"src/sources.ts": "93dad72dd9b5e54a7781b642a0715317bdd8d23d107d53ce64a7e62ea960bdde",
|
|
72
78
|
"src/verification.ts": "754e39554c0c432cf1404741503f66b4199b84f39003d8e42f300a7256ffaa6a",
|
|
73
|
-
"src/epoch.ts": "
|
|
74
|
-
"contracts/EpochEntropy.sol": "
|
|
75
|
-
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286"
|
|
79
|
+
"src/epoch.ts": "226f0c12f138fa4b45c0d073a5aceac4344882ecbdf9593053535ecd4e9a772a",
|
|
80
|
+
"contracts/EpochEntropy.sol": "100785392042af99e710af2e13855fd44d9c1018e33220d2601f75a3cb72f441",
|
|
81
|
+
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286",
|
|
82
|
+
"contracts/libraries/DataTemplate.sol": "f0d93c2ec3bcb8cfb625001506fe24f938e6e2cfbae85632f2980d23595ed961",
|
|
83
|
+
"src/templates.ts": "7f74968e746461e168a863769736399d74bdab29041ab8dd1cdc0d197b927e61",
|
|
84
|
+
"contracts/D20BeaconVerifier.sol": "f2eb0917c2d996f4c3e4969d37e32366163532605cb9ae8e7e97e86935c7b068",
|
|
85
|
+
"contracts/interfaces/IBeaconVerifier.sol": "75782d629af93a368e216272cd1ab25191907ab65e79510294e8679a0f7c6f74",
|
|
86
|
+
"contracts/vendor/bls-bn254/BLS.sol": "887fd94553b9d6d0a247900bdb05523d3b9ef3b8ca049e2a0524a0b1a9d37e69",
|
|
87
|
+
"contracts/vendor/bls-bn254/ModExp.sol": "fd91ae9291511668914b05fece03fb9bf6e2b57f7784d2edddc82456af12b495",
|
|
88
|
+
"contracts/vendor/bls-bn254/LICENSE": "af36460fa628a7aca8c5b1f1b6b3615376f00212284fa0fd61a013ee982a3666",
|
|
89
|
+
"src/beacon.ts": "ab94d0702d7174405be085ac4ed4139a71c9d62929e05b93dc3f9e09f6d0a776"
|
|
76
90
|
},
|
|
77
91
|
"packageSources": {
|
|
78
92
|
"src/fees.ts": "836f6a6e14d638876a4ceca8f3369577edb5d242096b420606fb69c74bb7dcae"
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
Replay covers drand beacon epochs. Arc Testnet draws its epochs from drand since epoch 11319 (2026-09-30) and Arc
|
|
6
|
+
Mainnet since epoch 12448 (2026-10-01). The proxy addresses are unchanged and the interface a consumer calls is the
|
|
7
|
+
same as in 0.4.0, so a consumer needs no change. Replay tools do: 0.4.0 rejects a beacon epoch's 64-byte signature
|
|
8
|
+
with `Expected canonical 65-byte low-s EIP-191 signature`.
|
|
9
|
+
|
|
10
|
+
### Protocol
|
|
11
|
+
|
|
12
|
+
- **The registry has beacon recipes.** `registerBeacon` appends a public randomness beacon as an immutable recipe;
|
|
13
|
+
`beaconOf`, `slotSigner`, `verifyBeacon`, `BEACON_VERIFY_GAS` and `BEACON_DOMAIN` read it, and `BeaconRegistered`
|
|
14
|
+
and `BeaconGasTooLow` are the new event and error. An epoch it serves commits one drand round: the round number as
|
|
15
|
+
data, the round's scheduled time as timestamp and the beacon's 64-byte BLS signature, which the stateless
|
|
16
|
+
`D20BeaconVerifier` (BLS on BN254, built on the unmodified kevincharm/bls-bn254 library) checks on chain. The
|
|
17
|
+
catalog's signer for a beacon slot is `slotSigner(recipe)`.
|
|
18
|
+
- `scheduleCatalog` keeps the version that takes effect at the next epoch and replaces only a version two or more
|
|
19
|
+
epochs ahead. A beacon recipe must be listed with its `slotSigner`.
|
|
20
|
+
- New registry implementation `0xD20dA0853a6f894c0cdc9018fD4F8F67Eac15704` and verifier
|
|
21
|
+
`0xd20dA01Aa16AeD6b77Cd8DDb869151802599100a` on both chains, behind the unchanged proxies: Arc Testnet from block
|
|
22
|
+
64712965, Arc Mainnet from block 23724929 (transaction
|
|
23
|
+
`0x5a7a2fa8f15eefccee99f6bd363ce7717e65c5571c8c76396337fd8a1261a7cb`).
|
|
24
|
+
`protocol/` now also carries the source of the coordinator implementation `0xD20da000125643B4db5A6A36A3b853c17745DF44`
|
|
25
|
+
live since 2026-09-22: the batch gas guard and the zero minimum fee check.
|
|
26
|
+
- Catalogs: Arc Testnet `[0,1,2,4,5]` from epoch 966, `[6,7,8,9,10]` from 10108 and `[11]` from 11319; Arc Mainnet
|
|
27
|
+
`[0,1,2,4,5]` from epoch 848, `[6,7,8,9,10]` from 10070 and `[11]` from 12448.
|
|
28
|
+
|
|
29
|
+
### SDK
|
|
30
|
+
|
|
31
|
+
- `replayEpochCommitment` and `replayCoordinator` verify both record types. A beacon epoch needs the registration in
|
|
32
|
+
the recipe book: round, scheduled time, BLS signature and slot signer are checked. Signed-record epochs replay as
|
|
33
|
+
before: nine Arc Mainnet and three Arc Testnet signed-record requests give the same result in 0.4.0 and 0.5.0.
|
|
34
|
+
- `readEpochRecipes` reads `beaconOf` for a recipe that names drand and accepts `{ blockTag }`. `EpochRecipe` has an
|
|
35
|
+
optional `beacon` registration.
|
|
36
|
+
- New exports: `DRAND_EVMNET`, `BEACON_TEMPLATE`, `BEACON_DST`, `BEACON_DOMAIN`, `beaconRoundTime`, `beaconRoundAt`,
|
|
37
|
+
`encodeBeaconRound`, `decodeBeaconRound`, `beaconCanonicalRequest`, `beaconSlotSigner`, `beaconRoundMessage`,
|
|
38
|
+
`verifyBeaconRound` and `BeaconRegistration`. The passthrough-recipe helpers of the protocol source are exported too:
|
|
39
|
+
`PASSTHROUGH`, `PASSTHROUGH_EPOCH_REQUESTS`, `passthroughEpochRecipe`, `canonicalPassthroughRequest`,
|
|
40
|
+
`parsePassthroughRequest` and `passthroughUrl`; `canonicalRequestOfBody` accepts a passthrough body.
|
|
41
|
+
- `beaconVerifierAbi` and `abi/D20BeaconVerifier.json` are the verifier's ABI, and `epochEntropyAbi` covers the beacon
|
|
42
|
+
functions. `API.md` documents them and the changed coordinator source.
|
|
43
|
+
- The BN254 curve comes from `@noble/curves` 1.9.7, the version already in use. It is read only inside the functions
|
|
44
|
+
that verify a round, so a bundler leaves it out of a bundle that reaches none of them; importing the package in Node
|
|
45
|
+
loads it, which adds about 45 ms.
|
|
46
|
+
- Tests replay real Arc requests recorded from the public RPCs, including the first Arc Mainnet drand epoch (12448),
|
|
47
|
+
with tampered-signature, wrong-round, wrong-signer and missing-registration cases, and real drand rounds checked
|
|
48
|
+
against another library's hash-to-curve points.
|
|
49
|
+
- README and `AGENTS.md`: verification covers both record types, the catalog history replaces the single five-source
|
|
50
|
+
catalog, the implementation tables list the registry upgrade and the verifier, and `protocol/` is described as a
|
|
51
|
+
byte-for-byte copy of the keeper source at the pinned commit, checked by its SHA-256 list; that commit is ahead of the
|
|
52
|
+
latest release of the public keeper repository.
|
|
53
|
+
- Vendored protocol re-pinned; `PROTOCOL-PROVENANCE.json` names the commit and the SHA-256 of every file, including
|
|
54
|
+
the vendored bls-bn254 library, whose license ships as `notices/BLS-BN254-LICENSE`.
|
|
55
|
+
|
|
56
|
+
## 0.4.0
|
|
57
|
+
|
|
58
|
+
Both Arc networks run the upgraded contracts. The proxy addresses are unchanged, so nothing in an existing
|
|
59
|
+
integration has to move; the coordinator interface a consumer calls is the same as in 0.3.4.
|
|
60
|
+
|
|
61
|
+
### Protocol
|
|
62
|
+
|
|
63
|
+
- **The epoch source catalog is an on-chain recipe registry.** A recipe is a canonical request, a data template
|
|
64
|
+
that fixes the exact signed bytes the registry accepts, and the gateway body. `registerRecipe` appends an id
|
|
65
|
+
and a registered recipe never changes. Five sources are active: Hyperliquid BTC day volume, dRPC Ethereum
|
|
66
|
+
block hash, TickerLayer BTCUSD, Nodary ETH/USD and dRPC Base block hash. Arc Testnet draws from them
|
|
67
|
+
from epoch 966 and Arc Mainnet from epoch 848.
|
|
68
|
+
- **The keeper share follows the wallet that serves the request.** At proof acceptance `keeperFeeBps` of the
|
|
69
|
+
escrowed fee goes to the submitting wallet when the registry authorizes it — the committer or an allowed
|
|
70
|
+
backup committer — and to `committer()` for any other submitter. Backup committers let a second keeper take
|
|
71
|
+
over. Consumers see no API change.
|
|
72
|
+
- New implementations behind the unchanged proxies on both chains: registry
|
|
73
|
+
`0xd20dA048C969e5aDcC703Dfdf8220cc9dCB2f865`, coordinator `0xd20da0DADa4352A1a9722be43a2D85923443458c`.
|
|
74
|
+
|
|
75
|
+
### SDK
|
|
76
|
+
|
|
77
|
+
- New epoch helpers for the registry: `BUILTIN_EPOCH_RECIPES`, `readEpochRecipes`, `resolveEpochCatalog` and
|
|
78
|
+
`MAX_ATTESTATION_AGE`, plus the data-template helpers `encodeDataTemplate`, `decodeDataTemplate`,
|
|
79
|
+
`matchesDataTemplate`, `isValidDataTemplate` and `validateDataTemplate` on the root entry point.
|
|
80
|
+
- `epochEntropyAbi` and `abi/EpochEntropy.json` cover `registerRecipe`, `getRecipe`, `recipeCount`,
|
|
81
|
+
`scheduleCatalog`, `catalogAt`, `setBackupCommitter`, `isBackupCommitter` and `isAuthorizedCommitter`. The
|
|
82
|
+
four-signer catalog views (`signersAt`, `catalogHashAt`, `anuSigner`) are gone.
|
|
83
|
+
- `replayEpochCommitment` checks the committed packet against the recipe's canonical request and data template,
|
|
84
|
+
and derives the fallback attempt from the committed source.
|
|
85
|
+
- Three examples replace the previous two. `examples/DiceConsumer.sol` is a dice roll,
|
|
86
|
+
`examples/RaffleConsumer.sol` draws one winner from a frozen list and shows the `_onRefund` hook, and
|
|
87
|
+
`examples/LootDropConsumer.sol` is a weighted drop. Each is self-contained and sixty to seventy lines.
|
|
88
|
+
- **Removed:** `contracts/examples/MiningRandomnessConsumer.sol`. It was an abstract building block for one
|
|
89
|
+
application, not something to copy on a first day. Nothing else imported it; the payment pattern it showed is
|
|
90
|
+
in [Best practices](README.md#best-practices) and the change-returning variant is in `DiceConsumer`.
|
|
91
|
+
- New [Best practices](README.md#best-practices) section in the README, reflected in `AGENTS.md`.
|
|
92
|
+
- Vendored protocol re-pinned; `PROTOCOL-PROVENANCE.json` names the commit and the SHA-256 of every file.
|
|
93
|
+
|
|
94
|
+
## 0.3.4 and earlier
|
|
95
|
+
|
|
96
|
+
Base-fee request pricing (`quoteFee`, `quoteFeeAt`, `quoteRequestFee`) with overpayment credit, epoch source
|
|
97
|
+
fallback, the generated `API.md` reference, the Arc Mainnet deployment and the 50% keeper share.
|
package/PROTOCOL-PROVENANCE.json
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sourceRepository": "https://github.com/d20dao/keeper",
|
|
3
|
-
"sourceCommit": "
|
|
4
|
-
"note": "
|
|
3
|
+
"sourceCommit": "98e537fb249dd0d3365b8d78e6040a9323a65a88",
|
|
4
|
+
"note": "Protocol copied byte-for-byte from the committed Git blobs of the keeper source at sourceCommit, which is ahead of the latest release of the public repository named in sourceRepository. Operator backends, keys, test fixtures and proof generation are excluded from the package.",
|
|
5
5
|
"files": {
|
|
6
6
|
"LICENSE": "bfdc94eef4cfbec12a9ed47bb406c8125cf4c306facf7b8d92db58f133b1a703",
|
|
7
7
|
"contracts/D20VRFConsumer.sol": "9200fcd8825756ba6978e42d94b52e82e6dea9b1ba35dc506652490194e16162",
|
|
8
|
-
"contracts/D20VRFCoordinator.sol": "
|
|
9
|
-
"contracts/examples/MiningRandomnessConsumer.sol": "2f5c19d05e66bea313fff65269650fe1e3bea70bd6aa80fa3e3de8bee8c24649",
|
|
8
|
+
"contracts/D20VRFCoordinator.sol": "fa3ea7d7995c5dd8f6a9cd50140f0cb8d35e441a6ecda513f6e82fbbacea9eaf",
|
|
10
9
|
"contracts/interfaces/ID20VRF.sol": "0361aee07644cbf7c2bcde8ffd9188825d5be633c4a1520169a7702a38c1bdbc",
|
|
11
10
|
"contracts/libraries/D20VRFRequests.sol": "f87e66f7eb0350d9b8740f120b97085957793b826b81a0c7c80d58a3fcd92b76",
|
|
12
11
|
"contracts/libraries/RandomnessMapping.sol": "00bce68c1a6d89903d72d1c3f9ee5e1a56392188ed29b6aa32ab7451ef180c91",
|
|
13
12
|
"contracts/vendor/CHAINLINK-LICENSE": "25a502f8fd39602de8a98cc4835a4bf81851b095d6f2c5c130bf0863afac6c99",
|
|
14
|
-
"contracts/vendor/PROVENANCE.md": "
|
|
13
|
+
"contracts/vendor/PROVENANCE.md": "56d0e087c3e3fffca95aa8a371979c32239c97a066ca02bb36ae2f0d2af46ffe",
|
|
15
14
|
"contracts/vendor/VRF.sol": "98e0345fd2dd42178cad4ad16dd8b18621112078d63d0c64839c8bd01c539350",
|
|
16
15
|
"src/evidence.ts": "81b6a1446b9700ec545e794b08d356411608aa655e6030cdfabd1dfa531ef457",
|
|
17
|
-
"src/index.ts": "
|
|
16
|
+
"src/index.ts": "a120030d296f518925159422873b796614ab83aef53fbe2acd89ea517d10f7d9",
|
|
18
17
|
"src/mapping.ts": "76aa6093d55831052b56e177fc394ef6ef14183a8ab8ca6fcc2c9382efb6b83f",
|
|
19
18
|
"src/replay.ts": "c97a5081e785e6a7f27987e2d4c4d9861fe8fa8cbc775b0152e337141d3d48d7",
|
|
20
|
-
"src/sources.ts": "
|
|
19
|
+
"src/sources.ts": "93dad72dd9b5e54a7781b642a0715317bdd8d23d107d53ce64a7e62ea960bdde",
|
|
21
20
|
"src/verification.ts": "754e39554c0c432cf1404741503f66b4199b84f39003d8e42f300a7256ffaa6a",
|
|
22
|
-
"src/epoch.ts": "
|
|
23
|
-
"contracts/EpochEntropy.sol": "
|
|
24
|
-
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286"
|
|
21
|
+
"src/epoch.ts": "226f0c12f138fa4b45c0d073a5aceac4344882ecbdf9593053535ecd4e9a772a",
|
|
22
|
+
"contracts/EpochEntropy.sol": "100785392042af99e710af2e13855fd44d9c1018e33220d2601f75a3cb72f441",
|
|
23
|
+
"contracts/D20Proxy.sol": "83dcef3b72e2a0a4809c2d8df0d083d2a0f659fe2b3b01fadb1b2eaf8afb7286",
|
|
24
|
+
"contracts/libraries/DataTemplate.sol": "f0d93c2ec3bcb8cfb625001506fe24f938e6e2cfbae85632f2980d23595ed961",
|
|
25
|
+
"src/templates.ts": "7f74968e746461e168a863769736399d74bdab29041ab8dd1cdc0d197b927e61",
|
|
26
|
+
"contracts/D20BeaconVerifier.sol": "f2eb0917c2d996f4c3e4969d37e32366163532605cb9ae8e7e97e86935c7b068",
|
|
27
|
+
"contracts/interfaces/IBeaconVerifier.sol": "75782d629af93a368e216272cd1ab25191907ab65e79510294e8679a0f7c6f74",
|
|
28
|
+
"contracts/vendor/bls-bn254/BLS.sol": "887fd94553b9d6d0a247900bdb05523d3b9ef3b8ca049e2a0524a0b1a9d37e69",
|
|
29
|
+
"contracts/vendor/bls-bn254/ModExp.sol": "fd91ae9291511668914b05fece03fb9bf6e2b57f7784d2edddc82456af12b495",
|
|
30
|
+
"contracts/vendor/bls-bn254/LICENSE": "af36460fa628a7aca8c5b1f1b6b3615376f00212284fa0fd61a013ee982a3666",
|
|
31
|
+
"src/beacon.ts": "ab94d0702d7174405be085ac4ed4139a71c9d62929e05b93dc3f9e09f6d0a776"
|
|
25
32
|
}
|
|
26
33
|
}
|