Skip to content

Commit 787810f

Browse files
author
Nicolas Tallar
committed
[ETCM-44] Treasury block reward distribution
1 parent 6a58490 commit 787810f

22 files changed

+278
-128
lines changed

insomnia_workspace.json

Lines changed: 89 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"_type": "export",
33
"__export_format": 4,
4-
"__export_date": "2020-09-21T12:39:47.334Z",
5-
"__export_source": "insomnia.desktop.app:v2020.3.3",
4+
"__export_date": "2020-09-24T17:48:32.016Z",
5+
"__export_source": "insomnia.desktop.app:v2020.2.1",
66
"resources": [
77
{
88
"_id": "req_cd0078ce4a034ebdbdf7dc9e20e78a29",
@@ -149,6 +149,80 @@
149149
"parentId": "wrk_097d43914a4d4aea8b6f73f647921182",
150150
"_type": "request_group"
151151
},
152+
{
153+
"_id": "req_b47c93b7db864ccba4ef8b9ea4f2c101",
154+
"authentication": {},
155+
"body": {
156+
"mimeType": "application/json",
157+
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"personal_sendTransaction\", \n \"params\": [{\n\t\t\"from\": \"$address\",\n\t\t\"data\": \"6080604052348015600f57600080fd5b50609e8061001e6000396000f3fe608060405260043610603f576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063fc0e74d1146044575b600080fd5b348015604f57600080fd5b5060566058565b005b600073ffffffffffffffffffffffffffffffffffffffff16fffea165627a7a72305820a976be5f8d63b79a56bb1244dd07b0ef1abd13c682f86e5462c71e8cbbfa79320029\",\n\t\t\"value\": \"0x0\",\n\t\t\"gasLimit\": \"0x166f5777\",\n\t\t\"gasPrice\": \"0x0\"\n\t}, \"12345678\"],\n \"id\": 1\n}"
158+
},
159+
"created": 1600875628490,
160+
"description": "",
161+
"headers": [
162+
{
163+
"id": "pair_9f4d6a9dde554cd384487e04fa3b21aa",
164+
"name": "Content-Type",
165+
"value": "application/json"
166+
},
167+
{
168+
"id": "pair_088edc31f5e04f20a16b465a673871bb",
169+
"name": "Cache-Control",
170+
"value": "no-cache"
171+
}
172+
],
173+
"isPrivate": false,
174+
"metaSortKey": -1552939150156.0508,
175+
"method": "POST",
176+
"modified": 1600875893860,
177+
"name": "personal_sendTransaction",
178+
"parameters": [],
179+
"parentId": "fld_72829b866f0441e184e0d1a2030f8220",
180+
"settingDisableRenderRequestBody": false,
181+
"settingEncodeUrl": true,
182+
"settingFollowRedirects": "global",
183+
"settingRebuildPath": true,
184+
"settingSendCookies": true,
185+
"settingStoreCookies": true,
186+
"url": "{{ node_url }}",
187+
"_type": "request"
188+
},
189+
{
190+
"_id": "req_0185846496ad4bab9d52ec29b8052c5c",
191+
"authentication": {},
192+
"body": {
193+
"mimeType": "application/json",
194+
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"personal_unlockAccount\", \n \"params\": [\"$address\", \"12345678\"],\n \"id\": 1\n}"
195+
},
196+
"created": 1600875587412,
197+
"description": "",
198+
"headers": [
199+
{
200+
"id": "pair_9f4d6a9dde554cd384487e04fa3b21aa",
201+
"name": "Content-Type",
202+
"value": "application/json"
203+
},
204+
{
205+
"id": "pair_088edc31f5e04f20a16b465a673871bb",
206+
"name": "Cache-Control",
207+
"value": "no-cache"
208+
}
209+
],
210+
"isPrivate": false,
211+
"metaSortKey": -1552939150155.3672,
212+
"method": "POST",
213+
"modified": 1600875607946,
214+
"name": "personal_unlockAccount",
215+
"parameters": [],
216+
"parentId": "fld_72829b866f0441e184e0d1a2030f8220",
217+
"settingDisableRenderRequestBody": false,
218+
"settingEncodeUrl": true,
219+
"settingFollowRedirects": "global",
220+
"settingRebuildPath": true,
221+
"settingSendCookies": true,
222+
"settingStoreCookies": true,
223+
"url": "{{ node_url }}",
224+
"_type": "request"
225+
},
152226
{
153227
"_id": "req_105cb28c6f774eadbf099a28617a6d1f",
154228
"authentication": {},
@@ -199,7 +273,7 @@
199273
"_type": "request_group"
200274
},
201275
{
202-
"_id": "req_0ff71c4f648c4d3782612e9c53179321",
276+
"_id": "req_b60c1a4f9d604d868910f967c6a070d7",
203277
"authentication": {},
204278
"body": {
205279
"mimeType": "application/json",
@@ -212,10 +286,15 @@
212286
"id": "pair_c33a6ada19dd4aa8b75527639519f427",
213287
"name": "Content-Type",
214288
"value": "application/json"
289+
},
290+
{
291+
"id": "pair_088edc31f5e04f20a16b465a673871bb",
292+
"name": "Cache-Control",
293+
"value": "no-cache"
215294
}
216295
],
217296
"isPrivate": false,
218-
"metaSortKey": -1600691926224,
297+
"metaSortKey": -1565685344804,
219298
"method": "POST",
220299
"modified": 1600691932451,
221300
"name": "eth_chainId",
@@ -227,7 +306,7 @@
227306
"settingRebuildPath": true,
228307
"settingSendCookies": true,
229308
"settingStoreCookies": true,
230-
"url": "{{node_url}}",
309+
"url": "{{ node_url }}",
231310
"_type": "request"
232311
},
233312
{
@@ -243,13 +322,13 @@
243322
"_type": "request_group"
244323
},
245324
{
246-
"_id": "req_b60c1a4f9d604d868910f967c6a070d7",
325+
"_id": "req_97fa82439e3e46bfb8ee26400af6215d",
247326
"authentication": {},
248327
"body": {
249328
"mimeType": "application/json",
250329
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockByNumber\", \n\t\"params\": [\"latest\", true],\n \"id\": 1\n}"
251330
},
252-
"created": 1570730266922,
331+
"created": 1552939150179,
253332
"description": "",
254333
"headers": [
255334
{
@@ -264,7 +343,7 @@
264343
}
265344
],
266345
"isPrivate": false,
267-
"metaSortKey": -1565685344804,
346+
"metaSortKey": -1565685344791.5,
268347
"method": "POST",
269348
"modified": 1573216252176,
270349
"name": "eth_getBlockByNumber (get latest block)",
@@ -280,13 +359,13 @@
280359
"_type": "request"
281360
},
282361
{
283-
"_id": "req_97fa82439e3e46bfb8ee26400af6215d",
362+
"_id": "req_37ff379315d84ec2acf828c8ff27e31d",
284363
"authentication": {},
285364
"body": {
286365
"mimeType": "application/json",
287366
"text": "{\n\t\"jsonrpc\": \"2.0\",\n \"method\": \"eth_getBlockByNumber\", \n\t\"params\": [\"0x6\", true],\n \"id\": 1\n}"
288367
},
289-
"created": 1552939150179,
368+
"created": 1573216166361,
290369
"description": "",
291370
"headers": [
292371
{

src/ets/scala/io/iohk/ethereum/ets/blockchain/BlockchainTestConfig.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ object BlockchainTestConfig {
4343
atlantisBlockNumber = Long.MaxValue,
4444
aghartaBlockNumber = Long.MaxValue,
4545
phoenixBlockNumber = Long.MaxValue,
46-
ecip1098BlockNumber = Long.MaxValue
46+
ecip1098BlockNumber = Long.MaxValue,
47+
treasuryAddress = Address(0)
4748
)
4849

4950
val FrontierConfig = BaseBlockchainConfig.copy(

src/it/scala/io/iohk/ethereum/txExecTest/ECIP1017Test.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package io.iohk.ethereum.txExecTest
22

33
import java.util.concurrent.Executors
44

5-
import io.iohk.ethereum.domain.{ BlockchainImpl, Receipt, UInt256 }
5+
import io.iohk.ethereum.domain.{Address, BlockchainImpl, Receipt, UInt256}
66
import io.iohk.ethereum.ledger._
77
import io.iohk.ethereum.txExecTest.util.FixtureProvider
8-
import io.iohk.ethereum.utils.{ BlockchainConfig, MonetaryPolicyConfig }
9-
import org.scalatest.{ FlatSpec, Matchers }
8+
import io.iohk.ethereum.utils.{BlockchainConfig, MonetaryPolicyConfig}
9+
import org.scalatest.{FlatSpec, Matchers}
1010

1111
import scala.concurrent.ExecutionContext
1212

@@ -47,7 +47,8 @@ class ECIP1017Test extends FlatSpec with Matchers {
4747
aghartaBlockNumber = Long.MaxValue,
4848
phoenixBlockNumber = Long.MaxValue,
4949
petersburgBlockNumber = Long.MaxValue,
50-
ecip1098BlockNumber = Long.MaxValue
50+
ecip1098BlockNumber = Long.MaxValue,
51+
treasuryAddress = Address(0)
5152
)
5253
val ec = ExecutionContext.fromExecutor(Executors.newFixedThreadPool(4))
5354

src/it/scala/io/iohk/ethereum/txExecTest/ForksTest.scala

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ package io.iohk.ethereum.txExecTest
22

33
import java.util.concurrent.Executors
44

5-
import io.iohk.ethereum.domain.{ BlockchainImpl, Receipt, UInt256 }
6-
import io.iohk.ethereum.ledger.{ BlockExecution, BlockQueue, BlockValidation }
5+
import io.iohk.ethereum.domain.{Address, BlockchainImpl, Receipt, UInt256}
6+
import io.iohk.ethereum.ledger.{BlockExecution, BlockQueue, BlockValidation}
77
import io.iohk.ethereum.txExecTest.util.FixtureProvider
8-
import io.iohk.ethereum.utils.{ BlockchainConfig, MonetaryPolicyConfig }
9-
import org.scalatest.{ FlatSpec, Matchers }
8+
import io.iohk.ethereum.utils.{BlockchainConfig, MonetaryPolicyConfig}
9+
import org.scalatest.{FlatSpec, Matchers}
1010

1111
import scala.concurrent.ExecutionContext
1212

@@ -44,7 +44,8 @@ class ForksTest extends FlatSpec with Matchers {
4444
aghartaBlockNumber = Long.MaxValue,
4545
phoenixBlockNumber = Long.MaxValue,
4646
petersburgBlockNumber = Long.MaxValue,
47-
ecip1098BlockNumber = Long.MaxValue
47+
ecip1098BlockNumber = Long.MaxValue,
48+
treasuryAddress = Address(0)
4849
)
4950

5051
val noErrors = a[Right[_, Seq[Receipt]]]

src/main/resources/chains/etc-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
# Proto-treasury fork block number (ETC only, but deactivated for now)
8282
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
83+
treasury-address = "0011223344556677889900112233445566778899"
8384
ecip1098-block-number = "1000000000000000000"
8485

8586
# DAO fork configuration (Ethereum HF/Classic split)

src/main/resources/chains/eth-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
# Proto-treasury fork block number (ETC only, but deactivated for now)
8282
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
83+
treasury-address = "0011223344556677889900112233445566778899"
8384
ecip1098-block-number = "1000000000000000000"
8485

8586
# DAO fork configuration (Ethereum HF/Classic split)

src/main/resources/chains/mordor-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
# Proto-treasury fork block number (ETC only, but deactivated for now)
8282
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
83+
treasury-address = "0011223344556677889900112233445566778899"
8384
ecip1098-block-number = "1000000000000000000"
8485

8586
# DAO fork configuration (Ethereum HF/Classic split)

src/main/resources/chains/ropsten-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383

8484
# Proto-treasury fork block number (ETC only, but deactivated for now)
8585
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
86+
treasury-address = "0011223344556677889900112233445566778899"
8687
ecip1098-block-number = "1000000000000000000"
8788

8889
# DAO fork configuration (Ethereum HF/Classic split)

src/main/resources/chains/test-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
# Proto-treasury fork block number (ETC only, but deactivated for now)
8282
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
83+
treasury-address = "0011223344556677889900112233445566778899"
8384
ecip1098-block-number = "1000000000000000000"
8485

8586
# DAO fork configuration (Ethereum HF/Classic split)

src/main/resources/chains/testnet-internal-chain.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080

8181
# Proto-treasury fork block number (ETC only, but deactivated for now)
8282
# https://ecips.ethereumclassic.org/ECIPs/ecip-1098
83+
treasury-address = "0011223344556677889900112233445566778899"
8384
ecip1098-block-number = "1000000000000000000"
8485

8586
# DAO fork configuration (Ethereum HF/Classic split)

0 commit comments

Comments
 (0)