Commit Graph

115 Commits

Author SHA1 Message Date
Terence Tsao
72c03348b6 sharding/contracts: constant variable for challenge period
Former-commit-id: 6c54cefc17c1855b3fde65de940ab0ae5db072f1 [formerly 70a7100e04ffe3b3d7b558ee05ae4a97fe16403e]
Former-commit-id: e5b1d3cc70144cc2fef69ce26b1be89d1721dd7c
2018-06-09 07:50:23 -07:00
Terence Tsao
bac0c74b6b sharding/contracts: hash digest instead of byte array
Former-commit-id: e6d1149f737e0c21b8ef45712c30265ee699ec96 [formerly 72863268f45b7ca71d9990422cc3bd5b0a75b24d]
Former-commit-id: 9059a3971e64abda1939a5aaa6fee8b2e8e7e605
2018-05-25 10:20:51 -07:00
Terence Tsao
fd2124d6c0 sharding/contracts: comment for comparison
Former-commit-id: f1d5319758ab85bd5cfe63a66e0e8b960bab56a4 [formerly 4b80f9ccb7ce74b702774fc40af2e8cdf35ebb04]
Former-commit-id: fe5be3e1449f47bd73b50ea7db2418ec1dd1b16a
2018-05-22 21:20:56 -07:00
Terence Tsao
3a39e4a58a sharding/contracts: tests for event logs
Former-commit-id: 22adee68bad19ba219792eb4f7e91b89999979f7 [formerly 632857d61c53191ea4cc54a25706a4b2b14da39a]
Former-commit-id: 17bcf754eb5a14aeaa16407e8c1c0d90579cc209
2018-05-22 20:36:38 -07:00
Terence Tsao
a3dbac8ea7 sharding/contracts: add contracts.go back
Former-commit-id: 4da29790ac8bc3ece02c9ccc8e1eb969d037f54d [formerly 801a5d57e75c0d9ad51fa68bbbf155bb66757e89]
Former-commit-id: cc4e984d4b00ebef2b34562807871249ae843164
2018-05-21 08:38:04 -07:00
Terence Tsao
1541112f88 sharding/contracts: fixed goimports issue
Former-commit-id: d09d2fd7c683171c46bd54a83ff08e2277826efc [formerly e851930ca3631e33aa34dd0167f4f54f0d3b15aa]
Former-commit-id: 3c708bdf931f571db7c6bd8048baf40e9371f215
2018-05-19 15:27:29 -07:00
Terence Tsao
dee0ce608b sharding/contracts: only use t.Fatalf when necessary
Former-commit-id: 89075b65c022d6e8fd5c6ed17fc097fa745f4262 [formerly d5b8e5c32cc4ae4df014236693af05992482f903]
Former-commit-id: 1c60e10116a6900a7d010b17b201654e30a26c45
2018-05-19 15:10:02 -07:00
Terence Tsao
d5390fe6f5 sharding/contracts: optimize fastForward function
Former-commit-id: 932d6c2fb9f32160216b11e7ab46a41758be4d20 [formerly 388fe2ce8a060a4a36c97450c94d339f4e041aa9]
Former-commit-id: 0a08ba7d76cb526ae5d2e825ccf58b03b1582ea1
2018-05-19 12:24:42 -07:00
Terence Tsao
bbfdff510c sharding/contracts: merge with remote
Former-commit-id: 0cd088c968a4d3cb2732f4fae58369c970cd803b [formerly e03c58b8caeb564d3e76c06ab5bbc7bbaa1cac0f]
Former-commit-id: bdf2a7de17f155a5613f72a895016459688885c6
2018-05-19 12:19:09 -07:00
Terence Tsao
3440e77c46 sharding/contracts: refactor t, smc, backend into helper struct, better err return
Former-commit-id: 6ce788486f30198e493f57608a8e86b171d0bdda [formerly 9f92d0788669dfc49752e5e6fb19e86c18679864]
Former-commit-id: bf57b0660d1ab50624d45dc00555c3bd79d76c4f
2018-05-19 12:16:07 -07:00
Terence Tsao
7d4f29fd97 sharding/contracts: refactor check notary pool size
Former-commit-id: 161b00853b46eedef332676b89192c1f1082a5e3 [formerly 0e2da9ddc495704b954fa322b2cd40fb5018721b]
Former-commit-id: e79c519edfb5aebd433f364fdf2650ef5709681b
2018-05-18 10:09:22 -07:00
Terence Tsao
f2d194c09d sharding/contracts: refactor fast forward period
Former-commit-id: 01685f9671ed75a59800abedfb0a6c1172665415 [formerly 025eec8565c1506244612306f89e82817e760c75]
Former-commit-id: d62d86e65ccf866145e0008a6b8664a95a0b2b92
2018-05-17 15:22:14 -07:00
Terence Tsao
31f97c3e3e sharding/contracts: refactor deregister notary
Former-commit-id: f39b0c00fd298402cd9dff34a090252e0f2267fb [formerly ced6e24d9e9633dd4efc5e80ab53892f29451ea3]
Former-commit-id: 31d5143f3ef45a0ef62704c10205637ea0e30863
2018-05-17 14:21:13 -07:00
Terence Tsao
b36de30334 sharding/contracts: clean up
Former-commit-id: 3f42edb35e132531dc784846add3eb760f7fef3d [formerly 52d0ffcfac31d95aecc80ac94ff5d9fb2ccdfb68]
Former-commit-id: 4e868f4bf6399ea2b6185eb90adedd1e757d5c5f
2018-05-17 10:30:46 -07:00
Terence Tsao
ab04043fcb sharding/contracts: refactor notary vote
Former-commit-id: 3ed2a6b8b4468ac510d8acc28709dea7b26f3782 [formerly 58f86366d87ffc35d815292026bce9da4333cef8]
Former-commit-id: 66cf2af06796cb7a0ac2727dda1e7b62eef1a7c0
2018-05-17 10:20:17 -07:00
Terence Tsao
3920a856ae sharding/contracts: refactor propose adder
Former-commit-id: 9fad2c26d53f1562d26dcb1cf290233b14efa630 [formerly 43bce675dd752b1995b66a6ac7c5eccc20c03a32]
Former-commit-id: e77d06c2dd2bb8e20ab2c13b512574e8ade75e0d
2018-05-17 09:26:17 -07:00
Terence Tsao
6fc39469c1 sharding/contracts: refactor registering notaries
Former-commit-id: 3af06083dfd6f4ce067a8b0ce7eeaf2251fe29a6 [formerly d723f0b6370970a6160a63d88a07cb4ffcd4cd01]
Former-commit-id: 5619e9ac3fabfd00bce00d73d2e031f341f823f3
2018-05-17 08:17:26 -07:00
Terence Tsao
4e28d7c370 sharding/contracts: refactor initializing account
Former-commit-id: 07ac4c0d96835fa80191abbe853f7faaff8f6ec4 [formerly 7ef7bea8c9f095a6d0414a603dc5f9ffa02fe9b2]
Former-commit-id: a72da4966fc17c6b822e6ee0942716698d1dd3ac
2018-05-16 22:42:29 -07:00
Raul Jordan
dfaf005229 sharding: address linter errors
Former-commit-id: 70fee9bf5816e9520fb927b84ab8b93d83014869 [formerly 523192e37e40878079d7981bd28ed25f618ab0a6]
Former-commit-id: 604f33826c63ff42dd90d75bb517ed09f5d52b6a
2018-05-16 17:06:35 -04:00
Terence Tsao
89dedc3184 sharding/contract: merge with master
Former-commit-id: 9f271cd21ed6c7c5b3b04a9db7118d2a75f61d34 [formerly 2dc1d365b337c98aa543b6d6e8b54bf0b92d48c1]
Former-commit-id: ebaf4132fbbd00b027dacd4b9e38f2f765274b70
2018-05-15 11:22:38 -07:00
Terence Tsao
56e90be294 sharding/contract: add balance to notary struct
Former-commit-id: 81d73e4fe4675b370160bd7b391dfe6fed17aaab [formerly 734e43220a976da1a88e4d19b2ec42f77020e351]
Former-commit-id: a78e3fd7b345e8f032adc03aa567250b99c2aa1e
2018-05-15 09:05:01 -07:00
Terence Tsao
248f245f9f sharding/contracts: added regression test
Former-commit-id: 01dbc764a0a616d1ed4c21232d5fc886052c3c74 [formerly 5509cecf26e39948254f55d2d2cca820d3ed5b1b]
Former-commit-id: 3830de45de328b24d3d2c81559fac3a1e9d0a76a
2018-05-13 11:28:23 -07:00
Terence Tsao
c545df41be sharding/contracts: fixed getNotaryInCommittee not fetching latest notary sample size
Former-commit-id: 0591d5c65d5e8b165f9ca442391e5af0644b3e4d [formerly ae1d540ca879d6a72032462b880892c7dcdec179]
Former-commit-id: bd310578fb6afafab3f9485e70be1dacdfcf3f1b
2018-05-13 10:13:25 -07:00
Terence Tsao
0d73429252 sharding: reuse notaryCount
Former-commit-id: 46d9a0084896bd36375b756d1a778da28b838283 [formerly f97fdf445e13b5bc1d8efff79d7c42d76df360f6]
Former-commit-id: 4e627a869e3cea4894f4a5520280fae4d11ab3e9
2018-05-09 20:30:13 -07:00
Terence Tsao
a083a59f34 sharding: punctuated all comments
Former-commit-id: 024ae32926514787aa79b9adabb75bac8093cca2 [formerly ec5e6212b34ddff25f564f4cadd8a4ffae027a22]
Former-commit-id: 215ec3ed3cddd2c624cb5a7068b004e334ea83c2
2018-05-09 19:15:29 -07:00
Terence Tsao
37889c476a sharding: fixed lint
Former-commit-id: 413ad02b5004698771b67dfea296f1252b29c2e3 [formerly 978dcf9bbac9aabfb1decf48e5dd9af1c5b13ade]
Former-commit-id: 99c1b8b1a8dc308ebd834f18f04ea88861d8d17f
2018-05-09 12:02:45 -07:00
Terence Tsao
8b5cafd7a6 sharding: merge with master
Former-commit-id: eafe01eb22f8e478dacb6b07a17feeae4a7e0697 [formerly 2fe0af9b331c81eff468cb3adda6784af74d2a0f]
Former-commit-id: 93720d0e2f005bf1edfb141ffbf3e735fcbca7df
2018-05-09 11:56:59 -07:00
Terence Tsao
ff71722488 sharding: tests for submitVote
Former-commit-id: 1366e3a2ce8443fcca97b3a3dca97d2ae2173a1c [formerly f90336cfa8a389a4e2e7a64d5051fa809fe6b415]
Former-commit-id: 5da8b6d82156acf78618f15b45e8b0e0323c962a
2018-05-09 11:53:55 -07:00
Terence Tsao
9dbf1936b4 sharding: added submitVote test
Former-commit-id: 969f64168aea10d5b812919bf5a3d4f534a90922 [formerly 03a49e09f1ffbfe52858d89ddcbbac34f848ba19]
Former-commit-id: f1f57db412f0ae9bc22c31a5aabd5f4e4df3491c
2018-05-08 17:55:50 -07:00
Terence Tsao
6fb4d23c5d sharding: addressed SMC review feedback, refactored bitwise ops to be more readable
Former-commit-id: 55f263bd66cc76f14aba0862670a7189cc53153f [formerly bbef8789c0cb4155185f09de12388dd05f60d3c7]
Former-commit-id: 365d81184578e1d6bf55ec24d01d3c1b91348173
2018-05-08 14:55:18 -07:00
Raul Jordan
b6ec6d8b23 sharding: update comments across packages for punctuation
Former-commit-id: ab617ef43f369476a4ca863e9ab6f732cec9ed7e [formerly 221795c5c6f43cf0550cdf9ba37345e09e91f47d]
Former-commit-id: 6462269b88180c6f09dc3c633e4104c3cf8efb4d
2018-05-02 20:16:07 -05:00
Terence Tsao
c163c9618b sharding: finished add_header test cases, fixed linting
Former-commit-id: 3e1166190c9d244b3a11be98c762a964a828ded2 [formerly 813229ff3719a04e606f7999f61135c944b67b3c]
Former-commit-id: b91db465aa3e9bd221aae5bb17165bbe45a9be9d
2018-05-02 13:00:12 -07:00
Terence Tsao
6dd7261bd1 sharding: test for adding header at the wrong period
Former-commit-id: af8d4bebd7d9d9478d543482a43f450444893b50 [formerly 4913424a3a91032b3fee76ccd805c3b6a8926271]
Former-commit-id: a48c6f7a508549f89ec66a9bc8ba72ecac03e784
2018-05-02 12:29:08 -07:00
Terence Tsao
ea13800459 sharding: test for adding multiple headers within same period
Former-commit-id: fc458cbf2960c15c0fa689b22b03614578ab8be3 [formerly 715efa2aeaf765dcab6fc87e1c3da729f2447f8a]
Former-commit-id: 420db139f99b7cb667ea3d5113d36037a88e0904
2018-05-02 11:50:31 -07:00
Terence Tsao
48a6306127 sharding: test for add_header with normal usage
Former-commit-id: 63f6cf891ff13d1ea88126793ad73e0ef458ef6c [formerly 16966f2d6e2054b432852e46758c12a06108e6e3]
Former-commit-id: 7d6ff2b31b31f59c171552043b6bb181dec0eaa7
2018-05-01 21:33:40 -07:00
Terence Tsao
3b7c5bf64c sharding: notary casts votes
Former-commit-id: 8c0007eaf2de0d36c69ea346f85234dee6af89ee [formerly c9ed2d6063398edf0734a6d48a6cc88b6afd637b]
Former-commit-id: f508bacaab3632fa4d3d05c26eea3c6b155c2ab1
2018-04-30 17:31:44 -07:00
Terence Tsao
668bbc7478 sharding: check bit in bytes for notary votes
Former-commit-id: 4c38295fbf89008dda9c43ee6a60472e15726064 [formerly b6594988cb3353751f09ac69863813ca106467df]
Former-commit-id: d2196e99231a1cb0f43d0f5380bb2fdc645a8949
2018-04-29 16:31:30 -07:00
Terence Tsao
3bc4acd4e3 sharding: finished addHeader, started submitVote
Former-commit-id: ed38e8621204fa276328cfe8dfbf989294a28519 [formerly 10bbd9cc3990c0922e73eeba138bab7d016e9fde]
Former-commit-id: 8d0d2407ab547a8f5e2022d85361dd74d3328da9
2018-04-28 14:55:27 -07:00
Terence Tsao
8bed2909f1 sharding: initial commit for add header in SMC
Former-commit-id: 71e0b082ddca84797d04ffd07a2904eef013a7fc [formerly c9e0bf0453a0c60b3f327731bd58ef62a7cd5915]
Former-commit-id: f07a9c7590d715abc41f0c2fdb64c46e553af0b4
2018-04-28 10:11:42 -07:00
Terence Tsao
84389b219b sharding: fixed return bool for functions in sol
Former-commit-id: 33624e189e073aa862f2e33f8fd5ebea919d6368 [formerly c7c40d11c99abd923eeee641866e73ea26d7ca13]
Former-commit-id: 7d307bc09f0f46d31be20560879954eb8b2a9215
2018-04-27 16:38:24 -07:00
Terence Tsao
150f0ae58d sharding: latest round of feedback
Former-commit-id: e37429c965bb98a0155f85351f76e0db2d0e2a07 [formerly 1d3ad1e172e1d0a80c66a2bd44a8fac7414d439a]
Former-commit-id: addf37b75b2c9952da0274bbb57df27b096455fb
2018-04-24 21:55:32 -07:00
Terence Tsao
4e45d1882c sharding: fixed lint
Former-commit-id: cecf8e888992de3583c222e98f1e3e4c26c48924 [formerly 67381715d66b4a512d9e884a257ab0609fd81d33]
Former-commit-id: 66fa59bb52e8343843f10247d668e2b3fe8c892f
2018-04-24 11:22:55 -07:00
Terence Tsao
b923b9e101 sharding: feedback changes
Former-commit-id: 3251e6a3a13984b154dfb82ffae68ec214177829 [formerly 0bc330ae3445a0d88d014afa412dd4e21bdb5208]
Former-commit-id: 3c3938127ccc1f56ced09496038fa0d72ed32ae7
2018-04-24 08:47:08 -07:00
Terence Tsao
f32a80a911 sharding: added tests for sampling committees
Former-commit-id: abdaf09b36f79ea6dc90d2a1d6390b20fb1f2420 [formerly cd0aac8794f2c51e19bd839c0c04bdf4103731a4]
Former-commit-id: 9a53826157411039ec2fad9adefd8623147b6725
2018-04-23 22:02:37 -07:00
Terence Tsao
eb3f491cf8 sharding: added notary tests for degistration and release
Former-commit-id: 2c76a184836468e95f5893fcd736420e89769e37 [formerly 01c871c359c0cf74866c9c5738f1574d89610c9c]
Former-commit-id: 49a841231ed673421fca98d9bb54876b1e271ce0
2018-04-23 16:18:07 -07:00
Terence Tsao
8a10e4efa2 sharding: added test cases for registering notary
Former-commit-id: dad6acfd8273a5fce14a635999c145776727a50b [formerly 3d88c2eca4e930e07d76c2d28b2122408eb9b734]
Former-commit-id: ea652d4701ba898e007604d9c1e1ae6c94949072
2018-04-21 16:57:13 -07:00
Terence Tsao
0d9523dcd4 sharding: fixed notary sample function
Former-commit-id: 608025faad454e517fd144759886e04113805907 [formerly 5b753cdef5fc3f4f4f585e972ba624a42d21c672]
Former-commit-id: 8125d538d91209971860ed637b456ff07dff8151
2018-04-20 16:14:16 -07:00
Terence Tsao
b54a20281e sharding: fixed notary tests
Former-commit-id: 9ba590940143b0de2068c8dfe4233d221d8148dc [formerly b6cefd256e5f0d2db0f8284932ada4a5e4804212]
Former-commit-id: 4aa404a5fd760990ecc4414360e7b02c068a882a
2018-04-20 15:08:52 -07:00
Terence Tsao
d45e45f543 sharding: functions descriptions
Former-commit-id: ea79f98f18b2f001c8b0c9579926d7c2de4e45c8 [formerly 2bafc5faedc0dba69799629bd55d17683e06a583]
Former-commit-id: 609f9f31e1b6cebb515300f5c8672c15ae2003c1
2018-04-19 23:41:52 -07:00
Terence Tsao
9d2be9f867 sharding: fixed lint messages
Former-commit-id: a79631df65076e8ffd6ab2cd6265a1411456356f [formerly 5f02c7f2b7f50b230e9a434a50d2d569770806ab]
Former-commit-id: 2fd87aa767d8efbefdf54cdc08f49cbea0dd5b6f
2018-04-19 16:47:38 -07:00