Skip to content

Instantly share code, notes, and snippets.

View sourabhniyogi's full-sized avatar

Sourabh Niyogi sourabhniyogi

View GitHub Profile
(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)
This file has been truncated, but you can view the full file.
🔍 Testing file: 4_004.json
---------------------------------
DEBUG[04-02|21:24:32.920] SINGLE ACCUMULATE s=1065941251 wrangledResults='{"H":"0x66036e9ff03719152f125a9669f832160d61e3d583385d3e53ffe2735a5f4d14","E":"0x4a01d004095c0328783e60f1a451198d22be1ac2b1de845b88cb1c782ef1b252","A":"0x0b27478648cd19b4f812f897a26976ecf312eac28508b4368d0c63ea949c7cb0","O":"","Y":"0x46090e1520f0664af9bfd333855c91ae7cffd628b1e7a580e93141725da9f4dc","D":"0x000c0a0000005900000037000000"}'
DEBUG[04-02|21:24:32.921] PVM Params OSIZE=4672 WSIZE=24 Z=2 S=40960 O="[140 0 255 255 164 0 255 255 182 0 255 255 200 0 255 255 224 0 255 255 248 0 255 255 14 1 255 255 26 1 255 255 38 1 255 255 56 1 255 255 0 16 0 0 0 0 0 0 252 255 255 255 255 255 255 255 250 255 255 255 255 255 255 255 101 120 112 117 110 103 101 32 0 0 0 0 0 0 0 0 255 255 255 255 255 255 255 255 32 111 117 116 112 117 116 61 247 255 255 255 255 255 255 255 122 61 32 115 61 32 111 95 98 121 116 101 115 95 97 100 100 114 1
🔍 Testing file: 1_005.json
---------------------------------
DEBUG[04-02|20:44:07.639] SINGLE ACCUMULATE s=0 wrangledResults='{"H":"0x3aaf70d3c62f815d100dd6c95185c9c124210ac96115680f0927dc694a367f6a","E":"0x0000000000000000000000000000000000000000000000000000000000000000","A":"0x0b27478648cd19b4f812f897a26976ecf312eac28508b4368d0c63ea949c7cb0","O":"","Y":"0x58895203656b4df71654f43d328d1cb3e10b2f5977f19cb65b84e308b43e8755","D":"0x0024aa125123e0373599cacc94075a0d7d365a6bd81a1e260c4dcabd837fe48ddafdf7050000"}'
DEBUG[04-02|20:44:07.639] PVM Params OSIZE=0 WSIZE=0 Z=2 S=8192 O=[] W=[] "Code and Jump Table size: %d\n"=1074
DEBUG[04-02|20:44:07.639] [N0] bootstrap 1: PC 5 JUMP g=9876 reg="[4294901760 4278059008 0 0 0 0 0 4278124544 176 0 0 0 0]"
DEBUG[04-02|20:44:07.639] [N0] bootstrap 2: PC 179 ADD_IMM_64 g=9876 reg="[4294901760 4278058832 0 0 0 0 0 4278124544 176 0 0 0 0]"
DEBUG[04-02|20:44:07.639] [N0] bootstrap 3: PC 183 STORE_IND_U64 g=987
{
"0": {
"peer_id": 0,
"peer_addr": "jam-0.jamduna.org:9900",
"validator": {
"bandersnatch": "0x5e465beb01dbafe160ce8216047f2155dd0569f058afd52dcea601025a8d161d",
"ed25519": "0x3b6a27bcceb6a42d62a3a8d02a6f0d73653215771de243a63ac048a18b59da29",
"bls": "0xb27150a1f1cd24bccc792ba7ba4220a1e8c36636e35a969d1d14b4c89bce7d1d463474fb186114a89dd70e88506fefc9830756c27a7845bec1cb6ee31e07211afd0dde34f0dc5d89231993cd323973faa23d84d521fd574e840b8617c75d1a1d0102aa3c71999137001a77464ced6bb2885c460be760c709009e26395716a52c8c52e6e23906a455b4264e7d0c75466e",
"metadata": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}