Skip to content

Instantly share code, notes, and snippets.

View sourabhniyogi's full-sized avatar

Sourabh Niyogi sourabhniyogi

View GitHub Profile
INFO [08-01|12:34:44.895] SINGLE ACCUMULATE s=0 wrangledResults='{"H":"0xf14c03db6ded1da69aedde1d441c057b09a757506157746033a5514c11b7b51b","E":"0x0000000000000000000000000000000000000000000000000000000000000000","A":"0x5bb6b19a5b7cb6ef4cedf210685daac229da3b06949a0f1415921e7032372e6d","Y":"0xc691f578054d7cc5714fae4d6a2c30552da009303d436a2ec7da4d1572b513b4","G":10000000,"D":"0x002a0106c7db27778fd16f96056dcc6844a36f98479d7701d80788a3fcdf16248fc496ac2400000000000000","O":"0x417574683d3c3e"}'
*** jump 57561
accumulate: JUMP step: 0 pc: 57561 gas:9999999 Registers:[4294901760 4278059008 0 0 0 0 0 4278124544 3 0 0 0 0]
TRACE polkavm::interpreter sp = 0xfefdffc0
accumulate: ADD_IMM_64 step: 1 pc: 57564 gas:9999992 Registers:[4294901760 4278058944 0 0 0 0 0 4278124544 3 0 0 0 0]
TRACE polkavm::interpreter u64 [0xfefdfff8] = ra = 0xffff0000
accumulate: STORE_IND_U64 step: 2 pc: 57567 gas:9999992 Registers:[4294901760 4278058944 0 0 0 0 0 4278124544 3 0 0 0 0
INFO [08-01|12:35:14.318] SINGLE ACCUMULATE s=0 wrangledResults='{"H":"0x520dd9959393522cb6b6fd9ca02c845c22792e91a593c2a6adf53c1df635543b","E":"0x0000000000000000000000000000000000000000000000000000000000000000","A":"0x5bb6b19a5b7cb6ef4cedf210685daac229da3b06949a0f1415921e7032372e6d","Y":"0xf9465651a5d69817b50ab4ac9a1b74570fe127798b240ea49292ab4b8f86ea06","G":10000000,"D":"0x008124011600095251fc63d6ad1a0cd5d52734c02ba70f317dfcb2d63614c12835d07aa8f15f40333adc619129bd8cdae03b04e7072c5560ab519beba06397e8f62890fae2083d13717d587c3a156efb6892b22c32efe6569032143bf8456744734672d84df15f65baa30419b56fc73ae6454529dfeb3038af8ac5ce2a57305d85db4dbf049b940b53eec90039290096fa08f2b29f79e87a25642af1e5754a7b44f199fc71b2c78c43116e5b7e54db30357a79509b933e70dd36453c23921b2e52e81c3bdf5a8bd5a55e3886abd544b9c20b259c10394821b577ecd1c917b323f5916e1b04b3387cec52460716ad13c562e01721f90b1dfd924367b268dce62a093c640eca1c53952949d0587e7f263f5afb8eaa4bdd689e79a37fff5c505b69ad0fc12b84ff8b","O":"0x417574683d3c3e"}'
INFO [
{"pre_state":{"state_root":"0x6f2da6eb06a46a826b79910b5e00c2e043e8ef5edf573a9e9b55774f92599eb2","keyvals":[{"key":"0x001900f8002e006b716065de2af70248e37524d95427d71342ee67cadb903f","value":"0x09626f6f74737472617042010008000011000000016e756c6c5f617574686f72697a6572206761732063616c6c20206761735f726573756c743a2000000000010000000000190000000000000019000100000000000d000000000000001e0000000000000018000000000000000800000000000000200000000000000026000000000000002e00000000000000307830303031303230333034303530363037303830393130313131323133313431353136313731383139323032313232323332343235323632373238323933303331333233333334333533363337333833393430343134323433343434353436343734383439353035313532353335343535353635373538353936303631363236333634363536363637363836393730373137323733373437353736373737383739383038313832383338343835383638373838383939303931393239333934393539363937393839394b598638d6c56d34a711000027028f680d00c600d1007d01ff02170386039e0310042804c9046b058f0661078507bb07e5070a0811083b08f10817091e09d309f60ab90b0d0c2e0c71
(base) root@jamops:~/go/src/github.com/colorfulnotion/jam/node# make fib
Running TestFib with targetN=10 and timeout 400h...
go test -timeout 400h -v -run '^TestFib$' -tags "network_test,tiny" -targetN=10 -jce_manual=true -jam_node=true -jam_local_client=false
=== RUN TestFib
jamtest: fib-node
INFO [06-12|04:42:40.922] NewNode [N0] spec=jamduna addr=0.0.0.0:40000 dataDir=/tmp/root/jam/1749703360_e0d09245a81a1ba3/node0
[N0] addr=0.0.0.0:40000, dataDir=/tmp/root/jam/1749703360_e0d09245a81a1ba3/node0
INFO [06-12|04:42:40.946] GetFinalizedBlock block_hash=0xdc6c0067138a71b327821a24100bea03553a4bca2e5cdf1bec9fa3677e85f8cf
[N0] running on buildV: 898af04e
INFO [06-12|04:42:40.946] ALPN configuration genesis_hash=0xdc6c0067138a71b327821a24100bea03553a4bca2e5cdf1bec9fa3677e85f8cf alpn=jamnp-s/0/dc6c0067 alpn_builder=jamnp-s/0/dc6c0067/builder
% go test -run=TestStateTransitionSingle | more
s=0, codeHash=0x395be3f4f9749460400badafee623f5b5f9ecab34f4f65483c62e62eab147281 code[0:10]=0x5000156a616d2d626f6f len(code)=126227
Metadata length: 80, Code length: 126146
DecodeProgram o_size: 29128, w_size: 68, z_val: 0, s_val: 8192
JSize=1362 Z=3 CSize=82527 Code[0:10]=0x2843690000287f760000
Copied argument_data_a 0x030001b4a436db1f8c41cb819a62f365686ff07c958bda767e9fe2dc4b6d3893a865ea000000000000000000000000000000000000000000000000000000000000000017a00e9e63faebe104af3090ac1de4468598d56ccf3c7a210931782b1c5c17cc07417574683d3c3e4bc66a5860b430684be2787ab3c24395b5d7f70dab619ea5497e39374b316ad4e08096980080a401160005bfa726c3c149165b108e6ff550cb1a1c4f0fdc2e9f26a9a16f48babe73b600cebb30a42c1e62f0afda5f0a4e8a562f7a13a24cea00ee81917b86b89e801314aaee155ace9c40292074cb6aff8c9ccdd273c81648ff1149ef36bcea6ebb8a3e2503170a2e7597b7b7e3d84c05391d139a62b157e78786d8c082f29dcf4c111314f5c890541793f37bfeefc6edfa38412de005f5ac94f0f1ebfb8b55df20e6f654 (len 310) to RAM at address feff0
This file has been truncated, but you can view the full file.
instruction=40 pc=30340 g=9999999 Registers=[4294901760 4278059008 0 0 0 0 0 4278124544 187 0 0 0 0]
instruction=149 pc=30343 g=9999998 Registers=[4294901760 4278058904 0 0 0 0 0 4278124544 187 0 0 0 0]
instruction=123 pc=30346 g=9999997 Registers=[4294901760 4278058904 0 0 0 0 0 4278124544 187 0 0 0 0]
instruction=131 pc=30348 g=9999996 Registers=[4294901760 4278058904 0 0 0 0 0 4278124544 187 0 18446744073692708864 0 0]
instruction=131 pc=30350 g=9999995 Registers=[4294901760 4278058904 0 0 0 0 0 4278124544 187 187 18446744073692708864 0 0]
instruction=149 pc=30353 g=9999994 Registers=[4294901760 4278058904 0 0 0 0 0 4278058928 187 187 18446744073692708864 0 0]
instruction=100 pc=30355 g=9999993 Registers=[4294901760 4278058904 0 0 0 0 0 4278058928 18446744073692708864 187 18446744073692708864 0 0]
instruction=80 pc=39231 g=9999992 Registers=[982 4278058904 0 0 0 0 0 4278058928 18446744073692708864 187 18446744073692708864 0 0]
instruction=149 pc=39234 g=9999991 Registers=[982 4278058800 0 0 0 0 0 427805892
First WP exports exactly this 4104-byte segment
https://github.com/davxy/jam-test-vectors/blob/erasure_coding/erasure_conding/test_segment_shards_tiny.json#L2
and we confirmed that the CE137 exportedShards have exactly the shardIndex => exportedShards
0: eb390c02e701e9c3584bfc5ce48c64fc804526778fe6fc3e51850fcd9db19512d5395a6402a72fac3c169ff9bae6826eedc2c94dc99ab7ec60e5fb8000030fd54cfe3d9c29efc766aad3d3781ecc9c7ed0616c799fb2eccee0ee1897c971a386f51dd3c70e0ebcc30511112c7d6a008a6463c8a1bb7ee86e683787cbfac83a4516cb4417e3e02104e1e5a2e81c252b95ee5125f0f1a7cafc315013526c1e01dd1f8493dfac8364bb60d984d76e59a0c2227b128050722535e9fda3ff313e447cfe1132245848b436f7863e6520e9c7909d5f1d2bac4918ec2667931ad29552eccca417f9eb2882d42c695374d27216eb40f32965671e528843a064cd2ff1c5520725cf2e57076b9117fafc8ba832c7f887368e03b6506bcf1caa99b39baab9315419e1025c74f444548815896a5f76055f8757d9ca964609e50e8de160bedc67aa69d7895c8b8daf8c9f9657851ef07f02d2fea5bd8c94fb74e0c4115c60829d018a8b445b3f0d12622bea132655ff59b7bd652e26bac52f1f4fcc2dd6507c75
✅ [../jamtestvectors/traces/reports-l1/00000001.json] PostState.StateRoot 0x761a6f96786c9b48137265dfeb6b17178e99d28be19907a17821a3fe10c3c026 matches
✅ [../jamtestvectors/traces/reports-l1/00000002.json] PostState.StateRoot 0x9804f5145b42ce14776147cbf318174b4398d8238a2d3f7be621134787ddeacc matches
INFO [06-04|03:33:31.983] Bootstrap Service Accumulate, 0h @3 $18446744073709551615
INFO [06-04|03:33:31.983] Solicited 0x69b0929b9d970f00... of length 10
INFO [06-04|03:33:31.984] Solicited 0x63f4381fd7822e8e... of length 74
INFO [06-04|03:33:31.984] Solicited 0x8873a33208bd1726... of length 94
INFO [06-04|03:33:31.985] Solicited 0xa99bfef462fc9c4f... of length 54
INFO [06-04|03:33:31.986] Solicited 0xd260bf00852ec054... of length 66
✅ [../jamtestvectors/traces/reports-l1/00000003.json] PostState.StateRoot 0x7ad05a024482c372bffa43d0761802bcf968ad2c4ec0e2eaca3a37dda1f11785 matches
✅ [../jamtestvectors/traces/reports-l1/00000004.json] PostState.StateRoot 0x0ff9b455b822d0ee6ac4376d0fc0d37220d8cef106d717c637bc2a09200eb0
sourabhniyogi@Sourabhs-MBP jam % make run_1
Running JAM DUNA node with the following flags:
dataPath: /Users/sourabhniyogi/.jamduna, Port: 40000, RPCPort: 19805, validatorIndex: 5, network: tiny, chainSpec: chainspecs/jamduna-spec.json, logLevel: trace, start_time:
Read spec chainspecs/jamduna-spec.json...
validatorIndex 5 out of 6 peers
Port from chainSpec: 40005
INFO [06-02|06:12:41.915] NewNode [N5] spec=jamduna addr=0.0.0.0:40005 dataDir=/Users/sourabhniyogi/.jamduna/jam-5
[N5] addr=0.0.0.0:40005, dataDir=/Users/sourabhniyogi/.jamduna/jam-5
INFO [06-02|06:12:42.043] GetFinalizedBlock block_hash=0xdc6c0067138a71b327821a24100bea03553a4bca2e5cdf1bec9fa3677e85f8cf
[N5] running on buildV: 05a4f7a8
#![no_std]
#![no_main]
extern crate alloc;
const SIZE0 : usize = 4*1024*1024; // GP stack
// allocate memory for stack
use polkavm_derive::min_stack_size;
min_stack_size!(SIZE0); // 2^24 - 1 - 4096, should not greater than 2^24 - 1 (16777215)