Skip to content

Instantly share code, notes, and snippets.

View tranvictor's full-sized avatar

Victor Tran tranvictor

View GitHub Profile
[6100258 1679244 7186452 8548988 5525504 8591682 7817920 7707803 3647301 9632067 9094506 4755354 2769219 9468202 1218192 2887829 1870009 921735 1366012 1755583 6391156 9760105 7323962 7959186 4833456 2553397 6345470 6437303 120678 1919905 8868019 6865013 9030547 1369996 5453685 4696215 3063135 6757181 2950714 3222015 231031 8526593 626784 9121376 2544823 8974305 8106659 8366486 1997695 4428246 7150657 6338147 7533776 3443142 8294240 9186007 8267176 9324280 4741270 5541823 4858294 7689845 7943904 8895903]
[6100258 1679244 7186452 8548988 5525504 8591682 7817920 7707803 3647301 9632067 9094506 4755354 2769219 9468202 1218192 2887829 1870009 921735 1366012 1755583 6391156 9760105 7323962 7959186 4833456 2553397 6345470 6437303 120678 1919905 8868019 6865013 9030547 1369996 5453685 4696215 3063135 6757181 2950714 3222015 231031 8526593 626784 9121376 2544823 8974305 8106659 8366486 1997695 4428246 7150657 6338147 7533776 3443142 8294240 9186007 8267176 9324280 4741270 5541823 4858294 7689845 7943904 8895903]
0x52754c117b85d478e491a6b8510b486abca87d6f
curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["pending", false],"id":1}' localhost:8545
Using miner address: 0x001adbc838ede392b5b054a47f8b8c28f2fa9f3f
Connected to Ethereum node: Parity//v1.6.2-beta-8a27211-20170311/x86_64-macos/rustc1.15.1
Using miner address: 0x001adbc838ede392b5b054a47f8b8c28f2fa9f3f
Please enter passphrase:
Unlocking account...Done.
The address is already registered to the pool. Good to go.
Share collector is running...
RPC Server is running...
You can start mining now by running ethminer using following command:
--------------------------
epoch_params = [0x5cf0ab674551868e8887da00281a057c, 15204349, 24, 104]
submit_claim_params = [1, 120394963533509, 0x589a31aa0000000000000000, 0x589a31aa0000000000000000, 0x506aa0f947bba3155cf30163ba064f01]
cache_elements = [0xc8cc30930a6d053ca53ea4417870239489572dcde99babf3b3f964f08be1f9ad, 0x3b2af22a4f5e70407b19cc65cd1a36ddef84d559dfed0ea2251358b74b2da77d, 0xde7e291ce9830f6478f7f7e8150039718d98363c76e93899d30fd9dcb79e41, 0xa018793fa3e36cb26a006c5788a5f2708dcf562ec734a63013f150e075e63098, 0xc1ee2fc139e1a7ebf1d2737d58977687a9d867f81d9422aec3f69a7a8a6f65b6, 0x691981fe5dc8c3952e5c5f87188456d055cb7ea54ec325c177705f6e4f08aa43, 0x70d85bce95214712f061615ee5d04112b8df24afb862454efc8c169858207b15, 0x78305b7f59e51ca7d9ad1d2abafcaf3584c9c17bed54598bc9be91bc234b3ea4, 0xcc36820891e9c5ed3fd36fa840983dcd39f6f8c560deb0d8cc43cfbc86dc309d, 0xe9fd36ac4e196db14608c9c53641c58ed5319d39d2851ea96ab8458e0d2d18e0, 0xe59a9f55b9f829abc01e1d9e4654ee3181feeee1bf5e0db853e2bf8b09111b42, 0xba3fe8aad13b2a90dee4e7b944713669c3cd912fc5d410cd494a
Design question:
How would you design some modules and their responsibilites to model this scenario:
The company needs a container which receives blocks (1 at a time continously), it waits to have `PackageNo` number of blocks
to wrap them to a package then sends the package to a server via HTTP. After the package is sent, the container gets a
transaction ID meaning that the package is delivered to the server. Unfortunately, the cointainer doesn't know if the package
is actually accepted by the server immediately because it has to do some verifications on that block. There is an API that can
be used periodically to check if the block is actually accepted or not. The container needs to know when a block is accepted
to call another API.
epoch_params = [0xf34cafdb92d8626451414882183e1211, 8388593, 23, 0]
submit_claim_params = [8, 989235, 0x5831e71fb00a73511db2eef0, 0x5831e74f2cd4b5a05f2e651a, 0xa2367a06af1ee3a1e24ce69a1ade8818]
cache_elements = [0xdea9003f602a1c7027e43c3704965cec9081c20ecb89fa23e386e4c9ec8faa64, 0x420fe073acd4767d70baabba4207ba753870c87ce687e77db5cdaf3050fdef49, 0x2401a80cba2b2dcaa8740d9de64303f87fdb62e867cb0d76d47448649e7bd8e5, 0x6dbc159278fae5ca4e477c7cba6c7254c236b01c4fe68a84f2cd06aea2f400de, 0x7225d0bd223d17b7cfe074d298ad83e1db4a7967878c169851b7fcdf41e8ab35, 0xb568758a39f5ea69cb60f59a85644705ee70a201379c4ae0b3caf8da919494c2, 0x197b1e61549b8a6d4731b40aa08d4321cb387423f45efc6a5832d9b235605e2a, 0xeed2e89eba53d800fc09fb2c213b91ec7a919ac3d597caed8c33b0cdd64dde95, 0x798313e3dc622f0d42519135b7d2f30d2ed0a00cd7048368ee4ce78ecac3c52, 0x760bd9adbcde569a4e1ef9edd51cf1538101c01543b9201431f92e0c9a46cbfb, 0xa2f7dae3659497d957cc4ddaeae7d3f7090e9b6f3b3d3d730ba5e2d19a7f2314, 0x2880bc49aa2d2f202d6b86413a89ca9c00558e8ab167e18a83f6a09d702d1ab
Dag Merkle Root: 0x003c39872c72a19c32d103bf9415d824
Element Array: [0xfc5dd9b3571da554d2478b592c6944120d5bb02666f14ccfb81ee71ecf269dff, 0xc686b96362fad66ce3db639e8ce8d4c3f2b56eecd1ef14cdc4b9d792849aa3c0, 0xbc862f231753238d44bcdf64ed9688997a2824d21dd8299810ece25e2627d14d, 0xa843ad4b9a83f014cdcae3f36c46782a066cf7f2206f878ade7e5fef1af6f456, 0x8541f0507e964c9a34e6703105e3fb4955d50ad99ba1d91d1310960c5ca7d987, 0x318d23ba88b89072aa137ce181f1ee5d8d610c532f189a9c74ef32baf7c466a7, 0x252970050bda90a912e3df36226480ed71b3af293318377a698d7a8eeca85303, 0xd71c027146e978229d9bdec9ac1bf0503c89e124c87799c8d5eea87e38a2504f, 0xd7ea07316f9eaded67a74925adb566c43146f7b3266113e777d197bbadbe31b1, 0xff8dd190b4239537a62bcf770e78fc11527691daa0f5a2d365182c7fb141ae35, 0x1db21b608c61ab61b1fca8a20b253bde3c0d0de8fe85c8e9ef742d102493cb7b, 0x583df7ace67747128558caff10d6149606a2d48ee533385db2ba410e6da0c0e7, 0xe5f73277dc4c8eecf24f38e5feb5bcc0865bbe493f0410d50481910aee71b9d7, 0x66e5a28f5ca573d2c343181e92e7ca14243679815893f7a9af4c05e68228a08, 0x51a
epoch_params = [0xf34cafdb92d8626451414882183e1211, 8388593, 23, 0]
submit_claim_params = [5, 924407, 0x5831e1ad29e75d0382985481, 0x5831e1cd07e65601bb2bbf72, 0x46869688457554671ae9899c842ff903]
cache_elements = [0x9dbff2a429fe867b9028e67bfe5ed38f69250831cf803b97c8f7760759e31ab9, 0xb16190485b9f353d05b54faf8130a37c661880fde6af69583b42b446e4340446, 0x1749ef468e4bb2f6b8a96c874d130ca7cdf81a4a3448a05bae003e0f19c990a4, 0xac65ddbdd68cb5125f299f8eb2ed94e50d5ee2bb652f9820a28ee87b8b67a0cb, 0xfd83b354ed59e120df5e8bc90146e7c8b11f0c05ccbffdf74ad82f4c38635b2c, 0xe4557dc8915b022e153f367d9636d94036201de3781278cce3a0add2fb8452df, 0x41d73008d0b111d8216a1bea116bf4e129fea422ba7ef00f3d4c0a0774bdf8fb, 0x2a4d63b7cd300e07cdc3eb11db32cafe453b8291a668673733b9d55922fa963a, 0x53baf109823191b220f48123acb432ae8677fde40d66a1218e0f4c24cc87a883, 0x15a7a57a1ccd8f1ba83c8c58d890c92b8c11fb5f682a30f2bc97e4e81283a2fc, 0x246501ff0cf811b21a265eb3db20844d005e54a86124a48fa274a721a85aa89, 0xf7d7567c44fd7b73c374974a9a04f2574c54e8ab7628a8411615e21af85cc9d