Skip to content

Conversation

@kunxian-xia
Copy link
Collaborator

@kunxian-xia kunxian-xia commented Sep 8, 2025

Summary

Sub tasks

@kunxian-xia kunxian-xia marked this pull request as draft September 8, 2025 13:51
@kunxian-xia kunxian-xia linked an issue Sep 9, 2025 that may be closed by this pull request
Copy link
Collaborator

@hero78119 hero78119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1st quick review pass, without reviewing global chip in detail

/// 2. The curve's order is a large prime number of 31x7 bits
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
pub struct SepticPoint<F> {
pub x: SepticExtension<F>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a tiny question: it seems SepticExtension extension field is also a field, so in future both could be define separately?, e.g.

pub struct SepticPoint<F, E<BaseField = F>> {
    pub x: E,
    pub y: E,
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this should work.

@kunxian-xia kunxian-xia marked this pull request as ready for review October 28, 2025 04:03
assert_eq!(xs.len(), 7);
assert_eq!(ys.len(), 7);
assert_eq!(slopes.len(), 7);
assert_eq!(final_sum.len(), 7 * 2);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicks: replace with SEPTIC_EXTENSION_DEGREE

.map(|i| cb.create_witin(|| format!("slope{}", i)))
.collect();
let addr = cb.create_witin(|| "addr");
let is_ram_register = cb.create_witin(|| "is_ram_register");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems there missing assert_bit on is_ram_register

1 - is_global_write.expr(),
local_clk.expr(),
)?;
// TODO: enforce shard = shard_id in the public values
Copy link
Collaborator

@hero78119 hero78119 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is api cb.query_shard_id() and we need below constrian

  • if is_global_write == 0, then assert_lt(global_clk, cb.query_shard_id())
  • if is_global_write == 1, then assert_eq(global_clk, cb.query_shard_id())

let addr = cb.create_witin(|| "addr");
let is_ram_register = cb.create_witin(|| "is_ram_register");
let value = UInt::new(|| "value", cb)?;
let shard = cb.create_witin(|| "shard");
Copy link
Collaborator

@hero78119 hero78119 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

follow comments here #1061 (comment)
we can remove shard and just keep global_clk

.collect_vec()
};
// build x[b,0], x[b,1], y[b,0], y[b,1]
let mut x0 = filter_bj(&xs, 0);
Copy link
Collaborator

@hero78119 hero78119 Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: will be nice to add TODO for define new api split_to_owned_even_odd in SmartSlice so we can use it like as_view_slice

];

let prime = E::BaseField::order().to_u64_digits()[0];
loop {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An improvement: we can do parallel search + find_any just like plonk3 grinding api

https://github.com/Plonky3/Plonky3/blob/658115aae28312e97cd3ef38d1ab046839f734a8/challenger/src/grinding_challenger.rs#L56-L62

@kunxian-xia
Copy link
Collaborator Author

kunxian-xia commented Oct 31, 2025

}
}

#[derive(Clone)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be left-over

kunxian-xia and others added 2 commits October 31, 2025 12:56
- simplify index computation of affine_add(left, right)
- allocate buffer once and parallel initialization
@kunxian-xia kunxian-xia mentioned this pull request Oct 31, 2025
2 tasks
kunxian-xia and others added 2 commits October 31, 2025 17:07
#1061 Cleanup

- [x] clippy fixes
- [x] remove old unused routines for generating witness for the ecc
summation tower tree. Note this approach is abandoned. We prefer to pack
$log_2(N)$ layers in one layer using the relation `p[1, b] =
ec_add(p[0,b], p[1,b])` (first proposed in Quark paper.
fix few issue reported in global chip integration test
@hero78119
Copy link
Collaborator

hero78119 commented Nov 3, 2025

Blocking issues

  • comment out goldilocks unittest/integration test in ci, as global chip not work on goldilocks for now @kunxian-xia

Later TODOs

# Summary

- [x] bump up `gkr-backend`.
- [x] The global chip does not support goldilocks field for now.
Therefore we need to disable `fibonacci + goldilocks` in the integration
tests.
@kunxian-xia kunxian-xia merged commit 7530159 into feat/multi_shard Nov 3, 2025
4 checks passed
@kunxian-xia kunxian-xia deleted the feat/septic_global_chip branch November 3, 2025 04:46
github-merge-queue bot pushed a commit that referenced this pull request Nov 6, 2025
To deal with > 1 shards and satisfy offline memory constrain
related to #1061, #1063, #699,
#698, #697, #696, #700

### change scope
- [x] separate mem bus to read/write 2 different map
- [x] add new public input 
- [x] integrate local init chip
- [x] integrate local final chip
- [x] shift opcode & mem record to shard ts
- [x] integrate mem bus chip
- [x] refactor mock prover mock proving

### benchmarks
bench on single chunk
with fibonacci on CPU: 5900XT 32 cores, 64GB RAM

| Benchmark | Median Time (s) | Median Change (%) |

|------------------------------|----------------|----------------------------------------|
| fibonacci_max_steps_1048576 | 2.8142 | +1.54% (Change within noise
threshold) |
| fibonacci_max_steps_2097152 | 4.9337 | +1.05% (Change within noise
threshold) |
| fibonacci_max_steps_4194304 | 9.1971 | -3.21% (Change within noise
threshold) |

which shows no performance impact

---------

Co-authored-by: xkx <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: split timestamp into shard, clk

3 participants